@opsydyn/effect-three 0.3.0 → 0.6.4

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.
Files changed (143) hide show
  1. package/CHANGELOG.md +56 -0
  2. package/README.md +15 -1
  3. package/dist/{index-8cf8t6by.js → index-re3rrfwd.js} +2935 -104
  4. package/dist/index-re3rrfwd.js.map +56 -0
  5. package/dist/index-ttwy0znv.js +145 -0
  6. package/dist/index-ttwy0znv.js.map +12 -0
  7. package/dist/index.js +557 -147
  8. package/dist/index.js.map +8 -6
  9. package/dist/kernel/bodies.d.ts +20 -1
  10. package/dist/kernel/bodies.d.ts.map +1 -1
  11. package/dist/kernel/boxSelect.d.ts +22 -0
  12. package/dist/kernel/boxSelect.d.ts.map +1 -0
  13. package/dist/kernel/build.d.ts +165 -7
  14. package/dist/kernel/build.d.ts.map +1 -1
  15. package/dist/kernel/cameraShake.d.ts.map +1 -1
  16. package/dist/kernel/describeScene.d.ts +50 -0
  17. package/dist/kernel/describeScene.d.ts.map +1 -0
  18. package/dist/kernel/description.d.ts +223 -1
  19. package/dist/kernel/description.d.ts.map +1 -1
  20. package/dist/kernel/diff.d.ts +15 -0
  21. package/dist/kernel/diff.d.ts.map +1 -1
  22. package/dist/kernel/equality.d.ts +11 -1
  23. package/dist/kernel/equality.d.ts.map +1 -1
  24. package/dist/kernel/gizmo.d.ts +69 -0
  25. package/dist/kernel/gizmo.d.ts.map +1 -0
  26. package/dist/kernel/history.d.ts +61 -0
  27. package/dist/kernel/history.d.ts.map +1 -0
  28. package/dist/kernel/index.d.ts +19 -6
  29. package/dist/kernel/index.d.ts.map +1 -1
  30. package/dist/kernel/index.js +124 -3
  31. package/dist/kernel/index.js.map +1 -1
  32. package/dist/kernel/inspect.d.ts +85 -0
  33. package/dist/kernel/inspect.d.ts.map +1 -0
  34. package/dist/kernel/lineGeometry.d.ts +25 -0
  35. package/dist/kernel/lineGeometry.d.ts.map +1 -0
  36. package/dist/kernel/lockstep.d.ts +114 -0
  37. package/dist/kernel/lockstep.d.ts.map +1 -0
  38. package/dist/kernel/loop.d.ts.map +1 -1
  39. package/dist/kernel/materials.d.ts.map +1 -1
  40. package/dist/kernel/paintOrder.d.ts +53 -0
  41. package/dist/kernel/paintOrder.d.ts.map +1 -0
  42. package/dist/kernel/physics.d.ts +39 -0
  43. package/dist/kernel/physics.d.ts.map +1 -1
  44. package/dist/kernel/pivot.d.ts +54 -0
  45. package/dist/kernel/pivot.d.ts.map +1 -0
  46. package/dist/kernel/pointBuffers.d.ts +17 -0
  47. package/dist/kernel/pointBuffers.d.ts.map +1 -0
  48. package/dist/kernel/pointer.d.ts +31 -1
  49. package/dist/kernel/pointer.d.ts.map +1 -1
  50. package/dist/kernel/preview.d.ts +32 -0
  51. package/dist/kernel/preview.d.ts.map +1 -0
  52. package/dist/kernel/renderKit.d.ts +21 -1
  53. package/dist/kernel/renderKit.d.ts.map +1 -1
  54. package/dist/kernel/renderer.d.ts +6 -0
  55. package/dist/kernel/renderer.d.ts.map +1 -1
  56. package/dist/kernel/sceneChanges.d.ts +87 -0
  57. package/dist/kernel/sceneChanges.d.ts.map +1 -0
  58. package/dist/kernel/sceneGraph.d.ts +9 -1
  59. package/dist/kernel/sceneGraph.d.ts.map +1 -1
  60. package/dist/kernel/sceneIndex.d.ts +5 -0
  61. package/dist/kernel/sceneIndex.d.ts.map +1 -1
  62. package/dist/kernel/seeded.d.ts +9 -0
  63. package/dist/kernel/seeded.d.ts.map +1 -0
  64. package/dist/kernel/shots.d.ts +26 -0
  65. package/dist/kernel/shots.d.ts.map +1 -0
  66. package/dist/kernel/tape.d.ts +38 -0
  67. package/dist/kernel/tape.d.ts.map +1 -0
  68. package/dist/kernel/timeline.d.ts +60 -0
  69. package/dist/kernel/timeline.d.ts.map +1 -0
  70. package/dist/kernel/trail.d.ts +31 -0
  71. package/dist/kernel/trail.d.ts.map +1 -0
  72. package/dist/kernel/viewportGizmo.d.ts +25 -0
  73. package/dist/kernel/viewportGizmo.d.ts.map +1 -0
  74. package/dist/runtime/Inspector.d.ts +20 -0
  75. package/dist/runtime/Inspector.d.ts.map +1 -0
  76. package/dist/runtime/SceneFile.d.ts +462 -0
  77. package/dist/runtime/SceneFile.d.ts.map +1 -0
  78. package/dist/runtime/SceneSchema.d.ts +404 -0
  79. package/dist/runtime/SceneSchema.d.ts.map +1 -1
  80. package/dist/runtime/errors.d.ts +9 -0
  81. package/dist/runtime/errors.d.ts.map +1 -1
  82. package/dist/runtime/index.d.ts +3 -1
  83. package/dist/runtime/index.d.ts.map +1 -1
  84. package/dist/webgl/index.d.ts.map +1 -1
  85. package/dist/webgl/index.js +228 -3
  86. package/dist/webgl/index.js.map +6 -4
  87. package/dist/webgl/line.d.ts +4 -0
  88. package/dist/webgl/line.d.ts.map +1 -0
  89. package/dist/webgl/points.d.ts +4 -0
  90. package/dist/webgl/points.d.ts.map +1 -0
  91. package/dist/webgpu/index.d.ts.map +1 -1
  92. package/dist/webgpu/index.js +206 -26
  93. package/dist/webgpu/index.js.map +6 -4
  94. package/dist/webgpu/line.d.ts +4 -0
  95. package/dist/webgpu/line.d.ts.map +1 -0
  96. package/dist/webgpu/points.d.ts +4 -0
  97. package/dist/webgpu/points.d.ts.map +1 -0
  98. package/package.json +4 -2
  99. package/src/kernel/bodies.ts +299 -17
  100. package/src/kernel/boxSelect.ts +73 -0
  101. package/src/kernel/build.ts +374 -1
  102. package/src/kernel/cameraShake.ts +3 -13
  103. package/src/kernel/describeScene.ts +224 -0
  104. package/src/kernel/description.ts +243 -0
  105. package/src/kernel/diff.ts +39 -0
  106. package/src/kernel/equality.ts +123 -0
  107. package/src/kernel/gizmo.ts +478 -0
  108. package/src/kernel/history.ts +118 -0
  109. package/src/kernel/index.ts +110 -1
  110. package/src/kernel/inspect.ts +214 -0
  111. package/src/kernel/lineGeometry.ts +75 -0
  112. package/src/kernel/lockstep.ts +237 -0
  113. package/src/kernel/loop.ts +7 -0
  114. package/src/kernel/materials.ts +3 -0
  115. package/src/kernel/paintOrder.ts +274 -0
  116. package/src/kernel/physics.ts +86 -1
  117. package/src/kernel/pivot.ts +418 -0
  118. package/src/kernel/pointBuffers.ts +115 -0
  119. package/src/kernel/pointer.ts +98 -17
  120. package/src/kernel/preview.ts +467 -0
  121. package/src/kernel/renderKit.ts +23 -1
  122. package/src/kernel/renderer.ts +6 -0
  123. package/src/kernel/sceneChanges.ts +265 -0
  124. package/src/kernel/sceneGraph.ts +354 -11
  125. package/src/kernel/sceneIndex.ts +8 -0
  126. package/src/kernel/seeded.ts +18 -0
  127. package/src/kernel/shots.ts +167 -0
  128. package/src/kernel/tape.ts +124 -0
  129. package/src/kernel/timeline.ts +93 -0
  130. package/src/kernel/trail.ts +170 -0
  131. package/src/kernel/viewportGizmo.ts +194 -0
  132. package/src/runtime/Inspector.ts +43 -0
  133. package/src/runtime/SceneFile.ts +46 -0
  134. package/src/runtime/SceneSchema.ts +319 -0
  135. package/src/runtime/errors.ts +6 -0
  136. package/src/runtime/index.ts +3 -1
  137. package/src/webgl/index.ts +4 -0
  138. package/src/webgl/line.ts +66 -0
  139. package/src/webgl/points.ts +205 -0
  140. package/src/webgpu/index.ts +4 -0
  141. package/src/webgpu/line.ts +67 -0
  142. package/src/webgpu/points.ts +193 -0
  143. package/dist/index-8cf8t6by.js.map +0 -41
