Finish JerryScript Entity/Scene wiring; remove JSON serialize/deserialize
Register Entity, the generic Component wrapper, and Scene as JerryScript classes (modulelist.c ties them together, plus their .d.ts stubs), so scenes/entities can be built from script going forward instead of the JSON scene format. With scripting now the intended authoring path, drop the JSON serialize/deserialize machinery entirely: componentdefinition_t's serialize/deserialize callbacks, every component's *Serialize/ *Deserialize function, entitySerialize/entityDeserialize, sceneSerialize/sceneDeserialize, and the "prefabs/<name>.json"/ "scenes/<name>.json" asset fallback in entityPrefabResolveAndApply/ scenePrefabResolveAndApply (C-coded prefabs only now). physicsshape.c and its test are removed outright since they only existed for this. game.c's test scene now comes from the existing overworldSceneCreate() C builder instead of loading the now-deleted assets/scenes/test.json. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,66 +0,0 @@
|
||||
{
|
||||
"extend": "OVERWORLDSCENE",
|
||||
"entities": [
|
||||
{
|
||||
"components": [
|
||||
{ "type": "POSITION", "x": 0, "y": 1, "z": 0, "parent": "camera" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "testArea",
|
||||
"components": [
|
||||
{ "type": "POSITION", "x": 2, "y": 1, "z": 0 },
|
||||
{
|
||||
"type": "TRIGGER",
|
||||
"collideMask": 2,
|
||||
"shape": {
|
||||
"type": "CUBE",
|
||||
"halfExtentX": 1.5, "halfExtentY": 1.5, "halfExtentZ": 1.5
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "npc",
|
||||
"components": [
|
||||
{ "type": "POSITION", "x": -3, "y": 1, "z": 0 },
|
||||
{
|
||||
"type": "RENDERABLE",
|
||||
"renderType": "SHADER_MATERIAL",
|
||||
"priority": 0,
|
||||
"shaderType": "UNLIT",
|
||||
"color": { "r": 80, "g": 255, "b": 120, "a": 255 },
|
||||
"displayState": { "cull": false, "depthTest": true, "blend": false }
|
||||
},
|
||||
{ "type": "PHYSICS", "bodyType": "STATIC" },
|
||||
{ "type": "INTERACTABLE", "kind": "ITEM_PICKUP", "pickupId": 1 }
|
||||
]
|
||||
},
|
||||
{
|
||||
"components": [
|
||||
{
|
||||
"type": "POSITION",
|
||||
"x": 0, "y": -0.1, "z": 0,
|
||||
"scale": { "x": 20, "y": 0.2, "z": 20 }
|
||||
},
|
||||
{
|
||||
"type": "RENDERABLE",
|
||||
"renderType": "SHADER_MATERIAL",
|
||||
"priority": 0,
|
||||
"shaderType": "UNLIT",
|
||||
"color": { "r": 128, "g": 128, "b": 128, "a": 255 },
|
||||
"displayState": { "cull": false, "depthTest": true, "blend": false }
|
||||
},
|
||||
{
|
||||
"type": "PHYSICS",
|
||||
"bodyType": "STATIC",
|
||||
"shape": {
|
||||
"type": "PLANE",
|
||||
"normalX": 0, "normalY": 1, "normalZ": 0,
|
||||
"distance": 0
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user