@kubohiroya/turbowarp-aframe 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +373 -0
- package/README.ja.md +131 -0
- package/README.md +462 -0
- package/dist/extension-manifest.json +517 -0
- package/dist/turbowarp-aframe.js +1422 -0
- package/docs/architecture.ja.md +136 -0
- package/docs/architecture.md +136 -0
- package/docs/index.html +50 -0
- package/package.json +66 -0
- package/schemas/aframe-template.schema.json +40 -0
- package/schemas/extension-manifest.schema.json +49 -0
- package/src/block-definitions.json +329 -0
- package/src/config.ts +12 -0
- package/src/extension-manifest.ts +149 -0
- package/src/extension.ts +1226 -0
- package/src/globals.d.ts +25 -0
- package/src/index.ts +8 -0
package/README.md
ADDED
|
@@ -0,0 +1,462 @@
|
|
|
1
|
+
# TurboWarp-A-Frame
|
|
2
|
+
|
|
3
|
+
[日本語](README.ja.md)
|
|
4
|
+
|
|
5
|
+
TurboWarp-A-Frame is an unsandboxed TurboWarp extension for building declarative A-Frame scene graphs from blocks.
|
|
6
|
+
|
|
7
|
+
It treats TurboWarp sprites and backdrops as places to run 3D scene logic, not as 3D object identities. The 3D world is addressed with A-Frame-style node ids, classes, data attributes, attributes, templates, selectors, and events.
|
|
8
|
+
|
|
9
|
+
## What it does
|
|
10
|
+
|
|
11
|
+
- Creates an embedded A-Frame scene host from TurboWarp.
|
|
12
|
+
- Builds a parent-child scene graph with primitive, image, text, model, light, camera, and group nodes.
|
|
13
|
+
- Selects nodes with a limited `#id`, `.class`, and `[data-key=value]` selector subset.
|
|
14
|
+
- Mutates local `position`, `rotation`, class, `data-*`, visibility, and arbitrary A-Frame component attributes.
|
|
15
|
+
- Loads JSON templates and instantiates them with explicit instance ids.
|
|
16
|
+
- Mounts the A-Frame host near the detected TurboWarp stage and queues scene-ready, DOM pointer/click, and selector-scoped custom events for hat blocks.
|
|
17
|
+
- Defines and plays Three.js keyframe animation clips with vector and quaternion tracks.
|
|
18
|
+
- Keeps AR and collision APIs documented as next-stage extension points while preserving a small initial implementation.
|
|
19
|
+
|
|
20
|
+
## Requirements and safety
|
|
21
|
+
|
|
22
|
+
- Node.js 22 or newer
|
|
23
|
+
- Corepack-managed pnpm
|
|
24
|
+
- TurboWarp unsandboxed extension support
|
|
25
|
+
- A-Frame loaded by the host page or project environment before using the generated extension in a browser
|
|
26
|
+
|
|
27
|
+
Unsandboxed extensions can manipulate the containing page. Load only generated extension bundles that you trust.
|
|
28
|
+
|
|
29
|
+
## Install
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
corepack enable
|
|
33
|
+
pnpm install --frozen-lockfile
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## Quick start
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
pnpm run build
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Load `dist/turbowarp-aframe.js` as an unsandboxed custom extension in TurboWarp.
|
|
43
|
+
|
|
44
|
+
For package-based reuse, pin the version:
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
pnpm add --save-exact @kubohiroya/turbowarp-aframe@0.2.0
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## Block reference
|
|
51
|
+
|
|
52
|
+
<!-- BEGIN GENERATED BLOCKS -->
|
|
53
|
+
|
|
54
|
+
### `create 3D scene with layer [LAYER] mode [MODE]`
|
|
55
|
+
|
|
56
|
+
Initializes the A-Frame scene host and emits the scene ready event.
|
|
57
|
+
|
|
58
|
+
| Property | Value |
|
|
59
|
+
|---|---|
|
|
60
|
+
| Type | Command |
|
|
61
|
+
| Opcode | `createScene` |
|
|
62
|
+
| `LAYER` | String, default: `above-stage` |
|
|
63
|
+
| `MODE` | String, default: `3d` |
|
|
64
|
+
|
|
65
|
+
### `load template [ID] from JSON [SOURCE]`
|
|
66
|
+
|
|
67
|
+
Stores a declarative scene graph template for later instantiation.
|
|
68
|
+
|
|
69
|
+
| Property | Value |
|
|
70
|
+
|---|---|
|
|
71
|
+
| Type | Command |
|
|
72
|
+
| Opcode | `loadTemplate` |
|
|
73
|
+
| `ID` | String, default: `monster` |
|
|
74
|
+
| `SOURCE` | String, default: `{"type":"box","id":"body","attributes":{"color":"#4cffb0"}}` |
|
|
75
|
+
|
|
76
|
+
### `create [TYPE] node id [ID] under [PARENT]`
|
|
77
|
+
|
|
78
|
+
Creates a primitive, model, text, light, camera, or group node.
|
|
79
|
+
|
|
80
|
+
| Property | Value |
|
|
81
|
+
|---|---|
|
|
82
|
+
| Type | Command |
|
|
83
|
+
| Opcode | `createNode` |
|
|
84
|
+
| `TYPE` | String, default: `box` |
|
|
85
|
+
| `ID` | String, default: `card` |
|
|
86
|
+
| `PARENT` | String, default: `#scene` |
|
|
87
|
+
|
|
88
|
+
### `create template [TEMPLATE] as [INSTANCE] under [PARENT]`
|
|
89
|
+
|
|
90
|
+
Instantiates a stored template under the first node matching the parent selector.
|
|
91
|
+
|
|
92
|
+
| Property | Value |
|
|
93
|
+
|---|---|
|
|
94
|
+
| Type | Command |
|
|
95
|
+
| Opcode | `createFromTemplate` |
|
|
96
|
+
| `TEMPLATE` | String, default: `monster` |
|
|
97
|
+
| `INSTANCE` | String, default: `monster-1` |
|
|
98
|
+
| `PARENT` | String, default: `#scene` |
|
|
99
|
+
|
|
100
|
+
### `set selector [SELECTOR] position x [X] y [Y] z [Z]`
|
|
101
|
+
|
|
102
|
+
Sets local position on every node matching the selector.
|
|
103
|
+
|
|
104
|
+
| Property | Value |
|
|
105
|
+
|---|---|
|
|
106
|
+
| Type | Command |
|
|
107
|
+
| Opcode | `setPosition` |
|
|
108
|
+
| `SELECTOR` | String, default: `#card` |
|
|
109
|
+
| `X` | Number, default: `0` |
|
|
110
|
+
| `Y` | Number, default: `1` |
|
|
111
|
+
| `Z` | Number, default: `-3` |
|
|
112
|
+
|
|
113
|
+
### `move selector [SELECTOR] by x [X] y [Y] z [Z]`
|
|
114
|
+
|
|
115
|
+
Offsets local position on every node matching the selector.
|
|
116
|
+
|
|
117
|
+
| Property | Value |
|
|
118
|
+
|---|---|
|
|
119
|
+
| Type | Command |
|
|
120
|
+
| Opcode | `moveBy` |
|
|
121
|
+
| `SELECTOR` | String, default: `#card` |
|
|
122
|
+
| `X` | Number, default: `0` |
|
|
123
|
+
| `Y` | Number, default: `0` |
|
|
124
|
+
| `Z` | Number, default: `1` |
|
|
125
|
+
|
|
126
|
+
### `set selector [SELECTOR] rotation x [X] y [Y] z [Z]`
|
|
127
|
+
|
|
128
|
+
Sets local Euler rotation in degrees on every node matching the selector.
|
|
129
|
+
|
|
130
|
+
| Property | Value |
|
|
131
|
+
|---|---|
|
|
132
|
+
| Type | Command |
|
|
133
|
+
| Opcode | `setRotation` |
|
|
134
|
+
| `SELECTOR` | String, default: `#card` |
|
|
135
|
+
| `X` | Number, default: `0` |
|
|
136
|
+
| `Y` | Number, default: `45` |
|
|
137
|
+
| `Z` | Number, default: `0` |
|
|
138
|
+
|
|
139
|
+
### `add class [CLASS] to selector [SELECTOR]`
|
|
140
|
+
|
|
141
|
+
Adds a CSS-style class to every node matching the selector.
|
|
142
|
+
|
|
143
|
+
| Property | Value |
|
|
144
|
+
|---|---|
|
|
145
|
+
| Type | Command |
|
|
146
|
+
| Opcode | `addClass` |
|
|
147
|
+
| `CLASS` | String, default: `monster` |
|
|
148
|
+
| `SELECTOR` | String, default: `#card` |
|
|
149
|
+
|
|
150
|
+
### `set selector [SELECTOR] data [KEY] to [VALUE]`
|
|
151
|
+
|
|
152
|
+
Sets a data-* value on every node matching the selector.
|
|
153
|
+
|
|
154
|
+
| Property | Value |
|
|
155
|
+
|---|---|
|
|
156
|
+
| Type | Command |
|
|
157
|
+
| Opcode | `setData` |
|
|
158
|
+
| `SELECTOR` | String, default: `#card` |
|
|
159
|
+
| `KEY` | String, default: `zone` |
|
|
160
|
+
| `VALUE` | String, default: `field` |
|
|
161
|
+
|
|
162
|
+
### `set selector [SELECTOR] attribute [NAME] to [VALUE]`
|
|
163
|
+
|
|
164
|
+
Sets an A-Frame component or HTML attribute on every node matching the selector.
|
|
165
|
+
|
|
166
|
+
| Property | Value |
|
|
167
|
+
|---|---|
|
|
168
|
+
| Type | Command |
|
|
169
|
+
| Opcode | `setAttribute` |
|
|
170
|
+
| `SELECTOR` | String, default: `#card` |
|
|
171
|
+
| `NAME` | String, default: `visible` |
|
|
172
|
+
| `VALUE` | String, default: `true` |
|
|
173
|
+
|
|
174
|
+
### `delete selector [SELECTOR]`
|
|
175
|
+
|
|
176
|
+
Deletes every non-root node matching the selector and its descendants.
|
|
177
|
+
|
|
178
|
+
| Property | Value |
|
|
179
|
+
|---|---|
|
|
180
|
+
| Type | Command |
|
|
181
|
+
| Opcode | `deleteSelector` |
|
|
182
|
+
| `SELECTOR` | String, default: `#card` |
|
|
183
|
+
|
|
184
|
+
### `count selector [SELECTOR]`
|
|
185
|
+
|
|
186
|
+
Returns the number of nodes matching a limited selector.
|
|
187
|
+
|
|
188
|
+
| Property | Value |
|
|
189
|
+
|---|---|
|
|
190
|
+
| Type | Reporter |
|
|
191
|
+
| Opcode | `countSelector` |
|
|
192
|
+
| `SELECTOR` | String, default: `.monster` |
|
|
193
|
+
|
|
194
|
+
### `event target id`
|
|
195
|
+
|
|
196
|
+
Returns the id of the most recently handled 3D event target.
|
|
197
|
+
|
|
198
|
+
| Property | Value |
|
|
199
|
+
|---|---|
|
|
200
|
+
| Type | Reporter |
|
|
201
|
+
| Opcode | `eventTargetId` |
|
|
202
|
+
|
|
203
|
+
### `emit 3D event [TYPE] from selector [SELECTOR] with data [DATA]`
|
|
204
|
+
|
|
205
|
+
Queues and dispatches a 3D event from the first node matching the selector.
|
|
206
|
+
|
|
207
|
+
| Property | Value |
|
|
208
|
+
|---|---|
|
|
209
|
+
| Type | Command |
|
|
210
|
+
| Opcode | `emitEvent` |
|
|
211
|
+
| `TYPE` | String, default: `attack` |
|
|
212
|
+
| `SELECTOR` | String, default: `#card` |
|
|
213
|
+
| `DATA` | String, default: `{}` |
|
|
214
|
+
|
|
215
|
+
### `when 3D scene ready`
|
|
216
|
+
|
|
217
|
+
Fires once after create 3D scene initializes the scene host.
|
|
218
|
+
|
|
219
|
+
| Property | Value |
|
|
220
|
+
|---|---|
|
|
221
|
+
| Type | Hat |
|
|
222
|
+
| Opcode | `whenSceneReady` |
|
|
223
|
+
|
|
224
|
+
### `when event [TYPE] on selector [SELECTOR]`
|
|
225
|
+
|
|
226
|
+
Fires when a queued 3D event of the given type targets a node matching the selector.
|
|
227
|
+
|
|
228
|
+
| Property | Value |
|
|
229
|
+
|---|---|
|
|
230
|
+
| Type | Hat |
|
|
231
|
+
| Opcode | `whenEventOnSelector` |
|
|
232
|
+
| `TYPE` | String, default: `attack` |
|
|
233
|
+
| `SELECTOR` | String, default: `.monster` |
|
|
234
|
+
|
|
235
|
+
### `create 3D animation clip [NAME] duration [DURATION]`
|
|
236
|
+
|
|
237
|
+
Creates or replaces a Three.js AnimationClip definition.
|
|
238
|
+
|
|
239
|
+
| Property | Value |
|
|
240
|
+
|---|---|
|
|
241
|
+
| Type | Command |
|
|
242
|
+
| Opcode | `createAnimationClip` |
|
|
243
|
+
| `NAME` | String, default: `wave` |
|
|
244
|
+
| `DURATION` | Number, default: `-1` |
|
|
245
|
+
|
|
246
|
+
### `delete 3D animation clip [NAME]`
|
|
247
|
+
|
|
248
|
+
Deletes a stored 3D animation clip definition and stops its active actions.
|
|
249
|
+
|
|
250
|
+
| Property | Value |
|
|
251
|
+
|---|---|
|
|
252
|
+
| Type | Command |
|
|
253
|
+
| Opcode | `deleteAnimationClip` |
|
|
254
|
+
| `NAME` | String, default: `wave` |
|
|
255
|
+
|
|
256
|
+
### `add vector keyframe track to clip [CLIP] path [PATH] times [TIMES] values [VALUES]`
|
|
257
|
+
|
|
258
|
+
Adds a Three.js VectorKeyframeTrack definition with x y z values.
|
|
259
|
+
|
|
260
|
+
| Property | Value |
|
|
261
|
+
|---|---|
|
|
262
|
+
| Type | Command |
|
|
263
|
+
| Opcode | `addVectorKeyframeTrack` |
|
|
264
|
+
| `CLIP` | String, default: `move-up` |
|
|
265
|
+
| `PATH` | String, default: `.position` |
|
|
266
|
+
| `TIMES` | String, default: `0,0.5,1` |
|
|
267
|
+
| `VALUES` | String, default: `0,1,-3, 0,1.5,-3, 0,1,-3` |
|
|
268
|
+
|
|
269
|
+
### `add quaternion keyframe track to clip [CLIP] path [PATH] times [TIMES] values [VALUES]`
|
|
270
|
+
|
|
271
|
+
Adds a Three.js QuaternionKeyframeTrack definition with x y z w values.
|
|
272
|
+
|
|
273
|
+
| Property | Value |
|
|
274
|
+
|---|---|
|
|
275
|
+
| Type | Command |
|
|
276
|
+
| Opcode | `addQuaternionKeyframeTrack` |
|
|
277
|
+
| `CLIP` | String, default: `wave` |
|
|
278
|
+
| `PATH` | String, default: `.quaternion` |
|
|
279
|
+
| `TIMES` | String, default: `0,0.5,1` |
|
|
280
|
+
| `VALUES` | String, default: `0,0,0,1, 0,0,0.389,0.921, 0,0,0,1` |
|
|
281
|
+
|
|
282
|
+
### `add euler rotation keyframe track to clip [CLIP] path [PATH] times [TIMES] values [VALUES] unit [UNIT]`
|
|
283
|
+
|
|
284
|
+
Adds a quaternion track converted from Euler x y z rotation values.
|
|
285
|
+
|
|
286
|
+
| Property | Value |
|
|
287
|
+
|---|---|
|
|
288
|
+
| Type | Command |
|
|
289
|
+
| Opcode | `addEulerRotationKeyframeTrack` |
|
|
290
|
+
| `CLIP` | String, default: `wave` |
|
|
291
|
+
| `PATH` | String, default: `.quaternion` |
|
|
292
|
+
| `TIMES` | String, default: `0,0.25,0.5,0.75,1` |
|
|
293
|
+
| `VALUES` | String, default: `0,0,0, 0,0,0.8, 0,0,0, 0,0,-0.8, 0,0,0` |
|
|
294
|
+
| `UNIT` | String, default: `radians` |
|
|
295
|
+
|
|
296
|
+
### `add position keyframe to clip [CLIP] at [TIME] x [X] y [Y] z [Z]`
|
|
297
|
+
|
|
298
|
+
Adds or replaces one position keyframe on the clip.
|
|
299
|
+
|
|
300
|
+
| Property | Value |
|
|
301
|
+
|---|---|
|
|
302
|
+
| Type | Command |
|
|
303
|
+
| Opcode | `addPositionKeyframe` |
|
|
304
|
+
| `CLIP` | String, default: `move-up` |
|
|
305
|
+
| `TIME` | Number, default: `0` |
|
|
306
|
+
| `X` | Number, default: `0` |
|
|
307
|
+
| `Y` | Number, default: `1` |
|
|
308
|
+
| `Z` | Number, default: `-3` |
|
|
309
|
+
|
|
310
|
+
### `add scale keyframe to clip [CLIP] at [TIME] x [X] y [Y] z [Z]`
|
|
311
|
+
|
|
312
|
+
Adds or replaces one scale keyframe on the clip.
|
|
313
|
+
|
|
314
|
+
| Property | Value |
|
|
315
|
+
|---|---|
|
|
316
|
+
| Type | Command |
|
|
317
|
+
| Opcode | `addScaleKeyframe` |
|
|
318
|
+
| `CLIP` | String, default: `pulse` |
|
|
319
|
+
| `TIME` | Number, default: `0` |
|
|
320
|
+
| `X` | Number, default: `1` |
|
|
321
|
+
| `Y` | Number, default: `1` |
|
|
322
|
+
| `Z` | Number, default: `1` |
|
|
323
|
+
|
|
324
|
+
### `add euler rotation keyframe to clip [CLIP] at [TIME] x [X] y [Y] z [Z] unit [UNIT]`
|
|
325
|
+
|
|
326
|
+
Adds or replaces one Euler rotation keyframe converted to quaternion values.
|
|
327
|
+
|
|
328
|
+
| Property | Value |
|
|
329
|
+
|---|---|
|
|
330
|
+
| Type | Command |
|
|
331
|
+
| Opcode | `addEulerRotationKeyframe` |
|
|
332
|
+
| `CLIP` | String, default: `wave` |
|
|
333
|
+
| `TIME` | Number, default: `0` |
|
|
334
|
+
| `X` | Number, default: `0` |
|
|
335
|
+
| `Y` | Number, default: `0` |
|
|
336
|
+
| `Z` | Number, default: `0.8` |
|
|
337
|
+
| `UNIT` | String, default: `radians` |
|
|
338
|
+
|
|
339
|
+
### `play 3D animation clip [CLIP] on selector [SELECTOR] loop [LOOP]`
|
|
340
|
+
|
|
341
|
+
Plays a stored 3D animation clip on every matching node.
|
|
342
|
+
|
|
343
|
+
| Property | Value |
|
|
344
|
+
|---|---|
|
|
345
|
+
| Type | Command |
|
|
346
|
+
| Opcode | `playAnimationClip` |
|
|
347
|
+
| `CLIP` | String, default: `wave` |
|
|
348
|
+
| `SELECTOR` | String, default: `#leftArm` |
|
|
349
|
+
| `LOOP` | Boolean, default: `true` |
|
|
350
|
+
|
|
351
|
+
### `stop 3D animation clip [CLIP] on selector [SELECTOR]`
|
|
352
|
+
|
|
353
|
+
Stops a stored 3D animation clip on every matching node.
|
|
354
|
+
|
|
355
|
+
| Property | Value |
|
|
356
|
+
|---|---|
|
|
357
|
+
| Type | Command |
|
|
358
|
+
| Opcode | `stopAnimationClip` |
|
|
359
|
+
| `CLIP` | String, default: `wave` |
|
|
360
|
+
| `SELECTOR` | String, default: `#leftArm` |
|
|
361
|
+
|
|
362
|
+
### `pause 3D animation clip [CLIP] on selector [SELECTOR]`
|
|
363
|
+
|
|
364
|
+
Pauses a stored 3D animation clip on every matching node.
|
|
365
|
+
|
|
366
|
+
| Property | Value |
|
|
367
|
+
|---|---|
|
|
368
|
+
| Type | Command |
|
|
369
|
+
| Opcode | `pauseAnimationClip` |
|
|
370
|
+
| `CLIP` | String, default: `wave` |
|
|
371
|
+
| `SELECTOR` | String, default: `#leftArm` |
|
|
372
|
+
|
|
373
|
+
### `resume 3D animation clip [CLIP] on selector [SELECTOR]`
|
|
374
|
+
|
|
375
|
+
Resumes a paused 3D animation clip on every matching node.
|
|
376
|
+
|
|
377
|
+
| Property | Value |
|
|
378
|
+
|---|---|
|
|
379
|
+
| Type | Command |
|
|
380
|
+
| Opcode | `resumeAnimationClip` |
|
|
381
|
+
| `CLIP` | String, default: `wave` |
|
|
382
|
+
| `SELECTOR` | String, default: `#leftArm` |
|
|
383
|
+
|
|
384
|
+
### `set 3D animation clip [CLIP] on selector [SELECTOR] time scale [SCALE]`
|
|
385
|
+
|
|
386
|
+
Sets the playback speed for a stored 3D animation clip on every matching node.
|
|
387
|
+
|
|
388
|
+
| Property | Value |
|
|
389
|
+
|---|---|
|
|
390
|
+
| Type | Command |
|
|
391
|
+
| Opcode | `setAnimationTimeScale` |
|
|
392
|
+
| `CLIP` | String, default: `wave` |
|
|
393
|
+
| `SELECTOR` | String, default: `#leftArm` |
|
|
394
|
+
| `SCALE` | Number, default: `1` |
|
|
395
|
+
|
|
396
|
+
### `is 3D animation clip [CLIP] playing on selector [SELECTOR]?`
|
|
397
|
+
|
|
398
|
+
Reports whether any matching node has the stored 3D animation clip playing.
|
|
399
|
+
|
|
400
|
+
| Property | Value |
|
|
401
|
+
|---|---|
|
|
402
|
+
| Type | Boolean |
|
|
403
|
+
| Opcode | `isAnimationClipPlaying` |
|
|
404
|
+
| `CLIP` | String, default: `wave` |
|
|
405
|
+
| `SELECTOR` | String, default: `#leftArm` |
|
|
406
|
+
|
|
407
|
+
<!-- END GENERATED BLOCKS -->
|
|
408
|
+
|
|
409
|
+
## Scene model
|
|
410
|
+
|
|
411
|
+
`#scene` is the root node. Every block operates on this extension-owned 3D graph; Scratch sprites, backdrops, clones, and the current sprite target are not imported into the node identity model.
|
|
412
|
+
|
|
413
|
+
Selectors intentionally support a small subset first:
|
|
414
|
+
|
|
415
|
+
- `#card`
|
|
416
|
+
- `.monster`
|
|
417
|
+
- `[data-zone=field]`
|
|
418
|
+
- `*`
|
|
419
|
+
- `@event` or `event target` after an event hat runs
|
|
420
|
+
|
|
421
|
+
When a selector matches multiple nodes, command blocks apply to all matches. Blocks that require one node, such as template instantiation parents or event emitters, use the first match in graph insertion order.
|
|
422
|
+
|
|
423
|
+
## Keyframe animations
|
|
424
|
+
|
|
425
|
+
Animation blocks create stored clip definitions and play them on matching node root `object3D` instances through `AFRAME.THREE.AnimationMixer` when A-Frame and Three.js are available. `VectorKeyframeTrack` supports `.position` and `.scale`; `QuaternionKeyframeTrack` supports `.quaternion`. glTF internals such as bones, child objects, and material properties are outside the initial scope.
|
|
426
|
+
|
|
427
|
+
The CSV track blocks are low-level APIs that stay close to Three.js. Classroom and ordinary block projects should prefer the single-keyframe blocks: `add position keyframe...`, `add scale keyframe...`, and `add euler rotation keyframe...`. A keyframe with the same clip, path, and time replaces the earlier value.
|
|
428
|
+
|
|
429
|
+
Existing `set selector [SELECTOR] rotation x [X] y [Y] z [Z]` uses A-Frame rotation attributes in degrees. Quaternion tracks operate on Three.js object state, so Euler helper input must declare `degrees` or `radians` and is converted to quaternion values before playback.
|
|
430
|
+
|
|
431
|
+
## Architecture
|
|
432
|
+
|
|
433
|
+
```text
|
|
434
|
+
src/index.ts + src/extension.ts
|
|
435
|
+
-> vite-plugin-turbowarp-extension
|
|
436
|
+
-> dist/turbowarp-aframe.js
|
|
437
|
+
|
|
438
|
+
src/config.ts + src/block-definitions.json
|
|
439
|
+
-> extension-api-manifest Vite plugin
|
|
440
|
+
-> dist/extension-manifest.json
|
|
441
|
+
```
|
|
442
|
+
|
|
443
|
+
See [docs/architecture.md](docs/architecture.md) for the issue #1 architecture, initial scope, rollback path, and AR fallback notes.
|
|
444
|
+
|
|
445
|
+
## Development
|
|
446
|
+
|
|
447
|
+
```bash
|
|
448
|
+
pnpm run typecheck
|
|
449
|
+
pnpm run lint
|
|
450
|
+
pnpm run test
|
|
451
|
+
pnpm run build
|
|
452
|
+
```
|
|
453
|
+
|
|
454
|
+
The full repository check is:
|
|
455
|
+
|
|
456
|
+
```bash
|
|
457
|
+
pnpm run check
|
|
458
|
+
```
|
|
459
|
+
|
|
460
|
+
## License
|
|
461
|
+
|
|
462
|
+
SPDX-License-Identifier: MPL-2.0
|