108 lines
3.3 KiB
JSON
108 lines
3.3 KiB
JSON
{
|
||
"transactions": "1–1000 commands apply atomically. Read project_read first. Mutation expectedRevision must match current revision. requestId deduplicates successful retried transactions. On REVISION_CONFLICT reread project before editing.",
|
||
"coordinates": "Y up, meters, radians. Entity transforms local to parent. Reparent preserves local coordinates unless you provide transform. Kinematic move uses world displacement; other move uses local.",
|
||
"commands": {
|
||
"project.rename": "{name}",
|
||
"project.settings": "{background:\"#dedbd2\",ambient:0.85,shadows:true,renderScale:1}",
|
||
"scene.create": "{id?,name}",
|
||
"scene.activate": "{id}",
|
||
"scene.rename": "{sceneId,name}",
|
||
"node.create": "{name,id?,position?,parentId?,components?,sceneId?} OR {entity:{id,name,parentId:null,enabled:true,transform:{position:[0,0,0],rotation:[0,0,0],scale:[1,1,1]},components:{}}}",
|
||
"node.patch": "{id,patch:{name?,enabled?,transform?,components?},sceneId?}; deep merge, arrays replace, id/parentId immutable here",
|
||
"node.reparent": "{id,parentId:null|string,transform?,sceneId?}",
|
||
"node.delete": "{id,sceneId?}; subtree",
|
||
"node.duplicate": "{id,sceneId?}; subtree and internal references",
|
||
"component.set": "{id,type,value,sceneId?}; replaces component",
|
||
"component.remove": "{id,type,sceneId?}",
|
||
"asset.upsert": "{asset:{id,name,kind:\"model\"|\"geometry\"|\"prefab\",uri?,geometry?,entities?,metadata?}}",
|
||
"asset.delete": "{id}; fails if referenced",
|
||
"script.upsert": "{script:{id,name,source,fields:{speed:{type:\"number\",default:5,label:\"Speed\",min:0,max:30}}}}",
|
||
"prefab.create": "{id,name?,sceneId?}",
|
||
"prefab.instantiate": "{assetId,position?,sceneId?}"
|
||
},
|
||
"components": {
|
||
"mesh": {
|
||
"type": "box | sphere | cylinder | icosphere | torus | model | geometry | custom",
|
||
"size": [
|
||
1,
|
||
1,
|
||
1
|
||
],
|
||
"assetId": "for model/geometry types",
|
||
"geometry": "{positions,indices,normals?,uvs?} for custom type"
|
||
},
|
||
"material": {
|
||
"color": "#91a697",
|
||
"roughness": 0.8,
|
||
"metallic": 0,
|
||
"emissive": 0,
|
||
"override": false
|
||
},
|
||
"collider": {
|
||
"shape": "box | ball | capsule",
|
||
"size": [
|
||
1,
|
||
1,
|
||
1
|
||
],
|
||
"radius": 0.32,
|
||
"height": 1.8,
|
||
"offset": [
|
||
0,
|
||
0.9,
|
||
0
|
||
],
|
||
"sensor": false,
|
||
"enabled": true
|
||
},
|
||
"rigidbody": {
|
||
"type": "fixed | dynamic | kinematic",
|
||
"mass": 1,
|
||
"restitution": 0.1
|
||
},
|
||
"camera": {
|
||
"mode": "follow | firstPerson",
|
||
"targetId": "subject",
|
||
"offset": [
|
||
0,
|
||
13,
|
||
-10
|
||
],
|
||
"fov": 0.72,
|
||
"yaw": 0,
|
||
"pitch": 0
|
||
},
|
||
"character": {
|
||
"gravity": 24,
|
||
"autostep": 0.25,
|
||
"requires": "kinematic rigidbody + capsule collider"
|
||
},
|
||
"sign": {
|
||
"text": "Text in the scene",
|
||
"color": "#d7f34b",
|
||
"width": 5
|
||
},
|
||
"light": {
|
||
"color": "#fff1da",
|
||
"intensity": 2
|
||
},
|
||
"animator": {
|
||
"idle": "Idle",
|
||
"run": "Run",
|
||
"attack": "Attack",
|
||
"death": "Death",
|
||
"speed": 1
|
||
},
|
||
"script": {
|
||
"scriptId": "script_rotate",
|
||
"params": {
|
||
"speed": 1
|
||
}
|
||
},
|
||
"data": {
|
||
"customValue": 1,
|
||
"label": "Application-defined properties"
|
||
}
|
||
}
|
||
}
|