Added some rendering
Signed-off-by: Robear Selwans <robear.selwans@outlook.com>
This commit is contained in:
@@ -33,5 +33,5 @@
|
|||||||
"path": "scenes://TestScene.evsc"
|
"path": "scenes://TestScene.evsc"
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
"activeScene": "MainScene"
|
"activeScene": "TestScene"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -85,6 +85,11 @@
|
|||||||
"type": "ScriptComponent",
|
"type": "ScriptComponent",
|
||||||
"script_name": "MainPlayerController",
|
"script_name": "MainPlayerController",
|
||||||
"script_path": "scripts://MainScene/Player.lua"
|
"script_path": "scripts://MainScene/Player.lua"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "RenderComponent",
|
||||||
|
"mesh": "project://Avocado.mesh",
|
||||||
|
"material": "WhiteMaterial"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"children": [
|
"children": [
|
||||||
@@ -119,6 +124,11 @@
|
|||||||
"type": "ScriptComponent",
|
"type": "ScriptComponent",
|
||||||
"script_name": "MainChildController",
|
"script_name": "MainChildController",
|
||||||
"script_path": "scripts://MainScene/Child.lua"
|
"script_path": "scripts://MainScene/Child.lua"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "RenderComponent",
|
||||||
|
"mesh": "project://Avocado.mesh",
|
||||||
|
"material": "WhiteMaterial"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -195,6 +205,11 @@
|
|||||||
"type": "Box",
|
"type": "Box",
|
||||||
"halfExtents": [1.0, 4.0, 9.0]
|
"halfExtents": [1.0, 4.0, 9.0]
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "RenderComponent",
|
||||||
|
"mesh": "project://Avocado.mesh",
|
||||||
|
"material": "WhiteMaterial"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -98,7 +98,7 @@
|
|||||||
"type": "ScriptComponent",
|
"type": "ScriptComponent",
|
||||||
"script_name": "MainPlayerController",
|
"script_name": "MainPlayerController",
|
||||||
"script_path": "scripts://TestScene/Player.lua"
|
"script_path": "scripts://TestScene/Player.lua"
|
||||||
}
|
},
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -119,6 +119,11 @@
|
|||||||
"type": "Sphere",
|
"type": "Sphere",
|
||||||
"radius": 1.0
|
"radius": 1.0
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "RenderComponent",
|
||||||
|
"mesh": "project://Avocado.mesh",
|
||||||
|
"material": "GreenMaterial"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@@ -140,12 +145,22 @@
|
|||||||
"type": "Sphere",
|
"type": "Sphere",
|
||||||
"radius": 1.0
|
"radius": 1.0
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "RenderComponent",
|
||||||
|
"mesh": "project://Avocado.mesh",
|
||||||
|
"material": "GreenMaterial"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "Ball3",
|
"id": "Ball3",
|
||||||
"components": [
|
"components": [
|
||||||
|
{
|
||||||
|
"type": "RenderComponent",
|
||||||
|
"mesh": "project://Avocado.mesh",
|
||||||
|
"material": "GreenMaterial"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "TransformComponent",
|
"type": "TransformComponent",
|
||||||
"position": [0.0, 10.0, -15.0],
|
"position": [0.0, 10.0, -15.0],
|
||||||
@@ -167,6 +182,11 @@
|
|||||||
{
|
{
|
||||||
"id": "Ball4",
|
"id": "Ball4",
|
||||||
"components": [
|
"components": [
|
||||||
|
{
|
||||||
|
"type": "RenderComponent",
|
||||||
|
"mesh": "project://Avocado.mesh",
|
||||||
|
"material": "GreenMaterial"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "TransformComponent",
|
"type": "TransformComponent",
|
||||||
"position": [0.0, 10.0, -15.0],
|
"position": [0.0, 10.0, -15.0],
|
||||||
@@ -188,6 +208,11 @@
|
|||||||
{
|
{
|
||||||
"id": "Ball5",
|
"id": "Ball5",
|
||||||
"components": [
|
"components": [
|
||||||
|
{
|
||||||
|
"type": "RenderComponent",
|
||||||
|
"mesh": "project://Avocado.mesh",
|
||||||
|
"material": "GreenMaterial"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "TransformComponent",
|
"type": "TransformComponent",
|
||||||
"position": [0.0, 10.0, -15.0],
|
"position": [0.0, 10.0, -15.0],
|
||||||
@@ -209,6 +234,11 @@
|
|||||||
{
|
{
|
||||||
"id": "Ball6",
|
"id": "Ball6",
|
||||||
"components": [
|
"components": [
|
||||||
|
{
|
||||||
|
"type": "RenderComponent",
|
||||||
|
"mesh": "project://Avocado.mesh",
|
||||||
|
"material": "GreenMaterial"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "TransformComponent",
|
"type": "TransformComponent",
|
||||||
"position": [0.0, 10.0, -15.0],
|
"position": [0.0, 10.0, -15.0],
|
||||||
@@ -230,6 +260,11 @@
|
|||||||
{
|
{
|
||||||
"id": "Ball7",
|
"id": "Ball7",
|
||||||
"components": [
|
"components": [
|
||||||
|
{
|
||||||
|
"type": "RenderComponent",
|
||||||
|
"mesh": "project://Avocado.mesh",
|
||||||
|
"material": "GreenMaterial"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "TransformComponent",
|
"type": "TransformComponent",
|
||||||
"position": [0.0, 10.0, -15.0],
|
"position": [0.0, 10.0, -15.0],
|
||||||
@@ -251,6 +286,11 @@
|
|||||||
{
|
{
|
||||||
"id": "Ball9",
|
"id": "Ball9",
|
||||||
"components": [
|
"components": [
|
||||||
|
{
|
||||||
|
"type": "RenderComponent",
|
||||||
|
"mesh": "project://Avocado.mesh",
|
||||||
|
"material": "GreenMaterial"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "TransformComponent",
|
"type": "TransformComponent",
|
||||||
"position": [0.0, 10.0, -15.0],
|
"position": [0.0, 10.0, -15.0],
|
||||||
@@ -272,6 +312,11 @@
|
|||||||
{
|
{
|
||||||
"id": "Ball10",
|
"id": "Ball10",
|
||||||
"components": [
|
"components": [
|
||||||
|
{
|
||||||
|
"type": "RenderComponent",
|
||||||
|
"mesh": "project://Avocado.mesh",
|
||||||
|
"material": "GreenMaterial"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "TransformComponent",
|
"type": "TransformComponent",
|
||||||
"position": [0.0, 10.0, -15.0],
|
"position": [0.0, 10.0, -15.0],
|
||||||
@@ -293,6 +338,11 @@
|
|||||||
{
|
{
|
||||||
"id": "Ball11",
|
"id": "Ball11",
|
||||||
"components": [
|
"components": [
|
||||||
|
{
|
||||||
|
"type": "RenderComponent",
|
||||||
|
"mesh": "project://Avocado.mesh",
|
||||||
|
"material": "GreenMaterial"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "TransformComponent",
|
"type": "TransformComponent",
|
||||||
"position": [0.0, 10.0, -15.0],
|
"position": [0.0, 10.0, -15.0],
|
||||||
@@ -314,6 +364,11 @@
|
|||||||
{
|
{
|
||||||
"id": "Ball12",
|
"id": "Ball12",
|
||||||
"components": [
|
"components": [
|
||||||
|
{
|
||||||
|
"type": "RenderComponent",
|
||||||
|
"mesh": "project://Avocado.mesh",
|
||||||
|
"material": "GreenMaterial"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "TransformComponent",
|
"type": "TransformComponent",
|
||||||
"position": [0.0, 10.0, -15.0],
|
"position": [0.0, 10.0, -15.0],
|
||||||
@@ -335,6 +390,11 @@
|
|||||||
{
|
{
|
||||||
"id": "Ball13",
|
"id": "Ball13",
|
||||||
"components": [
|
"components": [
|
||||||
|
{
|
||||||
|
"type": "RenderComponent",
|
||||||
|
"mesh": "project://Avocado.mesh",
|
||||||
|
"material": "GreenMaterial"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "TransformComponent",
|
"type": "TransformComponent",
|
||||||
"position": [0.0, 10.0, -15.0],
|
"position": [0.0, 10.0, -15.0],
|
||||||
@@ -356,6 +416,11 @@
|
|||||||
{
|
{
|
||||||
"id": "Ball14",
|
"id": "Ball14",
|
||||||
"components": [
|
"components": [
|
||||||
|
{
|
||||||
|
"type": "RenderComponent",
|
||||||
|
"mesh": "project://Avocado.mesh",
|
||||||
|
"material": "GreenMaterial"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "TransformComponent",
|
"type": "TransformComponent",
|
||||||
"position": [0.0, 10.0, -15.0],
|
"position": [0.0, 10.0, -15.0],
|
||||||
@@ -377,6 +442,11 @@
|
|||||||
{
|
{
|
||||||
"id": "Ball15",
|
"id": "Ball15",
|
||||||
"components": [
|
"components": [
|
||||||
|
{
|
||||||
|
"type": "RenderComponent",
|
||||||
|
"mesh": "project://Avocado.mesh",
|
||||||
|
"material": "GreenMaterial"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "TransformComponent",
|
"type": "TransformComponent",
|
||||||
"position": [0.0, 10.0, -15.0],
|
"position": [0.0, 10.0, -15.0],
|
||||||
@@ -398,6 +468,11 @@
|
|||||||
{
|
{
|
||||||
"id": "Ball16",
|
"id": "Ball16",
|
||||||
"components": [
|
"components": [
|
||||||
|
{
|
||||||
|
"type": "RenderComponent",
|
||||||
|
"mesh": "project://Avocado.mesh",
|
||||||
|
"material": "GreenMaterial"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "TransformComponent",
|
"type": "TransformComponent",
|
||||||
"position": [0.0, 10.0, -15.0],
|
"position": [0.0, 10.0, -15.0],
|
||||||
@@ -419,6 +494,11 @@
|
|||||||
{
|
{
|
||||||
"id": "Ball17",
|
"id": "Ball17",
|
||||||
"components": [
|
"components": [
|
||||||
|
{
|
||||||
|
"type": "RenderComponent",
|
||||||
|
"mesh": "project://Avocado.mesh",
|
||||||
|
"material": "GreenMaterial"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "TransformComponent",
|
"type": "TransformComponent",
|
||||||
"position": [0.0, 10.0, -15.0],
|
"position": [0.0, 10.0, -15.0],
|
||||||
@@ -440,6 +520,11 @@
|
|||||||
{
|
{
|
||||||
"id": "Ball18",
|
"id": "Ball18",
|
||||||
"components": [
|
"components": [
|
||||||
|
{
|
||||||
|
"type": "RenderComponent",
|
||||||
|
"mesh": "project://Avocado.mesh",
|
||||||
|
"material": "GreenMaterial"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "TransformComponent",
|
"type": "TransformComponent",
|
||||||
"position": [0.0, 10.0, -15.0],
|
"position": [0.0, 10.0, -15.0],
|
||||||
@@ -461,6 +546,11 @@
|
|||||||
{
|
{
|
||||||
"id": "Ball19",
|
"id": "Ball19",
|
||||||
"components": [
|
"components": [
|
||||||
|
{
|
||||||
|
"type": "RenderComponent",
|
||||||
|
"mesh": "project://Avocado.mesh",
|
||||||
|
"material": "GreenMaterial"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "TransformComponent",
|
"type": "TransformComponent",
|
||||||
"position": [0.0, 10.0, -15.0],
|
"position": [0.0, 10.0, -15.0],
|
||||||
@@ -482,6 +572,11 @@
|
|||||||
{
|
{
|
||||||
"id": "Ball21",
|
"id": "Ball21",
|
||||||
"components": [
|
"components": [
|
||||||
|
{
|
||||||
|
"type": "RenderComponent",
|
||||||
|
"mesh": "project://Avocado.mesh",
|
||||||
|
"material": "GreenMaterial"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "TransformComponent",
|
"type": "TransformComponent",
|
||||||
"position": [0.0, 10.0, -15.0],
|
"position": [0.0, 10.0, -15.0],
|
||||||
@@ -503,6 +598,11 @@
|
|||||||
{
|
{
|
||||||
"id": "Ball22",
|
"id": "Ball22",
|
||||||
"components": [
|
"components": [
|
||||||
|
{
|
||||||
|
"type": "RenderComponent",
|
||||||
|
"mesh": "project://Avocado.mesh",
|
||||||
|
"material": "GreenMaterial"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "TransformComponent",
|
"type": "TransformComponent",
|
||||||
"position": [0.0, 10.0, -15.0],
|
"position": [0.0, 10.0, -15.0],
|
||||||
@@ -524,6 +624,11 @@
|
|||||||
{
|
{
|
||||||
"id": "Ball23",
|
"id": "Ball23",
|
||||||
"components": [
|
"components": [
|
||||||
|
{
|
||||||
|
"type": "RenderComponent",
|
||||||
|
"mesh": "project://Avocado.mesh",
|
||||||
|
"material": "GreenMaterial"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "TransformComponent",
|
"type": "TransformComponent",
|
||||||
"position": [0.0, 10.0, -15.0],
|
"position": [0.0, 10.0, -15.0],
|
||||||
@@ -545,6 +650,11 @@
|
|||||||
{
|
{
|
||||||
"id": "Ball24",
|
"id": "Ball24",
|
||||||
"components": [
|
"components": [
|
||||||
|
{
|
||||||
|
"type": "RenderComponent",
|
||||||
|
"mesh": "project://Avocado.mesh",
|
||||||
|
"material": "WhiteMaterial"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "TransformComponent",
|
"type": "TransformComponent",
|
||||||
"position": [0.0, 10.0, -15.0],
|
"position": [0.0, 10.0, -15.0],
|
||||||
@@ -566,6 +676,11 @@
|
|||||||
{
|
{
|
||||||
"id": "Ball25",
|
"id": "Ball25",
|
||||||
"components": [
|
"components": [
|
||||||
|
{
|
||||||
|
"type": "RenderComponent",
|
||||||
|
"mesh": "project://Avocado.mesh",
|
||||||
|
"material": "WhiteMaterial"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "TransformComponent",
|
"type": "TransformComponent",
|
||||||
"position": [0.0, 10.0, -15.0],
|
"position": [0.0, 10.0, -15.0],
|
||||||
@@ -587,6 +702,11 @@
|
|||||||
{
|
{
|
||||||
"id": "Ball26",
|
"id": "Ball26",
|
||||||
"components": [
|
"components": [
|
||||||
|
{
|
||||||
|
"type": "RenderComponent",
|
||||||
|
"mesh": "project://Avocado.mesh",
|
||||||
|
"material": "WhiteMaterial"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "TransformComponent",
|
"type": "TransformComponent",
|
||||||
"position": [0.0, 10.0, -15.0],
|
"position": [0.0, 10.0, -15.0],
|
||||||
@@ -608,6 +728,11 @@
|
|||||||
{
|
{
|
||||||
"id": "Ball27",
|
"id": "Ball27",
|
||||||
"components": [
|
"components": [
|
||||||
|
{
|
||||||
|
"type": "RenderComponent",
|
||||||
|
"mesh": "project://Avocado.mesh",
|
||||||
|
"material": "WhiteMaterial"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "TransformComponent",
|
"type": "TransformComponent",
|
||||||
"position": [0.0, 10.0, -15.0],
|
"position": [0.0, 10.0, -15.0],
|
||||||
@@ -629,6 +754,11 @@
|
|||||||
{
|
{
|
||||||
"id": "Ball28",
|
"id": "Ball28",
|
||||||
"components": [
|
"components": [
|
||||||
|
{
|
||||||
|
"type": "RenderComponent",
|
||||||
|
"mesh": "project://Avocado.mesh",
|
||||||
|
"material": "WhiteMaterial"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "TransformComponent",
|
"type": "TransformComponent",
|
||||||
"position": [0.0, 10.0, -15.0],
|
"position": [0.0, 10.0, -15.0],
|
||||||
@@ -650,6 +780,11 @@
|
|||||||
{
|
{
|
||||||
"id": "Ball29",
|
"id": "Ball29",
|
||||||
"components": [
|
"components": [
|
||||||
|
{
|
||||||
|
"type": "RenderComponent",
|
||||||
|
"mesh": "project://Avocado.mesh",
|
||||||
|
"material": "WhiteMaterial"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "TransformComponent",
|
"type": "TransformComponent",
|
||||||
"position": [0.0, 10.0, -15.0],
|
"position": [0.0, 10.0, -15.0],
|
||||||
@@ -671,6 +806,11 @@
|
|||||||
{
|
{
|
||||||
"id": "Ball30",
|
"id": "Ball30",
|
||||||
"components": [
|
"components": [
|
||||||
|
{
|
||||||
|
"type": "RenderComponent",
|
||||||
|
"mesh": "project://Avocado.mesh",
|
||||||
|
"material": "WhiteMaterial"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "TransformComponent",
|
"type": "TransformComponent",
|
||||||
"position": [0.0, 10.0, -15.0],
|
"position": [0.0, 10.0, -15.0],
|
||||||
@@ -692,6 +832,11 @@
|
|||||||
{
|
{
|
||||||
"id": "Ball31",
|
"id": "Ball31",
|
||||||
"components": [
|
"components": [
|
||||||
|
{
|
||||||
|
"type": "RenderComponent",
|
||||||
|
"mesh": "project://Avocado.mesh",
|
||||||
|
"material": "WhiteMaterial"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "TransformComponent",
|
"type": "TransformComponent",
|
||||||
"position": [0.0, 10.0, -15.0],
|
"position": [0.0, 10.0, -15.0],
|
||||||
@@ -713,6 +858,11 @@
|
|||||||
{
|
{
|
||||||
"id": "Ball32",
|
"id": "Ball32",
|
||||||
"components": [
|
"components": [
|
||||||
|
{
|
||||||
|
"type": "RenderComponent",
|
||||||
|
"mesh": "project://Avocado.mesh",
|
||||||
|
"material": "WhiteMaterial"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "TransformComponent",
|
"type": "TransformComponent",
|
||||||
"position": [0.0, 10.0, -15.0],
|
"position": [0.0, 10.0, -15.0],
|
||||||
@@ -734,6 +884,11 @@
|
|||||||
{
|
{
|
||||||
"id": "Ball33",
|
"id": "Ball33",
|
||||||
"components": [
|
"components": [
|
||||||
|
{
|
||||||
|
"type": "RenderComponent",
|
||||||
|
"mesh": "project://Avocado.mesh",
|
||||||
|
"material": "WhiteMaterial"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "TransformComponent",
|
"type": "TransformComponent",
|
||||||
"position": [0.0, 10.0, -15.0],
|
"position": [0.0, 10.0, -15.0],
|
||||||
@@ -755,6 +910,11 @@
|
|||||||
{
|
{
|
||||||
"id": "Ball34",
|
"id": "Ball34",
|
||||||
"components": [
|
"components": [
|
||||||
|
{
|
||||||
|
"type": "RenderComponent",
|
||||||
|
"mesh": "project://Avocado.mesh",
|
||||||
|
"material": "WhiteMaterial"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "TransformComponent",
|
"type": "TransformComponent",
|
||||||
"position": [0.0, 10.0, -15.0],
|
"position": [0.0, 10.0, -15.0],
|
||||||
@@ -776,6 +936,11 @@
|
|||||||
{
|
{
|
||||||
"id": "Ball35",
|
"id": "Ball35",
|
||||||
"components": [
|
"components": [
|
||||||
|
{
|
||||||
|
"type": "RenderComponent",
|
||||||
|
"mesh": "project://Avocado.mesh",
|
||||||
|
"material": "WhiteMaterial"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "TransformComponent",
|
"type": "TransformComponent",
|
||||||
"position": [0.0, 10.0, -15.0],
|
"position": [0.0, 10.0, -15.0],
|
||||||
@@ -797,6 +962,11 @@
|
|||||||
{
|
{
|
||||||
"id": "Ball36",
|
"id": "Ball36",
|
||||||
"components": [
|
"components": [
|
||||||
|
{
|
||||||
|
"type": "RenderComponent",
|
||||||
|
"mesh": "project://Avocado.mesh",
|
||||||
|
"material": "WhiteMaterial"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "TransformComponent",
|
"type": "TransformComponent",
|
||||||
"position": [0.0, 10.0, -15.0],
|
"position": [0.0, 10.0, -15.0],
|
||||||
@@ -818,6 +988,11 @@
|
|||||||
{
|
{
|
||||||
"id": "Ball37",
|
"id": "Ball37",
|
||||||
"components": [
|
"components": [
|
||||||
|
{
|
||||||
|
"type": "RenderComponent",
|
||||||
|
"mesh": "project://Avocado.mesh",
|
||||||
|
"material": "WhiteMaterial"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "TransformComponent",
|
"type": "TransformComponent",
|
||||||
"position": [0.0, 10.0, -15.0],
|
"position": [0.0, 10.0, -15.0],
|
||||||
@@ -839,6 +1014,11 @@
|
|||||||
{
|
{
|
||||||
"id": "Ball38",
|
"id": "Ball38",
|
||||||
"components": [
|
"components": [
|
||||||
|
{
|
||||||
|
"type": "RenderComponent",
|
||||||
|
"mesh": "project://Avocado.mesh",
|
||||||
|
"material": "WhiteMaterial"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "TransformComponent",
|
"type": "TransformComponent",
|
||||||
"position": [0.0, 10.0, -15.0],
|
"position": [0.0, 10.0, -15.0],
|
||||||
@@ -860,6 +1040,11 @@
|
|||||||
{
|
{
|
||||||
"id": "Ball39",
|
"id": "Ball39",
|
||||||
"components": [
|
"components": [
|
||||||
|
{
|
||||||
|
"type": "RenderComponent",
|
||||||
|
"mesh": "project://Avocado.mesh",
|
||||||
|
"material": "WhiteMaterial"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "TransformComponent",
|
"type": "TransformComponent",
|
||||||
"position": [0.0, 10.0, -15.0],
|
"position": [0.0, 10.0, -15.0],
|
||||||
@@ -881,6 +1066,11 @@
|
|||||||
{
|
{
|
||||||
"id": "Ball40",
|
"id": "Ball40",
|
||||||
"components": [
|
"components": [
|
||||||
|
{
|
||||||
|
"type": "RenderComponent",
|
||||||
|
"mesh": "project://Avocado.mesh",
|
||||||
|
"material": "WhiteMaterial"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "TransformComponent",
|
"type": "TransformComponent",
|
||||||
"position": [0.0, 10.0, -15.0],
|
"position": [0.0, 10.0, -15.0],
|
||||||
@@ -902,6 +1092,11 @@
|
|||||||
{
|
{
|
||||||
"id": "Ball41",
|
"id": "Ball41",
|
||||||
"components": [
|
"components": [
|
||||||
|
{
|
||||||
|
"type": "RenderComponent",
|
||||||
|
"mesh": "project://Avocado.mesh",
|
||||||
|
"material": "WhiteMaterial"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "TransformComponent",
|
"type": "TransformComponent",
|
||||||
"position": [0.0, 10.0, -15.0],
|
"position": [0.0, 10.0, -15.0],
|
||||||
@@ -923,6 +1118,11 @@
|
|||||||
{
|
{
|
||||||
"id": "Ball42",
|
"id": "Ball42",
|
||||||
"components": [
|
"components": [
|
||||||
|
{
|
||||||
|
"type": "RenderComponent",
|
||||||
|
"mesh": "project://Avocado.mesh",
|
||||||
|
"material": "WhiteMaterial"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "TransformComponent",
|
"type": "TransformComponent",
|
||||||
"position": [0.0, 10.0, -15.0],
|
"position": [0.0, 10.0, -15.0],
|
||||||
@@ -944,6 +1144,11 @@
|
|||||||
{
|
{
|
||||||
"id": "Ball43",
|
"id": "Ball43",
|
||||||
"components": [
|
"components": [
|
||||||
|
{
|
||||||
|
"type": "RenderComponent",
|
||||||
|
"mesh": "project://Avocado.mesh",
|
||||||
|
"material": "WhiteMaterial"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "TransformComponent",
|
"type": "TransformComponent",
|
||||||
"position": [0.0, 10.0, -15.0],
|
"position": [0.0, 10.0, -15.0],
|
||||||
@@ -965,6 +1170,11 @@
|
|||||||
{
|
{
|
||||||
"id": "Ball44",
|
"id": "Ball44",
|
||||||
"components": [
|
"components": [
|
||||||
|
{
|
||||||
|
"type": "RenderComponent",
|
||||||
|
"mesh": "project://Avocado.mesh",
|
||||||
|
"material": "WhiteMaterial"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "TransformComponent",
|
"type": "TransformComponent",
|
||||||
"position": [0.0, 10.0, -15.0],
|
"position": [0.0, 10.0, -15.0],
|
||||||
@@ -986,6 +1196,11 @@
|
|||||||
{
|
{
|
||||||
"id": "Ball45",
|
"id": "Ball45",
|
||||||
"components": [
|
"components": [
|
||||||
|
{
|
||||||
|
"type": "RenderComponent",
|
||||||
|
"mesh": "project://Avocado.mesh",
|
||||||
|
"material": "WhiteMaterial"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "TransformComponent",
|
"type": "TransformComponent",
|
||||||
"position": [0.0, 10.0, -15.0],
|
"position": [0.0, 10.0, -15.0],
|
||||||
@@ -1007,6 +1222,11 @@
|
|||||||
{
|
{
|
||||||
"id": "Ball46",
|
"id": "Ball46",
|
||||||
"components": [
|
"components": [
|
||||||
|
{
|
||||||
|
"type": "RenderComponent",
|
||||||
|
"mesh": "project://Avocado.mesh",
|
||||||
|
"material": "WhiteMaterial"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "TransformComponent",
|
"type": "TransformComponent",
|
||||||
"position": [0.0, 10.0, -15.0],
|
"position": [0.0, 10.0, -15.0],
|
||||||
@@ -1028,6 +1248,11 @@
|
|||||||
{
|
{
|
||||||
"id": "Ball47",
|
"id": "Ball47",
|
||||||
"components": [
|
"components": [
|
||||||
|
{
|
||||||
|
"type": "RenderComponent",
|
||||||
|
"mesh": "project://Avocado.mesh",
|
||||||
|
"material": "WhiteMaterial"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "TransformComponent",
|
"type": "TransformComponent",
|
||||||
"position": [0.0, 10.0, -15.0],
|
"position": [0.0, 10.0, -15.0],
|
||||||
@@ -1049,6 +1274,11 @@
|
|||||||
{
|
{
|
||||||
"id": "Ball48",
|
"id": "Ball48",
|
||||||
"components": [
|
"components": [
|
||||||
|
{
|
||||||
|
"type": "RenderComponent",
|
||||||
|
"mesh": "project://Avocado.mesh",
|
||||||
|
"material": "WhiteMaterial"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "TransformComponent",
|
"type": "TransformComponent",
|
||||||
"position": [0.0, 10.0, -15.0],
|
"position": [0.0, 10.0, -15.0],
|
||||||
@@ -1070,6 +1300,11 @@
|
|||||||
{
|
{
|
||||||
"id": "Ball49",
|
"id": "Ball49",
|
||||||
"components": [
|
"components": [
|
||||||
|
{
|
||||||
|
"type": "RenderComponent",
|
||||||
|
"mesh": "project://Avocado.mesh",
|
||||||
|
"material": "WhiteMaterial"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "TransformComponent",
|
"type": "TransformComponent",
|
||||||
"position": [0.0, 10.0, -15.0],
|
"position": [0.0, 10.0, -15.0],
|
||||||
@@ -1091,6 +1326,11 @@
|
|||||||
{
|
{
|
||||||
"id": "Ball50",
|
"id": "Ball50",
|
||||||
"components": [
|
"components": [
|
||||||
|
{
|
||||||
|
"type": "RenderComponent",
|
||||||
|
"mesh": "project://Avocado.mesh",
|
||||||
|
"material": "WhiteMaterial"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "TransformComponent",
|
"type": "TransformComponent",
|
||||||
"position": [0.0, 10.0, -15.0],
|
"position": [0.0, 10.0, -15.0],
|
||||||
@@ -1112,6 +1352,11 @@
|
|||||||
{
|
{
|
||||||
"id": "Ball51",
|
"id": "Ball51",
|
||||||
"components": [
|
"components": [
|
||||||
|
{
|
||||||
|
"type": "RenderComponent",
|
||||||
|
"mesh": "project://Avocado.mesh",
|
||||||
|
"material": "WhiteMaterial"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "TransformComponent",
|
"type": "TransformComponent",
|
||||||
"position": [0.0, 10.0, -15.0],
|
"position": [0.0, 10.0, -15.0],
|
||||||
@@ -1133,6 +1378,11 @@
|
|||||||
{
|
{
|
||||||
"id": "Ball52",
|
"id": "Ball52",
|
||||||
"components": [
|
"components": [
|
||||||
|
{
|
||||||
|
"type": "RenderComponent",
|
||||||
|
"mesh": "project://Avocado.mesh",
|
||||||
|
"material": "WhiteMaterial"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "TransformComponent",
|
"type": "TransformComponent",
|
||||||
"position": [0.0, 10.0, -15.0],
|
"position": [0.0, 10.0, -15.0],
|
||||||
@@ -1154,6 +1404,11 @@
|
|||||||
{
|
{
|
||||||
"id": "Ball53",
|
"id": "Ball53",
|
||||||
"components": [
|
"components": [
|
||||||
|
{
|
||||||
|
"type": "RenderComponent",
|
||||||
|
"mesh": "project://Avocado.mesh",
|
||||||
|
"material": "WhiteMaterial"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "TransformComponent",
|
"type": "TransformComponent",
|
||||||
"position": [0.0, 10.0, -15.0],
|
"position": [0.0, 10.0, -15.0],
|
||||||
@@ -1175,6 +1430,11 @@
|
|||||||
{
|
{
|
||||||
"id": "Ball54",
|
"id": "Ball54",
|
||||||
"components": [
|
"components": [
|
||||||
|
{
|
||||||
|
"type": "RenderComponent",
|
||||||
|
"mesh": "project://Avocado.mesh",
|
||||||
|
"material": "WhiteMaterial"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "TransformComponent",
|
"type": "TransformComponent",
|
||||||
"position": [0.0, 10.0, -15.0],
|
"position": [0.0, 10.0, -15.0],
|
||||||
@@ -1196,6 +1456,11 @@
|
|||||||
{
|
{
|
||||||
"id": "Ball55",
|
"id": "Ball55",
|
||||||
"components": [
|
"components": [
|
||||||
|
{
|
||||||
|
"type": "RenderComponent",
|
||||||
|
"mesh": "project://Avocado.mesh",
|
||||||
|
"material": "WhiteMaterial"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "TransformComponent",
|
"type": "TransformComponent",
|
||||||
"position": [0.0, 10.0, -15.0],
|
"position": [0.0, 10.0, -15.0],
|
||||||
@@ -1217,6 +1482,11 @@
|
|||||||
{
|
{
|
||||||
"id": "Ball56",
|
"id": "Ball56",
|
||||||
"components": [
|
"components": [
|
||||||
|
{
|
||||||
|
"type": "RenderComponent",
|
||||||
|
"mesh": "project://Avocado.mesh",
|
||||||
|
"material": "WhiteMaterial"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "TransformComponent",
|
"type": "TransformComponent",
|
||||||
"position": [0.0, 10.0, -15.0],
|
"position": [0.0, 10.0, -15.0],
|
||||||
@@ -1238,6 +1508,11 @@
|
|||||||
{
|
{
|
||||||
"id": "Ball57",
|
"id": "Ball57",
|
||||||
"components": [
|
"components": [
|
||||||
|
{
|
||||||
|
"type": "RenderComponent",
|
||||||
|
"mesh": "project://Avocado.mesh",
|
||||||
|
"material": "WhiteMaterial"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "TransformComponent",
|
"type": "TransformComponent",
|
||||||
"position": [0.0, 10.0, -15.0],
|
"position": [0.0, 10.0, -15.0],
|
||||||
@@ -1259,6 +1534,11 @@
|
|||||||
{
|
{
|
||||||
"id": "Ball58",
|
"id": "Ball58",
|
||||||
"components": [
|
"components": [
|
||||||
|
{
|
||||||
|
"type": "RenderComponent",
|
||||||
|
"mesh": "project://Avocado.mesh",
|
||||||
|
"material": "WhiteMaterial"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "TransformComponent",
|
"type": "TransformComponent",
|
||||||
"position": [0.0, 10.0, -15.0],
|
"position": [0.0, 10.0, -15.0],
|
||||||
@@ -1280,6 +1560,11 @@
|
|||||||
{
|
{
|
||||||
"id": "Ball59",
|
"id": "Ball59",
|
||||||
"components": [
|
"components": [
|
||||||
|
{
|
||||||
|
"type": "RenderComponent",
|
||||||
|
"mesh": "project://Avocado.mesh",
|
||||||
|
"material": "WhiteMaterial"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "TransformComponent",
|
"type": "TransformComponent",
|
||||||
"position": [0.0, 10.0, -15.0],
|
"position": [0.0, 10.0, -15.0],
|
||||||
@@ -1301,6 +1586,11 @@
|
|||||||
{
|
{
|
||||||
"id": "Ball60",
|
"id": "Ball60",
|
||||||
"components": [
|
"components": [
|
||||||
|
{
|
||||||
|
"type": "RenderComponent",
|
||||||
|
"mesh": "project://Avocado.mesh",
|
||||||
|
"material": "WhiteMaterial"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "TransformComponent",
|
"type": "TransformComponent",
|
||||||
"position": [0.0, 10.0, -15.0],
|
"position": [0.0, 10.0, -15.0],
|
||||||
@@ -1322,6 +1612,11 @@
|
|||||||
{
|
{
|
||||||
"id": "Ball61",
|
"id": "Ball61",
|
||||||
"components": [
|
"components": [
|
||||||
|
{
|
||||||
|
"type": "RenderComponent",
|
||||||
|
"mesh": "project://Avocado.mesh",
|
||||||
|
"material": "WhiteMaterial"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "TransformComponent",
|
"type": "TransformComponent",
|
||||||
"position": [0.0, 10.0, -15.0],
|
"position": [0.0, 10.0, -15.0],
|
||||||
|
|||||||
@@ -15,6 +15,9 @@ this.on_update = function()
|
|||||||
if Input.getKeyJustPressed(Input.KeyCode.Enter) then
|
if Input.getKeyJustPressed(Input.KeyCode.Enter) then
|
||||||
gotoScene('SideScene')
|
gotoScene('SideScene')
|
||||||
end
|
end
|
||||||
|
if Input.getKeyJustPressed(Input.KeyCode.T) then
|
||||||
|
gotoScene('TestScene')
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
local pos = this.position
|
local pos = this.position
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ layout(location = 1) in Material material;
|
|||||||
layout(location = 0) out vec4 outColor;
|
layout(location = 0) out vec4 outColor;
|
||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
//float intensity = ((dot(normalize(normal), normalize(directional_light)) +1)/2.0)+0.05;
|
float intensity = ((dot(normalize(normal), normalize(directional_light)) +1)/2.0)+0.05;
|
||||||
|
|
||||||
//outColor = vec4(material.baseColor * intensity, 1.0);
|
outColor = vec4(material.baseColor * intensity, 1.0);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -42,23 +42,19 @@ layout(set = 1, binding = 2) buffer IndexBuffer {
|
|||||||
} IndexBuffers[];
|
} IndexBuffers[];
|
||||||
|
|
||||||
layout(set = 1, binding = 3) buffer MaterialBuffer {
|
layout(set = 1, binding = 3) buffer MaterialBuffer {
|
||||||
layout(align = 16) Material material;
|
layout(align = 16) Material materials[];
|
||||||
} MaterialBuffers[];
|
} MaterialBuffers;
|
||||||
|
|
||||||
layout(location = 0) out vec3 normal;
|
layout(location = 0) out vec3 normal;
|
||||||
layout(location = 1) out Material material;
|
layout(location = 1) out Material material;
|
||||||
|
|
||||||
void main()
|
void main()
|
||||||
{
|
{
|
||||||
//Mesh mesh = MeshBuffers[PushConstants.meshIndex].mesh;
|
material = MaterialBuffers.materials[ PushConstants.materialBufferIndex ];
|
||||||
//material = MaterialBuffers[ mesh.materialBufferIndex ].material;
|
|
||||||
material = MaterialBuffers[ PushConstants.materialBufferIndex ].material;
|
|
||||||
|
|
||||||
uint index = IndexBuffers[ PushConstants.indexBufferIndex ].indices[gl_VertexIndex];
|
uint index = IndexBuffers[ PushConstants.indexBufferIndex ].indices[gl_VertexIndex];
|
||||||
//uint index = IndexBuffers[ mesh.indexBufferIndex ].indices[gl_VertexIndex];
|
|
||||||
//Vertex vertex = VertexBuffers[ mesh.vertexBufferIndex ].vertices[ index ];
|
|
||||||
Vertex vertex = VertexBuffers[ PushConstants.vertexBufferIndex ].vertices[ index ];
|
Vertex vertex = VertexBuffers[ PushConstants.vertexBufferIndex ].vertices[ index ];
|
||||||
|
|
||||||
normal = vertex.normal.xyz;
|
normal = vertex.normal.xyz;
|
||||||
gl_Position = Camera.projection * Camera.view * PushConstants.render_matrix * vec4(vertex.position.x, vertex.position.y, vertex.position.z, 1.0);
|
gl_Position = Camera.projection * Camera.view * PushConstants.render_matrix * vec4(vertex.position.xyz, 1.0);
|
||||||
}
|
}
|
||||||
|
|||||||
11
src/main.c
11
src/main.c
@@ -41,6 +41,10 @@ void
|
|||||||
project_changed_cb()
|
project_changed_cb()
|
||||||
{
|
{
|
||||||
Game->clearScenes();
|
Game->clearScenes();
|
||||||
|
/* evol_unloadmodule(State.renderer_mod); */
|
||||||
|
/* State.renderer_mod = evol_loadmodule("renderer"); */
|
||||||
|
/* Renderer->setWindow((GenericHandle)State.window); */
|
||||||
|
|
||||||
|
|
||||||
evstring project_dir = NULL;
|
evstring project_dir = NULL;
|
||||||
EvConfigLoaderResult project_dir_get_res = ev_configloader_get("project_dir", EV_TYPE_NAME(STRING), &project_dir);
|
EvConfigLoaderResult project_dir_get_res = ev_configloader_get("project_dir", EV_TYPE_NAME(STRING), &project_dir);
|
||||||
@@ -81,7 +85,6 @@ project_changed_cb()
|
|||||||
evstring_free(path_id);
|
evstring_free(path_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Loading Scenes
|
// Loading Scenes
|
||||||
double scene_count = evjs_get(project_desc.json_data, "scenes.len")->as_num;
|
double scene_count = evjs_get(project_desc.json_data, "scenes.len")->as_num;
|
||||||
for(int i = 0; i < (int)scene_count;i++) {
|
for(int i = 0; i < (int)scene_count;i++) {
|
||||||
@@ -106,10 +109,6 @@ project_changed_cb()
|
|||||||
|
|
||||||
evstring_free(project_dir);
|
evstring_free(project_dir);
|
||||||
|
|
||||||
evol_unloadmodule(State.renderer_mod);
|
|
||||||
State.renderer_mod = evol_loadmodule("renderer");
|
|
||||||
|
|
||||||
Renderer->setWindow((GenericHandle)State.window);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@@ -173,8 +172,6 @@ load_project()
|
|||||||
evstring_free(path_id);
|
evstring_free(path_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
Renderer->setWindow((GenericHandle)State.window);
|
|
||||||
|
|
||||||
// Loading Scenes
|
// Loading Scenes
|
||||||
double scene_count = evjs_get(project_desc.json_data, "scenes.len")->as_num;
|
double scene_count = evjs_get(project_desc.json_data, "scenes.len")->as_num;
|
||||||
for(int i = 0; i < (int)scene_count;i++) {
|
for(int i = 0; i < (int)scene_count;i++) {
|
||||||
|
|||||||
Reference in New Issue
Block a user