@@ -0,0 +1,87 @@
1
+ /**
2
+ * Scene diffs for review (roadmap, "Beyond parity" 4): what changed between two
3
+ * descriptions, in the kernel's own terms (the operations `diff` would apply, plus the
4
+ * scene-wide settings the graph applies beside them), as typed changes and as lines a
5
+ * person reads in review. `formatChanges` writes one line per change:
6
+ *
7
+ * ```text
8
+ * + Mesh crate in table
9
+ * - Light sun
10
+ * ~ crate: position, rotation
11
+ * > crate to shelf
12
+ * = order of the root: table, crate
13
+ * ⋯ scene: camera, environment
14
+ * ```
15
+ *
16
+ * Changes inside the HUD and render textures are listed after them, each line prefixed
17
+ * with where it is (`hud`, `texture screen`).
18
+ *
19
+ * @module
20
+ */
21
+ import type { SceneDescription, SceneNode } from './description.ts';
22
+ import { type Field } from './diff.ts';
23
+ import { type DescriptionError, type ParentKey } from './sceneIndex.ts';
24
+ /** A scene-wide part of a description, which changes as a whole. */
25
+ export type SceneSetting = 'camera' | 'views' | 'render' | 'resources' | 'gestures' | 'overlays' | 'environment' | 'sky' | 'contactShadows' | 'physics' | 'xr' | 'measure';
26
+ /** Where a change is: the scene, its HUD, or one of its render textures. */
27
+ export type ChangePlace = 'scene' | 'hud' | {
28
+ readonly texture: string;
29
+ };
30
+ export type SceneChange = {
31
+ readonly place: ChangePlace;
32
+ } & ({
33
+ readonly _tag: 'Added';
34
+ readonly key: string;
35
+ readonly kind: SceneNode['_tag'];
36
+ readonly parent: ParentKey;
37
+ } | {
38
+ readonly _tag: 'Removed';
39
+ readonly key: string;
40
+ } | {
41
+ readonly _tag: 'Replaced';
42
+ readonly key: string;
43
+ readonly kind: SceneNode['_tag'];
44
+ } | {
45
+ readonly _tag: 'Changed';
46
+ readonly key: string;
47
+ readonly fields: ReadonlyArray<Field>;
48
+ } | {
49
+ readonly _tag: 'Moved';
50
+ readonly key: string;
51
+ readonly parent: ParentKey;
52
+ } | {
53
+ readonly _tag: 'Reordered';
54
+ readonly parent: ParentKey;
55
+ readonly keys: ReadonlyArray<string>;
56
+ } | {
57
+ readonly _tag: 'Settings';
58
+ readonly settings: ReadonlyArray<SceneSetting>;
59
+ } | {
60
+ readonly _tag: 'HudAdded';
61
+ } | {
62
+ readonly _tag: 'HudRemoved';
63
+ } | {
64
+ readonly _tag: 'TextureAdded';
65
+ readonly id: string;
66
+ } | {
67
+ readonly _tag: 'TextureRemoved';
68
+ readonly id: string;
69
+ });
70
+ export type SceneChanges = {
71
+ readonly _tag: 'Changes';
72
+ readonly changes: ReadonlyArray<SceneChange>;
73
+ }
74
+ /** The second description is not a valid scene: why, as `reconcile` would say. */
75
+ | {
76
+ readonly _tag: 'Invalid';
77
+ readonly error: DescriptionError;
78
+ };
79
+ /**
80
+ * What changed from `before` to `after`: the scene's settings and nodes, then its HUD's
81
+ * and its render textures'. Invalid when `after` is not a valid scene; a `before` that
82
+ * is not is compared as though it were empty.
83
+ */
84
+ export declare const sceneChanges: (before: SceneDescription, after: SceneDescription) => SceneChanges;
85
+ /** The changes as lines for review, one per change; `No changes.` when there are none. */
86
+ export declare const formatChanges: (changes: ReadonlyArray<SceneChange>) => string;
87
+ //# sourceMappingURL=sceneChanges.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sceneChanges.d.ts","sourceRoot":"","sources":["../../src/kernel/sceneChanges.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,KAAK,EAAE,gBAAgB,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACpE,OAAO,EAAQ,KAAK,KAAK,EAAW,MAAM,WAAW,CAAC;AACtD,OAAO,EAAE,KAAK,gBAAgB,EAA0B,KAAK,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAEhG,oEAAoE;AACpE,MAAM,MAAM,YAAY,GACpB,QAAQ,GACR,OAAO,GACP,QAAQ,GACR,WAAW,GACX,UAAU,GACV,UAAU,GACV,aAAa,GACb,KAAK,GACL,gBAAgB,GAChB,SAAS,GACT,IAAI,GACJ,SAAS,CAAC;AAEd,4EAA4E;AAC5E,MAAM,MAAM,WAAW,GAAG,OAAO,GAAG,KAAK,GAAG;IAAE,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC;AAEzE,MAAM,MAAM,WAAW,GAAG;IAAE,QAAQ,CAAC,KAAK,EAAE,WAAW,CAAA;CAAE,GAAG,CACxD;IACE,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IACvB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC;IACjC,QAAQ,CAAC,MAAM,EAAE,SAAS,CAAC;CAC5B,GACD;IAAE,QAAQ,CAA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AAC,OAAO,EAAE,aAAa,CAAC,WAAW,CAAC,CAAA;CAAE;AAC5E,kFAAkF;GAChF;IAAE,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,gBAAgB,CAAA;CAAE,CAAC;AAgJnE;;;;GAIG;AACH,eAAO,MAAM,YAAY,WAAY,gBAAgB,SAAS,gBAAgB,KAAG,YAYhF,CAAC;AAqCF,0FAA0F;AAC1F,eAAO,MAAM,aAAa,YAAa,aAAa,CAAC,WAAW,CAAC,KAAG,MACG,CAAC"}
@@ -7,7 +7,7 @@
7
7
  * @module
