@vgai/engine 0.4.1 → 0.5.0-canary.20260719.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/README.md +48 -15
- package/package.json +11 -25
- package/schemas/engine-capabilities.json +10 -10
- package/schemas/entity2d.schema.json +468 -0
- package/schemas/mat.schema.json +2 -33
- package/schemas/prefab.schema.json +16 -172
- package/schemas/scn2d.schema.json +42 -23
- package/schemas/vgai-game.schema.json +34 -0
- package/schemas/vscn.schema.json +16 -172
- package/src/adapter/authoring.ts +152 -2
- package/src/adapter/colyseus-networking-adapter.ts +35 -1
- package/src/adapter/first-party-systems.ts +7 -1
- package/src/adapter/game-adapter.ts +13 -0
- package/src/adapter/index.ts +25 -0
- package/src/adapter/rapier-physics-adapter.ts +55 -2
- package/src/adapter/system-adapter.ts +249 -2
- package/src/adapter/vgai-scene-game-adapter.ts +149 -25
- package/src/ai/navigation.ts +28 -0
- package/src/animation/clip-map.ts +1 -8
- package/src/animation/theatre-director.ts +50 -0
- package/src/animation/xstate-animation-binding.ts +6 -0
- package/src/audio/audio-introspection.ts +290 -0
- package/src/audio/tone-context.ts +46 -0
- package/src/dev/chrome-trace.ts +153 -0
- package/src/dev/performance-profiler.ts +93 -6
- package/src/dev/render-debug-adapter.ts +199 -0
- package/src/dev/render-memory.ts +243 -0
- package/src/dev/webgl-frame-capture.ts +424 -0
- package/src/ecs/component-manager.ts +43 -10
- package/src/ecs/game-component.ts +39 -10
- package/src/input/input-manager.ts +24 -19
- package/src/input/input-types.ts +1 -1
- package/src/loader.ts +7 -0
- package/src/manifest/load.ts +14 -0
- package/src/manifest/schema.ts +65 -0
- package/src/react/game-state.tsx +1 -1
- package/src/render/render-batch-system.ts +26 -12
- package/src/render/spark-renderer-lifecycle.ts +64 -0
- package/src/runtime/create-runtime.ts +33 -5
- package/src/runtime/debug-bridge.ts +5 -5
- package/src/runtime/game.ts +102 -20
- package/src/runtime/mount-manifest.ts +1 -1
- package/src/runtime/render-control.ts +121 -0
- package/src/runtime/types.ts +1 -1
- package/src/scene/asset-loaders.ts +77 -3
- package/src/scene/instance-mesh.ts +25 -0
- package/src/scene/material-factory.ts +4 -15
- package/src/scene/mesh-shadow.ts +18 -0
- package/src/scene/particles-factory.ts +59 -0
- package/src/scene/scene-loader.ts +41 -16
- package/src/scene/schema/instances.ts +1 -2
- package/src/scene/schema/material.ts +83 -94
- package/src/scene/schema/mesh.ts +76 -90
- package/src/scene/schema/scene-file.ts +1 -2
- package/src/scene/user-data.ts +30 -14
- package/src/setup/setup-renderer.ts +6 -1
- package/src/world2d/asset-paths2d.ts +44 -0
- package/src/world2d/collision-2d.ts +7 -14
- package/src/world2d/entity2d-asset.ts +22 -0
- package/src/world2d/index.ts +27 -2
- package/src/world2d/physics2d-transform.ts +173 -0
- package/src/world2d/physics2d-units.ts +10 -0
- package/src/world2d/pixi-game-adapter.ts +148 -36
- package/src/world2d/scene2d-identity.ts +49 -0
- package/src/world2d/scene2d-loader.ts +243 -119
- package/src/world2d/schema/entity2d.ts +51 -33
- package/src/world2d/schema/physics2d.ts +14 -3
- package/src/world2d/schema/sprite.ts +32 -4
- package/src/world2d/schema/tilemap.ts +26 -9
- package/src/world2d/transform-writer-2d.ts +29 -11
- package/src/world2d/types.ts +21 -8
- package/src/world3d-react/behavior.tsx +138 -0
- package/src/world3d-react/engine-bridge.ts +48 -0
- package/src/world3d-react/index.ts +44 -0
- package/src/world3d-react/r3f-adapter.tsx +303 -0
- package/src/world3d-react/world-context.ts +294 -0
- package/vendor/realism-effects/LICENSE.md +21 -0
- package/vendor/realism-effects/UPSTREAM.md +19 -0
- package/vendor/realism-effects/dist/index.cjs +3447 -0
- package/vendor/realism-effects/dist/index.d.ts +59 -0
- package/vendor/realism-effects/dist/index.js +3434 -0
- package/vendor/realism-effects/package.json +23 -0
- package/src/character/cloth-sim.ts +0 -533
- package/src/character/spring-chain.ts +0 -307
- package/src/humanoid/body.ts +0 -663
- package/src/humanoid/clips.ts +0 -149
- package/src/humanoid/compose.ts +0 -209
- package/src/humanoid/generate.ts +0 -189
- package/src/humanoid/index.ts +0 -36
- package/src/humanoid/schema.ts +0 -108
- package/src/humanoid/skeleton.ts +0 -345
- package/src/react/humanoid-bake.document.tsx +0 -337
- package/src/scene/geometries/index.ts +0 -7
- package/src/scene/geometries/terrain.ts +0 -42
- package/src/scene/geometry-registry.ts +0 -42
- package/src/scene/instance-registry.ts +0 -84
- package/src/scene/instancers/grid.ts +0 -38
- package/src/scene/instancers/index.ts +0 -7
- package/src/scene/material-registry.ts +0 -73
- package/src/scene/materials/index.ts +0 -7
- package/src/scene/materials/water.ts +0 -56
- package/src/world2d/components-2d.ts +0 -86
- package/tools/humanoid-bake.tool.ts +0 -274
|
@@ -250,19 +250,20 @@
|
|
|
250
250
|
"plane",
|
|
251
251
|
"cylinder",
|
|
252
252
|
"capsule",
|
|
253
|
-
"gltf"
|
|
253
|
+
"gltf",
|
|
254
|
+
"splat"
|
|
254
255
|
],
|
|
255
|
-
"description": "
|
|
256
|
+
"description": "Renderable type: a built-in mesh primitive, \"gltf\" for an external 3D model, or \"splat\" for a native Gaussian-splat asset"
|
|
256
257
|
},
|
|
257
258
|
"args": {
|
|
258
|
-
"description": "Geometry constructor args — box: [w,h,d], sphere: [radius], cylinder: [rTop,rBot,h], capsule: [radius,length], plane: [w,h]",
|
|
259
|
+
"description": "Geometry constructor args — box: [w,h,d], sphere: [radius], cylinder: [rTop,rBot,h], capsule: [radius,length], plane: [w,h,widthSegments,heightSegments]",
|
|
259
260
|
"type": "array",
|
|
260
261
|
"items": {
|
|
261
262
|
"type": "number"
|
|
262
263
|
}
|
|
263
264
|
},
|
|
264
265
|
"src": {
|
|
265
|
-
"description": "Path to
|
|
266
|
+
"description": "Path to the external render asset. Required for \"gltf\" (GLTF/GLB) and \"splat\" (SPZ)",
|
|
266
267
|
"type": "string"
|
|
267
268
|
},
|
|
268
269
|
"node": {
|
|
@@ -273,56 +274,8 @@
|
|
|
273
274
|
"description": "Path to an instance-transform asset (.instances.json: an array of [posX,posY,posZ, quatX,quatY,quatZ,quatW, scaleX,scaleY,scaleZ] tuples). Renders one THREE.InstancedMesh (one draw call). Bulk transform data is referenced as an asset, never inlined — keeps vscn thin.",
|
|
274
275
|
"type": "string"
|
|
275
276
|
},
|
|
276
|
-
"instancer": {
|
|
277
|
-
"description": "Registered instancer name. When set, the mesh renders as a single THREE.InstancedMesh (one draw call) with code-generated per-instance transforms instead of one THREE.Mesh",
|
|
278
|
-
"type": "string"
|
|
279
|
-
},
|
|
280
|
-
"instancerParams": {
|
|
281
|
-
"description": "Params for the instancer (e.g. count, spacing), keyed by name",
|
|
282
|
-
"type": "object",
|
|
283
|
-
"propertyNames": {
|
|
284
|
-
"type": "string"
|
|
285
|
-
},
|
|
286
|
-
"additionalProperties": {
|
|
287
|
-
"anyOf": [
|
|
288
|
-
{
|
|
289
|
-
"type": "number"
|
|
290
|
-
},
|
|
291
|
-
{
|
|
292
|
-
"type": "string"
|
|
293
|
-
},
|
|
294
|
-
{
|
|
295
|
-
"type": "boolean"
|
|
296
|
-
}
|
|
297
|
-
]
|
|
298
|
-
}
|
|
299
|
-
},
|
|
300
|
-
"generator": {
|
|
301
|
-
"description": "Registered geometry-generator name (e.g. \"Terrain\"). When set, the mesh geometry is produced procedurally in code instead of from `type`/`args`. Pairs with a \"trimesh\" collider for matching physics.",
|
|
302
|
-
"type": "string"
|
|
303
|
-
},
|
|
304
|
-
"generatorParams": {
|
|
305
|
-
"description": "Params for the geometry generator (e.g. width, segments, amplitude)",
|
|
306
|
-
"type": "object",
|
|
307
|
-
"propertyNames": {
|
|
308
|
-
"type": "string"
|
|
309
|
-
},
|
|
310
|
-
"additionalProperties": {
|
|
311
|
-
"anyOf": [
|
|
312
|
-
{
|
|
313
|
-
"type": "number"
|
|
314
|
-
},
|
|
315
|
-
{
|
|
316
|
-
"type": "string"
|
|
317
|
-
},
|
|
318
|
-
{
|
|
319
|
-
"type": "boolean"
|
|
320
|
-
}
|
|
321
|
-
]
|
|
322
|
-
}
|
|
323
|
-
},
|
|
324
277
|
"lod": {
|
|
325
|
-
"description": "Per-entity Level-of-Detail: distance-keyed glTF sub-nodes swapped by camera distance (THREE.LOD). gltf-only. Gated by the environment.rendering.lod master toggle — when off, only the closest level renders. Cannot combine with node/instances
|
|
278
|
+
"description": "Per-entity Level-of-Detail: distance-keyed glTF sub-nodes swapped by camera distance (THREE.LOD). gltf-only. Gated by the environment.rendering.lod master toggle — when off, only the closest level renders. Cannot combine with node/instances.",
|
|
326
279
|
"type": "array",
|
|
327
280
|
"items": {
|
|
328
281
|
"type": "object",
|
|
@@ -359,40 +312,9 @@
|
|
|
359
312
|
"standard",
|
|
360
313
|
"physical",
|
|
361
314
|
"basic",
|
|
362
|
-
"toon"
|
|
363
|
-
"custom"
|
|
315
|
+
"toon"
|
|
364
316
|
],
|
|
365
|
-
"description": "Material shading model
|
|
366
|
-
},
|
|
367
|
-
"def": {
|
|
368
|
-
"description": "Registered custom-material name (required when type is \"custom\")",
|
|
369
|
-
"type": "string"
|
|
370
|
-
},
|
|
371
|
-
"uniforms": {
|
|
372
|
-
"description": "Authored uniform values for a custom material, keyed by uniform name",
|
|
373
|
-
"type": "object",
|
|
374
|
-
"propertyNames": {
|
|
375
|
-
"type": "string"
|
|
376
|
-
},
|
|
377
|
-
"additionalProperties": {
|
|
378
|
-
"anyOf": [
|
|
379
|
-
{
|
|
380
|
-
"type": "number"
|
|
381
|
-
},
|
|
382
|
-
{
|
|
383
|
-
"type": "string"
|
|
384
|
-
},
|
|
385
|
-
{
|
|
386
|
-
"type": "boolean"
|
|
387
|
-
},
|
|
388
|
-
{
|
|
389
|
-
"type": "array",
|
|
390
|
-
"items": {
|
|
391
|
-
"type": "number"
|
|
392
|
-
}
|
|
393
|
-
}
|
|
394
|
-
]
|
|
395
|
-
}
|
|
317
|
+
"description": "Material shading model"
|
|
396
318
|
},
|
|
397
319
|
"color": {
|
|
398
320
|
"description": "Base color as CSS hex string (e.g. \"#ff0000\")",
|
|
@@ -5322,19 +5244,20 @@
|
|
|
5322
5244
|
"plane",
|
|
5323
5245
|
"cylinder",
|
|
5324
5246
|
"capsule",
|
|
5325
|
-
"gltf"
|
|
5247
|
+
"gltf",
|
|
5248
|
+
"splat"
|
|
5326
5249
|
],
|
|
5327
|
-
"description": "
|
|
5250
|
+
"description": "Renderable type: a built-in mesh primitive, \"gltf\" for an external 3D model, or \"splat\" for a native Gaussian-splat asset"
|
|
5328
5251
|
},
|
|
5329
5252
|
"args": {
|
|
5330
|
-
"description": "Geometry constructor args — box: [w,h,d], sphere: [radius], cylinder: [rTop,rBot,h], capsule: [radius,length], plane: [w,h]",
|
|
5253
|
+
"description": "Geometry constructor args — box: [w,h,d], sphere: [radius], cylinder: [rTop,rBot,h], capsule: [radius,length], plane: [w,h,widthSegments,heightSegments]",
|
|
5331
5254
|
"type": "array",
|
|
5332
5255
|
"items": {
|
|
5333
5256
|
"type": "number"
|
|
5334
5257
|
}
|
|
5335
5258
|
},
|
|
5336
5259
|
"src": {
|
|
5337
|
-
"description": "Path to
|
|
5260
|
+
"description": "Path to the external render asset. Required for \"gltf\" (GLTF/GLB) and \"splat\" (SPZ)",
|
|
5338
5261
|
"type": "string"
|
|
5339
5262
|
},
|
|
5340
5263
|
"node": {
|
|
@@ -5345,56 +5268,8 @@
|
|
|
5345
5268
|
"description": "Path to an instance-transform asset (.instances.json: an array of [posX,posY,posZ, quatX,quatY,quatZ,quatW, scaleX,scaleY,scaleZ] tuples). Renders one THREE.InstancedMesh (one draw call). Bulk transform data is referenced as an asset, never inlined — keeps vscn thin.",
|
|
5346
5269
|
"type": "string"
|
|
5347
5270
|
},
|
|
5348
|
-
"instancer": {
|
|
5349
|
-
"description": "Registered instancer name. When set, the mesh renders as a single THREE.InstancedMesh (one draw call) with code-generated per-instance transforms instead of one THREE.Mesh",
|
|
5350
|
-
"type": "string"
|
|
5351
|
-
},
|
|
5352
|
-
"instancerParams": {
|
|
5353
|
-
"description": "Params for the instancer (e.g. count, spacing), keyed by name",
|
|
5354
|
-
"type": "object",
|
|
5355
|
-
"propertyNames": {
|
|
5356
|
-
"type": "string"
|
|
5357
|
-
},
|
|
5358
|
-
"additionalProperties": {
|
|
5359
|
-
"anyOf": [
|
|
5360
|
-
{
|
|
5361
|
-
"type": "number"
|
|
5362
|
-
},
|
|
5363
|
-
{
|
|
5364
|
-
"type": "string"
|
|
5365
|
-
},
|
|
5366
|
-
{
|
|
5367
|
-
"type": "boolean"
|
|
5368
|
-
}
|
|
5369
|
-
]
|
|
5370
|
-
}
|
|
5371
|
-
},
|
|
5372
|
-
"generator": {
|
|
5373
|
-
"description": "Registered geometry-generator name (e.g. \"Terrain\"). When set, the mesh geometry is produced procedurally in code instead of from `type`/`args`. Pairs with a \"trimesh\" collider for matching physics.",
|
|
5374
|
-
"type": "string"
|
|
5375
|
-
},
|
|
5376
|
-
"generatorParams": {
|
|
5377
|
-
"description": "Params for the geometry generator (e.g. width, segments, amplitude)",
|
|
5378
|
-
"type": "object",
|
|
5379
|
-
"propertyNames": {
|
|
5380
|
-
"type": "string"
|
|
5381
|
-
},
|
|
5382
|
-
"additionalProperties": {
|
|
5383
|
-
"anyOf": [
|
|
5384
|
-
{
|
|
5385
|
-
"type": "number"
|
|
5386
|
-
},
|
|
5387
|
-
{
|
|
5388
|
-
"type": "string"
|
|
5389
|
-
},
|
|
5390
|
-
{
|
|
5391
|
-
"type": "boolean"
|
|
5392
|
-
}
|
|
5393
|
-
]
|
|
5394
|
-
}
|
|
5395
|
-
},
|
|
5396
5271
|
"lod": {
|
|
5397
|
-
"description": "Per-entity Level-of-Detail: distance-keyed glTF sub-nodes swapped by camera distance (THREE.LOD). gltf-only. Gated by the environment.rendering.lod master toggle — when off, only the closest level renders. Cannot combine with node/instances
|
|
5272
|
+
"description": "Per-entity Level-of-Detail: distance-keyed glTF sub-nodes swapped by camera distance (THREE.LOD). gltf-only. Gated by the environment.rendering.lod master toggle — when off, only the closest level renders. Cannot combine with node/instances.",
|
|
5398
5273
|
"type": "array",
|
|
5399
5274
|
"items": {
|
|
5400
5275
|
"type": "object",
|
|
@@ -5428,40 +5303,9 @@
|
|
|
5428
5303
|
"standard",
|
|
5429
5304
|
"physical",
|
|
5430
5305
|
"basic",
|
|
5431
|
-
"toon"
|
|
5432
|
-
"custom"
|
|
5306
|
+
"toon"
|
|
5433
5307
|
],
|
|
5434
|
-
"description": "Material shading model
|
|
5435
|
-
},
|
|
5436
|
-
"def": {
|
|
5437
|
-
"description": "Registered custom-material name (required when type is \"custom\")",
|
|
5438
|
-
"type": "string"
|
|
5439
|
-
},
|
|
5440
|
-
"uniforms": {
|
|
5441
|
-
"description": "Authored uniform values for a custom material, keyed by uniform name",
|
|
5442
|
-
"type": "object",
|
|
5443
|
-
"propertyNames": {
|
|
5444
|
-
"type": "string"
|
|
5445
|
-
},
|
|
5446
|
-
"additionalProperties": {
|
|
5447
|
-
"anyOf": [
|
|
5448
|
-
{
|
|
5449
|
-
"type": "number"
|
|
5450
|
-
},
|
|
5451
|
-
{
|
|
5452
|
-
"type": "string"
|
|
5453
|
-
},
|
|
5454
|
-
{
|
|
5455
|
-
"type": "boolean"
|
|
5456
|
-
},
|
|
5457
|
-
{
|
|
5458
|
-
"type": "array",
|
|
5459
|
-
"items": {
|
|
5460
|
-
"type": "number"
|
|
5461
|
-
}
|
|
5462
|
-
}
|
|
5463
|
-
]
|
|
5464
|
-
}
|
|
5308
|
+
"description": "Material shading model"
|
|
5465
5309
|
},
|
|
5466
5310
|
"color": {
|
|
5467
5311
|
"description": "Base color as CSS hex string (e.g. \"#ff0000\")",
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"type": "number"
|
|
9
9
|
},
|
|
10
10
|
"name": {
|
|
11
|
-
"description": "Scene name
|
|
11
|
+
"description": "Scene name shown in the native 2D document hierarchy and inspector",
|
|
12
12
|
"type": "string"
|
|
13
13
|
},
|
|
14
14
|
"surface": {
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"const": "world2d"
|
|
18
18
|
},
|
|
19
19
|
"gravity": {
|
|
20
|
-
"description": "World gravity [x, y] in px/s^2. Default [0, 980]",
|
|
20
|
+
"description": "World gravity [x, y] in px/s^2. Default [0, 9.8 * pixelsPerMeter] ([0, 980] at the default scale)",
|
|
21
21
|
"type": "array",
|
|
22
22
|
"prefixItems": [
|
|
23
23
|
{
|
|
@@ -28,6 +28,11 @@
|
|
|
28
28
|
}
|
|
29
29
|
]
|
|
30
30
|
},
|
|
31
|
+
"pixelsPerMeter": {
|
|
32
|
+
"description": "Authored pixels per physics meter. Configures native Rapier World.lengthUnit and scales default gravity. Default 100",
|
|
33
|
+
"type": "number",
|
|
34
|
+
"exclusiveMinimum": 0
|
|
35
|
+
},
|
|
31
36
|
"background": {
|
|
32
37
|
"description": "Background color hex string. Default '#10101a'",
|
|
33
38
|
"type": "string"
|
|
@@ -70,7 +75,7 @@
|
|
|
70
75
|
"type": "boolean"
|
|
71
76
|
},
|
|
72
77
|
"locked": {
|
|
73
|
-
"description": "Prevent selection and editing in the scene editor
|
|
78
|
+
"description": "Prevent selection and editing in the native 2D scene editor",
|
|
74
79
|
"type": "boolean"
|
|
75
80
|
},
|
|
76
81
|
"tags": {
|
|
@@ -149,7 +154,13 @@
|
|
|
149
154
|
},
|
|
150
155
|
"frame": {
|
|
151
156
|
"description": "Spritesheet frame/sub-texture name when `texture` is a spritesheet atlas",
|
|
152
|
-
"type": "string"
|
|
157
|
+
"type": "string",
|
|
158
|
+
"minLength": 1
|
|
159
|
+
},
|
|
160
|
+
"animation": {
|
|
161
|
+
"description": "Named spritesheet animation from `texture` (PIXI.Spritesheet.animations); mutually exclusive with `frame`",
|
|
162
|
+
"type": "string",
|
|
163
|
+
"minLength": 1
|
|
153
164
|
},
|
|
154
165
|
"anchor": {
|
|
155
166
|
"description": "Normalized anchor [x, y] (0..1). Default [0.5, 0.5]",
|
|
@@ -204,15 +215,14 @@
|
|
|
204
215
|
"desaturate"
|
|
205
216
|
]
|
|
206
217
|
},
|
|
207
|
-
"animationFrames": {
|
|
208
|
-
"description": "If set, build an AnimatedSprite cycling N generated tinted frames",
|
|
209
|
-
"type": "integer",
|
|
210
|
-
"minimum": -9007199254740991,
|
|
211
|
-
"maximum": 9007199254740991
|
|
212
|
-
},
|
|
213
218
|
"fps": {
|
|
214
219
|
"description": "AnimatedSprite playback speed in frames/sec. Default 8",
|
|
215
|
-
"type": "number"
|
|
220
|
+
"type": "number",
|
|
221
|
+
"exclusiveMinimum": 0
|
|
222
|
+
},
|
|
223
|
+
"loop": {
|
|
224
|
+
"description": "Whether the named spritesheet animation loops. Default true",
|
|
225
|
+
"type": "boolean"
|
|
216
226
|
}
|
|
217
227
|
},
|
|
218
228
|
"additionalProperties": false
|
|
@@ -255,16 +265,24 @@
|
|
|
255
265
|
"description": "2D tilemap (CompositeTilemap)",
|
|
256
266
|
"type": "object",
|
|
257
267
|
"properties": {
|
|
258
|
-
"
|
|
259
|
-
"
|
|
260
|
-
"description": "Tile width/height in pixels"
|
|
261
|
-
},
|
|
262
|
-
"palette": {
|
|
268
|
+
"frames": {
|
|
269
|
+
"minItems": 1,
|
|
263
270
|
"type": "array",
|
|
264
271
|
"items": {
|
|
265
|
-
"type": "string"
|
|
272
|
+
"type": "string",
|
|
273
|
+
"minLength": 1
|
|
266
274
|
},
|
|
267
|
-
"description": "
|
|
275
|
+
"description": "Ordered Pixi spritesheet frame names used as tile indices"
|
|
276
|
+
},
|
|
277
|
+
"texture": {
|
|
278
|
+
"type": "string",
|
|
279
|
+
"minLength": 1,
|
|
280
|
+
"description": "URL or project path to a Pixi spritesheet JSON asset"
|
|
281
|
+
},
|
|
282
|
+
"tileSize": {
|
|
283
|
+
"type": "number",
|
|
284
|
+
"exclusiveMinimum": 0,
|
|
285
|
+
"description": "Positive square tile width/height in pixels"
|
|
268
286
|
},
|
|
269
287
|
"tiles": {
|
|
270
288
|
"type": "array",
|
|
@@ -276,12 +294,13 @@
|
|
|
276
294
|
"maximum": 9007199254740991
|
|
277
295
|
}
|
|
278
296
|
},
|
|
279
|
-
"description": "Row-major grid of
|
|
297
|
+
"description": "Row-major grid of frame indices; -1 is an empty cell (each row is an array of tile indices)"
|
|
280
298
|
}
|
|
281
299
|
},
|
|
282
300
|
"required": [
|
|
301
|
+
"frames",
|
|
302
|
+
"texture",
|
|
283
303
|
"tileSize",
|
|
284
|
-
"palette",
|
|
285
304
|
"tiles"
|
|
286
305
|
],
|
|
287
306
|
"additionalProperties": false
|
|
@@ -298,7 +317,7 @@
|
|
|
298
317
|
"kinematicVelocity",
|
|
299
318
|
"kinematicPosition"
|
|
300
319
|
],
|
|
301
|
-
"description": "Rapier 2D rigid-body type"
|
|
320
|
+
"description": "Rapier 2D rigid-body type. A body of any type nested below a dynamic or kinematic body is rejected: Rapier has no parent/child body relationship. Nesting below a fixed or physics-less transformed parent is supported for fixed bodies. Dynamic and kinematic bodies additionally require a conformal parent chain (uniform scale plus rotation/reflection), because later body rotation cannot round-trip through non-uniform parent scale without shearing the Pixi visual."
|
|
302
321
|
},
|
|
303
322
|
"collider": {
|
|
304
323
|
"oneOf": [
|
|
@@ -308,7 +327,7 @@
|
|
|
308
327
|
"shape": {
|
|
309
328
|
"type": "string",
|
|
310
329
|
"const": "cuboid",
|
|
311
|
-
"description": "
|
|
330
|
+
"description": "Box collider aligned to the rigid-body rotation"
|
|
312
331
|
},
|
|
313
332
|
"halfExtents": {
|
|
314
333
|
"type": "array",
|
|
@@ -373,7 +392,7 @@
|
|
|
373
392
|
"additionalProperties": false
|
|
374
393
|
}
|
|
375
394
|
],
|
|
376
|
-
"description": "Collider shape attached to the body"
|
|
395
|
+
"description": "Collider shape attached to the body. Its pose and dimensions use the composed parent transform at spawn. Cuboids support non-uniform scale; ball/capsule colliders reject non-uniform scale because Rapier cannot represent an ellipse."
|
|
377
396
|
},
|
|
378
397
|
"sensor": {
|
|
379
398
|
"description": "If true, a sensor (trigger) collider — overlaps fire onTriggerEnter/Exit, no solid response",
|
|
@@ -369,6 +369,40 @@
|
|
|
369
369
|
"required": [
|
|
370
370
|
"seededRandom"
|
|
371
371
|
]
|
|
372
|
+
},
|
|
373
|
+
"budget": {
|
|
374
|
+
"description": "Performance budget (W3d, F11 perf regression gates) asserted by `vgai perf --assert-budget`: a seeded, fixed-step headless run samples the engine profiler and fails (nonzero exit) when any metric here is exceeded. Only headlessly-measurable metrics are budgetable; real GPU frame time is not (SwiftShader).",
|
|
375
|
+
"type": "object",
|
|
376
|
+
"properties": {
|
|
377
|
+
"frameCpuMsP95": {
|
|
378
|
+
"description": "Maximum allowed p95 of per-frame CPU time (ms) across the measured frames of a `vgai perf` seeded headless run. CPU-side only: headless runs rasterize under SwiftShader, so this is main-thread frame cost, NOT real GPU frame time. Machine-dependent — prefer the baseline-diff tolerance band for regression gating and use this as a coarse absolute ceiling.",
|
|
379
|
+
"type": "number",
|
|
380
|
+
"exclusiveMinimum": 0
|
|
381
|
+
},
|
|
382
|
+
"physicsMsP95": {
|
|
383
|
+
"description": "Maximum allowed p95 of the profiler's `physics` phase time (ms) per fixed-step frame in a `vgai perf` run. Same CPU-timing caveats as frameCpuMsP95.",
|
|
384
|
+
"type": "number",
|
|
385
|
+
"exclusiveMinimum": 0
|
|
386
|
+
},
|
|
387
|
+
"maxEntities": {
|
|
388
|
+
"description": "Maximum allowed entity-tagged scene-graph nodes (nodes carrying userData.entityId) summed across the game's threejs/pixijs worlds at the end of a `vgai perf` run. Exact and deterministic under a seed — no tolerance band.",
|
|
389
|
+
"type": "integer",
|
|
390
|
+
"minimum": 0,
|
|
391
|
+
"maximum": 9007199254740991
|
|
392
|
+
},
|
|
393
|
+
"maxDrawCalls": {
|
|
394
|
+
"description": "Maximum allowed renderer draw calls in any measured frame of a `vgai perf` run (the profiler's per-frame render.drawCalls, from renderer.info). Exact and deterministic under a seed.",
|
|
395
|
+
"type": "integer",
|
|
396
|
+
"exclusiveMinimum": 0,
|
|
397
|
+
"maximum": 9007199254740991
|
|
398
|
+
},
|
|
399
|
+
"maxTriangles": {
|
|
400
|
+
"description": "Maximum allowed rendered triangles in any measured frame of a `vgai perf` run (the profiler's per-frame render.triangles, from renderer.info). Exact and deterministic under a seed.",
|
|
401
|
+
"type": "integer",
|
|
402
|
+
"exclusiveMinimum": 0,
|
|
403
|
+
"maximum": 9007199254740991
|
|
404
|
+
}
|
|
405
|
+
}
|
|
372
406
|
}
|
|
373
407
|
},
|
|
374
408
|
"required": [
|