Repository navigation
feat: shiplap aspect/joints, BoxGeometry world UVs, arch kit ergonomics, cutaway shadow opt-out, and camera-fit-fill - #128
Merged
Conversation
…cs, cutaway shadow opt-out, and camera-fit-fill
Upstream authoring ergonomics, cross-platform cutaway shadow parity, and perspective viewport-fill auto-framing across Web, Rust/Boa, Android, and iOS:
- **`ProceduralTexture.shiplap` `buttJoints` & `boardAspect` (JS + Rust Boa parity):** adds `buttJoints` (`0..16`, default `2`) and `boardAspect` (`0.125..16`, auto-inferred as `ry / rx` when `repeat` is anisotropic `[rx, ry]` unless overridden, canonicalized to `1` when `buttJoints === 0`) with Nyquist groove clamping and byte-identical JS + Rust output (`generate_material_preset_with_options` / `__three_live_native_material_preset_ext__`, keeping `ThreeLiveKernels` C-ABI v1 unchanged).
- **`BoxGeometry` `uvGenerator: 'world'`:** accepts `{ uvGenerator?: 'bbox' | 'world' }` as 4th or 7th constructor argument on both JS and `ENABLE_NATIVE_HOOKS` (`__three_live_native_box__`) paths.
- **`THREE.Architecture` ergonomics (`WallGeometry`, `RoofGeometry`, `createDoorGroup`):**
- `WallGeometry` adds `baseboardSide` and `corniceSide` (`'both' | 'front' | 'back'`), intersected with `cutaway`.
- `RoofGeometry({ style: 'flat-parapet', openSides })` omits abutting interior parapet walls across all 16 cardinal subsets (`'n'|'s'|'e'|'w'`, full names, `'-z'|'+z'|'+x'|'-x'`) while remaining watertight 2-manifold (`origin: 'center'` uses deck height when all 4 sides are open).
- `createDoorGroup()` adds separate frame vs. leaf materials (`frameMaterial` or `{ frame?, leaf? }` map), `linkedLeaves: true` (shared toggle state variable per leaf across sibling triggers + parent-scoped target lookup so cloned/same-named rigs stay isolated), and initial `openFraction` ajar/open poses with smart first-click open/close direction.
- **`userData.xr.cutaway.castShadow` opt-out (3-target parity) + cutaway-aware `section-cap="solid"`:**
- `castShadow?: boolean` (default `true`) suppresses shadows while cut away across Web (WebGL2 `shadowMapsPlugin` + WebGPU `gpuSceneAccelerator`), Android (`XRLiveSceneCoreHelper` / `XRLiveRuntimeSession`), and iOS (`XRLiveTraits` / `XRLiveRuntimeSession`), serialized to glTF `ANDROID_xr_scenecore` and USDZ `customData` (`bool cutawayCastShadow = false` only when `false`).
- `section-cap="solid"` skips meshes currently hidden by `cutaway` so cut-away walls never emit floating poché bars.
- **Declarative perspective framing (`camera-fit-fill`):** adds `camera-fit-fill` (`0.1..0.98`, `"72%"`, or `"auto"`), `computeFitDistance()`, and `fitCameraToBounds()` projecting all 8 world AABB corners against FOV, aspect ratio, orbit angles, `camera-target`, and `boundsIgnore` when `camera-orbit` omits an explicit radius.
- **Bundle budgets & docs:** updated `scripts/build.js`, `README.md`, `AGENTS.md`, `CHANGELOG.md`, `three-live.d.ts`, `docs/`, and `llms-full.txt`.
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.
Upstream authoring ergonomics, cross-platform cutaway shadow parity, and perspective viewport-fill auto-framing across Web, Rust/Boa, Android, and iOS:
ProceduralTexture.shiplapbuttJoints&boardAspect(JS + Rust Boa parity): addsbuttJoints(0..16, default2) andboardAspect(0.125..16, auto-inferred asry / rxwhenrepeatis anisotropic[rx, ry]unless overridden, canonicalized to1whenbuttJoints === 0) with Nyquist groove clamping and byte-identical JS + Rust output (generate_material_preset_with_options/__three_live_native_material_preset_ext__, keepingThreeLiveKernelsC-ABI v1 unchanged).BoxGeometryuvGenerator: 'world': accepts{ uvGenerator?: 'bbox' | 'world' }as 4th or 7th constructor argument on both JS andENABLE_NATIVE_HOOKS(__three_live_native_box__) paths.THREE.Architectureergonomics (WallGeometry,RoofGeometry,createDoorGroup):WallGeometryaddsbaseboardSideandcorniceSide('both' | 'front' | 'back'), intersected withcutaway.RoofGeometry({ style: 'flat-parapet', openSides })omits abutting interior parapet walls across all 16 cardinal subsets ('n'|'s'|'e'|'w', full names,'-z'|'+z'|'+x'|'-x') while remaining watertight 2-manifold (origin: 'center'uses deck height when all 4 sides are open).createDoorGroup()adds separate frame vs. leaf materials (frameMaterialor{ frame?, leaf? }map),linkedLeaves: true(shared toggle state variable per leaf across sibling triggers + parent-scoped target lookup so cloned/same-named rigs stay isolated), and initialopenFractionajar/open poses with smart first-click open/close direction.userData.xr.cutaway.castShadowopt-out (3-target parity) + cutaway-awaresection-cap="solid":castShadow?: boolean(defaulttrue) suppresses shadows while cut away across Web (WebGL2shadowMapsPlugin+ WebGPUgpuSceneAccelerator), Android (XRLiveSceneCoreHelper/XRLiveRuntimeSession), and iOS (XRLiveTraits/XRLiveRuntimeSession), serialized to glTFANDROID_xr_scenecoreand USDZcustomData(bool cutawayCastShadow = falseonly whenfalse).section-cap="solid"skips meshes currently hidden bycutawayso cut-away walls never emit floating poché bars.camera-fit-fill): addscamera-fit-fill(0.1..0.98,"72%", or"auto"),computeFitDistance(), andfitCameraToBounds()projecting all 8 world AABB corners against FOV, aspect ratio, orbit angles,camera-target, andboundsIgnorewhencamera-orbitomits an explicit radius.scripts/build.js,README.md,AGENTS.md,CHANGELOG.md,three-live.d.ts,docs/, andllms-full.txt.