Skip to content

refactor: more baseline code between node and edge shader getters, and create common attach for the 2d/3d skeleton render layers#155

Merged
afonsobspinto merged 3 commits into
feature/edit-modefrom
refactor/skeleton-frontend-cont
May 11, 2026
Merged

refactor: more baseline code between node and edge shader getters, and create common attach for the 2d/3d skeleton render layers#155
afonsobspinto merged 3 commits into
feature/edit-modefrom
refactor/skeleton-frontend-cont

Conversation

@seankmartin
Copy link
Copy Markdown

Medium priority — done:

  • defineShaderBase() method extracted into RenderHelper (L806) — handles the shared error check, defineCommonShader,
    defineAttributeAccess, defineDynamicSegmentAppearance, and the pick uniforms (uPickInstanceStride, vPickID,
    vSegmentValue)
  • finalizeShaderBuilder() method extracted into RenderHelper (L832) — handles COLORMAPS, segment attr defines, user
    attr varying loop, setVertexMain, addControlsToBuilder, setFragmentMainFunction; the TODO about Uint32/Uint64 moved
    here as it's the right home
  • Both edgeShaderGetter and nodeShaderGetter defineShader callbacks now open with defineShaderBase and close with
    finalizeShaderBuilder, leaving only primitive-specific code between them
  • attachSpatiallyIndexedSkeletonLayer() free function extracted (L3170) — "2d" vs "3d" is the only argument that
    differs; both attach() methods now delegate in 2 lines

Low priority — done:

  • PackedSkeletonGeometry.lod field removed; SpatiallyIndexedSkeletonChunk.lod field and its assignment also removed
  • data: any → data: unknown in both updateMouseState methods (cast at the delegation site)
  • position → _position in both getValueAt methods
  • registerDisposer(base.redrawNeeded...) moved to immediately after registerDisposer(base) in the SliceView
    constructor, consistent with the Perspective constructor

@seankmartin seankmartin changed the title claude generated: experiment with medium+low prio remaining refactorings on skeleton layer claude generated: experiment with medium+low prio remaining refactorings on skeleton frontend May 8, 2026
@afonsobspinto afonsobspinto changed the base branch from refactor/skeleton-frontend to feature/edit-mode May 8, 2026 20:33
@seankmartin seankmartin changed the title claude generated: experiment with medium+low prio remaining refactorings on skeleton frontend refactor: more baseline code between node and edge shader getters, and create an attach for the 2d/3d skeleton render layers May 11, 2026
@seankmartin seankmartin changed the title refactor: more baseline code between node and edge shader getters, and create an attach for the 2d/3d skeleton render layers refactor: more baseline code between node and edge shader getters, and create common attach for the 2d/3d skeleton render layers May 11, 2026
@seankmartin seankmartin requested a review from afonsobspinto May 11, 2026 10:40
@afonsobspinto afonsobspinto merged commit 74e296e into feature/edit-mode May 11, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants