Skip to content

feat: shiplap aspect/joints, BoxGeometry world UVs, arch kit ergonomics, cutaway shadow opt-out, and camera-fit-fill - #128

Merged
jbingham merged 1 commit into
mainfrom
feat/arch-ergonomics-cutaway-shadows-camera-fit
Nov 28, 2026
Merged

jbingham merged 1 commit into
mainfrom
feat/arch-ergonomics-cutaway-shadows-camera-fit

Conversation

@jbingham

Copy link
Copy Markdown
Collaborator

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.

…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`.
@jbingham
jbingham merged commit c6049db into main Nov 28, 2026
12 checks passed
@jbingham
jbingham deleted the feat/arch-ergonomics-cutaway-shadows-camera-fit branch November 28, 2026 02:16
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.

1 participant