Repository navigation
V3: 3D Model layer (GLB, HDR studios, PBR, shadows, exact depth, Blender-style transforms) - #189
Merged
Merged
Conversation
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
…roup failures Media load callbacks now ignore replaced or removed passes and pending loads are cleared on disposal. Strict-mode pass failures are reported once at the originating pass instead of at every group boundary.
Publishing now drops every descendant of a hidden group and clears the parentId of any retained layer (the audio source) whose parent was removed, so the published scene passes hierarchy validation on reopen.
Cap the neighbor row and column search to two cells each side so the worst-case cellAt count per fragment is 25 instead of unbounded in the packed minimum-size, maximum-stroke configuration. Mirrored in the runtime package.
…e on buttons Clear the active paint layer when the layer stops being paintable (selection, mode, visibility or lock change) so Paint never resumes without Edit Paint. Only preventDefault on Space for non-interactive targets so focused buttons and links still activate.
Add Mask Feather parameter definition for brush masks so the timeline shows the user-facing label. Update the manual QA Limits paragraph to match the Feather and keyframe contract.
…, hex and frosted
Derive output alpha from the red, green and blue samples so displaced fringes survive at transparent edges. Skip the blur pyramid when distance and frost are both zero, in the app and runtime copies.
…est, video benchmark - Image background keeps the input alpha instead of forcing opaque (editor and runtime passes) - Duplication check edits the real mode param and asserts both layers - Add a --dots scenario set (graph, blobs, plexus) to the effect video benchmark
…trols Mesh drift is scaled to keep each point inside its cell, and each quad splits along whichever diagonal is interior. Dot and link controls that Mesh ignores are hidden, via a new oneOf visibility condition.
… style paper, duplicate test - Un-premultiply ink color in transparent-paper output so alpha coverage is not applied twice (app and SDK pass) - Show Angle for hatch and squiggle (new oneOf visibility condition); show Cross Angle only in hatch - Plotter styles also set paper to color - Duplication test now edits the real mode param and checks both layers
- Scale transparent-paper toner by input alpha so empty pixels stay clear - Mix Amount in premultiplied space so partial amounts do not darken toner - Skip the blur pyramid when Amount is zero - Update a real parameter in the duplicate-independence check - Mirror the pass changes into the React runtime
…ate test Seed small shapes at their top-left tip so Cut Line and Cloud style them. Raise the flood reach cap to 4096 so distant rings survive. Let Scalloped draw inside for negative offsets. Make the duplicate-independence check update a real parameter.
…terials, shadows, exact depth and Blender-style transforms A new 3D Model source layer renders a .glb (or self-contained .gltf) into its own HalfFloat MSAA target and composites it as a source over the layers below. Draco, meshopt and KTX2 decoders are served from public/three. The model is fitted to a tight vertex sphere with a margin; focal length changes perspective without changing size. Lighting: five CC0 Poly Haven studios or a custom .hdr, each normalized to the same mean irradiance so switching studios keeps the exposure. The environment goes through one persistent pmremTexture node set as scene.environmentNode, because r183 bakes the environment texture node into compiled materials and swapping scene.environment left them sampling the disposed PMREM. A camera-relative key light casts PCF soft shadows onto an invisible floor, and a blurred height pass under the model draws the contact shadow. Tone mapping runs in the composite (Neutral by default). Materials: the file's PBR materials or Chrome, Brushed Metal, Glass, Clay, Rubber and Iridescent overrides. Anisotropy was dropped (flat white on derivative tangents); iridescence is a view-angle spectral tint because thin-film interference was invisible on metals. Depth: an override pass writes near=1 depth normalized to the model's bounding sphere, composited over any incoming scene depth, so Blur, Glass, Relief, Input -> Depth and depth masks read the model, also inside groups. Transform UX (asked for Blender basics): Location/Rotation/Scale as XYZ fields with scrubbable axis letters, Move/Rotate/Scale gizmos, G/R/S modal transforms with X/Y/Z locks, Alt+G/R/S clear, middle-drag orbit and Shift+middle-drag shift. Modal keys are captured before other handlers so a focused toolbar tooltip cannot swallow Escape. Workarounds for three r183, found by tests: - NodeMaterialObserver is shared per node builder state and its renderId fast path skips the world-matrix cache, so a mesh returning to an exact earlier pose kept a stale GPU matrix. A node-valued property on file materials makes the observer refresh every render. - compileAsync allocates the transmission backdrop copy with the canvas format, breaking glass in HalfFloat targets; transmissive models compile on first draw instead. - ShadowNode updates once per node frame per camera and frames only advance on three's own rAF, so the pass advances the node frame before each draw (hidden-tab exports and several draws per tick froze shadows). - WebGPU only allows 1 or 4 samples; MSAA turns off above 4K so 8192 px exports stay within memory. Exports wait up to 30 s for model and HDR loads.
The picker already uses the cube for 3D Model; the layer row fell back to the generic image placeholder like effect layers do.
…, load tracking - Offset the floor, contact shadow and key light target by Location Y - Render the depth pass with per-material alpha-tested variants so cutouts stay empty - Carry alpha test, alpha map, map alpha, transparency and depth write into material presets - Track model and environment loads per request so stale loads cannot clear readiness - Keep model and environment errors in separate slots and flag a missing custom HDR
git-chad
force-pushed
the
git-chad/v3-outline
branch
from
October 1, 2026 14:03
4150019 to
f9738ee
Compare
git-chad
force-pushed
the
git-chad/v3-model-layer
branch
from
October 1, 2026 14:03
e73a83d to
ecc6f02
Compare
git-chad
changed the base branch from
git-chad/v3-outline
to
git-chad/shader-lab-v3-plan
October 1, 2026 15:14
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #188. Part of the V3 stack (parent #150); nothing merges to
mainuntil the plan is complete.What
Step 1 of roadmap 4.4: a 3D Model source layer.
.glb, or.gltfwith embedded buffers, from Add layer → 3D Model or dropped on the canvas. Draco, meshopt and KTX2 decode frompublic/three..objisn't accepted..hdr, all normalized to the same brightness.Limits
.hdrfiles can't be published to Community yet: the upload allowlist has no Radiance type. Bundled studios work.Workarounds for three r183 bugs
The tests found four bugs, each worked around in the pass:
compileAsynccreates the transmission backdrop copy in the canvas format. Transmissive models now compile on first draw.Tests
src,tests,packages),tscandtsgopass; the only lint warnings are the two that were already there. Locally,bun run checkfails only on scratch scripts in the gitignored.context.model-layer.mjsadds 81 GPU checks, all passing:.hdrlighting, normalization and studio swaps.model-layer-ui.mjspasses against the dev server: picker import, gizmo drags, undo granularity, G with an axis lock, Esc cancel, Alt+G, gizmo modes, uniform scale,.hdrattach/remove and save.bun run test:compositionsuite passes.Manual test:
tests/composition/MODEL-LAYER-MANUAL-QA.md. References 31, 15 and 26 to 30 were reviewed.🤖 Generated with Claude Code