@fugood/bricks-ctor 2.25.0-beta.60 → 2.25.0-beta.61

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 (190) hide show
  1. package/package.json +4 -28
  2. package/tools/deploy.ts +19 -176
  3. package/tools/mcp-server.ts +16 -33
  4. package/tools/postinstall.ts +21 -292
  5. package/tools/pull.ts +15 -195
  6. package/tools/push-config.ts +18 -113
  7. package/tools/simulator.ts +19 -148
  8. package/compile/__tests__/config-diff.test.js +0 -100
  9. package/compile/__tests__/index.test.js +0 -461
  10. package/compile/__tests__/util.test.js +0 -450
  11. package/compile/action-name-map.ts +0 -1079
  12. package/compile/config-diff.ts +0 -155
  13. package/compile/index.ts +0 -1594
  14. package/compile/util.ts +0 -482
  15. package/index.ts +0 -6
  16. package/skills/bricks-ctor/SKILL.md +0 -38
  17. package/skills/bricks-ctor/references/animation.md +0 -160
  18. package/skills/bricks-ctor/references/architecture-patterns.md +0 -88
  19. package/skills/bricks-ctor/references/automations.md +0 -232
  20. package/skills/bricks-ctor/references/buttress.md +0 -245
  21. package/skills/bricks-ctor/references/data-calculation.md +0 -252
  22. package/skills/bricks-ctor/references/local-sync.md +0 -129
  23. package/skills/bricks-ctor/references/media-flow.md +0 -165
  24. package/skills/bricks-ctor/references/remote-data-bank.md +0 -196
  25. package/skills/bricks-ctor/references/simulator.md +0 -132
  26. package/skills/bricks-ctor/references/source-editing-tools.md +0 -81
  27. package/skills/bricks-ctor/references/standby-transition.md +0 -124
  28. package/skills/bricks-ctor/references/verification-toolchain.md +0 -200
  29. package/skills/bricks-design/SKILL.md +0 -171
  30. package/skills/bricks-design/references/architecture-truths.md +0 -132
  31. package/skills/bricks-design/references/avoiding-complexity.md +0 -91
  32. package/skills/bricks-design/references/design-critique.md +0 -195
  33. package/skills/bricks-design/references/design-languages.md +0 -265
  34. package/skills/bricks-design/references/performance.md +0 -116
  35. package/skills/bricks-design/references/presentation-and-slideshow.md +0 -137
  36. package/skills/bricks-design/references/translating-inputs.md +0 -152
  37. package/skills/bricks-design/references/variations-and-tweaks.md +0 -124
  38. package/skills/bricks-design/references/when-the-brief-is-branded.md +0 -284
  39. package/skills/bricks-design/references/when-the-brief-is-vague.md +0 -85
  40. package/skills/bricks-design/references/workflow.md +0 -134
  41. package/skills/bricks-ux/SKILL.md +0 -114
  42. package/skills/bricks-ux/references/accessibility.md +0 -162
  43. package/skills/bricks-ux/references/flow-states.md +0 -175
  44. package/skills/bricks-ux/references/interaction-archetypes.md +0 -189
  45. package/skills/bricks-ux/references/monitoring-screens.md +0 -153
  46. package/skills/bricks-ux/references/pressable-composition.md +0 -126
  47. package/skills/bricks-ux/references/user-journey.md +0 -168
  48. package/skills/bricks-ux/references/ux-critique.md +0 -256
  49. package/skills/rive-marketplace/SKILL.md +0 -99
  50. package/tools/__tests__/_cli-error.test.ts +0 -35
  51. package/tools/__tests__/_mcp-config.test.ts +0 -67
  52. package/tools/__tests__/pull.test.ts +0 -108
  53. package/tools/_cli-error.ts +0 -17
  54. package/tools/_edits-log.ts +0 -41
  55. package/tools/_git-author.ts +0 -37
  56. package/tools/_last-pushed-commit.ts +0 -28
  57. package/tools/_mcp-config.ts +0 -42
  58. package/tools/_shell.ts +0 -180
  59. package/tools/icons/.gitattributes +0 -1
  60. package/tools/icons/fa6pro-glyphmap.json +0 -4686
  61. package/tools/icons/fa6pro-meta.json +0 -1
  62. package/tools/mcp-env.ts +0 -13
  63. package/tools/mcp-tools/__tests__/data-calc-editing.test.js +0 -516
  64. package/tools/mcp-tools/__tests__/entry-editing.test.js +0 -866
  65. package/tools/mcp-tools/__tests__/huggingface.test.ts +0 -49
  66. package/tools/mcp-tools/__tests__/icons.test.ts +0 -21
  67. package/tools/mcp-tools/__tests__/mcp-env.test.js +0 -19
  68. package/tools/mcp-tools/_editing-helpers.ts +0 -98
  69. package/tools/mcp-tools/_verify.ts +0 -50
  70. package/tools/mcp-tools/compile.ts +0 -104
  71. package/tools/mcp-tools/data-calc-editing.ts +0 -1311
  72. package/tools/mcp-tools/entry-editing.ts +0 -2297
  73. package/tools/mcp-tools/huggingface.ts +0 -772
  74. package/tools/mcp-tools/icons.ts +0 -97
  75. package/tools/mcp-tools/lottie.ts +0 -102
  76. package/tools/mcp-tools/media.ts +0 -113
  77. package/tools/simulator-main.mjs +0 -488
  78. package/tools/simulator-preload.cjs +0 -16
  79. package/types/animation.d.ts +0 -116
  80. package/types/automation.d.ts +0 -231
  81. package/types/brick-base.d.ts +0 -80
  82. package/types/bricks/Camera.d.ts +0 -246
  83. package/types/bricks/Chart.d.ts +0 -372
  84. package/types/bricks/GenerativeMedia.d.ts +0 -290
  85. package/types/bricks/Icon.d.ts +0 -98
  86. package/types/bricks/Image.d.ts +0 -126
  87. package/types/bricks/Items.d.ts +0 -480
  88. package/types/bricks/Lottie.d.ts +0 -168
  89. package/types/bricks/Maps.d.ts +0 -262
  90. package/types/bricks/QrCode.d.ts +0 -117
  91. package/types/bricks/Rect.d.ts +0 -150
  92. package/types/bricks/RichText.d.ts +0 -131
  93. package/types/bricks/Rive.d.ts +0 -220
  94. package/types/bricks/Scene3D.d.ts +0 -676
  95. package/types/bricks/Sketch.d.ts +0 -256
  96. package/types/bricks/Slideshow.d.ts +0 -201
  97. package/types/bricks/Svg.d.ts +0 -99
  98. package/types/bricks/Text.d.ts +0 -148
  99. package/types/bricks/TextInput.d.ts +0 -242
  100. package/types/bricks/Video.d.ts +0 -242
  101. package/types/bricks/VideoStreaming.d.ts +0 -112
  102. package/types/bricks/WebRtcStream.d.ts +0 -65
  103. package/types/bricks/WebView.d.ts +0 -168
  104. package/types/bricks/index.d.ts +0 -23
  105. package/types/canvas.d.ts +0 -82
  106. package/types/common.d.ts +0 -141
  107. package/types/data-calc-command/base.d.ts +0 -57
  108. package/types/data-calc-command/collection.d.ts +0 -418
  109. package/types/data-calc-command/color.d.ts +0 -432
  110. package/types/data-calc-command/constant.d.ts +0 -50
  111. package/types/data-calc-command/datetime.d.ts +0 -147
  112. package/types/data-calc-command/file.d.ts +0 -129
  113. package/types/data-calc-command/index.d.ts +0 -13
  114. package/types/data-calc-command/iteratee.d.ts +0 -23
  115. package/types/data-calc-command/logictype.d.ts +0 -190
  116. package/types/data-calc-command/math.d.ts +0 -275
  117. package/types/data-calc-command/object.d.ts +0 -119
  118. package/types/data-calc-command/sandbox.d.ts +0 -66
  119. package/types/data-calc-command/string.d.ts +0 -407
  120. package/types/data-calc-script.d.ts +0 -21
  121. package/types/data-calc.d.ts +0 -12
  122. package/types/data.d.ts +0 -97
  123. package/types/generators/AlarmClock.d.ts +0 -110
  124. package/types/generators/Assistant.d.ts +0 -640
  125. package/types/generators/BleCentral.d.ts +0 -247
  126. package/types/generators/BlePeripheral.d.ts +0 -208
  127. package/types/generators/CanvasMap.d.ts +0 -74
  128. package/types/generators/CastlesPay.d.ts +0 -87
  129. package/types/generators/DataBank.d.ts +0 -160
  130. package/types/generators/File.d.ts +0 -432
  131. package/types/generators/GraphQl.d.ts +0 -132
  132. package/types/generators/Http.d.ts +0 -222
  133. package/types/generators/HttpServer.d.ts +0 -230
  134. package/types/generators/Information.d.ts +0 -103
  135. package/types/generators/Intent.d.ts +0 -168
  136. package/types/generators/Iterator.d.ts +0 -108
  137. package/types/generators/Keyboard.d.ts +0 -105
  138. package/types/generators/LlmAnthropicCompat.d.ts +0 -212
  139. package/types/generators/LlmAppleBuiltin.d.ts +0 -159
  140. package/types/generators/LlmGgml.d.ts +0 -903
  141. package/types/generators/LlmMediaTekNeuroPilot.d.ts +0 -235
  142. package/types/generators/LlmMlx.d.ts +0 -228
  143. package/types/generators/LlmOnnx.d.ts +0 -213
  144. package/types/generators/LlmOpenAiCompat.d.ts +0 -312
  145. package/types/generators/LlmQualcommAiEngine.d.ts +0 -247
  146. package/types/generators/Mcp.d.ts +0 -637
  147. package/types/generators/McpServer.d.ts +0 -289
  148. package/types/generators/MediaFlow.d.ts +0 -170
  149. package/types/generators/MqttBroker.d.ts +0 -141
  150. package/types/generators/MqttClient.d.ts +0 -141
  151. package/types/generators/Question.d.ts +0 -408
  152. package/types/generators/RealtimeTranscription.d.ts +0 -287
  153. package/types/generators/RerankerGgml.d.ts +0 -195
  154. package/types/generators/SerialPort.d.ts +0 -151
  155. package/types/generators/SoundPlayer.d.ts +0 -94
  156. package/types/generators/SoundRecorder.d.ts +0 -139
  157. package/types/generators/SpeechToTextGgml.d.ts +0 -424
  158. package/types/generators/SpeechToTextOnnx.d.ts +0 -236
  159. package/types/generators/SpeechToTextPlatform.d.ts +0 -85
  160. package/types/generators/SqLite.d.ts +0 -159
  161. package/types/generators/Step.d.ts +0 -107
  162. package/types/generators/SttAppleBuiltin.d.ts +0 -153
  163. package/types/generators/Tcp.d.ts +0 -126
  164. package/types/generators/TcpServer.d.ts +0 -147
  165. package/types/generators/TextToSpeechAppleBuiltin.d.ts +0 -127
  166. package/types/generators/TextToSpeechGgml.d.ts +0 -221
  167. package/types/generators/TextToSpeechOnnx.d.ts +0 -178
  168. package/types/generators/TextToSpeechOpenAiLike.d.ts +0 -121
  169. package/types/generators/ThermalPrinter.d.ts +0 -193
  170. package/types/generators/Tick.d.ts +0 -83
  171. package/types/generators/Udp.d.ts +0 -120
  172. package/types/generators/VadGgml.d.ts +0 -260
  173. package/types/generators/VadOnnx.d.ts +0 -231
  174. package/types/generators/VadTraditional.d.ts +0 -138
  175. package/types/generators/VectorStore.d.ts +0 -257
  176. package/types/generators/Watchdog.d.ts +0 -107
  177. package/types/generators/WebCrawler.d.ts +0 -103
  178. package/types/generators/WebRtc.d.ts +0 -181
  179. package/types/generators/WebSocket.d.ts +0 -148
  180. package/types/generators/index.d.ts +0 -57
  181. package/types/index.d.ts +0 -13
  182. package/types/subspace.d.ts +0 -60
  183. package/types/switch.d.ts +0 -51
  184. package/types/system.d.ts +0 -707
  185. package/utils/__tests__/calc.test.js +0 -25
  186. package/utils/__tests__/id.test.js +0 -154
  187. package/utils/calc.ts +0 -130
  188. package/utils/data.ts +0 -495
  189. package/utils/event-props.ts +0 -912
  190. package/utils/id.ts +0 -133
