Add context sharing on prefabs.
This commit is contained in:
@ -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"
|
||||
}
|
||||
}
|
||||
}
|
30
assets/scenes/test_rpg_scene.json
Normal file
30
assets/scenes/test_rpg_scene.json
Normal 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 ]
|
||||
}
|
||||
}
|
||||
}
|
@ -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"
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user