Add context sharing on prefabs.

This commit is contained in:
2024-12-03 17:15:39 -06:00
parent 68fab7c94d
commit 5998037994
30 changed files with 166 additions and 177 deletions

View File

@ -1,5 +1,5 @@
{
"name": "Test Cube",
"name": "Rosa",
"assets": {
"rosa": {
@ -8,21 +8,20 @@
}
},
"position": [ 0, 0, 0 ],
"components": {
"mat": {
"material": {
"type": "SimpleTexturedMaterial",
"color": "blue",
"texture": "rosa"
},
"renderer": {
"meshRenderer": {
"type": "MeshRenderer"
},
"mesh": {
"type": "CubeMesh"
"entity": {
"type": "RPGEntity"
},
"player": {
"type": "RPGPlayer",
"camera": "camera"
}
}
}

View File

@ -0,0 +1,30 @@
{
"name": "Test RPG Scene",
"assets": {
"rosa": {
"type": "prefab",
"path": "prefabs/rosa.json"
}
},
"items": {
"camera": {
"components": {
"camera": {
"type": "camera"
}
}
},
"rosa": {
"prefab": "rosa",
"position": [ 0, 0, 0 ]
},
"rosa2": {
"prefab": "rosa",
"position": [ 2, 0, 0 ]
}
}
}

View File

@ -1,32 +0,0 @@
{
"name": "Test Scene",
"assets": {
"rosa": {
"type": "texture",
"path": "rosa.texture"
},
"cube": {
"type": "prefab",
"path": "test_cube.json"
}
},
"items": {
"camera": {
"lookAt": {
"position": [ 3, 3, 3 ],
"look": [ 0, 0, 0 ],
"view": [ 0, 1, 0 ]
},
"components": {
"camera": {
"type": "Camera"
}
}
},
"cube": {
"prefab": "cube"
}
}
}