@@ -1,676 +0,0 @@
1
- /* Auto generated by build script
2
- *
3
- * 3D scene renderer powered by WebGPU/WebGL with declarative objects, lights, camera, controls, and a script hook (tvOS support is experimental)
4
- */
5
- import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
6
- import type { Data, DataLink } from '../data'
7
- import type { Animation, AnimationBasicEvents, AnimationOrGetter } from '../animation'
8
- import type {
9
- Brick,
10
- EventAction,
11
- EventActionForItem,
12
- ActionWithDataParams,
13
- ActionWithParams,
14
- Action,
15
- EventProperty,
16
- } from '../common'
17
- import type { BrickBasicProperty, BrickBasicEvents, BrickBasicEventsForItem } from '../brick-base'
18
- import type { TemplateEventPropsMap } from '../../utils/event-props'
19
-
20
- /* Add an object to the scene */
21
- export type BrickScene3DActionAddObject = ActionWithParams & {
22
- __actionName: 'BRICK_SCENE_3D_ADD_OBJECT'
23
- params?: Array<
24
- | {
25
- input: 'objectId'
26
- value?: string | DataLink | EventProperty
27
- mapping?: string
28
- }
29
- | {
30
- input: 'objectType'
31
- value?:
32
- | 'gltf'
33
- | 'usd'
34
- | 'usdz'
35
- | 'box'
36
- | 'sphere'
37
- | 'plane'
38
- | 'cylinder'
39
- | 'cone'
40
- | 'torus'
41
- | 'text'
42
- | DataLink
43
- | EventProperty
44
- mapping?: string
45
- }
46
- | {
47
- input: 'objectUrl'
48
- value?: string | DataLink | EventProperty
49
- mapping?: string
50
- }
51
- | {
52
- input: 'objectMd5'
53
- value?: string | DataLink | EventProperty
54
- mapping?: string
55
- }
56
- | {
57
- input: 'objectPosition'
58
- value?: any | EventProperty
59
- mapping?: string
60
- }
61
- | {
62
- input: 'objectRotation'
63
- value?: any | EventProperty
64
- mapping?: string
65
- }
66
- | {
67
- input: 'objectScale'
68
- value?: any | EventProperty
69
- mapping?: string
70
- }
71
- | {
72
- input: 'objectColor'
73
- value?: string | DataLink | EventProperty
74
- mapping?: string
75
- }
76
- >
77
- }
78
-
79
- /* Remove an object by id */
80
- export type BrickScene3DActionRemoveObject = ActionWithParams & {
81
- __actionName: 'BRICK_SCENE_3D_REMOVE_OBJECT'
82
- params?: Array<{
83
- input: 'objectId'
84
- value?: string | DataLink | EventProperty
85
- mapping?: string
86
- }>
87
- }
88
-
89
- /* Update an object's transform / appearance */
90
- export type BrickScene3DActionUpdateObject = ActionWithParams & {
91
- __actionName: 'BRICK_SCENE_3D_UPDATE_OBJECT'
92
- params?: Array<
93
- | {
94
- input: 'objectId'
95
- value?: string | DataLink | EventProperty
96
- mapping?: string
97
- }
98
- | {
99
- input: 'objectPosition'
100
- value?: any | EventProperty
101
- mapping?: string
102
- }
103
- | {
104
- input: 'objectRotation'
105
- value?: any | EventProperty
106
- mapping?: string
107
- }
108
- | {
109
- input: 'objectScale'
110
- value?: any | EventProperty
111
- mapping?: string
112
- }
113
- | {
114
- input: 'objectVisible'
115
- value?: boolean | DataLink | EventProperty
116
- mapping?: string
117
- }
118
- | {
119
- input: 'objectColor'
120
- value?: string | DataLink | EventProperty
121
- mapping?: string
122
- }
123
- | {
124
- input: 'objectNodes'
125
- value?: any | EventProperty
126
- mapping?: string
127
- }
128
- >
129
- }
130
-
131
- /* Move the camera (optionally animated) */
132
- export type BrickScene3DActionSetCamera = ActionWithParams & {
133
- __actionName: 'BRICK_SCENE_3D_SET_CAMERA'
134
- params?: Array<
135
- | {
136
- input: 'cameraPosition'
137
- value?: any | EventProperty
138
- mapping?: string
139
- }
140
- | {
141
- input: 'cameraTarget'
142
- value?: any | EventProperty
143
- mapping?: string
144
- }
145
- | {
146
- input: 'cameraFov'
147
- value?: number | DataLink | EventProperty
148
- mapping?: string
149
- }
150
- | {
151
- input: 'cameraAnimateMs'
152
- value?: number | DataLink | EventProperty
153
- mapping?: string
154
- }
155
- >
156
- }
157
-
158
- /* Aim the camera at an object */
159
- export type BrickScene3DActionLookAt = ActionWithParams & {
160
- __actionName: 'BRICK_SCENE_3D_LOOK_AT'
161
- params?: Array<{
162
- input: 'objectId'
163
- value?: string | DataLink | EventProperty
164
- mapping?: string
165
- }>
166
- }
167
-
168
- /* Play an animation clip on a gltf object */
169
- export type BrickScene3DActionPlayAnimation = ActionWithParams & {
170
- __actionName: 'BRICK_SCENE_3D_PLAY_ANIMATION'
171
- params?: Array<
172
- | {
173
- input: 'objectId'
174
- value?: string | DataLink | EventProperty
175
- mapping?: string
176
- }
177
- | {
178
- input: 'animationName'
179
- value?: string | DataLink | EventProperty
180
- mapping?: string
181
- }
182
- | {
183
- input: 'animationLoop'
184
- value?: boolean | DataLink | EventProperty
185
- mapping?: string
186
- }
187
- | {
188
- input: 'animationSpeed'
189
- value?: number | DataLink | EventProperty
190
- mapping?: string
191
- }
192
- >
193
- }
194
-
195
- /* Stop an animation clip */
196
- export type BrickScene3DActionStopAnimation = ActionWithParams & {
197
- __actionName: 'BRICK_SCENE_3D_STOP_ANIMATION'
198
- params?: Array<
199
- | {
200
- input: 'objectId'
201
- value?: string | DataLink | EventProperty
202
- mapping?: string
203
- }
204
- | {
205
- input: 'animationName'
206
- value?: string | DataLink | EventProperty
207
- mapping?: string
208
- }
209
- >
210
- }
211
-
212
- /* Replace the background (color or HDR image) */
213
- export type BrickScene3DActionSetBackground = ActionWithParams & {
214
- __actionName: 'BRICK_SCENE_3D_SET_BACKGROUND'
215
- params?: Array<
216
- | {
217
- input: 'backgroundColor'
218
- value?: string | DataLink | EventProperty
219
- mapping?: string
220
- }
221
- | {
222
- input: 'backgroundHdrUrl'
223
- value?: string | DataLink | EventProperty
224
- mapping?: string
225
- }
226
- | {
227
- input: 'backgroundMd5'
228
- value?: string | DataLink | EventProperty
229
- mapping?: string
230
- }
231
- >
232
- }
233
-
234
- /* Toggle interaction controls at runtime */
235
- export type BrickScene3DActionSetControls = ActionWithParams & {
236
- __actionName: 'BRICK_SCENE_3D_SET_CONTROLS'
237
- params?: Array<
238
- | {
239
- input: 'controlsEnabled'
240
- value?: boolean | DataLink | EventProperty
241
- mapping?: string
242
- }
243
- | {
244
- input: 'controlsAutoRotate'
245
- value?: boolean | DataLink | EventProperty
246
- mapping?: string
247
- }
248
- | {
249
- input: 'controlsAutoRotateSpeed'
250
- value?: number | DataLink | EventProperty
251
- mapping?: string
252
- }
253
- >
254
- }
255
-
256
- /* Capture a screenshot (file URI emitted to BRICK_SCENE_3D_LAST_SCREENSHOT_URI) */
257
- export type BrickScene3DActionScreenshot = ActionWithParams & {
258
- __actionName: 'BRICK_SCENE_3D_SCREENSHOT'
259
- params?: Array<
260
- | {
261
- input: 'screenshotFormat'
262
- value?: 'png' | 'jpeg' | DataLink | EventProperty
263
- mapping?: string
264
- }
265
- | {
266
- input: 'screenshotQuality'
267
- value?: number | DataLink | EventProperty
268
- mapping?: string
269
- }
270
- >
271
- }
272
-
273
- /* Reset the scene back to the declared `objects` / `lights` / `camera` props */
274
- export type BrickScene3DActionReset = Action & {
275
- __actionName: 'BRICK_SCENE_3D_RESET'
276
- }
277
-
278
- interface BrickScene3DDef {
279
- /*
280
- Default property:
281
- {
282
- "backend": "auto",
283
- "antialias": true,
284
- "alpha": false,
285
- "shadows": false,
286
- "toneMapping": "aces",
287
- "exposure": 1,
288
- "pixelRatio": 0,
289
- "colorSpace": "srgb",
290
- "powerPreference": "default",
291
- "frameLoop": "always",
292
- "cameraType": "perspective",
293
- "cameraPosition": {
294
- "x": 3,
295
- "y": 3,
296
- "z": 5
297
- },
298
- "cameraTarget": {
299
- "x": 0,
300
- "y": 0,
301
- "z": 0
302
- },
303
- "fov": 50,
304
- "near": 0.1,
305
- "far": 1000,
306
- "zoom": 1,
307
- "controls": "none",
308
- "autoRotate": false,
309
- "autoRotateSpeed": 2,
310
- "enableDamping": true,
311
- "minDistance": 0.5,
312
- "maxDistance": 50,
313
- "minPolarAngle": 0,
314
- "backgroundBlur": 0,
315
- "backgroundIntensity": 1,
316
- "envMapProjection": "equirect",
317
- "envIntensity": 1,
318
- "envRotation": 0,
319
- "groundEnabled": false,
320
- "groundColor": "",
321
- "groundOpacity": 0.5,
322
- "groundY": 0,
323
- "groundSize": 100,
324
- "ambientColor": "#ffffff",
325
- "ambientIntensity": 0.4,
326
- "lights": [],
327
- "objects": [],
328
- "bloom": false,
329
- "bloomStrength": 0.6,
330
- "bloomThreshold": 1,
331
- "bloomRadius": 0.4,
332
- "fxaa": false,
333
- "ssao": false,
334
- "frameRuntime": "ui",
335
- "variables": {},
336
- "eventScriptEvents": "none",
337
- "eventScriptKeys": [],
338
- "eventScriptKeyRepeat": false,
339
- "eventScriptKeyRepeatInterval": 90,
340
- "enableRaycast": false,
341
- "emitFrameEvents": false,
342
- "frameEventInterval": 250
343
- }
344
- */
345
- property?: BrickBasicProperty & {
346
- /* Renderer backend. `auto` uses WebGPU when available and falls back to WebGL. */
347
- backend?: 'auto' | 'webgpu' | 'webgl' | DataLink
348
- /* Enable multi-sample antialiasing */
349
- antialias?: boolean | DataLink
350
- /* Render with a transparent canvas (alpha channel) */
351
- alpha?: boolean | DataLink
352
- /* Enable shadow mapping for lights and meshes */
353
- shadows?: boolean | DataLink
354
- /* Tone mapping curve */
355
- toneMapping?: 'none' | 'linear' | 'reinhard' | 'cineon' | 'aces' | 'agx' | DataLink
356
- /* Tone mapping exposure */
357
- exposure?: number | DataLink
358
- /* Render pixel ratio. `0` follows the device pixel ratio (capped at 2 on web; native renders at 1) */
359
- pixelRatio?: number | DataLink
360
- /* Output color space */
361
- colorSpace?: 'srgb' | 'srgb-linear' | DataLink
362
- /* GPU power preference */
363
- powerPreference?: 'default' | 'high-performance' | 'low-power' | DataLink
364
- /* Frame loop policy. `always` renders every frame; `whenVisible` pauses off-screen; `demand` renders only on prop change or invalidate */
365
- frameLoop?: 'always' | 'whenVisible' | 'demand' | DataLink
366
- /* Camera projection type */
367
- cameraType?: 'perspective' | 'orthographic' | DataLink
368
- /* Camera position in world space */
369
- cameraPosition?:
370
- | DataLink
371
- | {
372
- x?: number | DataLink
373
- y?: number | DataLink
374
- z?: number | DataLink
375
- }
376
- /* Point the camera looks at */
377
- cameraTarget?:
378
- | DataLink
379
- | {
380
- x?: number | DataLink
381
- y?: number | DataLink
382
- z?: number | DataLink
383
- }
384
- /* Field of view in degrees (perspective camera only) */
385
- fov?: number | DataLink
386
- /* Near clipping plane */
387
- near?: number | DataLink
388
- /* Far clipping plane */
389
- far?: number | DataLink
390
- /* Camera zoom factor */
391
- zoom?: number | DataLink
392
- /* Interaction controls */
393
- controls?: 'none' | 'orbit' | 'pan-zoom' | DataLink
394
- /* Auto-rotate the camera around the target */
395
- autoRotate?: boolean | DataLink
396
- /* Auto-rotate speed (units per second) */
397
- autoRotateSpeed?: number | DataLink
398
- /* Smooth interaction with damping */
399
- enableDamping?: boolean | DataLink
400
- /* Minimum dolly distance */
401
- minDistance?: number | DataLink
402
- /* Maximum dolly distance */
403
- maxDistance?: number | DataLink
404
- /* Minimum polar angle (radians) */
405
- minPolarAngle?: number | DataLink
406
- /* Maximum polar angle (radians) */
407
- maxPolarAngle?: number | DataLink
408
- /* Background solid color (used when no background image is set) */
409
- backgroundColor?: string | DataLink
410
- /* Equirect environment image URL (HDR/EXR/LDR). Used for PBR image-based lighting; also shown as the scene background unless `backgroundColor` is set */
411
- backgroundImage?: string | DataLink
412
- /* Background image blurriness (0–1, only when the environment image is shown as background) */
413
- backgroundBlur?: number | DataLink
414
- /* Background image intensity multiplier */
415
- backgroundIntensity?: number | DataLink
416
- /* Environment map projection. `none` disables environment lighting from the background image */
417
- envMapProjection?: 'equirect' | 'cube' | 'none' | DataLink
418
- /* Environment lighting intensity multiplier */
419
- envIntensity?: number | DataLink
420
- /* Environment rotation around the Y axis (radians, also rotates the background) */
421
- envRotation?: number | DataLink
422
- /* Fog color */
423
- fogColor?: string | DataLink
424
- /* Fog near distance */
425
- fogNear?: number | DataLink
426
- /* Fog far distance */
427
- fogFar?: number | DataLink
428
- /* Show a ground plane that catches shadows (enable `shadows` and a `castShadow` light for the shadow itself) */
429
- groundEnabled?: boolean | DataLink
430
- /* Ground color. Empty renders a shadow-only (invisible) catcher */
431
- groundColor?: string | DataLink
432
- /* Shadow opacity for the shadow-only ground (0–1) */
433
- groundOpacity?: number | DataLink
434
- /* Ground plane height (Y position) */
435
- groundY?: number | DataLink
436
- /* Ground plane size (width and depth) */
437
- groundSize?: number | DataLink
438
- /* Ambient light color */
439
- ambientColor?: string | DataLink
440
- /* Ambient light intensity */
441
- ambientIntensity?: number | DataLink
442
- /* Scene lights. Each entry: `{ type, color, intensity, position, target, castShadow, ... }` */
443
- lights?:
444
- | Array<
445
- | DataLink
446
- | {
447
- type?: 'ambient' | 'directional' | 'point' | 'spot' | 'hemisphere' | DataLink
448
- color?: string | DataLink
449
- intensity?: number | DataLink
450
- position?:
451
- | DataLink
452
- | {
453
- x?: number | DataLink
454
- y?: number | DataLink
455
- z?: number | DataLink
456
- }
457
- target?:
458
- | DataLink
459
- | {
460
- x?: number | DataLink
461
- y?: number | DataLink
462
- z?: number | DataLink
463
- }
464
- castShadow?: boolean | DataLink
465
- distance?: number | DataLink
466
- decay?: number | DataLink
467
- angle?: number | DataLink
468
- penumbra?: number | DataLink
469
- groundColor?: string | DataLink
470
- }
471
- >
472
- | DataLink
473
- /* Scene objects. Each entry: `{ id, type, url?, md5?, position, rotation, scale, color?, animation?, visible, nodes? }`. `nodes` overrides named nodes inside a loaded model: `[{ name, visible?, position?, rotation?, scale?, color?, emissive?, emissiveIntensity?, metalness?, roughness?, opacity? }]` */
474
- objects?:
475
- | Array<
476
- | DataLink
477
- | {
478
- id?: string | DataLink
479
- type?:
480
- | 'gltf'
481
- | 'usd'
482
- | 'usdz'
483
- | 'box'
484
- | 'sphere'
485
- | 'plane'
486
- | 'cylinder'
487
- | 'cone'
488
- | 'torus'
489
- | 'text'
490
- | DataLink
491
- url?: string | DataLink
492
- md5?: string | DataLink
493
- position?:
494
- | DataLink
495
- | {
496
- x?: number | DataLink
497
- y?: number | DataLink
498
- z?: number | DataLink
499
- }
500
- rotation?:
501
- | DataLink
502
- | {
503
- x?: number | DataLink
504
- y?: number | DataLink
505
- z?: number | DataLink
506
- }
507
- scale?:
508
- | DataLink
509
- | {
510
- x?: number | DataLink
511
- y?: number | DataLink
512
- z?: number | DataLink
513
- }
514
- color?: string | DataLink
515
- text?: string | DataLink
516
- animation?: string | DataLink
517
- visible?: boolean | DataLink
518
- castShadow?: boolean | DataLink
519
- receiveShadow?: boolean | DataLink
520
- nodes?:
521
- | Array<
522
- | DataLink
523
- | {
524
- name?: string | DataLink
525
- visible?: boolean | DataLink
526
- position?:
527
- | DataLink
528
- | {
529
- x?: number | DataLink
530
- y?: number | DataLink
531
- z?: number | DataLink
532
- }
533
- rotation?:
534
- | DataLink
535
- | {
536
- x?: number | DataLink
537
- y?: number | DataLink
538
- z?: number | DataLink
539
- }
540
- scale?:
541
- | DataLink
542
- | {
543
- x?: number | DataLink
544
- y?: number | DataLink
545
- z?: number | DataLink
546
- }
547
- color?: string | DataLink
548
- emissive?: string | DataLink
549
- emissiveIntensity?: number | DataLink
550
- metalness?: number | DataLink
551
- roughness?: number | DataLink
552
- opacity?: number | DataLink
553
- }
554
- >
555
- | DataLink
556
- }
557
- >
558
- | DataLink
559
- /* Enable bloom post-effect */
560
- bloom?: boolean | DataLink
561
- /* Bloom intensity */
562
- bloomStrength?: number | DataLink
563
- /* Bloom luminance threshold. The chain is HDR — values ≥ 1 keep bloom on highlights only */
564
- bloomThreshold?: number | DataLink
565
- /* Bloom radius (glow spread) */
566
- bloomRadius?: number | DataLink
567
- /* Enable FXAA antialiasing post-effect */
568
- fxaa?: boolean | DataLink
569
- /* Enable screen-space ambient occlusion (SSAO) */
570
- ssao?: boolean | DataLink
571
- /* Where the per-frame script runs. `ui` dispatches the data-op to reanimated's UI runtime via `runOnUI` (slightly less Promise overhead). `js` evaluates on the worklets-core thread via `runOnUIAsync` (Promise-resolved). Pick `js` if you don't have `react-native-reanimated` installed. */
572
- frameRuntime?: 'js' | 'ui' | DataLink
573
- /* JS expression or script. Pure expressions run on the worklet thread per frame (`time`, `dt`, `objects`, `camera`, `variables` are in scope). Statement-form scripts run once on mount via the JS sandbox. */
574
- script?: string | DataLink
575
- /* JS expression run when an enabled key or pointer event fires. It receives `event` / `input` plus `time`, `objects`, `camera`, and `variables`, and returns the same mutation map as `script`. */
576
- eventScript?: string | DataLink
577
- /* Object of values exposed to the inline `script` as `variables.<key>`. Updates re-flow into the script on the next frame. */
578
- variables?: DataLink | {}
579
- /* Which input events can run `eventScript`. `none` disables it; `all` enables key + pointer; `keys` and `pointer` enable only that input family. */
580
- eventScriptEvents?: 'none' | 'all' | 'keys' | 'pointer' | DataLink
581
- /* Optional key allowlist for `eventScript` (`pressedKey`, `code`, or `keyCode`). Empty means every key. */
582
- eventScriptKeys?:
583
- | string
584
- | DataLink
585
- | Array<string | DataLink | number | DataLink | DataLink>
586
- | DataLink
587
- | DataLink
588
- /* Repeat `keydown` event scripts while an allowed key is held. Repeat events include `event.repeat === true`. */
589
- eventScriptKeyRepeat?: boolean | DataLink
590
- /* Interval in milliseconds for repeated key event scripts. */
591
- eventScriptKeyRepeatInterval?: number | DataLink
592
- /* Enable pointer raycast → emits `BRICK_SCENE_3D_ON_OBJECT_CLICK` / `_ON_OBJECT_HOVER` */
593
- enableRaycast?: boolean | DataLink
594
- /* Emit periodic `BRICK_SCENE_3D_ON_FRAME` events */
595
- emitFrameEvents?: boolean | DataLink
596
- /* Throttle interval for frame events (ms) */
597
- frameEventInterval?: number | DataLink
598
- }
599
- events?: BrickBasicEvents & {
600
- /* An asset finished loading (gltf/usd/usdz/hdr/texture) */
601
- onLoad?: Array<EventAction<string & keyof TemplateEventPropsMap['Scene3D']['onLoad']>>
602
- /* An asset failed to load */
603
- onLoadError?: Array<EventAction<string & keyof TemplateEventPropsMap['Scene3D']['onLoadError']>>
604
- /* Pointer click hit an object */
605
- onObjectClick?: Array<
606
- EventAction<string & keyof TemplateEventPropsMap['Scene3D']['onObjectClick']>
607
- >
608
- /* Pointer hover entered or left an object */
609
- onObjectHover?: Array<
610
- EventAction<string & keyof TemplateEventPropsMap['Scene3D']['onObjectHover']>
611
- >
612
- /* An animation clip finished */
613
- onAnimationEnd?: Array<
614
- EventAction<string & keyof TemplateEventPropsMap['Scene3D']['onAnimationEnd']>
615
- >
616
- /* Periodic frame tick (throttled by `frameEventInterval`, gated by `emitFrameEvents`) */
617
- onFrame?: Array<EventAction<string & keyof TemplateEventPropsMap['Scene3D']['onFrame']>>
618
- /* Inline `script` failed at compile, init, or per-frame execution */
619
- onScriptError?: Array<
620
- EventAction<string & keyof TemplateEventPropsMap['Scene3D']['onScriptError']>
621
- >
622
- }
623
- outlets?: {
624
- /* Latest frame rate (frames per second) */
625
- fps?: () => Data<number>
626
- /* Number of objects in the scene */
627
- objectCount?: () => Data<number>
628
- /* ID of the most recently selected object (via raycast click) */
629
- selectedObjectId?: () => Data<string>
630
- /* URI of the most recent screenshot */
631
- lastScreenshotUri?: () => Data<string>
632
- /* Snapshot of scene state (objects, camera, lights) */
633
- sceneState?: () => Data<{
634
- objects?: any[]
635
- camera?: { [key: string]: any }
636
- lights?: any[]
637
- [key: string]: any
638
- }>
639
- }
640
- animation?: AnimationBasicEvents & {
641
- onLoad?: AnimationOrGetter
642
- onLoadError?: AnimationOrGetter
643
- onObjectClick?: AnimationOrGetter
644
- onObjectHover?: AnimationOrGetter
645
- onAnimationEnd?: AnimationOrGetter
646
- onFrame?: AnimationOrGetter
647
- onScriptError?: AnimationOrGetter
648
- }
649
- }
650
-
651
- /* 3D scene renderer powered by WebGPU/WebGL with declarative objects, lights, camera, controls, and a script hook (tvOS support is experimental) */
652
- export type BrickScene3D = Brick &
653
- BrickScene3DDef & {
654
- templateKey: 'BRICK_SCENE_3D'
655
- switches?: Array<
656
- SwitchDef &
657
- BrickScene3DDef & {
658
- conds?: Array<{
659
- method: '==' | '!=' | '>' | '<' | '>=' | '<='
660
- cond:
661
- | SwitchCondInnerStateCurrentCanvas
662
- | SwitchCondData
663
- | {
664
- __typename: 'SwitchCondInnerStateOutlet'
665
- outlet:
666
- | 'fps'
667
- | 'objectCount'
668
- | 'selectedObjectId'
669
- | 'lastScreenshotUri'
670
- | 'sceneState'
671
- value: any
672
- }
673
- }>
674
- }
675
- >
676
- }