@bendyline/molen-dioramas 0.0.5 → 0.0.8

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/dist/client.d.mts CHANGED
@@ -45,6 +45,12 @@ interface DioramaVisualOptions {
45
45
  * scene, so a light arriving or leaving with a diorama rebuilt every object in view in one frame.
46
46
  */
47
47
  localLights?: boolean;
48
+ /**
49
+ * Build the diorama's shaders before it joins `root` (a host passes its renderer's
50
+ * `prepareObject`). Its figures, models and static batches otherwise built them in the first
51
+ * frame that drew them: a flight school beside a runway stalled a takeoff for a quarter second.
52
+ */
53
+ prepare?: (object: THREE.Object3D, parent: THREE.Object3D) => Promise<void>;
48
54
  }
49
55
  /** Lazy-load the scripting runtime only when a placement is admitted by the director. */
50
56
  declare function createDioramaVisual(definition: DioramaDefinition, placement: DioramaPlacement, options: DioramaVisualOptions): Promise<DioramaInstance>;
package/dist/client.mjs CHANGED
@@ -162,6 +162,7 @@ async function createDioramaVisual(definition, placement, options) {
162
162
  interpolation.push(playback.tick, mirror.transforms(), 0);
163
163
  sync();
164
164
  await backend.whenReady();
165
+ await options.prepare?.(root, options.root);
165
166
  options.root.add(root);
166
167
  } catch (error) {
167
168
  dispose();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bendyline/molen-dioramas",
3
- "version": "0.0.5",
3
+ "version": "0.0.8",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -40,12 +40,12 @@
40
40
  "dist"
41
41
  ],
42
42
  "dependencies": {
43
- "@bendyline/molen-figures": "0.0.12",
44
- "@bendyline/molen-kernel": "0.0.10",
45
- "@bendyline/molen-schema": "0.0.10"
43
+ "@bendyline/molen-figures": "0.0.15",
44
+ "@bendyline/molen-kernel": "0.0.11",
45
+ "@bendyline/molen-schema": "0.0.11"
46
46
  },
47
47
  "peerDependencies": {
48
- "@bendyline/molen-client": "0.0.12",
48
+ "@bendyline/molen-client": "0.0.15",
49
49
  "three": ">=0.184.0 <0.187.0"
50
50
  },
51
51
  "peerDependenciesMeta": {
@@ -57,7 +57,7 @@
57
57
  }
58
58
  },
59
59
  "devDependencies": {
60
- "@bendyline/molen-client": "0.0.12",
60
+ "@bendyline/molen-client": "0.0.15",
61
61
  "@biomejs/biome": "^2.5.0",
62
62
  "@types/three": "0.184.0",
63
63
  "fast-check": "^3.23.2",