Skip to content

Commit aa5992f

Browse files
committed
docs(skills): scope gizmo behaviour by renderer and state both ambient workarounds
1 parent c04ff65 commit aa5992f

4 files changed

Lines changed: 22 additions & 6 deletions

File tree

‎packages/skills/skill/docs/controls-and-interaction.md‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,11 @@ Raycasting runs on pointer events only — never per frame.
130130
## Transform controls
131131

132132
Translate mode gives axis arrows and plane handles; rotate mode gives axis
133-
rings. Dragging updates the attached mesh directly.
133+
rings. **In vanilla** dragging updates the attached mesh directly, because
134+
`createTransformControls` calls `handle.setTransform(...)` itself. **In React
135+
and Vue** dragging updates nothing on its own — the gizmo emits
136+
`onObjectChange` and your state update is what moves the mesh (and the gizmo
137+
with it).
134138

135139
Key props: `object`, `mode`, `size`, `showX`, `showY`, `showZ`,
136140
`translationSnap`, `rotationSnap`, `enabled`, `onChange`, `onObjectChange`,

‎packages/skills/skill/docs/lighting.md‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,12 @@ baseline.
5656
- **Vanilla `setOptions({ ambientLight })` changes nothing on its own.** There
5757
is no ambient branch in the change detection at all, so the baked surface
5858
stays stale *and* the shadow fill — which is derived from ambient — is not
59-
re-emitted. Change the directional light in the same call, or call
60-
`mesh.rebakeAtlas()`, to make an ambient edit take effect.
59+
re-emitted. Two outputs are stale and **neither workaround fixes both**:
60+
`mesh.rebakeAtlas()` refreshes that mesh's baked paint but does not re-emit
61+
the receiver shadow, while touching the directional light in the same
62+
`setOptions` call re-emits the shadow but leaves baked mesh colors frozen. To
63+
fully apply an ambient edit, do both — nudge the directional light *and*
64+
rebake every affected mesh.
6165

6266
So the vanilla freeze covers the directional **and** ambient lights, not the
6367
directional light alone.

‎website/public/skill/docs/controls-and-interaction.md‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,11 @@ Raycasting runs on pointer events only — never per frame.
130130
## Transform controls
131131

132132
Translate mode gives axis arrows and plane handles; rotate mode gives axis
133-
rings. Dragging updates the attached mesh directly.
133+
rings. **In vanilla** dragging updates the attached mesh directly, because
134+
`createTransformControls` calls `handle.setTransform(...)` itself. **In React
135+
and Vue** dragging updates nothing on its own — the gizmo emits
136+
`onObjectChange` and your state update is what moves the mesh (and the gizmo
137+
with it).
134138

135139
Key props: `object`, `mode`, `size`, `showX`, `showY`, `showZ`,
136140
`translationSnap`, `rotationSnap`, `enabled`, `onChange`, `onObjectChange`,

‎website/public/skill/docs/lighting.md‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,12 @@ baseline.
5656
- **Vanilla `setOptions({ ambientLight })` changes nothing on its own.** There
5757
is no ambient branch in the change detection at all, so the baked surface
5858
stays stale *and* the shadow fill — which is derived from ambient — is not
59-
re-emitted. Change the directional light in the same call, or call
60-
`mesh.rebakeAtlas()`, to make an ambient edit take effect.
59+
re-emitted. Two outputs are stale and **neither workaround fixes both**:
60+
`mesh.rebakeAtlas()` refreshes that mesh's baked paint but does not re-emit
61+
the receiver shadow, while touching the directional light in the same
62+
`setOptions` call re-emits the shadow but leaves baked mesh colors frozen. To
63+
fully apply an ambient edit, do both — nudge the directional light *and*
64+
rebake every affected mesh.
6165

6266
So the vanilla freeze covers the directional **and** ambient lights, not the
6367
directional light alone.

0 commit comments

Comments
 (0)