effect-motion 0.4.0 → 0.6.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.
Files changed (91) hide show
  1. package/README.md +3 -3
  2. package/dist/Camera.d.ts +186 -49
  3. package/dist/Camera.js +343 -76
  4. package/dist/Color.d.ts +101 -1
  5. package/dist/Color.js +101 -1
  6. package/dist/EffectMotionError.d.ts +17 -0
  7. package/dist/EffectMotionError.js +17 -0
  8. package/dist/Entity.d.ts +684 -30
  9. package/dist/Entity.js +281 -27
  10. package/dist/Font.d.ts +108 -0
  11. package/dist/Font.js +95 -0
  12. package/dist/Image.d.ts +71 -0
  13. package/dist/Image.js +50 -0
  14. package/dist/Instance.d.ts +73 -11
  15. package/dist/Instance.js +44 -11
  16. package/dist/Motion.d.ts +328 -53
  17. package/dist/Motion.js +278 -46
  18. package/dist/Physics.d.ts +154 -20
  19. package/dist/Physics.js +92 -11
  20. package/dist/Projection.d.ts +36 -132
  21. package/dist/Projection.js +33 -292
  22. package/dist/Resource.d.ts +26 -0
  23. package/dist/Resource.js +41 -0
  24. package/dist/Runner.d.ts +714 -349
  25. package/dist/Runner.js +197 -150
  26. package/dist/Scene.d.ts +603 -175
  27. package/dist/Scene.js +596 -112
  28. package/dist/Timing.d.ts +170 -13
  29. package/dist/Timing.js +124 -6
  30. package/dist/Tree.d.ts +39 -0
  31. package/dist/Tree.js +127 -0
  32. package/dist/index.d.ts +54 -5
  33. package/dist/index.js +56 -5
  34. package/dist/particles/Particle.d.ts +2 -2
  35. package/dist/particles/ParticleField.d.ts +44 -42
  36. package/dist/particles/ParticleField.js +8 -9
  37. package/dist/particles/constructors.d.ts +5 -6
  38. package/dist/particles/constructors.js +8 -3
  39. package/dist/particles/legacy.d.ts +58 -0
  40. package/dist/particles/legacy.js +46 -0
  41. package/dist/particles/simulate.js +11 -3
  42. package/dist/particles/step.js +14 -10
  43. package/dist/types.d.ts +5 -0
  44. package/dist/types.js +1 -0
  45. package/package.json +58 -60
  46. package/dist/CameraHelpers.d.ts +0 -70
  47. package/dist/CameraHelpers.js +0 -239
  48. package/dist/CanvasExporter.d.ts +0 -12
  49. package/dist/CanvasExporter.js +0 -40
  50. package/dist/Fonts.d.ts +0 -41
  51. package/dist/Fonts.js +0 -27
  52. package/dist/Images.d.ts +0 -33
  53. package/dist/Images.js +0 -24
  54. package/dist/PngExporter.d.ts +0 -6
  55. package/dist/PngExporter.js +0 -85
  56. package/dist/Renderer.d.ts +0 -118
  57. package/dist/Renderer.js +0 -508
  58. package/dist/Shapes.d.ts +0 -11
  59. package/dist/Shapes.js +0 -11
  60. package/dist/demo.d.ts +0 -3
  61. package/dist/demo.js +0 -71
  62. package/dist/render/dof.d.ts +0 -27
  63. package/dist/render/dof.js +0 -37
  64. package/dist/render/paint.d.ts +0 -30
  65. package/dist/render/paint.js +0 -36
  66. package/dist/render/shapes.d.ts +0 -42
  67. package/dist/render/shapes.js +0 -310
  68. package/dist/shapes/Circle.d.ts +0 -32
  69. package/dist/shapes/Circle.js +0 -9
  70. package/dist/shapes/Ellipse.d.ts +0 -35
  71. package/dist/shapes/Ellipse.js +0 -10
  72. package/dist/shapes/Group.d.ts +0 -126
  73. package/dist/shapes/Group.js +0 -89
  74. package/dist/shapes/Hud.d.ts +0 -38
  75. package/dist/shapes/Hud.js +0 -35
  76. package/dist/shapes/Image.d.ts +0 -45
  77. package/dist/shapes/Image.js +0 -28
  78. package/dist/shapes/Line.d.ts +0 -47
  79. package/dist/shapes/Line.js +0 -35
  80. package/dist/shapes/Path.d.ts +0 -107
  81. package/dist/shapes/Path.js +0 -32
  82. package/dist/shapes/Rect.d.ts +0 -51
  83. package/dist/shapes/Rect.js +0 -22
  84. package/dist/shapes/Shape2D.d.ts +0 -49
  85. package/dist/shapes/Shape2D.js +0 -52
  86. package/dist/shapes/Shapes.d.ts +0 -11
  87. package/dist/shapes/Shapes.js +0 -11
  88. package/dist/shapes/Square.d.ts +0 -32
  89. package/dist/shapes/Square.js +0 -11
  90. package/dist/shapes/Text.d.ts +0 -51
  91. package/dist/shapes/Text.js +0 -24
package/dist/Runner.d.ts CHANGED
@@ -3,43 +3,81 @@ import type * as Cause from "effect/Cause";
3
3
  import * as Context from "effect/Context";
4
4
  import * as Effect from "effect/Effect";
5
5
  import type * as Fiber from "effect/Fiber";
6
- import type * as Schema from "effect/Schema";
7
- import { type CameraState } from "./Camera.js";
8
6
  import * as Color from "./Color.js";
9
- import type * as Entity from "./Entity.js";
7
+ import * as Entity from "./Entity.js";
10
8
  import * as Instance from "./Instance.js";
11
- import { Group } from "./shapes/Group.js";
9
+ import * as Projection from "./Projection.js";
10
+ import { ROOT_ID } from "./Tree.js";
12
11
  export declare const TypeId: "~motion/SceneRunner";
13
- /** conventional id of the implicit root group every instance attaches to */
14
- export declare const ROOT_ID = "root";
12
+ export { ROOT_ID };
15
13
  export type Seed = number | string;
16
- /** the fixed default: scenes are deterministic even with no seed set */
14
+ /**
15
+ * The seed used when none is given.
16
+ *
17
+ * @remarks
18
+ * Fixed rather than random on purpose: a scene using randomness still
19
+ * produces identical frames on every run unless you deliberately vary the
20
+ * seed.
21
+ */
17
22
  export declare const defaultSeed: Seed;
