@opsydyn/effect-three 0.1.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +16 -0
- package/README.md +3 -4
- package/dist/{index-ef8pbv9g.js → index-8cf8t6by.js} +328 -25
- package/dist/index-8cf8t6by.js.map +41 -0
- package/dist/index.js +61 -8
- package/dist/index.js.map +3 -3
- package/dist/kernel/behaviours.d.ts.map +1 -1
- package/dist/kernel/build.d.ts +56 -1
- package/dist/kernel/build.d.ts.map +1 -1
- package/dist/kernel/cameraMotion.d.ts +3 -1
- package/dist/kernel/cameraMotion.d.ts.map +1 -1
- package/dist/kernel/cameraShake.d.ts +33 -0
- package/dist/kernel/cameraShake.d.ts.map +1 -0
- package/dist/kernel/description.d.ts +85 -1
- package/dist/kernel/description.d.ts.map +1 -1
- package/dist/kernel/diff.d.ts +3 -1
- package/dist/kernel/diff.d.ts.map +1 -1
- package/dist/kernel/equality.d.ts +5 -1
- package/dist/kernel/equality.d.ts.map +1 -1
- package/dist/kernel/index.d.ts +1 -1
- package/dist/kernel/index.d.ts.map +1 -1
- package/dist/kernel/index.js +12 -2
- package/dist/kernel/index.js.map +1 -1
- package/dist/kernel/labels.d.ts +6 -0
- package/dist/kernel/labels.d.ts.map +1 -1
- package/dist/kernel/pointer.d.ts.map +1 -1
- package/dist/kernel/renderKit.d.ts +5 -4
- package/dist/kernel/renderKit.d.ts.map +1 -1
- package/dist/kernel/resources.d.ts.map +1 -1
- package/dist/kernel/sceneGraph.d.ts +0 -1
- package/dist/kernel/sceneGraph.d.ts.map +1 -1
- package/dist/runtime/SceneSchema.d.ts +296 -5
- package/dist/runtime/SceneSchema.d.ts.map +1 -1
- package/dist/webgl/index.js +2 -2
- package/dist/webgl/index.js.map +3 -3
- package/dist/webgpu/index.js +2 -2
- package/dist/webgpu/index.js.map +3 -3
- package/package.json +1 -1
- package/src/kernel/behaviours.ts +5 -0
- package/src/kernel/bodySources.ts +1 -1
- package/src/kernel/build.ts +98 -0
- package/src/kernel/cameraMotion.ts +3 -0
- package/src/kernel/cameraShake.ts +97 -0
- package/src/kernel/description.ts +91 -1
- package/src/kernel/diff.ts +7 -1
- package/src/kernel/equality.ts +47 -0
- package/src/kernel/index.ts +5 -0
- package/src/kernel/labels.ts +6 -0
- package/src/kernel/pointer.ts +8 -0
- package/src/kernel/renderKit.ts +5 -4
- package/src/kernel/resources.ts +69 -0
- package/src/kernel/sceneGraph.ts +146 -3
- package/src/runtime/SceneSchema.ts +58 -4
- package/src/webgl/index.ts +1 -1
- package/src/webgpu/index.ts +2 -2
- package/dist/index-ef8pbv9g.js.map +0 -40
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.3.0](https://github.com/opsydyn/fold-kit-experiments/compare/effect-three-v0.2.0...effect-three-v0.3.0) (2026-10-19)
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
- **effect-three:** Drei's Billboard, RoundedBox and Backdrop, Detailed, CameraShake and Clone ([3ec570e](https://github.com/opsydyn/fold-kit-experiments/commit/3ec570e14e7632565adf846ef48b66287713a291))
|
|
8
|
+
|
|
9
|
+
## [0.2.0](https://github.com/opsydyn/fold-kit-experiments/compare/effect-three-v0.1.0...effect-three-v0.2.0) (2026-10-19)
|
|
10
|
+
|
|
11
|
+
### ⚠ BREAKING CHANGES
|
|
12
|
+
|
|
13
|
+
- **effect-three:** `RenderKit.drawsLabels` is gone; a render kit names its `shading` instead. Code that spreads a renderer factory to instrument it is unaffected.
|
|
14
|
+
|
|
15
|
+
### Features
|
|
16
|
+
|
|
17
|
+
- **effect-three:** render kits name their kind of material; label engines may draw with TSL ([8059fde](https://github.com/opsydyn/fold-kit-experiments/commit/8059fde41349297dea0c7c3383361333dc6a25ad))
|
|
18
|
+
|
|
3
19
|
## 0.1.0 (2026-10-18)
|
|
4
20
|
|
|
5
21
|
### Features
|
package/README.md
CHANGED
|
@@ -46,7 +46,8 @@ const description = scene({
|
|
|
46
46
|
|
|
47
47
|
- **Keys are unique across the whole scene.** A node keeps its three.js object while its key and kind stay the same, including when it moves to another group. A different kind under the same key replaces the object in place.
|
|
48
48
|
- **Descriptions are fully specified data.** The constructors fill in defaults, and nothing in a description is a closure or a three.js object.
|
|
49
|
-
- **Shapes:** `box`, `sphere`, `plane`, `cylinder`, `torus`, `cone`, `capsule`, `ring` and `circle`, owned by one mesh or shared through `resources`. Parameter names and defaults are three.js's own.
|
|
49
|
+
- **Shapes:** `box`, `sphere`, `plane`, `cylinder`, `torus`, `cone`, `capsule`, `ring` and `circle`, owned by one mesh or shared through `resources`. Parameter names and defaults are three.js's own. `roundedBox` and `backdrop` are Drei's `RoundedBox` and `Backdrop`, with Drei's defaults.
|
|
50
|
+
- **Facing, detail and shake:** `rotation: billboard()` turns a node to face the camera every frame (Drei's `Billboard`, with `lockX`/`lockY`/`lockZ`); `group({ detail: detailed({ distances: [0, 10, 20] }) })` shows one child at a time by the camera's distance (Drei's `Detailed`); and a camera's `shake: cameraShake({ decay: true })` shakes it (Drei's `CameraShake`), a pure function of scene time that reduced motion holds still. A `borrowed` model shown under several keys is cloned, skinned models included (Drei's `Clone`).
|
|
50
51
|
- **Materials:** `basic`, `lambert`, `phong`, `standard`, `physical` and `normalMaterial`, each with opacity, transparency, `side`, wireframe and (lit kinds) flat shading and emission. Defaults are three.js's own. Changing a material within its kind updates it in place; changing its kind replaces it.
|
|
51
52
|
- **Shadows and render settings:** `scene({ render: renderSettings({ shadows: 'soft', toneMapping: 'aces' }) })`, then `castShadow`/`receiveShadow` on meshes and `castShadow` on directional, point and spot lights. Tone mapping defaults to `none` (React Three Fiber defaults to ACES) so colours render exactly as given.
|
|
52
53
|
- **Instancing:** `instances({ key, geometry, material, instances: [instance({ key, position, color })] })` draws many copies in one call. Updates rewrite only the instances that changed, and hits name the instance (`instance` on the event).
|
|
@@ -144,7 +145,7 @@ Everything needed for deterministic headless tests ships with the package:
|
|
|
144
145
|
- `recordingRendererFactory()`: counts renders and records viewport and disposal.
|
|
145
146
|
- `createManualFrames()`: frames run when you call `step()`.
|
|
146
147
|
- Effect's `TestClock`: scene time comes from the `Clock` service's monotonic reading.
|
|
147
|
-
- **Renderers:** `webglRendererFactory` (the default) or `webgpuRendererFactory` (three's `WebGPURenderer`: WebGPU where available, its WebGL 2 backend otherwise), each carrying its render kit (`@opsydyn/effect-three/webgl` or `/webgpu`).
|
|
148
|
+
- **Renderers:** `webglRendererFactory` (the default) or `webgpuRendererFactory` (three's `WebGPURenderer`: WebGPU where available, its WebGL 2 backend otherwise), each carrying its render kit (`@opsydyn/effect-three/webgl` or `/webgpu`). Under WebGPU, labels draw with `troikaLabels` from `@opsydyn/effect-three-troika/webgpu`. See [ADR-010](../../docs/effect-three/adr/010-webgpu-renderer.md).
|
|
148
149
|
- `createSceneGraph()`: the synchronous kernel on its own, with `object(key)` and resource `stats()` for assertions. Pass `kit: webglKit` (from `@opsydyn/effect-three/webgl`) to draw skies, shader grids and contact shadows; `webglRendererFactory` carries it for you.
|
|
149
150
|
|
|
150
151
|
## Stability
|
|
@@ -159,8 +160,6 @@ patch.
|
|
|
159
160
|
|
|
160
161
|
- **WebXR on `WebGPURenderer`** is wired but untested: the headset emulator the tests use
|
|
161
162
|
(IWER) cannot render into it. WebXR on the WebGL renderer is tested.
|
|
162
|
-
- **Labels are not drawn under WebGPU**: troika builds WebGL shaders and has no WebGPU
|
|
163
|
-
path. A scene with labels draws everything else.
|
|
164
163
|
- **DOM overlay** (`xr({ domOverlay: true })`) is checked only in the session request; the
|
|
165
164
|
emulator has no overlay.
|
|
166
165
|
|