8
8
  */
9
9
  import { type BufferGeometry, Mesh, type Object3D, OrthographicCamera, PerspectiveCamera, Scene } from 'three';
10
- import { type BodyCollision, type BodyContactForce } from './bodies.ts';
10
+ import { type BodyCollision, type BodyContactForce, type PhysicsReached } from './bodies.ts';
11
11
  import type { RenderSettings, SceneDescription, ContactShadows, Environment, Gestures, Overlay, Xr, XrSpace, Vec3 } from './description.ts';
12
12
  import { type Op } from './diff.ts';
13
13
  import type { LabelEngine, LabelLayout } from './labels.ts';
@@ -20,6 +20,10 @@ import { type DescriptionError } from './sceneIndex.ts';
20
20
  /** The mesh type the kernel hosts. */
21
21
  export type HostMesh = Mesh<BufferGeometry, HostMaterial>;
22
22
  /** A render texture as hosted: its id, size and the nested graph that draws it. */
23
+ /** The HUD as hosted: its nested graph, drawn over the scene by the frame loop. */
24
+ export type HostedHud = {
25
+ readonly graph: SceneGraph;
26
+ };
23
27
  export type HostedTexture = {
24
28
  readonly id: string;
25
29
  readonly graph: SceneGraph;
@@ -76,6 +80,8 @@ export type SceneGraph = {
76
80
  readonly turned: (view: string | undefined) => Vec3 | undefined;
77
81
  /** Render textures, each a nested graph to draw into its texture (by the frame loop). */
78
82
  readonly renderTextures: () => ReadonlyArray<HostedTexture>;
83
+ /** The HUD, a nested graph drawn over the scene (by the frame loop), if there is one. */
84
+ readonly hud: () => HostedHud | undefined;
79
85
  /** Whether the scene claims the pointer's gestures from the page. */
80
86
  readonly gestures: () => Gestures;
81
87
  /** Points to show HTML at; the frame loop places them after drawing. */
@@ -88,6 +94,8 @@ export type SceneGraph = {
88
94
  readonly collisions: () => ReadonlyArray<BodyCollision>;
89
95
  /** Contact forces over their bodies' thresholds since the last call. */
90
96
  readonly contactForces: () => ReadonlyArray<BodyContactForce>;
97
+ /** Steps a world on `physics({ until })` has reached since the last call. */
98
+ readonly physicsReached: () => ReadonlyArray<PhysicsReached>;
91
99
  /** How the scene is presented immersively, for the host; `null` if it never is. */
92
100
  readonly xr: () => Xr | null;
93
101
  /** Keys of the nodes whose bounds the frame loop reports. */
@@ -1 +1 @@
1
- {"version":3,"file":"sceneGraph.d.ts","sourceRoot":"","sources":["../../src/kernel/sceneGraph.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAKL,KAAK,cAAc,EAKnB,IAAI,EACJ,KAAK,QAAQ,EACb,kBAAkB,EAClB,iBAAiB,EAGjB,KAAK,EAGN,MAAM,OAAO,CAAC;AAKf,OAAO,EAAE,KAAK,aAAa,EAAE,KAAK,gBAAgB,EAAkB,MAAM,aAAa,CAAC;AAKxF,OAAO,KAAK,EAeV,cAAc,EACd,gBAAgB,EAGhB,cAAc,EACd,WAAW,EACX,QAAQ,EACR,OAAO,EAGP,EAAE,EACF,OAAO,EAEP,IAAI,EAGL,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAoB,KAAK,EAAE,EAAE,MAAM,WAAW,CAAC;AAGtD,OAAO,KAAK,EAAe,WAAW,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AACzE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,EACL,KAAK,SAAS,EAKf,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC5D,OAAO,KAAK,EAA+B,SAAS,EAAE,MAAM,gBAAgB,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MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;IAC7E,8FAA8F;IAC9F,QAAQ,CAAC,OAAO,EAAE,MAAM,IAAI,CAAC;CAC9B,CAAC;AAqFF,kDAAkD;AAClD,MAAM,MAAM,UAAU,GAAG,iBAAiB,GAAG,kBAAkB,CAAC;AAmDhE,eAAO,MAAM,gBAAgB,aAAa,iBAAiB,KAAQ,UAi5ClE,CAAC"}
@@ -56,6 +56,11 @@ export type DescriptionError = {
56
56
  readonly _tag: 'UnknownMeasuredNode';
57
57
  readonly key: string;
58
58
  }
59
+ /** Two assets the scene asks for share an id. */
60
+ | {
61
+ readonly _tag: 'DuplicateAssetId';
62
+ readonly id: string;
63
+ }
59
64
  /** Two joints share a key. */
60
65
  | {
61
66
  readonly _tag: 'DuplicateJointKey';
@@ -1 +1 @@
1
- {"version":3,"file":"sceneIndex.d.ts","sourceRoot":"","sources":["../../src/kernel/sceneIndex.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,EAAS,gBAAgB,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAE3E,0EAA0E;AAC1E,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,IAAI,CAAC;AAEtC,4CAA4C;AAC5C,MAAM,MAAM,WAAW,GAAG;IACxB,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC;IACzB,QAAQ,CAAC,MAAM,EAAE,SAAS,CAAC;CAC5B,CAAC;AAEF,qFAAqF;AACrF,MAAM,MAAM,gBAAgB,GACxB;IAAE,QAAQ,CAAC,IAAI,EAAE,cAAc,CAAC;IAAC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA;CAAE,GACvD;IACE,QAAQ,CAAC,IAAI,EAAE,qBAAqB,CAAC;IACrC,QAAQ,CAAC,QAAQ,EAAE,UAAU,GAAG,UAAU,CAAC;IAC3C,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;CACrB,GACD;IAAE,QAAQ,CAAC,IAAI,EAAE,uBAAu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;IACjE,4EAA4E;IAC5E,QAAQ,CAAC,QAAQ,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;CAC1C,CAAC;AAEF,iEAAiE;AACjE,eAAO,MAAM,UAAU,EAAE,UAKxB,CAAC;AAEF,MAAM,MAAM,WAAW,GACnB;IAAE,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,UAAU,CAAA;CAAE,GACxD;IAAE,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,gBAAgB,CAAA;CAAE,CAAC;AAgCnE,4CAA4C;AAC5C,eAAO,MAAM,UAAU,gBACR,gBAAgB,eACjB,WAAW,CAAC,MAAM,CAAC,KAC9B,WAiIF,CAAC"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * A small seeded random generator (mulberry32): the same numbers for the same seed on
3
+ * every page load, so randomly scattered scene parts are reproducible.
4
+ *
5
+ * @module
6
+ */
7
+ /** A generator of numbers in [0, 1) from `seed`, as `Math.random` would give them. */
8
+ export declare const seededRandom: (seed: number) => (() => number);
9
+ //# sourceMappingURL=seeded.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"seeded.d.ts","sourceRoot":"","sources":["../../src/kernel/seeded.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,sFAAsF;AACtF,eAAO,MAAM,YAAY,SAAU,MAAM,KAAG,CAAC,MAAM,MAAM,CASxD,CAAC"}
@@ -0,0 +1,26 @@
1
+ import type { Camera, Environment, SceneNode, Sky } from './description.ts';
2
+ import { type Box } from './orbit.ts';
3
+ /** Where the camera looks from, round the subject. */
4
+ export type ShotAngle = 'front' | 'back' | 'left' | 'right' | 'top' | 'three-quarter' | 'low';
5
+ export declare const shotAngles: ReadonlyArray<ShotAngle>;
6
+ /**
7
+ * The camera looking at `subject` from `angle`, as close as it can be with the box
8
+ * still inside the frame (`margin` 1.3 leaves room round it). `area` is the canvas's
9
+ * size, or its shape: only the ratio matters to a perspective camera.
10
+ */
11
+ export declare const shotCamera: <C extends Camera>(camera: C, subject: Box, angle: ShotAngle, area?: {
12
+ readonly width: number;
13
+ readonly height: number;
14
+ }, margin?: number) => C;
15
+ /** A lighting mood, from the even light of a studio to a clear night. */
16
+ export type Mood = 'studio' | 'daylight' | 'sunset' | 'night';
17
+ export declare const moods: ReadonlyArray<Mood>;
18
+ /** What a mood stages: lights (keyed under the prefix), image-based light and a sky. */
19
+ export type Staging = {
20
+ readonly lights: ReadonlyArray<SceneNode>;
21
+ readonly environment: Environment | null;
22
+ readonly sky: Sky | null;
23
+ };
24
+ /** The staging for `mood`, its lights keyed `${prefix}:…`. */
25
+ export declare const moodStaging: (mood: Mood, prefix?: string) => Staging;
26
+ //# sourceMappingURL=shots.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shots.d.ts","sourceRoot":"","sources":["../../src/kernel/shots.ts"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,SAAS,EAAE,GAAG,EAAQ,MAAM,kBAAkB,CAAC;AAClF,OAAO,EAAE,KAAK,GAAG,EAAa,MAAM,YAAY,CAAC;AAEjD,sDAAsD;AACtD,MAAM,MAAM,SAAS,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,KAAK,GAAG,eAAe,GAAG,KAAK,CAAC;AAE9F,eAAO,MAAM,UAAU,EAAE,aAAa,CAAC,SAAS,CAQ/C,CAAC;AAgBF;;;;GAIG;AACH,eAAO,MAAM,UAAU,GAAI,CAAC,SAAS,MAAM,UACjC,CAAC,WACA,GAAG,SACL,SAAS,SACV;IAAE,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CAAE,sBAExD,CAWF,CAAC;AAEF,yEAAyE;AACzE,MAAM,MAAM,IAAI,GAAG,QAAQ,GAAG,UAAU,GAAG,QAAQ,GAAG,OAAO,CAAC;AAE9D,eAAO,MAAM,KAAK,EAAE,aAAa,CAAC,IAAI,CAA6C,CAAC;AAEpF,wFAAwF;AACxF,MAAM,MAAM,OAAO,GAAG;IACpB,QAAQ,CAAC,MAAM,EAAE,aAAa,CAAC,SAAS,CAAC,CAAC;IAC1C,QAAQ,CAAC,WAAW,EAAE,WAAW,GAAG,IAAI,CAAC;IACzC,QAAQ,CAAC,GAAG,EAAE,GAAG,GAAG,IAAI,CAAC;CAC1B,CAAC;AAEF,8DAA8D;AAC9D,eAAO,MAAM,WAAW,SAAU,IAAI,sBAAoB,OAiFzD,CAAC"}
@@ -0,0 +1,38 @@
1
+ import type { Rgb, SceneNode, Vec3 } from './description.ts';
2
+ export type Tape = {
3
+ /** The first end, once placed. */
4
+ readonly from: Vec3 | null;
5
+ /** The second end, once placed: the tape is then measured. */
6
+ readonly to: Vec3 | null;
7
+ /** Where the pointer is on the scene while the second end is being placed. */
8
+ readonly pointer: Vec3 | null;
9
+ /** Rounds each end to this step on every axis, or not when `null`. */
10
+ readonly snap: number | null;
11
+ };
12
+ /** An empty tape, snapping to `snap` when given. */
13
+ export declare const tape: (options?: {
14
+ readonly snap?: number | null;
15
+ }) => Tape;
16
+ /** A click at `point`: the first end, the second, or (when both are placed) a new tape. */
17
+ export declare const placeTapeEnd: (state: Tape, point: Vec3) => Tape;
18
+ /** The pointer over the scene at `point` (or off it, `null`), for the preview. */
19
+ export declare const pointTape: (state: Tape, point: Vec3 | null) => Tape;
20
+ /** An empty tape, keeping its snap. */
21
+ export declare const clearTape: (state: Tape) => Tape;
22
+ /** The tape's length: between its ends, or to the pointer while the second is placed. */
23
+ export declare const tapeLength: (state: Tape) => number | undefined;
24
+ /** The middle of the tape, for a label there. */
25
+ export declare const tapeMiddle: (state: Tape) => Vec3 | undefined;
26
+ export type TapeLook = {
27
+ readonly color: Rgb;
28
+ /** The line's width in pixels. */
29
+ readonly width: number;
30
+ /** The end balls' radius in scene units. */
31
+ readonly endRadius: number;
32
+ };
33
+ /**
34
+ * The tape under `key`: a ball at each placed end and a line between them, dashed while
35
+ * it runs to the pointer. Nothing in it is picked, so clicks reach the scene beneath.
36
+ */
37
+ export declare const tapeNodes: (key: string, state: Tape, look?: Partial<TapeLook>) => SceneNode;
38
+ //# sourceMappingURL=tape.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tape.d.ts","sourceRoot":"","sources":["../../src/kernel/tape.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,GAAG,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAE7D,MAAM,MAAM,IAAI,GAAG;IACjB,kCAAkC;IAClC,QAAQ,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,CAAC;IAC3B,8DAA8D;IAC9D,QAAQ,CAAC,EAAE,EAAE,IAAI,GAAG,IAAI,CAAC;IACzB,8EAA8E;IAC9E,QAAQ,CAAC,OAAO,EAAE,IAAI,GAAG,IAAI,CAAC;IAC9B,sEAAsE;IACtE,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;CAC9B,CAAC;AAEF,oDAAoD;AACpD,eAAO,MAAM,IAAI,aAAa;IAAE,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,KAAQ,IAKrE,CAAC;AAYH,2FAA2F;AAC3F,eAAO,MAAM,YAAY,UAAW,IAAI,SAAS,IAAI,KAAG,IAIvD,CAAC;AAEF,kFAAkF;AAClF,eAAO,MAAM,SAAS,UAAW,IAAI,SAAS,IAAI,GAAG,IAAI,KAAG,IAGjD,CAAC;AAEZ,uCAAuC;AACvC,eAAO,MAAM,SAAS,UAAW,IAAI,KAAG,IAA2C,CAAC;AAOpF,yFAAyF;AACzF,eAAO,MAAM,UAAU,UAAW,IAAI,KAAG,MAAM,GAAG,SAGjD,CAAC;AAEF,iDAAiD;AACjD,eAAO,MAAM,UAAU,UAAW,IAAI,KAAG,IAAI,GAAG,SAI/C,CAAC;AAEF,MAAM,MAAM,QAAQ,GAAG;IACrB,QAAQ,CAAC,KAAK,EAAE,GAAG,CAAC;IACpB,kCAAkC;IAClC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,4CAA4C;IAC5C,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;CAC5B,CAAC;AAUF;;;GAGG;AACH,eAAO,MAAM,SAAS,QAAS,MAAM,SAAS,IAAI,SAAQ,OAAO,CAAC,QAAQ,CAAC,KAAQ,SAyBlF,CAAC"}
@@ -0,0 +1,60 @@
1
+ /**
2
+ * A timeline of physics steps, as data (ADR-014): inputs stamped with the step they apply
3
+ * at, and how far a world on `physics({ until })` may go. Peers (or a replay) that give
4
+ * the same inputs at the same steps to the same world get the same world, however their
5
+ * frames fell, because every change lands while the world waits at its step.
6
+ *
7
+ * The Model keeps a `Timeline`, `schedule`s inputs as they are agreed (a lockstep turn's,
8
+ * a recording's), moves the `frontier` as far as is known, `reach`es each step the world
9
+ * reports (`PhysicsReached`), and applies what `due` hands back. Its scene's physics is
10
+ * `physics({ until: Timeline.until(timeline) })`: the next step with inputs, or the
11
+ * frontier. Use it as a namespace: `Timeline.make()`.
12
+ *
13
+ * @module
14
+ */
15
+ /** An input, and the step it applies at. */
16
+ export type Scheduled<I> = {
17
+ readonly step: number;
18
+ readonly input: I;
19
+ };
20
+ export type Timeline<I> = {
21
+ /** Every input, in the order they apply: by step, then as scheduled. */
22
+ readonly inputs: ReadonlyArray<Scheduled<I>>;
23
+ /** How many of `inputs` have been handed out by `due`. */
24
+ readonly applied: number;
25
+ /** The step the world last said it reached; `null` before it says any. */
26
+ readonly reached: number | null;
27
+ /** How far the world may go before more inputs could arrive. */
28
+ readonly frontier: number;
29
+ };
30
+ /** An empty timeline, the world allowed as far as `frontier`. */
31
+ export declare const make: <I>(frontier?: number) => Timeline<I>;
32
+ /**
33
+ * `input` at `step`, after any already there. The step must be one the world has not
34
+ * passed: not before `until`. A lockstep session stamps a turn's inputs with that turn's
35
+ * step, which is the frontier until the turn applies.
36
+ */
37
+ export declare const schedule: <I>(timeline: Timeline<I>, step: number, input: I) => Timeline<I>;
38
+ /** The world may now go as far as `frontier` (a timeline's frontier never goes back). */
39
+ export declare const extend: <I>(timeline: Timeline<I>, frontier: number) => Timeline<I>;
40
+ /** The world said it reached `step`. */
41
+ export declare const reach: <I>(timeline: Timeline<I>, step: number) => Timeline<I>;
42
+ /**
43
+ * The inputs for the step the world is at, to apply now, and the timeline without them.
44
+ * Applied while the world waits there, they land at that step.
45
+ */
46
+ export declare const due: <I>(timeline: Timeline<I>) => {
47
+ readonly timeline: Timeline<I>;
48
+ readonly inputs: ReadonlyArray<I>;
49
+ };
50
+ /**
51
+ * Where the world should stop next: at the next step with inputs not yet applied, or at
52
+ * the frontier. Give it as `physics({ until })`.
53
+ */
54
+ export declare const until: <I>(timeline: Timeline<I>) => number;
55
+ /**
56
+ * The same inputs from the start, for a new world (a newcomer to a session, a replay):
57
+ * nothing applied or reached yet, the frontier where it was.
58
+ */
59
+ export declare const restart: <I>(timeline: Timeline<I>) => Timeline<I>;
60
+ //# sourceMappingURL=timeline.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"timeline.d.ts","sourceRoot":"","sources":["../../src/kernel/timeline.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,4CAA4C;AAC5C,MAAM,MAAM,SAAS,CAAC,CAAC,IAAI;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,CAAC,CAAA;CAAE,CAAC;AAExE,MAAM,MAAM,QAAQ,CAAC,CAAC,IAAI;IACxB,wEAAwE;IACxE,QAAQ,CAAC,MAAM,EAAE,aAAa,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC;IAC7C,0DAA0D;IAC1D,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,0EAA0E;IAC1E,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,gEAAgE;IAChE,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;CAC3B,CAAC;AAEF,iEAAiE;AACjE,eAAO,MAAM,IAAI,GAAI,CAAC,wBAAiB,QAAQ,CAAC,CAAC,CAK/C,CAAC;AAEH;;;;GAIG;AACH,eAAO,MAAM,QAAQ,GAAI,CAAC,YAAY,QAAQ,CAAC,CAAC,CAAC,QAAQ,MAAM,SAAS,CAAC,KAAG,QAAQ,CAAC,CAAC,CAOrF,CAAC;AAEF,yFAAyF;AACzF,eAAO,MAAM,MAAM,GAAI,CAAC,YAAY,QAAQ,CAAC,CAAC,CAAC,YAAY,MAAM,KAAG,QAAQ,CAAC,CAAC,CACR,CAAC;AAEvE,wCAAwC;AACxC,eAAO,MAAM,KAAK,GAAI,CAAC,YAAY,QAAQ,CAAC,CAAC,CAAC,QAAQ,MAAM,KAAG,QAAQ,CAAC,CAAC,CACF,CAAC;AAExE;;;GAGG;AACH,eAAO,MAAM,GAAG,GAAI,CAAC,YACT,QAAQ,CAAC,CAAC,CAAC,KACpB;IAAE,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC,CAAC,CAAA;CAUrE,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,KAAK,GAAI,CAAC,YAAY,QAAQ,CAAC,CAAC,CAAC,KAAG,MACiC,CAAC;AAEnF;;;GAGG;AACH,eAAO,MAAM,OAAO,GAAI,CAAC,YAAY,QAAQ,CAAC,CAAC,CAAC,KAAG,QAAQ,CAAC,CAAC,CAI3D,CAAC"}
@@ -0,0 +1,31 @@
1
+ /**
2
+ * Trails, as Drei's `Trail` (`bf6f4ad`, `src/core/Trail.tsx`): a ribbon behind a moving
3
+ * node through the places it has been. Drei records the target once a frame into
4
+ * `length × 10` points, shifting in `decay` new ones each time it moves at least
5
+ * `stride`, every `interval` frames, and draws them with `meshline`. Here the same rules
6
+ * run on a clock of 60 steps a second of scene time rather than per frame, so a trail is
7
+ * as long at 30 frames a second as at 120; and the ribbon is a plain mesh turned to face
8
+ * the camera each frame, with vertex colours, so either renderer draws it. Its width is
9
+ * Drei's: a tenth of `width`, in scene units, `taper` and `fade` narrowing and fading it
10
+ * towards the tail (Drei takes an `attenuation` function).
11
+ *
12
+ * @module
13
+ */
14
+ import { Mesh, Vector3 } from 'three';
15
+ import type { Trail } from './description.ts';
16
+ export type TrailRibbon = {
17
+ /** The ribbon, in the space the positions are in; never picked. */
18
+ readonly object: Mesh;
19
+ /** Records the node at `position` for every step up to scene time `now`. */
20
+ readonly record: (position: Vector3, now: number) => void;
21
+ /** Turns the ribbon to face a camera at `eye`. */
22
+ readonly face: (eye: Vector3) => void;
23
+ /** Whether every recorded point is where the node is: the trail has caught up. */
24
+ readonly settled: () => boolean;
25
+ /** Applies a new look; a new length starts the trail again at `position`. */
26
+ readonly restyle: (trail: Trail, position: Vector3, now: number) => void;
27
+ readonly dispose: () => void;
28
+ };
29
+ /** A ribbon of `trail.length × 10` points, all at `start`. Allocation-free once made. */
30
+ export declare const createTrailRibbon: (first: Trail, start: Vector3, now: number) => TrailRibbon;
31
+ //# sourceMappingURL=trail.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"trail.d.ts","sourceRoot":"","sources":["../../src/kernel/trail.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,EAKL,IAAI,EAEJ,OAAO,EACR,MAAM,OAAO,CAAC;AAEf,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAK9C,MAAM,MAAM,WAAW,GAAG;IACxB,mEAAmE;IACnE,QAAQ,CAAC,MAAM,EAAE,IAAI,CAAC;IACtB,4EAA4E;IAC5E,QAAQ,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1D,kDAAkD;IAClD,QAAQ,CAAC,IAAI,EAAE,CAAC,GAAG,EAAE,OAAO,KAAK,IAAI,CAAC;IACtC,kFAAkF;IAClF,QAAQ,CAAC,OAAO,EAAE,MAAM,OAAO,CAAC;IAChC,6EAA6E;IAC7E,QAAQ,CAAC,OAAO,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IACzE,QAAQ,CAAC,OAAO,EAAE,MAAM,IAAI,CAAC;CAC9B,CAAC;AAUF,yFAAyF;AACzF,eAAO,MAAM,iBAAiB,UAAW,KAAK,SAAS,OAAO,OAAO,MAAM,KAAG,WAsH7E,CAAC"}
@@ -0,0 +1,25 @@
1
+ import type { Camera, SceneNode } from './description.ts';
2
+ /** An axis end: a positive or negative world axis. */
3
+ export type ViewAxis = 'x' | 'y' | 'z' | '-x' | '-y' | '-z';
4
+ export type ViewportGizmoOptions = {
5
+ /** Pixels from the middle to a head: Drei's `scale` of 40. */
6
+ readonly size: number;
7
+ /** The head under the pointer, drawn larger, as Drei's. */
8
+ readonly hovered: ViewAxis | null;
9
+ /** Leaves out the negative heads (Drei's `hideNegativeAxes`). */
10
+ readonly hideNegativeAxes: boolean;
11
+ };
12
+ /**
13
+ * The gizmo for `camera`, keyed under `key` (`${key}:x`, `${key}:-y` and so on), for a
14
+ * scene's `hud`: Drei's defaults, 40 pixels to a head, every head shown.
15
+ */
16
+ export declare const viewportGizmoNodes: (key: string, camera: Camera, options?: Partial<ViewportGizmoOptions>) => SceneNode;
17
+ /** The head a hit `key` (or any part of one) is on, if it is one of this gizmo's. */
18
+ export declare const viewportAxisOf: (key: string, hit: string) => ViewAxis | undefined;
19
+ /**
20
+ * `camera` looking from `axis` at what it looks at, as far away as it was: Drei's
21
+ * `tweenCamera` to that head, where it ends. Looking straight up or down, it stays a
22
+ * hair off the pole toward +z, as `OrbitControls` keeps its camera off them.
23
+ */
24
+ export declare const cameraAlong: <C extends Camera>(camera: C, axis: ViewAxis) => C;
25
+ //# sourceMappingURL=viewportGizmo.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"viewportGizmo.d.ts","sourceRoot":"","sources":["../../src/kernel/viewportGizmo.ts"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,MAAM,EAAE,SAAS,EAAQ,MAAM,kBAAkB,CAAC;AAEhE,sDAAsD;AACtD,MAAM,MAAM,QAAQ,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAE5D,MAAM,MAAM,oBAAoB,GAAG;IACjC,8DAA8D;IAC9D,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,2DAA2D;IAC3D,QAAQ,CAAC,OAAO,EAAE,QAAQ,GAAG,IAAI,CAAC;IAClC,iEAAiE;IACjE,QAAQ,CAAC,gBAAgB,EAAE,OAAO,CAAC;CACpC,CAAC;AAwHF;;;GAGG;AACH,eAAO,MAAM,kBAAkB,QACxB,MAAM,UACH,MAAM,YACL,OAAO,CAAC,oBAAoB,CAAC,KACrC,SAeF,CAAC;AAEF,qFAAqF;AACrF,eAAO,MAAM,cAAc,QAAS,MAAM,OAAO,MAAM,KAAG,QAAQ,GAAG,SAIpE,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,WAAW,GAAI,CAAC,SAAS,MAAM,UAAU,CAAC,QAAQ,QAAQ,KAAG,CAOzE,CAAC"}
@@ -0,0 +1,20 @@
1
+ /**
2
+ * An inspector generated from schemas (roadmap, "Beyond parity" 4): the fields of any
3
+ * value with a schema (a scene node, a material, a Model's own records) as an inspector
4
+ * shows them, and edits that are checked by the same schema, so an inspector can never
5
+ * put a value the schema rejects into a Model.
6
+ *
7
+ * `fields(schema, value)` lists them (numbers, text, switches, choices, colours, vectors,
8
+ * and read-only kinds and lists); `edit(schema, value, path, next)` puts `next` at
9
+ * `path` and decodes the result, failing with the schema's own account of what is
10
+ * wrong. Colours are fields typed `SceneSchema.Rgb`; vectors, `SceneSchema.Vec3`.
11
+ *
12
+ * @module
13
+ */
14
+ import { Result, Schema } from 'effect';
15
+ import { type FieldPath, type InspectedField } from '../kernel/inspect.ts';
16
+ /** The fields of `value`, as `schema` describes it, in the schema's order. */
17
+ export declare const fields: (schema: Schema.Top, value: unknown) => ReadonlyArray<InspectedField>;
18
+ /** `value` with `next` at `path`, if `schema` accepts the result; why not, if it does not. */
19
+ export declare const edit: <A>(schema: Schema.Decoder<A>, value: A, path: FieldPath, next: unknown) => Result.Result<A, string>;
20
+ //# sourceMappingURL=Inspector.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Inspector.d.ts","sourceRoot":"","sources":["../../src/runtime/Inspector.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAExC,OAAO,EACL,KAAK,SAAS,EAEd,KAAK,cAAc,EAGpB,MAAM,sBAAsB,CAAC;AAQ9B,8EAA8E;AAC9E,eAAO,MAAM,MAAM,WAAY,MAAM,CAAC,GAAG,SAAS,OAAO,KAAG,aAAa,CAAC,cAAc,CACtC,CAAC;AAEnD,8FAA8F;AAC9F,eAAO,MAAM,IAAI,GAAI,CAAC,UACZ,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,SAClB,CAAC,QACF,SAAS,QACT,OAAO,KACZ,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,MAAM,CAGvB,CAAC"}