18
23
  /**
19
- * Playback settings — how the movie RUNS. What the movie IS (resolution,
20
- * background) lives on the root scene as its composition config.
24
+ * Playback settings — how a scene RUNS, as opposed to what it IS.
25
+ *
26
+ * @remarks
27
+ * Passed to `Scene.run` / `Scene.stream`, so the same scene can be played
28
+ * back at different rates or seeds without being rewritten. Resolution and
29
+ * background are NOT here: those are the composition's own identity, fixed
30
+ * at `Scene.make`.
21
31
  */
22
32
  export type Settings = {
33
+ /**
34
+ * Frames produced per second of scene time.
35
+ *
36
+ * @remarks
37
+ * Determines how many frames a given duration becomes: a one-second
38
+ * animation is 30 frames at 30fps and 60 at 60fps. It changes the
39
+ * sampling, never the motion — the same scene looks the same, just
40
+ * smoother.
41
+ *
42
+ * @defaultValue `60`
43
+ */
23
44
  frameRate: number;
24
45
  /**
25
- * seeds the scene's pseudo-random service (effect's Random via
26
- * withSeed); the fixed default keeps default-constructed scenes
27
- * byte-identical across runs. Note: the generator algorithm belongs
28
- * to effect, so upgrading effect may change seeded sequences.
46
+ * Seeds the scene's random number generator.
47
+ *
48
+ * @remarks
49
+ * Randomness in a scene comes from this seed rather than
50
+ * `Math.random()`, so the "random" scatter of a particle field is
51
+ * identical on every run. Change the seed to get a different arrangement
52
+ * that is itself reproducible.
53
+ *
54
+ * Note the generator belongs to `effect`, so upgrading it can change the
55
+ * sequence a given seed produces.
56
+ *
57
+ * @defaultValue `"effect-motion"`
29
58
  */
30
59
  seed: Seed;
31
60
  /**
32
- * hard cap on frames a scene may produce (default 36_000 — 10 minutes
33
- * at 60fps): a scene that exceeds it dies instead of hanging the
34
- * consumer. Set to `Infinity` to declare an intentionally infinite
35
- * scene.
61
+ * Hard cap on how many frames a scene may produce.
62
+ *
63
+ * @remarks
64
+ * A safety net: a scene that exceeds it fails with a message naming the
65
+ * limit instead of hanging whatever is consuming it. The usual cause is
66
+ * an unbounded loop with nothing to end it.
67
+ *
68
+ * Set it to `Infinity` to declare a deliberately endless scene.
69
+ *
70
+ * @defaultValue `36_000` — ten minutes at 60fps
36
71
  */
37
72
  maxFrames: number;
38
73
  };
39
74
  /**
40
- * A scene's composition config, After Effects–style: what the comp IS.
41
- * The runner inherits the ROOT scene's config; a nested scene keeps its
42
- * own as its bounds (see Scene.play).
75
+ * What a composition IS: its pixel dimensions and background.
76
+ *
77
+ * @remarks
78
+ * Set at `Scene.make` and carried on every frame, so a frame is
79
+ * self-describing. A nested scene keeps its own config as its bounds — that
80
+ * is what a played scene clips and paints within.
43
81
  */
44
82
  export type CompConfig = {
45
83
  width: number;
@@ -48,7 +86,8 @@ export type CompConfig = {
48
86
  backgroundColor: Color.Color;
49
87
  };
50
88
  export declare const defaultComp: CompConfig;
51
- export type GroupInstance = Instance.Of<typeof Group>;
89
+ /** A handle to a container (`Group` or `Hud`) — the only mountable parents. */
90
+ export type GroupInstance = Instance.Instance<Entity.ContainerTag>;
52
91
  /**
53
92
  * A child in a polymorphic `children` list: a plain string (→ a `Text`),
54
93
  * an already-created `Instance`, or an `Effect` that resolves to one (a
@@ -57,81 +96,19 @@ export type GroupInstance = Instance.Of<typeof Group>;
57
96
  */
58
97
  export type Child = string | Instance.Instance | Effect.Effect<Instance.Instance, never, Runner>;
59
98
  /**
60
- * Builtin, engine-owned instance properties — namespaced with `$` and
61
- * held BESIDE entity data, never in the entity schema. Every entity gets
62
- * them uniformly. `$visible` defaults to `true`.
99
+ * The input `instantiate` accepts: the entity's own make-input, except that
100
+ * a `children` field (stored as `Array<string>` of ids) is authored as the
101
+ * polymorphic {@link Child} list — the runner normalizes it to ids in list
102
+ * order.
63
103
  */
64
- export interface BuiltinProps {
65
- readonly $visible?: boolean;
66
- }
67
- /**
68
- * The input accepted by `instantiate`: an entity's own make-input, plus
69
- * builtin props ($visible), plus — when the entity has a `children` field
70
- * — a polymorphic `children` list (strings/instances/effects) in place of
71
- * the stored `Array<string>` of ids.
72
- */
73
- export type InstantiateProps<MakeInput> = Omit<MakeInput, "children"> & BuiltinProps & ("children" extends keyof MakeInput ? {
104
+ export type InstantiateProps<Tag extends Entity.EntityTag> = Omit<Entity.MakeInput<Tag>, "children"> & (Tag extends Entity.ContainerTag ? {
74
105
  readonly children?: ReadonlyArray<Child>;
75
106
  } : Record<never, never>);
76
107
  /**
77
108
  * The ambient mount parent for `instantiate` — provided per scene
78
109
  * evaluation (`Scene.play({ parent })`); `null` means the runner root.
79
110
  */
80
- export declare const CurrentParent: Context.Reference<Instance.Instance<"shapes/Group", Schema.Struct<{
81
- x: Schema.withConstructorDefault<Schema.Number>;
82
- y: Schema.withConstructorDefault<Schema.Number>;
83
- z: Schema.withConstructorDefault<Schema.Number>;
84
- opacity: Schema.withConstructorDefault<Schema.Number>;
85
- transform: Schema.withConstructorDefault<Schema.Struct<{
86
- readonly a: Schema.Number;
87
- readonly b: Schema.Number;
88
- readonly c: Schema.Number;
89
- readonly d: Schema.Number;
90
- readonly e: Schema.Number;
91
- readonly f: Schema.Number;
92
- }>>;
93
- width: Schema.optionalKey<Schema.Number>;
94
- height: Schema.optionalKey<Schema.Number>;
95
- backgroundColor: Schema.optionalKey<typeof Color.Color>;
96
- children: Schema.withConstructorDefault<Schema.$Array<Schema.String>>;
97
- }>, {
98
- "~position": Entity.TraitLens<{
99
- readonly x: number;
100
- readonly y: number;
101
- readonly z: number;
102
- readonly opacity: number;
103
- readonly transform: Schema.Struct.ReadonlySide<{
104
- readonly a: Schema.Number;
105
- readonly b: Schema.Number;
106
- readonly c: Schema.Number;
107
- readonly d: Schema.Number;
108
- readonly e: Schema.Number;
109
- readonly f: Schema.Number;
110
- }, "Type">;
111
- readonly width?: number;
112
- readonly height?: number;
113
- readonly backgroundColor?: Color.Color;
114
- readonly children: readonly string[];
115
- }, Entity.Position>;
116
- "~opacity": Entity.TraitLens<{
117
- readonly x: number;
118
- readonly y: number;
119
- readonly z: number;
120
- readonly opacity: number;
121
- readonly transform: Schema.Struct.ReadonlySide<{
122
- readonly a: Schema.Number;
123
- readonly b: Schema.Number;
124
- readonly c: Schema.Number;
125
- readonly d: Schema.Number;
126
- readonly e: Schema.Number;
127
- readonly f: Schema.Number;
128
- }, "Type">;
129
- readonly width?: number;
130
- readonly height?: number;
131
- readonly backgroundColor?: Color.Color;
132
- readonly children: readonly string[];
133
- }, number>;
134
- }> | null>;
111
+ export declare const CurrentParent: Context.Reference<GroupInstance | null>;
135
112
  /**
136
113
  * A branch of animation as the runner tracks it: its fiber and its
137
114
  * SEMANTIC end (`finished` resolves at `Scene.finish` or completion,
@@ -141,63 +118,16 @@ export interface BranchEntry {
141
118
  readonly fiber: Fiber.Fiber<unknown, unknown>;
142
119
  readonly finished: Effect.Effect<void>;
143
120
  }
121
+ /**
122
+ * The resting camera for a comp of the given width: width-relative focal
123
+ * length (AE's 50mm equivalent), positioned so the z=0 plane projects at
124
+ * scale 1 and is in focus.
125
+ */
126
+ export declare const identityCameraView: (width: number) => Projection.CameraView & Projection.PointOfInterest;
127
+ export declare const identityCamera: (width: number) => Entity.EntityByTag<"Camera">;
144
128
  declare const Runner_base: Context.ServiceClass<Runner, "Runner", {
145
- root: Instance.Instance<"shapes/Group", Schema.Struct<{
146
- x: Schema.withConstructorDefault<Schema.Number>;
147
- y: Schema.withConstructorDefault<Schema.Number>;
148
- z: Schema.withConstructorDefault<Schema.Number>;
149
- opacity: Schema.withConstructorDefault<Schema.Number>;
150
- transform: Schema.withConstructorDefault<Schema.Struct<{
151
- readonly a: Schema.Number;
152
- readonly b: Schema.Number;
153
- readonly c: Schema.Number;
154
- readonly d: Schema.Number;
155
- readonly e: Schema.Number;
156
- readonly f: Schema.Number;
157
- }>>;
158
- width: Schema.optionalKey<Schema.Number>;
159
- height: Schema.optionalKey<Schema.Number>;
160
- backgroundColor: Schema.optionalKey<typeof Color.Color>;
161
- children: Schema.withConstructorDefault<Schema.$Array<Schema.String>>;
162
- }>, {
163
- "~position": Entity.TraitLens<{
164
- readonly x: number;
165
- readonly y: number;
166
- readonly z: number;
167
- readonly opacity: number;
168
- readonly transform: Schema.Struct.ReadonlySide<{
169
- readonly a: Schema.Number;
170
- readonly b: Schema.Number;
171
- readonly c: Schema.Number;
172
- readonly d: Schema.Number;
173
- readonly e: Schema.Number;
174
- readonly f: Schema.Number;
175
- }, "Type">;
176
- readonly width?: number;
177
- readonly height?: number;
178
- readonly backgroundColor?: Color.Color;
179
- readonly children: readonly string[];
180
- }, Entity.Position>;
181
- "~opacity": Entity.TraitLens<{
182
- readonly x: number;
183
- readonly y: number;
184
- readonly z: number;
185
- readonly opacity: number;
186
- readonly transform: Schema.Struct.ReadonlySide<{
187
- readonly a: Schema.Number;
188
- readonly b: Schema.Number;
189
- readonly c: Schema.Number;
190
- readonly d: Schema.Number;
191
- readonly e: Schema.Number;
192
- readonly f: Schema.Number;
193
- }, "Type">;
194
- readonly width?: number;
195
- readonly height?: number;
196
- readonly backgroundColor?: Color.Color;
197
- readonly children: readonly string[];
198
- }, number>;
199
- }>;
200
- instantiate: <Name extends string, Data extends Schema.Top, Traits extends Partial<Entity.EntityTraits<Data["Type"]>>>(entity: Entity.Entity<Name, Data, Traits>, props: InstantiateProps<Data["~type.make.in"]>) => Effect.Effect<Instance.Instance<Name, Data, Traits>, never, Runner>;
129
+ root: GroupInstance;
130
+ instantiate: <Tag extends Entity.EntityTag>(kind: Tag, props: InstantiateProps<Tag>) => Effect.Effect<Instance.Instance<Tag>, never, Runner>;
201
131
  appendChild: (parent: GroupInstance, child: Instance.Instance) => void;
202
132
  removeChild: (parent: GroupInstance, child: Instance.Instance) => void;
203
133
  settings: {
@@ -206,87 +136,327 @@ declare const Runner_base: Context.ServiceClass<Runner, "Runner", {
206
136
  maxFrames: number;
207
137
  };
208
138
  comp: CompConfig;
209
- getDataUnsafe: <Name extends string, Data extends Schema.Top>(instance: Instance.Instance<Name, Data>) => Data["Type"] | null;
210
- setDataUnsafe: <Name extends string, Data extends Schema.Top>(instance: Instance.Instance<Name, Data>, data: unknown) => void;
139
+ getDataUnsafe: <Tag extends Entity.EntityTag>(instance: Instance.Instance<Tag>) => Entity.EntityByTag<Tag> | null;
140
+ setDataUnsafe: <Tag extends Entity.EntityTag>(instance: Instance.Instance<Tag>, state: Entity.EntityByTag<Tag>) => void;
211
141
  state: Effect.Effect<{
212
- instances: {
213
- [x: string]: {
214
- data: unknown;
215
- entity: Entity.AnyEntity;
216
- $visible: boolean;
217
- };
218
- };
142
+ instances: Record<string, {
143
+ data: Entity.Entity;
144
+ }>;
219
145
  root: string;
220
146
  frameRate: number;
221
147
  width: number;
222
148
  height: number;
223
149
  backgroundColor: Color.Color;
224
- camera: CameraState;
150
+ camera: Projection.CameraView & Projection.PointOfInterest;
151
+ comps: {
152
+ [k: string]: CompConfig;
153
+ };
225
154
  }, never, never>;
226
- camera: Instance.Instance<"Camera", Schema.Struct<{
227
- x: Schema.withConstructorDefault<Schema.Number>;
228
- y: Schema.withConstructorDefault<Schema.Number>;
229
- z: Schema.withConstructorDefault<Schema.Number>;
230
- rotX: Schema.withConstructorDefault<Schema.Number>;
231
- rotY: Schema.withConstructorDefault<Schema.Number>;
232
- rotZ: Schema.withConstructorDefault<Schema.Number>;
233
- focalLength: Schema.withConstructorDefault<Schema.Number>;
234
- focusDistance: Schema.withConstructorDefault<Schema.Number>;
235
- aperture: Schema.withConstructorDefault<Schema.Number>;
236
- poiX: Schema.optionalKey<Schema.Number>;
237
- poiY: Schema.optionalKey<Schema.Number>;
238
- poiZ: Schema.optionalKey<Schema.Number>;
239
- }>, {
240
- readonly "~position": {
241
- get: (data: {
242
- readonly x: number;
243
- readonly y: number;
244
- readonly z: number;
245
- readonly rotX: number;
246
- readonly rotY: number;
247
- readonly rotZ: number;
248
- readonly focalLength: number;
249
- readonly focusDistance: number;
250
- readonly aperture: number;
251
- readonly poiX?: number;
252
- readonly poiY?: number;
253
- readonly poiZ?: number;
254
- }) => {
255
- x: number;
256
- y: number;
257
- z: number;
258
- };
259
- set: (data: {
260
- readonly x: number;
261
- readonly y: number;
262
- readonly z: number;
263
- readonly rotX: number;
264
- readonly rotY: number;
265
- readonly rotZ: number;
266
- readonly focalLength: number;
267
- readonly focusDistance: number;
268
- readonly aperture: number;
269
- readonly poiX?: number;
270
- readonly poiY?: number;
271
- readonly poiZ?: number;
272
- }, value: Entity.Position) => {
273
- readonly x: number;
274
- readonly y: number;
275
- readonly z: number;
276
- readonly rotX: number;
277
- readonly rotY: number;
278
- readonly rotZ: number;
279
- readonly focalLength: number;
280
- readonly focusDistance: number;
281
- readonly aperture: number;
282
- readonly poiX?: number;
283
- readonly poiY?: number;
284
- readonly poiZ?: number;
285
- };
286
- };
287
- }>;
288
- setCamera: (instance: Instance.Instance) => void;
289
- destroy: <Name extends string, Data extends Schema.Top>(instance: Instance.Instance<Name, Data>) => void;
155
+ /**
156
+ * ponytail: create a tree node for an entity that is NOT in the
157
+ * union — the particle system only (design D10). Mounts under the
158
+ * ambient parent like any instance. Delete with the particles
159
+ * rewrite; see `particlesEscapeInstantiate`.
160
+ */
161
+ instantiateEscape: (state: {
162
+ readonly _tag: "Camera";
163
+ readonly position: {
164
+ readonly _tag: "Vec3";
165
+ readonly x: number;
166
+ readonly y: number;
167
+ readonly z: number;
168
+ };
169
+ readonly rotation: {
170
+ readonly _tag: "Vec3";
171
+ readonly x: number;
172
+ readonly y: number;
173
+ readonly z: number;
174
+ };
175
+ readonly focalLength: number;
176
+ readonly focusDistance: number;
177
+ readonly aperture: number;
178
+ readonly poi: {
179
+ readonly _tag: "Vec3";
180
+ readonly x: number;
181
+ readonly y: number;
182
+ readonly z: number;
183
+ } | null;
184
+ } | {
185
+ readonly _tag: "Circle";
186
+ readonly position: {
187
+ readonly _tag: "Vec3";
188
+ readonly x: number;
189
+ readonly y: number;
190
+ readonly z: number;
191
+ };
192
+ readonly rotation: {
193
+ readonly _tag: "Vec3";
194
+ readonly x: number;
195
+ readonly y: number;
196
+ readonly z: number;
197
+ };
198
+ readonly scale: {
199
+ readonly _tag: "Vec3";
200
+ readonly x: number;
201
+ readonly y: number;
202
+ readonly z: number;
203
+ };
204
+ readonly opacity: number;
205
+ readonly visible: boolean;
206
+ readonly strokeWidth: number;
207
+ readonly strokeColor: Color.Color;
208
+ readonly fillColor: Color.Color;
209
+ readonly radius: number;
210
+ } | {
211
+ readonly _tag: "Ellipse";
212
+ readonly position: {
213
+ readonly _tag: "Vec3";
214
+ readonly x: number;
215
+ readonly y: number;
216
+ readonly z: number;
217
+ };
218
+ readonly rotation: {
219
+ readonly _tag: "Vec3";
220
+ readonly x: number;
221
+ readonly y: number;
222
+ readonly z: number;
223
+ };
224
+ readonly scale: {
225
+ readonly _tag: "Vec3";
226
+ readonly x: number;
227
+ readonly y: number;
228
+ readonly z: number;
229
+ };
230
+ readonly opacity: number;
231
+ readonly visible: boolean;
232
+ readonly strokeWidth: number;
233
+ readonly strokeColor: Color.Color;
234
+ readonly fillColor: Color.Color;
235
+ readonly radiusX: number;
236
+ readonly radiusY: number;
237
+ } | {
238
+ readonly _tag: "Group";
239
+ readonly position: {
240
+ readonly _tag: "Vec3";
241
+ readonly x: number;
242
+ readonly y: number;
243
+ readonly z: number;
244
+ };
245
+ readonly rotation: {
246
+ readonly _tag: "Vec3";
247
+ readonly x: number;
248
+ readonly y: number;
249
+ readonly z: number;
250
+ };
251
+ readonly scale: {
252
+ readonly _tag: "Vec3";
253
+ readonly x: number;
254
+ readonly y: number;
255
+ readonly z: number;
256
+ };
257
+ readonly opacity: number;
258
+ readonly visible: boolean;
259
+ readonly children: readonly string[];
260
+ } | {
261
+ readonly _tag: "Hud";
262
+ readonly position: {
263
+ readonly _tag: "Vec3";
264
+ readonly x: number;
265
+ readonly y: number;
266
+ readonly z: number;
267
+ };
268
+ readonly rotation: {
269
+ readonly _tag: "Vec3";
270
+ readonly x: number;
271
+ readonly y: number;
272
+ readonly z: number;
273
+ };
274
+ readonly scale: {
275
+ readonly _tag: "Vec3";
276
+ readonly x: number;
277
+ readonly y: number;
278
+ readonly z: number;
279
+ };
280
+ readonly opacity: number;
281
+ readonly visible: boolean;
282
+ readonly children: readonly string[];
283
+ } | {
284
+ readonly _tag: "Image";
285
+ readonly position: {
286
+ readonly _tag: "Vec3";
287
+ readonly x: number;
288
+ readonly y: number;
289
+ readonly z: number;
290
+ };
291
+ readonly rotation: {
292
+ readonly _tag: "Vec3";
293
+ readonly x: number;
294
+ readonly y: number;
295
+ readonly z: number;
296
+ };
297
+ readonly scale: {
298
+ readonly _tag: "Vec3";
299
+ readonly x: number;
300
+ readonly y: number;
301
+ readonly z: number;
302
+ };
303
+ readonly opacity: number;
304
+ readonly visible: boolean;
305
+ readonly image: {
306
+ readonly _tag: "effect-motion/Resources/Image";
307
+ readonly id: string;
308
+ };
309
+ readonly width?: number;
310
+ readonly height?: number;
311
+ } | {
312
+ readonly _tag: "Line";
313
+ readonly position: {
314
+ readonly _tag: "Vec3";
315
+ readonly x: number;
316
+ readonly y: number;
317
+ readonly z: number;
318
+ };
319
+ readonly rotation: {
320
+ readonly _tag: "Vec3";
321
+ readonly x: number;
322
+ readonly y: number;
323
+ readonly z: number;
324
+ };
325
+ readonly scale: {
326
+ readonly _tag: "Vec3";
327
+ readonly x: number;
328
+ readonly y: number;
329
+ readonly z: number;
330
+ };
331
+ readonly opacity: number;
332
+ readonly visible: boolean;
333
+ readonly strokeWidth: number;
334
+ readonly strokeColor: Color.Color;
335
+ readonly start: {
336
+ readonly _tag: "Vec3";
337
+ readonly x: number;
338
+ readonly y: number;
339
+ readonly z: number;
340
+ };
341
+ readonly end: {
342
+ readonly _tag: "Vec3";
343
+ readonly x: number;
344
+ readonly y: number;
345
+ readonly z: number;
346
+ };
347
+ } | {
348
+ readonly _tag: "Path";
349
+ readonly position: {
350
+ readonly _tag: "Vec3";
351
+ readonly x: number;
352
+ readonly y: number;
353
+ readonly z: number;
354
+ };
355
+ readonly rotation: {
356
+ readonly _tag: "Vec3";
357
+ readonly x: number;
358
+ readonly y: number;
359
+ readonly z: number;
360
+ };
361
+ readonly scale: {
362
+ readonly _tag: "Vec3";
363
+ readonly x: number;
364
+ readonly y: number;
365
+ readonly z: number;
366
+ };
367
+ readonly opacity: number;
368
+ readonly visible: boolean;
369
+ readonly strokeWidth: number;
370
+ readonly strokeColor: Color.Color;
371
+ readonly fillColor: Color.Color;
372
+ readonly commands: readonly [{
373
+ readonly _tag: "L";
374
+ readonly x: number;
375
+ readonly y: number;
376
+ readonly z?: number;
377
+ } | {
378
+ readonly _tag: "M";
379
+ readonly x: number;
380
+ readonly y: number;
381
+ readonly z?: number;
382
+ } | {
383
+ readonly _tag: "Z";
384
+ }, ...({
385
+ readonly _tag: "L";
386
+ readonly x: number;
387
+ readonly y: number;
388
+ readonly z?: number;
389
+ } | {
390
+ readonly _tag: "M";
391
+ readonly x: number;
392
+ readonly y: number;
393
+ readonly z?: number;
394
+ } | {
395
+ readonly _tag: "Z";
396
+ })[]];
397
+ } | {
398
+ readonly _tag: "Rect";
399
+ readonly position: {
400
+ readonly _tag: "Vec3";
401
+ readonly x: number;
402
+ readonly y: number;
403
+ readonly z: number;
404
+ };
405
+ readonly rotation: {
406
+ readonly _tag: "Vec3";
407
+ readonly x: number;
408
+ readonly y: number;
409
+ readonly z: number;
410
+ };
411
+ readonly scale: {
412
+ readonly _tag: "Vec3";
413
+ readonly x: number;
414
+ readonly y: number;
415
+ readonly z: number;
416
+ };
417
+ readonly opacity: number;
418
+ readonly visible: boolean;
419
+ readonly strokeWidth: number;
420
+ readonly strokeColor: Color.Color;
421
+ readonly fillColor: Color.Color;
422
+ readonly width: number;
423
+ readonly height: number;
424
+ } | {
425
+ readonly _tag: "Text";
426
+ readonly position: {
427
+ readonly _tag: "Vec3";
428
+ readonly x: number;
429
+ readonly y: number;
430
+ readonly z: number;
431
+ };
432
+ readonly rotation: {
433
+ readonly _tag: "Vec3";
434
+ readonly x: number;
435
+ readonly y: number;
436
+ readonly z: number;
437
+ };
438
+ readonly scale: {
439
+ readonly _tag: "Vec3";
440
+ readonly x: number;
441
+ readonly y: number;
442
+ readonly z: number;
443
+ };
444
+ readonly opacity: number;
445
+ readonly visible: boolean;
446
+ readonly fillColor: Color.Color;
447
+ readonly text: string;
448
+ readonly fontSize: number;
449
+ readonly fontFamily: {
450
+ readonly _tag: "effect-motion/Resources/Font";
451
+ readonly id: string;
452
+ };
453
+ readonly textAnchor?: "end" | "middle" | "start";
454
+ readonly baseline?: "auto" | "hanging" | "middle";
455
+ }) => Effect.Effect<Instance.Instance<"Camera" | "Circle" | "Ellipse" | "Group" | "Hud" | "Image" | "Line" | "Path" | "Rect" | "Text">, never, never>;
456
+ registerComp: (id: string, config: CompConfig) => void;
457
+ camera: Instance.Instance<"Camera">;
458
+ setCamera: (instance: Instance.Instance<"Camera">) => void;
459
+ destroy: (instance: Instance.Instance) => void;
290
460
  phaser: {
291
461
  register: (n: number) => void;
292
462
  deregister: (n: number) => void;
@@ -307,62 +477,8 @@ declare const Runner_base: Context.ServiceClass<Runner, "Runner", {
307
477
  failureCause: () => Cause.Cause<unknown> | undefined;
308
478
  }> & {
309
479
  readonly make: (settings?: Partial<Settings> | undefined, comp?: CompConfig | undefined) => Effect.Effect<{
310
- root: Instance.Instance<"shapes/Group", Schema.Struct<{
311
- x: Schema.withConstructorDefault<Schema.Number>;
312
- y: Schema.withConstructorDefault<Schema.Number>;
313
- z: Schema.withConstructorDefault<Schema.Number>;
314
- opacity: Schema.withConstructorDefault<Schema.Number>;
315
- transform: Schema.withConstructorDefault<Schema.Struct<{
316
- readonly a: Schema.Number;
317
- readonly b: Schema.Number;
318
- readonly c: Schema.Number;
319
- readonly d: Schema.Number;
320
- readonly e: Schema.Number;
321
- readonly f: Schema.Number;
322
- }>>;
323
- width: Schema.optionalKey<Schema.Number>;
324
- height: Schema.optionalKey<Schema.Number>;
325
- backgroundColor: Schema.optionalKey<typeof Color.Color>;
326
- children: Schema.withConstructorDefault<Schema.$Array<Schema.String>>;
327
- }>, {
328
- "~position": Entity.TraitLens<{
329
- readonly x: number;
330
- readonly y: number;
331
- readonly z: number;
332
- readonly opacity: number;
333
- readonly transform: Schema.Struct.ReadonlySide<{
334
- readonly a: Schema.Number;
335
- readonly b: Schema.Number;
336
- readonly c: Schema.Number;
337
- readonly d: Schema.Number;
338
- readonly e: Schema.Number;
339
- readonly f: Schema.Number;
340
- }, "Type">;
341
- readonly width?: number;
342
- readonly height?: number;
343
- readonly backgroundColor?: Color.Color;
344
- readonly children: readonly string[];
345
- }, Entity.Position>;
346
- "~opacity": Entity.TraitLens<{
347
- readonly x: number;
348
- readonly y: number;
349
- readonly z: number;
350
- readonly opacity: number;
351
- readonly transform: Schema.Struct.ReadonlySide<{
352
- readonly a: Schema.Number;
353
- readonly b: Schema.Number;
354
- readonly c: Schema.Number;
355
- readonly d: Schema.Number;
356
- readonly e: Schema.Number;
357
- readonly f: Schema.Number;
358
- }, "Type">;
359
- readonly width?: number;
360
- readonly height?: number;
361
- readonly backgroundColor?: Color.Color;
362
- readonly children: readonly string[];
363
- }, number>;
364
- }>;
365
- instantiate: <Name extends string, Data extends Schema.Top, Traits extends Partial<Entity.EntityTraits<Data["Type"]>>>(entity: Entity.Entity<Name, Data, Traits>, props: InstantiateProps<Data["~type.make.in"]>) => Effect.Effect<Instance.Instance<Name, Data, Traits>, never, Runner>;
480
+ root: GroupInstance;
481
+ instantiate: <Tag extends Entity.EntityTag>(kind: Tag, props: InstantiateProps<Tag>) => Effect.Effect<Instance.Instance<Tag>, never, Runner>;
366
482
  appendChild: (parent: GroupInstance, child: Instance.Instance) => void;
367
483
  removeChild: (parent: GroupInstance, child: Instance.Instance) => void;
368
484
  settings: {
@@ -371,87 +487,327 @@ declare const Runner_base: Context.ServiceClass<Runner, "Runner", {
371
487
  maxFrames: number;
372
488
  };
373
489
  comp: CompConfig;
374
- getDataUnsafe: <Name extends string, Data extends Schema.Top>(instance: Instance.Instance<Name, Data>) => Data["Type"] | null;
375
- setDataUnsafe: <Name extends string, Data extends Schema.Top>(instance: Instance.Instance<Name, Data>, data: unknown) => void;
490
+ getDataUnsafe: <Tag extends Entity.EntityTag>(instance: Instance.Instance<Tag>) => Entity.EntityByTag<Tag> | null;
491
+ setDataUnsafe: <Tag extends Entity.EntityTag>(instance: Instance.Instance<Tag>, state: Entity.EntityByTag<Tag>) => void;
376
492
  state: Effect.Effect<{
377
- instances: {
378
- [x: string]: {
379
- data: unknown;
380
- entity: Entity.AnyEntity;
381
- $visible: boolean;
382
- };
383
- };
493
+ instances: Record<string, {
494
+ data: Entity.Entity;
495
+ }>;
384
496
  root: string;
385
497
  frameRate: number;
386
498
  width: number;
387
499
  height: number;
388
500
  backgroundColor: Color.Color;
389
- camera: CameraState;
501
+ camera: Projection.CameraView & Projection.PointOfInterest;
502
+ comps: {
503
+ [k: string]: CompConfig;
504
+ };
390
505
  }, never, never>;
391
- camera: Instance.Instance<"Camera", Schema.Struct<{
392
- x: Schema.withConstructorDefault<Schema.Number>;
393
- y: Schema.withConstructorDefault<Schema.Number>;
394
- z: Schema.withConstructorDefault<Schema.Number>;
395
- rotX: Schema.withConstructorDefault<Schema.Number>;
396
- rotY: Schema.withConstructorDefault<Schema.Number>;
397
- rotZ: Schema.withConstructorDefault<Schema.Number>;
398
- focalLength: Schema.withConstructorDefault<Schema.Number>;
399
- focusDistance: Schema.withConstructorDefault<Schema.Number>;
400
- aperture: Schema.withConstructorDefault<Schema.Number>;
401
- poiX: Schema.optionalKey<Schema.Number>;
402
- poiY: Schema.optionalKey<Schema.Number>;
403
- poiZ: Schema.optionalKey<Schema.Number>;
404
- }>, {
405
- readonly "~position": {
406
- get: (data: {
407
- readonly x: number;
408
- readonly y: number;
409
- readonly z: number;
410
- readonly rotX: number;
411
- readonly rotY: number;
412
- readonly rotZ: number;
413
- readonly focalLength: number;
414
- readonly focusDistance: number;
415
- readonly aperture: number;
416
- readonly poiX?: number;
417
- readonly poiY?: number;
418
- readonly poiZ?: number;
419
- }) => {
420
- x: number;
421
- y: number;
422
- z: number;
423
- };
424
- set: (data: {
425
- readonly x: number;
426
- readonly y: number;
427
- readonly z: number;
428
- readonly rotX: number;
429
- readonly rotY: number;
430
- readonly rotZ: number;
431
- readonly focalLength: number;
432
- readonly focusDistance: number;
433
- readonly aperture: number;
434
- readonly poiX?: number;
435
- readonly poiY?: number;
436
- readonly poiZ?: number;
437
- }, value: Entity.Position) => {
438
- readonly x: number;
439
- readonly y: number;
440
- readonly z: number;
441
- readonly rotX: number;
442
- readonly rotY: number;
443
- readonly rotZ: number;
444
- readonly focalLength: number;
445
- readonly focusDistance: number;
446
- readonly aperture: number;
447
- readonly poiX?: number;
448
- readonly poiY?: number;
449
- readonly poiZ?: number;
450
- };
506
+ /**
507
+ * ponytail: create a tree node for an entity that is NOT in the
508
+ * union — the particle system only (design D10). Mounts under the
509
+ * ambient parent like any instance. Delete with the particles
510
+ * rewrite; see `particlesEscapeInstantiate`.
511
+ */
512
+ instantiateEscape: (state: {
513
+ readonly _tag: "Camera";
514
+ readonly position: {
515
+ readonly _tag: "Vec3";
516
+ readonly x: number;
517
+ readonly y: number;
518
+ readonly z: number;
451
519
  };
452
- }>;
453
- setCamera: (instance: Instance.Instance) => void;
454
- destroy: <Name extends string, Data extends Schema.Top>(instance: Instance.Instance<Name, Data>) => void;
520
+ readonly rotation: {
521
+ readonly _tag: "Vec3";
522
+ readonly x: number;
523
+ readonly y: number;
524
+ readonly z: number;
525
+ };
526
+ readonly focalLength: number;
527
+ readonly focusDistance: number;
528
+ readonly aperture: number;
529
+ readonly poi: {
530
+ readonly _tag: "Vec3";
531
+ readonly x: number;
532
+ readonly y: number;
533
+ readonly z: number;
534
+ } | null;
535
+ } | {
536
+ readonly _tag: "Circle";
537
+ readonly position: {
538
+ readonly _tag: "Vec3";
539
+ readonly x: number;
540
+ readonly y: number;
541
+ readonly z: number;
542
+ };
543
+ readonly rotation: {
544
+ readonly _tag: "Vec3";
545
+ readonly x: number;
546
+ readonly y: number;
547
+ readonly z: number;
548
+ };
549
+ readonly scale: {
550
+ readonly _tag: "Vec3";
551
+ readonly x: number;
552
+ readonly y: number;
553
+ readonly z: number;
554
+ };
555
+ readonly opacity: number;
556
+ readonly visible: boolean;
557
+ readonly strokeWidth: number;
558
+ readonly strokeColor: Color.Color;
559
+ readonly fillColor: Color.Color;
560
+ readonly radius: number;
561
+ } | {
562
+ readonly _tag: "Ellipse";
563
+ readonly position: {
564
+ readonly _tag: "Vec3";
565
+ readonly x: number;
566
+ readonly y: number;
567
+ readonly z: number;
568
+ };
569
+ readonly rotation: {
570
+ readonly _tag: "Vec3";
571
+ readonly x: number;
572
+ readonly y: number;
573
+ readonly z: number;
574
+ };
575
+ readonly scale: {
576
+ readonly _tag: "Vec3";
577
+ readonly x: number;
578
+ readonly y: number;
579
+ readonly z: number;
580
+ };
581
+ readonly opacity: number;
582
+ readonly visible: boolean;
583
+ readonly strokeWidth: number;
584
+ readonly strokeColor: Color.Color;
585
+ readonly fillColor: Color.Color;
586
+ readonly radiusX: number;
587
+ readonly radiusY: number;
588
+ } | {
589
+ readonly _tag: "Group";
590
+ readonly position: {
591
+ readonly _tag: "Vec3";
592
+ readonly x: number;
593
+ readonly y: number;
594
+ readonly z: number;
595
+ };
596
+ readonly rotation: {
597
+ readonly _tag: "Vec3";
598
+ readonly x: number;
599
+ readonly y: number;
600
+ readonly z: number;
601
+ };
602
+ readonly scale: {
603
+ readonly _tag: "Vec3";
604
+ readonly x: number;
605
+ readonly y: number;
606
+ readonly z: number;
607
+ };
608
+ readonly opacity: number;
609
+ readonly visible: boolean;
610
+ readonly children: readonly string[];
611
+ } | {
612
+ readonly _tag: "Hud";
613
+ readonly position: {
614
+ readonly _tag: "Vec3";
615
+ readonly x: number;
616
+ readonly y: number;
617
+ readonly z: number;
618
+ };
619
+ readonly rotation: {
620
+ readonly _tag: "Vec3";
621
+ readonly x: number;
622
+ readonly y: number;
623
+ readonly z: number;
624
+ };
625
+ readonly scale: {
626
+ readonly _tag: "Vec3";
627
+ readonly x: number;
628
+ readonly y: number;
629
+ readonly z: number;
630
+ };
631
+ readonly opacity: number;
632
+ readonly visible: boolean;
633
+ readonly children: readonly string[];
634
+ } | {
635
+ readonly _tag: "Image";
636
+ readonly position: {
637
+ readonly _tag: "Vec3";
638
+ readonly x: number;
639
+ readonly y: number;
640
+ readonly z: number;
641
+ };
642
+ readonly rotation: {
643
+ readonly _tag: "Vec3";
644
+ readonly x: number;
645
+ readonly y: number;
646
+ readonly z: number;
647
+ };
648
+ readonly scale: {
649
+ readonly _tag: "Vec3";
650
+ readonly x: number;
651
+ readonly y: number;
652
+ readonly z: number;
653
+ };
654
+ readonly opacity: number;
655
+ readonly visible: boolean;
656
+ readonly image: {
657
+ readonly _tag: "effect-motion/Resources/Image";
658
+ readonly id: string;
659
+ };
660
+ readonly width?: number;
661
+ readonly height?: number;
662
+ } | {
663
+ readonly _tag: "Line";
664
+ readonly position: {
665
+ readonly _tag: "Vec3";
666
+ readonly x: number;
667
+ readonly y: number;
668
+ readonly z: number;
669
+ };
670
+ readonly rotation: {
671
+ readonly _tag: "Vec3";
672
+ readonly x: number;
673
+ readonly y: number;
674
+ readonly z: number;
675
+ };
676
+ readonly scale: {
677
+ readonly _tag: "Vec3";
678
+ readonly x: number;
679
+ readonly y: number;
680
+ readonly z: number;
681
+ };
682
+ readonly opacity: number;
683
+ readonly visible: boolean;
684
+ readonly strokeWidth: number;
685
+ readonly strokeColor: Color.Color;
686
+ readonly start: {
687
+ readonly _tag: "Vec3";
688
+ readonly x: number;
689
+ readonly y: number;
690
+ readonly z: number;
691
+ };
692
+ readonly end: {
693
+ readonly _tag: "Vec3";
694
+ readonly x: number;
695
+ readonly y: number;
696
+ readonly z: number;
697
+ };
698
+ } | {
699
+ readonly _tag: "Path";
700
+ readonly position: {
701
+ readonly _tag: "Vec3";
702
+ readonly x: number;
703
+ readonly y: number;
704
+ readonly z: number;
705
+ };
706
+ readonly rotation: {
707
+ readonly _tag: "Vec3";
708
+ readonly x: number;
709
+ readonly y: number;
710
+ readonly z: number;
711
+ };
712
+ readonly scale: {
713
+ readonly _tag: "Vec3";
714
+ readonly x: number;
715
+ readonly y: number;
716
+ readonly z: number;
717
+ };
718
+ readonly opacity: number;
719
+ readonly visible: boolean;
720
+ readonly strokeWidth: number;
721
+ readonly strokeColor: Color.Color;
722
+ readonly fillColor: Color.Color;
723
+ readonly commands: readonly [{
724
+ readonly _tag: "L";
725
+ readonly x: number;
726
+ readonly y: number;
727
+ readonly z?: number;
728
+ } | {
729
+ readonly _tag: "M";
730
+ readonly x: number;
731
+ readonly y: number;
732
+ readonly z?: number;
733
+ } | {
734
+ readonly _tag: "Z";
735
+ }, ...({
736
+ readonly _tag: "L";
737
+ readonly x: number;
738
+ readonly y: number;
739
+ readonly z?: number;
740
+ } | {
741
+ readonly _tag: "M";
742
+ readonly x: number;
743
+ readonly y: number;
744
+ readonly z?: number;
745
+ } | {
746
+ readonly _tag: "Z";
747
+ })[]];
748
+ } | {
749
+ readonly _tag: "Rect";
750
+ readonly position: {
751
+ readonly _tag: "Vec3";
752
+ readonly x: number;
753
+ readonly y: number;
754
+ readonly z: number;
755
+ };
756
+ readonly rotation: {
757
+ readonly _tag: "Vec3";
758
+ readonly x: number;
759
+ readonly y: number;
760
+ readonly z: number;
761
+ };
762
+ readonly scale: {
763
+ readonly _tag: "Vec3";
764
+ readonly x: number;
765
+ readonly y: number;
766
+ readonly z: number;
767
+ };
768
+ readonly opacity: number;
769
+ readonly visible: boolean;
770
+ readonly strokeWidth: number;
771
+ readonly strokeColor: Color.Color;
772
+ readonly fillColor: Color.Color;
773
+ readonly width: number;
774
+ readonly height: number;
775
+ } | {
776
+ readonly _tag: "Text";
777
+ readonly position: {
778
+ readonly _tag: "Vec3";
779
+ readonly x: number;
780
+ readonly y: number;
781
+ readonly z: number;
782
+ };
783
+ readonly rotation: {
784
+ readonly _tag: "Vec3";
785
+ readonly x: number;
786
+ readonly y: number;
787
+ readonly z: number;
788
+ };
789
+ readonly scale: {
790
+ readonly _tag: "Vec3";
791
+ readonly x: number;
792
+ readonly y: number;
793
+ readonly z: number;
794
+ };
795
+ readonly opacity: number;
796
+ readonly visible: boolean;
797
+ readonly fillColor: Color.Color;
798
+ readonly text: string;
799
+ readonly fontSize: number;
800
+ readonly fontFamily: {
801
+ readonly _tag: "effect-motion/Resources/Font";
802
+ readonly id: string;
803
+ };
804
+ readonly textAnchor?: "end" | "middle" | "start";
805
+ readonly baseline?: "auto" | "hanging" | "middle";
806
+ }) => Effect.Effect<Instance.Instance<"Camera" | "Circle" | "Ellipse" | "Group" | "Hud" | "Image" | "Line" | "Path" | "Rect" | "Text">, never, never>;
807
+ registerComp: (id: string, config: CompConfig) => void;
808
+ camera: Instance.Instance<"Camera">;
809
+ setCamera: (instance: Instance.Instance<"Camera">) => void;
810
+ destroy: (instance: Instance.Instance) => void;
455
811
  phaser: {
456
812
  register: (n: number) => void;
457
813
  deregister: (n: number) => void;
@@ -475,4 +831,13 @@ declare const Runner_base: Context.ServiceClass<Runner, "Runner", {
475
831
  export declare class Runner extends Runner_base {
476
832
  }
477
833
  export declare const layer: Layer.Layer<Runner, never, never>;
478
- export {};
834
+ /** the shape particles store — opaque, as far as the union is concerned */
835
+ type ParticlesState = Record<string, unknown>;
836
+ /** the tag particle fields are stored under; never a union member */
837
+ export declare const PARTICLE_FIELD_TAG = "particles/ParticleField";
838
+ /** instantiate a non-union entity. Particles only. */
839
+ export declare const particlesEscapeInstantiate: (runner: Runner["Service"], state: ParticlesState) => Effect.Effect<Instance.Instance, never, Runner>;
840
+ /** read a non-union entity's state. Particles only. */
841
+ export declare const particlesEscapeRead: <T>(runner: Runner["Service"], instance: Instance.Instance) => T | null;
842
+ /** write a non-union entity's state. Particles only. */
843
+ export declare const particlesEscapeWrite: <T>(runner: Runner["Service"], instance: Instance.Instance, state: T) => void;