diff --git a/config.lua b/config.lua old mode 100644 new mode 100755 index 1e3208e..59ab97a --- a/config.lua +++ b/config.lua @@ -3,4 +3,4 @@ module_dir = "." visualize_physics = 1 -project_dir = "../res/project" +project_dir = "../subprojects/project_assets" diff --git a/meson.build b/meson.build old mode 100644 new mode 100755 index cef1802..7c1df0a --- a/meson.build +++ b/meson.build @@ -35,6 +35,8 @@ evmodgame_dep = dependency('evmod_game') evmodrenderer_dep = dependency('evmod_renderer') evmod_assets_dep = dependency('evmod_assets') +subproject('project_assets') + # Setup build directory subdir('buildscripts') diff --git a/res/project/Avocado.mesh b/res/project/Avocado.mesh deleted file mode 100644 index a2e454d..0000000 Binary files a/res/project/Avocado.mesh and /dev/null differ diff --git a/res/project/game.proj b/res/project/game.proj deleted file mode 100644 index 981cd34..0000000 --- a/res/project/game.proj +++ /dev/null @@ -1,37 +0,0 @@ -{ - "name": "dummy_game", - "engineVersion": "0.2", - "mounts": [ - { - "path": "./res", - "mountpoint": "res" - }, - { - "path": "./res/scripts", - "mountpoint": "scripts" - }, - { - "path": "./res/scenes", - "mountpoint": "scenes" - }, - { - "path": "./res/shaders", - "mountpoint": "shaders" - } - ], - "scenes": [ - { - "id": "MainScene", - "path": "scenes://MainScene.evsc" - }, - { - "id": "SideScene", - "path": "scenes://SideScene.evsc" - }, - { - "id": "TestScene", - "path": "scenes://TestScene.evsc" - }, - ], - "activeScene": "TestScene" -} diff --git a/res/project/res/scenes/MainScene.evsc b/res/project/res/scenes/MainScene.evsc deleted file mode 100644 index 120fde6..0000000 --- a/res/project/res/scenes/MainScene.evsc +++ /dev/null @@ -1,304 +0,0 @@ -{ - "id":"MainScene", - "nodes": [ - { - "id": "Camera", - "components": [ - { - "type": "TransformComponent", - "position": [0.0, -2.0, -11.0], - "rotation": [0.0, 0.0, 0.0], - "scale": [1.0, 1.0, 1.0] - }, - { - "type": "ScriptComponent", - "script_name": "MainCameraController", - "script_path": "scripts://MainScene/Camera.lua" - } - ], - "children": [ - { - "id": "RotationHelper", - "components": [ - { - "type": "TransformComponent", - "position": [0.0, 0.0, 0.0], - "rotation": [0.0, 0.0, 0.0], - "scale": [1.0, 1.0, 1.0] - }, - { - "type": "CameraComponent", - "view": "Perspective", - "fov": 90, - "near": 0.001, - "far": 1000, - "aspectRatio": 1.3333 - }, - { - "type": "ScriptComponent", - "script_name": "MainCameraRotationHelper", - "script_path": "scripts://MainScene/CameraHelper.lua" - } - ] - } - ] - }, - { - "id": "SideCamera", - "components": [ - { - "type": "TransformComponent", - "position": [25.0, 0.0, -15.0], - "rotation": [0.0, 90.0, 0.0], - "scale": [1.0, 1.0, 1.0] - }, - { - "type": "CameraComponent", - "view": "Perspective", - "fov": 90, - "near": 0.001, - "far": 1000, - "aspectRatio": 1.3333 - } - ] - }, - { - "id": "Player", - "components": [ - { - "type": "TransformComponent", - "position": [0.0, 0.0, -15.0], - "rotation": [0.0, 0.0, 0.0], - "scale": [1.0, 1.0, 1.0] - }, - { - "type": "RigidbodyComponent", - "rigidbodyType": "Dynamic", - "mass": 1.0, - "restitution": 1.0, - "collisionShape": { - "type": "Sphere", - "radius": 1.0 - } - }, - { - "type": "ScriptComponent", - "script_name": "MainPlayerController", - "script_path": "scripts://MainScene/Player.lua" - }, - { - "type": "RenderComponent", - "mesh": "project://Avocado.mesh", - "material": "WhiteMaterial" - } - ], - "children": [ - { - "id": "Child", - "components": [ - { - "type": "TransformComponent", - "position": [0.0, 5.0, -5.0], - "rotation": [0.0, 0.0, 0.0], - "scale": [1.0, 1.0, 1.0] - }, - { - "type": "RigidbodyComponent", - "rigidbodyType": "Kinematic", - "mass": 1.0, - "restitution": 1.0, - "collisionShape": { - "type": "Box", - "halfExtents": [1.0, 1.0, 1.0] - } - }, - { - "type": "CameraComponent", - "view": "Perspective", - "fov": 120, - "near": 0.001, - "far": 1000, - "aspectRatio": 1.3333 - }, - { - "type": "ScriptComponent", - "script_name": "MainChildController", - "script_path": "scripts://MainScene/Child.lua" - }, - { - "type": "RenderComponent", - "mesh": "project://Cube.mesh", - "material": "WhiteMaterial" - } - ] - } - ] - }, - { - "id": "Map", - "components": [ - { - "type": "TransformComponent", - "position": [0.0, 0.0, 0.0], - "rotation": [0.0, 0.0, 0.0], - "scale": [1.0, 1.0, 1.0] - } - ], - "children": [ - { - "id": "Ground", - "components": [ - { - "type": "TransformComponent", - "position": [0.0, -5.0, -15.0], - "rotation": [0.0, 0.0, 0.0], - "scale": [1.0, 1.0, 1.0] - }, - { - "type": "RigidbodyComponent", - "rigidbodyType": "Static", - "mass": 0.0, - "restitution": 0.0, - "collisionShape": { - "type": "Box", - "halfExtents": [10.0, 1.0, 10.0] - } - } - ] - }, - { - "id": "Ceiling", - "components": [ - { - "type": "TransformComponent", - "position": [0.0, 5.0, -15.0], - "rotation": [0.0, 0.0, 0.0], - "scale": [1.0, 1.0, 1.0] - }, - { - "type": "RigidbodyComponent", - "rigidbodyType": "Static", - "mass": 0.0, - "restitution": 0.0, - "collisionShape": { - "type": "Box", - "halfExtents": [10.0, 1.0, 10.0] - } - } - ] - }, - { - "id": "WallRight", - "components": [ - { - "type": "TransformComponent", - "position": [9.0, 0.0, -14.0], - "rotation": [0.0, 0.0, 0.0], - "scale": [1.0, 1.0, 1.0] - }, - { - "type": "RigidbodyComponent", - "rigidbodyType": "Static", - "mass": 0.0, - "restitution": 0.0, - "collisionShape": { - "type": "Box", - "halfExtents": [1.0, 4.0, 9.0] - } - }, - { - "type": "RenderComponent", - "mesh": "project://Avocado.mesh", - "material": "WhiteMaterial" - } - ] - }, - { - "id": "WallLeft", - "components": [ - { - "type": "TransformComponent", - "position": [-9.0, 0.0, -14.0], - "rotation": [0.0, 0.0, 0.0], - "scale": [1.0, 1.0, 1.0] - }, - { - "type": "RigidbodyComponent", - "rigidbodyType": "Static", - "mass": 0.0, - "restitution": 0.0, - "collisionShape": { - "type": "Box", - "halfExtents": [1.0, 4.0, 9.0] - } - } - ] - }, - { - "id": "WallBack", - "components": [ - { - "type": "TransformComponent", - "position": [0.0, 0.0, -24.0], - "rotation": [0.0, 0.0, 0.0], - "scale": [1.0, 1.0, 1.0] - }, - { - "type": "RigidbodyComponent", - "rigidbodyType": "Static", - "mass": 0.0, - "restitution": 0.0, - "collisionShape": { - "type": "Box", - "halfExtents": [10.0, 4.0, 1.0] - } - } - ] - } - ] - } - ], - "materials": [ - { - "id": "GreenMaterial", - "pipeline": "DefaultPipeline", - "baseColor": [0.0, 1.0, 0.0, 1.0] - "albedoTexture": "project://lost.tx", - }, - { - "id": "RedMaterial", - "pipeline": "DefaultPipeline", - "baseColor": [1.0, 0.0, 0.0, 1.0] - "albedoTexture": "project://lost.tx", - }, - { - "id": "BlueMaterial", - "pipeline": "DefaultPipeline", - "baseColor": [0.0, 0.0, 1.0, 1.0] - "albedoTexture": "project://lost.tx", - }, - { - "id": "WhiteMaterial", - "pipeline": "DefaultPipeline", - "baseColor": [1.0, 1.0, 0.0, 1.0] - "albedoTexture": "project://lost.tx", - }, - ], - - "pipelines": [ - { - "id": "DefaultPipeline", - "shaderStages": [ - { - "type": "Vertex", - "shaderPath": "shaders://default.vert" - }, - { - "type": "Fragment", - "shaderPath": "shaders://default.frag" - } - ] - } - ], - "activeCamera": "Camera.RotationHelper" -} diff --git a/res/project/res/scenes/SideScene.evsc b/res/project/res/scenes/SideScene.evsc deleted file mode 100644 index b8e2e36..0000000 --- a/res/project/res/scenes/SideScene.evsc +++ /dev/null @@ -1,174 +0,0 @@ -{ - "id":"SideScene", - "nodes": [ - { - "id": "Camera", - "components": [ - { - "type": "TransformComponent", - "position": [0.0, 0.0, 0.0], - "rotation": [0.0, 0.0, 0.0], - "scale": [1.0, 1.0, 1.0] - }, - { - "type": "CameraComponent", - "view": "Perspective", - "fov": 60, - "near": 0.001, - "far": 1000, - "aspectRatio": 1.3333 - }, - { - "type": "ScriptComponent", - "script_name": "SideCameraController", - "script_path": "scripts://SideScene/Camera.lua" - } - ] - }, - { - "id": "Player", - "components": [ - { - "type": "TransformComponent", - "position": [0.0, 0.0, -15.0], - "rotation": [0.0, 0.0, 0.0], - "scale": [1.0, 1.0, 1.0] - }, - { - "type": "RigidbodyComponent", - "rigidbodyType": "Dynamic", - "mass": 1.0, - "restitution": 1.0, - "collisionShape": { - "type": "Capsule", - "radius": 1.0, - "height": 2.0 - } - }, - { - "type": "ScriptComponent", - "script_name": "SidePlayerController", - "script_path": "scripts://SideScene/Player.lua" - } - ], - "children": [ - { - "id": "Child", - "components": [ - { - "type": "TransformComponent", - "position": [0.0, 5.0, -5.0], - "rotation": [0.0, 0.0, 0.0], - "scale": [1.0, 1.0, 1.0] - }, - { - "type": "RigidbodyComponent", - "rigidbodyType": "Kinematic", - "mass": 1.0, - "restitution": 1.0, - "collisionShape": { - "type": "Sphere", - "radius": 1.0 - } - }, - { - "type": "ScriptComponent", - "script_name": "SideChildController", - "script_path": "scripts://SideScene/Child.lua" - } - ] - } - ] - }, - { - "id": "Ceiling", - "components": [ - { - "type": "TransformComponent", - "position": [0.0, 15.0, -15.0], - "rotation": [0.0, 0.0, 0.0], - "scale": [1.0, 1.0, 1.0] - }, - { - "type": "RigidbodyComponent", - "rigidbodyType": "Ghost", - "mass": 0.0, - "restitution": 0.0, - "collisionShape": { - "type": "Box", - "halfExtents": [10.0, 10.0, 10.0] - } - }, - { - "type": "ScriptComponent", - "script_name": "SideGhostController", - "script_path": "scripts://SideScene/Ghost.lua" - } - ] - }, - { - "id": "Ground", - "components": [ - { - "type": "TransformComponent", - "position": [0.0, -15.0, -15.0], - "rotation": [0.0, 0.0, 0.0], - "scale": [1.0, 1.0, 1.0] - }, - { - "type": "RigidbodyComponent", - "rigidbodyType": "Static", - "mass": 0.0, - "restitution": 0.0, - "collisionShape": { - "type": "Sphere", - "radius": 10.0 - } - } - ] - } - ], - "materials": [ - { - "id": "GreenMaterial", - "pipeline": "DefaultPipeline", - "baseColor": [0.0, 1.0, 0.0, 1.0] - "albedoTexture": "project://lost.tx", - }, - { - "id": "RedMaterial", - "pipeline": "DefaultPipeline", - "baseColor": [1.0, 0.0, 0.0, 1.0] - "albedoTexture": "project://lost.tx", - }, - { - "id": "BlueMaterial", - "pipeline": "DefaultPipeline", - "baseColor": [0.0, 0.0, 1.0, 1.0] - "albedoTexture": "project://lost.tx", - }, - { - "id": "WhiteMaterial", - "pipeline": "DefaultPipeline", - "baseColor": [1.0, 1.0, 0.0, 1.0] - "albedoTexture": "project://lost.tx", - }, - ], - - "pipelines": [ - { - "id": "DefaultPipeline", - "shaderStages": [ - { - "type": "Vertex", - "shaderPath": "shaders://default.vert" - }, - { - "type": "Fragment", - "shaderPath": "shaders://default.frag" - } - ] - } - ], - "activeCamera": "Camera" -} diff --git a/res/project/res/scenes/TestScene.evsc b/res/project/res/scenes/TestScene.evsc deleted file mode 100644 index 62e6fd1..0000000 --- a/res/project/res/scenes/TestScene.evsc +++ /dev/null @@ -1,1800 +0,0 @@ -{ - "id":"TestScene", - "nodes": [ - { - "id": "CameraTransformOverride", - "components": [ - { - "type": "TransformComponent", - "position": [0.0, 20.0, 7.0], - "rotation": [0.0, 0.0, 0.0], - "scale": [1.0, 1.0, 1.0] - } - ], - "children": [ - { - "id": "Camera", - "components": [ - { - "type": "TransformComponent", - "position": [0.0, 0.0, 0.0], - "rotation": [0.0, 0.0, 0.0], - "scale": [1.0, 1.0, 1.0] - }, - { - "type": "ScriptComponent", - "script_name": "MainCameraController", - "script_path": "scripts://TestScene/Camera.lua" - } - ], - "children": [ - { - "id": "RotationHelper", - "components": [ - { - "type": "TransformComponent", - "position": [0.0, 0.0, 0.0], - "rotation": [0.0, 0.0, 0.0], - "scale": [1.0, 1.0, 1.0] - }, - { - "type": "CameraComponent", - "view": "Perspective", - "fov": 90, - "near": 0.001, - "far": 1000, - "aspectRatio": 1.3333 - }, - { - "type": "ScriptComponent", - "script_name": "MainCameraRotationHelper", - "script_path": "scripts://TestScene/CameraHelper.lua" - } - ] - } - ] - }, - ] - } - { - "id": "SideCamera", - "components": [ - { - "type": "TransformComponent", - "position": [55.0, 0.0, -15.0], - "rotation": [0.0, 90.0, 0.0], - "scale": [1.0, 1.0, 1.0] - }, - { - "type": "CameraComponent", - "view": "Perspective", - "fov": 90, - "near": 0.001, - "far": 1000, - "aspectRatio": 1.3333 - } - ] - }, - { - "id": "Player", - "components": [ - { - "type": "TransformComponent", - "position": [0.0, 0.0, -15.0], - "rotation": [0.0, 0.0, 0.0], - "scale": [1.0, 1.0, 1.0] - }, - { - "type": "RigidbodyComponent", - "rigidbodyType": "Dynamic", - "mass": 0.3, - "restitution": 0.0, - "collisionShape": { - "type": "Box", - "halfExtents": [1.0, 1.0, 1.0] - } - }, - { - "type": "ScriptComponent", - "script_name": "MainPlayerController", - "script_path": "scripts://TestScene/Player.lua" - }, - ] - }, - { - "id": "Ball1", - "components": [ - { - "type": "TransformComponent", - "position": [0.0, 10.0, -15.0], - "rotation": [0.0, 0.0, 0.0], - "scale": [1.0, 1.0, 1.0] - }, - { - "type": "RigidbodyComponent", - "rigidbodyType": "Dynamic", - "mass": 1.0, - "restitution": 1.0, - "collisionShape": { - "type": "Sphere", - "radius": 1.0 - } - }, - { - "type": "RenderComponent", - "mesh": "project://Cube.mesh", - "material": "GreenMaterial" - } - ] - }, - { - "id": "Ball2", - "components": [ - { - "type": "TransformComponent", - "position": [0.0, 10.0, -15.0], - "rotation": [0.0, 0.0, 0.0], - "scale": [1.0, 1.0, 1.0] - }, - { - "type": "RigidbodyComponent", - "rigidbodyType": "Dynamic", - "mass": 1.0, - "restitution": 1.0, - "collisionShape": { - "type": "Sphere", - "radius": 1.0 - } - }, - { - "type": "RenderComponent", - "mesh": "project://Avocado.mesh", - "material": "GreenMaterial" - } - ] - }, - { - "id": "Ball3", - "components": [ - { - "type": "RenderComponent", - "mesh": "project://Avocado.mesh", - "material": "GreenMaterial" - }, - { - "type": "TransformComponent", - "position": [0.0, 10.0, -15.0], - "rotation": [0.0, 0.0, 0.0], - "scale": [1.0, 1.0, 1.0] - }, - { - "type": "RigidbodyComponent", - "rigidbodyType": "Dynamic", - "mass": 1.0, - "restitution": 1.0, - "collisionShape": { - "type": "Sphere", - "radius": 1.0 - } - } - ] - }, - { - "id": "Ball4", - "components": [ - { - "type": "RenderComponent", - "mesh": "project://Avocado.mesh", - "material": "GreenMaterial" - }, - { - "type": "TransformComponent", - "position": [0.0, 10.0, -15.0], - "rotation": [0.0, 0.0, 0.0], - "scale": [1.0, 1.0, 1.0] - }, - { - "type": "RigidbodyComponent", - "rigidbodyType": "Dynamic", - "mass": 1.0, - "restitution": 1.0, - "collisionShape": { - "type": "Sphere", - "radius": 1.0 - } - } - ] - }, - { - "id": "Ball5", - "components": [ - { - "type": "RenderComponent", - "mesh": "project://Avocado.mesh", - "material": "GreenMaterial" - }, - { - "type": "TransformComponent", - "position": [0.0, 10.0, -15.0], - "rotation": [0.0, 0.0, 0.0], - "scale": [1.0, 1.0, 1.0] - }, - { - "type": "RigidbodyComponent", - "rigidbodyType": "Dynamic", - "mass": 1.0, - "restitution": 1.0, - "collisionShape": { - "type": "Sphere", - "radius": 1.0 - } - } - ] - }, - { - "id": "Ball6", - "components": [ - { - "type": "RenderComponent", - "mesh": "project://Avocado.mesh", - "material": "GreenMaterial" - }, - { - "type": "TransformComponent", - "position": [0.0, 10.0, -15.0], - "rotation": [0.0, 0.0, 0.0], - "scale": [1.0, 1.0, 1.0] - }, - { - "type": "RigidbodyComponent", - "rigidbodyType": "Dynamic", - "mass": 1.0, - "restitution": 1.0, - "collisionShape": { - "type": "Sphere", - "radius": 1.0 - } - } - ] - }, - { - "id": "Ball7", - "components": [ - { - "type": "RenderComponent", - "mesh": "project://Avocado.mesh", - "material": "GreenMaterial" - }, - { - "type": "TransformComponent", - "position": [0.0, 10.0, -15.0], - "rotation": [0.0, 0.0, 0.0], - "scale": [1.0, 1.0, 1.0] - }, - { - "type": "RigidbodyComponent", - "rigidbodyType": "Dynamic", - "mass": 1.0, - "restitution": 1.0, - "collisionShape": { - "type": "Sphere", - "radius": 1.0 - } - } - ] - }, - { - "id": "Ball9", - "components": [ - { - "type": "RenderComponent", - "mesh": "project://Avocado.mesh", - "material": "GreenMaterial" - }, - { - "type": "TransformComponent", - "position": [0.0, 10.0, -15.0], - "rotation": [0.0, 0.0, 0.0], - "scale": [1.0, 1.0, 1.0] - }, - { - "type": "RigidbodyComponent", - "rigidbodyType": "Dynamic", - "mass": 1.0, - "restitution": 1.0, - "collisionShape": { - "type": "Sphere", - "radius": 1.0 - } - } - ] - }, - { - "id": "Ball10", - "components": [ - { - "type": "RenderComponent", - "mesh": "project://Avocado.mesh", - "material": "GreenMaterial" - }, - { - "type": "TransformComponent", - "position": [0.0, 10.0, -15.0], - "rotation": [0.0, 0.0, 0.0], - "scale": [1.0, 1.0, 1.0] - }, - { - "type": "RigidbodyComponent", - "rigidbodyType": "Dynamic", - "mass": 1.0, - "restitution": 1.0, - "collisionShape": { - "type": "Sphere", - "radius": 1.0 - } - } - ] - }, - { - "id": "Ball11", - "components": [ - { - "type": "RenderComponent", - "mesh": "project://Avocado.mesh", - "material": "GreenMaterial" - }, - { - "type": "TransformComponent", - "position": [0.0, 10.0, -15.0], - "rotation": [0.0, 0.0, 0.0], - "scale": [1.0, 1.0, 1.0] - }, - { - "type": "RigidbodyComponent", - "rigidbodyType": "Dynamic", - "mass": 1.0, - "restitution": 1.0, - "collisionShape": { - "type": "Sphere", - "radius": 1.0 - } - } - ] - }, - { - "id": "Ball12", - "components": [ - { - "type": "RenderComponent", - "mesh": "project://Avocado.mesh", - "material": "GreenMaterial" - }, - { - "type": "TransformComponent", - "position": [0.0, 10.0, -15.0], - "rotation": [0.0, 0.0, 0.0], - "scale": [1.0, 1.0, 1.0] - }, - { - "type": "RigidbodyComponent", - "rigidbodyType": "Dynamic", - "mass": 1.0, - "restitution": 1.0, - "collisionShape": { - "type": "Sphere", - "radius": 1.0 - } - } - ] - }, - { - "id": "Ball13", - "components": [ - { - "type": "RenderComponent", - "mesh": "project://Avocado.mesh", - "material": "GreenMaterial" - }, - { - "type": "TransformComponent", - "position": [0.0, 10.0, -15.0], - "rotation": [0.0, 0.0, 0.0], - "scale": [1.0, 1.0, 1.0] - }, - { - "type": "RigidbodyComponent", - "rigidbodyType": "Dynamic", - "mass": 1.0, - "restitution": 1.0, - "collisionShape": { - "type": "Sphere", - "radius": 1.0 - } - } - ] - }, - { - "id": "Ball14", - "components": [ - { - "type": "RenderComponent", - "mesh": "project://Avocado.mesh", - "material": "GreenMaterial" - }, - { - "type": "TransformComponent", - "position": [0.0, 10.0, -15.0], - "rotation": [0.0, 0.0, 0.0], - "scale": [1.0, 1.0, 1.0] - }, - { - "type": "RigidbodyComponent", - "rigidbodyType": "Dynamic", - "mass": 1.0, - "restitution": 1.0, - "collisionShape": { - "type": "Sphere", - "radius": 1.0 - } - } - ] - }, - { - "id": "Ball15", - "components": [ - { - "type": "RenderComponent", - "mesh": "project://Avocado.mesh", - "material": "GreenMaterial" - }, - { - "type": "TransformComponent", - "position": [0.0, 10.0, -15.0], - "rotation": [0.0, 0.0, 0.0], - "scale": [1.0, 1.0, 1.0] - }, - { - "type": "RigidbodyComponent", - "rigidbodyType": "Dynamic", - "mass": 1.0, - "restitution": 1.0, - "collisionShape": { - "type": "Sphere", - "radius": 1.0 - } - } - ] - }, - { - "id": "Ball16", - "components": [ - { - "type": "RenderComponent", - "mesh": "project://Avocado.mesh", - "material": "GreenMaterial" - }, - { - "type": "TransformComponent", - "position": [0.0, 10.0, -15.0], - "rotation": [0.0, 0.0, 0.0], - "scale": [1.0, 1.0, 1.0] - }, - { - "type": "RigidbodyComponent", - "rigidbodyType": "Dynamic", - "mass": 1.0, - "restitution": 1.0, - "collisionShape": { - "type": "Sphere", - "radius": 1.0 - } - } - ] - }, - { - "id": "Ball17", - "components": [ - { - "type": "RenderComponent", - "mesh": "project://Avocado.mesh", - "material": "GreenMaterial" - }, - { - "type": "TransformComponent", - "position": [0.0, 10.0, -15.0], - "rotation": [0.0, 0.0, 0.0], - "scale": [1.0, 1.0, 1.0] - }, - { - "type": "RigidbodyComponent", - "rigidbodyType": "Dynamic", - "mass": 1.0, - "restitution": 1.0, - "collisionShape": { - "type": "Sphere", - "radius": 1.0 - } - } - ] - }, - { - "id": "Ball18", - "components": [ - { - "type": "RenderComponent", - "mesh": "project://Avocado.mesh", - "material": "GreenMaterial" - }, - { - "type": "TransformComponent", - "position": [0.0, 10.0, -15.0], - "rotation": [0.0, 0.0, 0.0], - "scale": [1.0, 1.0, 1.0] - }, - { - "type": "RigidbodyComponent", - "rigidbodyType": "Dynamic", - "mass": 1.0, - "restitution": 1.0, - "collisionShape": { - "type": "Sphere", - "radius": 1.0 - } - } - ] - }, - { - "id": "Ball19", - "components": [ - { - "type": "RenderComponent", - "mesh": "project://Avocado.mesh", - "material": "GreenMaterial" - }, - { - "type": "TransformComponent", - "position": [0.0, 10.0, -15.0], - "rotation": [0.0, 0.0, 0.0], - "scale": [1.0, 1.0, 1.0] - }, - { - "type": "RigidbodyComponent", - "rigidbodyType": "Dynamic", - "mass": 1.0, - "restitution": 1.0, - "collisionShape": { - "type": "Sphere", - "radius": 1.0 - } - } - ] - }, - { - "id": "Ball21", - "components": [ - { - "type": "RenderComponent", - "mesh": "project://Avocado.mesh", - "material": "GreenMaterial" - }, - { - "type": "TransformComponent", - "position": [0.0, 10.0, -15.0], - "rotation": [0.0, 0.0, 0.0], - "scale": [1.0, 1.0, 1.0] - }, - { - "type": "RigidbodyComponent", - "rigidbodyType": "Dynamic", - "mass": 1.0, - "restitution": 1.0, - "collisionShape": { - "type": "Sphere", - "radius": 1.0 - } - } - ] - }, - { - "id": "Ball22", - "components": [ - { - "type": "RenderComponent", - "mesh": "project://Avocado.mesh", - "material": "GreenMaterial" - }, - { - "type": "TransformComponent", - "position": [0.0, 10.0, -15.0], - "rotation": [0.0, 0.0, 0.0], - "scale": [1.0, 1.0, 1.0] - }, - { - "type": "RigidbodyComponent", - "rigidbodyType": "Dynamic", - "mass": 1.0, - "restitution": 1.0, - "collisionShape": { - "type": "Sphere", - "radius": 1.0 - } - } - ] - }, - { - "id": "Ball23", - "components": [ - { - "type": "RenderComponent", - "mesh": "project://Avocado.mesh", - "material": "GreenMaterial" - }, - { - "type": "TransformComponent", - "position": [0.0, 10.0, -15.0], - "rotation": [0.0, 0.0, 0.0], - "scale": [1.0, 1.0, 1.0] - }, - { - "type": "RigidbodyComponent", - "rigidbodyType": "Dynamic", - "mass": 1.0, - "restitution": 1.0, - "collisionShape": { - "type": "Sphere", - "radius": 1.0 - } - } - ] - }, - { - "id": "Ball24", - "components": [ - { - "type": "RenderComponent", - "mesh": "project://Avocado.mesh", - "material": "WhiteMaterial" - }, - { - "type": "TransformComponent", - "position": [0.0, 10.0, -15.0], - "rotation": [0.0, 0.0, 0.0], - "scale": [1.0, 1.0, 1.0] - }, - { - "type": "RigidbodyComponent", - "rigidbodyType": "Dynamic", - "mass": 1.0, - "restitution": 1.0, - "collisionShape": { - "type": "Sphere", - "radius": 1.0 - } - } - ] - }, - { - "id": "Ball25", - "components": [ - { - "type": "RenderComponent", - "mesh": "project://Avocado.mesh", - "material": "WhiteMaterial" - }, - { - "type": "TransformComponent", - "position": [0.0, 10.0, -15.0], - "rotation": [0.0, 0.0, 0.0], - "scale": [1.0, 1.0, 1.0] - }, - { - "type": "RigidbodyComponent", - "rigidbodyType": "Dynamic", - "mass": 1.0, - "restitution": 1.0, - "collisionShape": { - "type": "Sphere", - "radius": 1.0 - } - } - ] - }, - { - "id": "Ball26", - "components": [ - { - "type": "RenderComponent", - "mesh": "project://Avocado.mesh", - "material": "WhiteMaterial" - }, - { - "type": "TransformComponent", - "position": [0.0, 10.0, -15.0], - "rotation": [0.0, 0.0, 0.0], - "scale": [1.0, 1.0, 1.0] - }, - { - "type": "RigidbodyComponent", - "rigidbodyType": "Dynamic", - "mass": 1.0, - "restitution": 1.0, - "collisionShape": { - "type": "Sphere", - "radius": 1.0 - } - } - ] - }, - { - "id": "Ball27", - "components": [ - { - "type": "RenderComponent", - "mesh": "project://Avocado.mesh", - "material": "WhiteMaterial" - }, - { - "type": "TransformComponent", - "position": [0.0, 10.0, -15.0], - "rotation": [0.0, 0.0, 0.0], - "scale": [1.0, 1.0, 1.0] - }, - { - "type": "RigidbodyComponent", - "rigidbodyType": "Dynamic", - "mass": 1.0, - "restitution": 1.0, - "collisionShape": { - "type": "Sphere", - "radius": 1.0 - } - } - ] - }, - { - "id": "Ball28", - "components": [ - { - "type": "RenderComponent", - "mesh": "project://Avocado.mesh", - "material": "WhiteMaterial" - }, - { - "type": "TransformComponent", - "position": [0.0, 10.0, -15.0], - "rotation": [0.0, 0.0, 0.0], - "scale": [1.0, 1.0, 1.0] - }, - { - "type": "RigidbodyComponent", - "rigidbodyType": "Dynamic", - "mass": 1.0, - "restitution": 1.0, - "collisionShape": { - "type": "Sphere", - "radius": 1.0 - } - } - ] - }, - { - "id": "Ball29", - "components": [ - { - "type": "RenderComponent", - "mesh": "project://Avocado.mesh", - "material": "WhiteMaterial" - }, - { - "type": "TransformComponent", - "position": [0.0, 10.0, -15.0], - "rotation": [0.0, 0.0, 0.0], - "scale": [1.0, 1.0, 1.0] - }, - { - "type": "RigidbodyComponent", - "rigidbodyType": "Dynamic", - "mass": 1.0, - "restitution": 1.0, - "collisionShape": { - "type": "Sphere", - "radius": 1.0 - } - } - ] - }, - { - "id": "Ball30", - "components": [ - { - "type": "RenderComponent", - "mesh": "project://Avocado.mesh", - "material": "WhiteMaterial" - }, - { - "type": "TransformComponent", - "position": [0.0, 10.0, -15.0], - "rotation": [0.0, 0.0, 0.0], - "scale": [1.0, 1.0, 1.0] - }, - { - "type": "RigidbodyComponent", - "rigidbodyType": "Dynamic", - "mass": 1.0, - "restitution": 1.0, - "collisionShape": { - "type": "Sphere", - "radius": 1.0 - } - } - ] - }, - { - "id": "Ball31", - "components": [ - { - "type": "RenderComponent", - "mesh": "project://Avocado.mesh", - "material": "WhiteMaterial" - }, - { - "type": "TransformComponent", - "position": [0.0, 10.0, -15.0], - "rotation": [0.0, 0.0, 0.0], - "scale": [1.0, 1.0, 1.0] - }, - { - "type": "RigidbodyComponent", - "rigidbodyType": "Dynamic", - "mass": 1.0, - "restitution": 1.0, - "collisionShape": { - "type": "Sphere", - "radius": 1.0 - } - } - ] - }, - { - "id": "Ball32", - "components": [ - { - "type": "RenderComponent", - "mesh": "project://Avocado.mesh", - "material": "WhiteMaterial" - }, - { - "type": "TransformComponent", - "position": [0.0, 10.0, -15.0], - "rotation": [0.0, 0.0, 0.0], - "scale": [1.0, 1.0, 1.0] - }, - { - "type": "RigidbodyComponent", - "rigidbodyType": "Dynamic", - "mass": 1.0, - "restitution": 1.0, - "collisionShape": { - "type": "Sphere", - "radius": 1.0 - } - } - ] - }, - { - "id": "Ball33", - "components": [ - { - "type": "RenderComponent", - "mesh": "project://Avocado.mesh", - "material": "WhiteMaterial" - }, - { - "type": "TransformComponent", - "position": [0.0, 10.0, -15.0], - "rotation": [0.0, 0.0, 0.0], - "scale": [1.0, 1.0, 1.0] - }, - { - "type": "RigidbodyComponent", - "rigidbodyType": "Dynamic", - "mass": 1.0, - "restitution": 1.0, - "collisionShape": { - "type": "Sphere", - "radius": 1.0 - } - } - ] - }, - { - "id": "Ball34", - "components": [ - { - "type": "RenderComponent", - "mesh": "project://Avocado.mesh", - "material": "WhiteMaterial" - }, - { - "type": "TransformComponent", - "position": [0.0, 10.0, -15.0], - "rotation": [0.0, 0.0, 0.0], - "scale": [1.0, 1.0, 1.0] - }, - { - "type": "RigidbodyComponent", - "rigidbodyType": "Dynamic", - "mass": 1.0, - "restitution": 1.0, - "collisionShape": { - "type": "Sphere", - "radius": 1.0 - } - } - ] - }, - { - "id": "Ball35", - "components": [ - { - "type": "RenderComponent", - "mesh": "project://Avocado.mesh", - "material": "WhiteMaterial" - }, - { - "type": "TransformComponent", - "position": [0.0, 10.0, -15.0], - "rotation": [0.0, 0.0, 0.0], - "scale": [1.0, 1.0, 1.0] - }, - { - "type": "RigidbodyComponent", - "rigidbodyType": "Dynamic", - "mass": 1.0, - "restitution": 1.0, - "collisionShape": { - "type": "Sphere", - "radius": 1.0 - } - } - ] - }, - { - "id": "Ball36", - "components": [ - { - "type": "RenderComponent", - "mesh": "project://Avocado.mesh", - "material": "WhiteMaterial" - }, - { - "type": "TransformComponent", - "position": [0.0, 10.0, -15.0], - "rotation": [0.0, 0.0, 0.0], - "scale": [1.0, 1.0, 1.0] - }, - { - "type": "RigidbodyComponent", - "rigidbodyType": "Dynamic", - "mass": 1.0, - "restitution": 1.0, - "collisionShape": { - "type": "Sphere", - "radius": 1.0 - } - } - ] - }, - { - "id": "Ball37", - "components": [ - { - "type": "RenderComponent", - "mesh": "project://Avocado.mesh", - "material": "WhiteMaterial" - }, - { - "type": "TransformComponent", - "position": [0.0, 10.0, -15.0], - "rotation": [0.0, 0.0, 0.0], - "scale": [1.0, 1.0, 1.0] - }, - { - "type": "RigidbodyComponent", - "rigidbodyType": "Dynamic", - "mass": 1.0, - "restitution": 1.0, - "collisionShape": { - "type": "Sphere", - "radius": 1.0 - } - } - ] - }, - { - "id": "Ball38", - "components": [ - { - "type": "RenderComponent", - "mesh": "project://Avocado.mesh", - "material": "WhiteMaterial" - }, - { - "type": "TransformComponent", - "position": [0.0, 10.0, -15.0], - "rotation": [0.0, 0.0, 0.0], - "scale": [1.0, 1.0, 1.0] - }, - { - "type": "RigidbodyComponent", - "rigidbodyType": "Dynamic", - "mass": 1.0, - "restitution": 1.0, - "collisionShape": { - "type": "Sphere", - "radius": 1.0 - } - } - ] - }, - { - "id": "Ball39", - "components": [ - { - "type": "RenderComponent", - "mesh": "project://Avocado.mesh", - "material": "WhiteMaterial" - }, - { - "type": "TransformComponent", - "position": [0.0, 10.0, -15.0], - "rotation": [0.0, 0.0, 0.0], - "scale": [1.0, 1.0, 1.0] - }, - { - "type": "RigidbodyComponent", - "rigidbodyType": "Dynamic", - "mass": 1.0, - "restitution": 1.0, - "collisionShape": { - "type": "Sphere", - "radius": 1.0 - } - } - ] - }, - { - "id": "Ball40", - "components": [ - { - "type": "RenderComponent", - "mesh": "project://Avocado.mesh", - "material": "WhiteMaterial" - }, - { - "type": "TransformComponent", - "position": [0.0, 10.0, -15.0], - "rotation": [0.0, 0.0, 0.0], - "scale": [1.0, 1.0, 1.0] - }, - { - "type": "RigidbodyComponent", - "rigidbodyType": "Dynamic", - "mass": 1.0, - "restitution": 1.0, - "collisionShape": { - "type": "Sphere", - "radius": 1.0 - } - } - ] - }, - { - "id": "Ball41", - "components": [ - { - "type": "RenderComponent", - "mesh": "project://Avocado.mesh", - "material": "WhiteMaterial" - }, - { - "type": "TransformComponent", - "position": [0.0, 10.0, -15.0], - "rotation": [0.0, 0.0, 0.0], - "scale": [1.0, 1.0, 1.0] - }, - { - "type": "RigidbodyComponent", - "rigidbodyType": "Dynamic", - "mass": 1.0, - "restitution": 1.0, - "collisionShape": { - "type": "Sphere", - "radius": 1.0 - } - } - ] - }, - { - "id": "Ball42", - "components": [ - { - "type": "RenderComponent", - "mesh": "project://Avocado.mesh", - "material": "WhiteMaterial" - }, - { - "type": "TransformComponent", - "position": [0.0, 10.0, -15.0], - "rotation": [0.0, 0.0, 0.0], - "scale": [1.0, 1.0, 1.0] - }, - { - "type": "RigidbodyComponent", - "rigidbodyType": "Dynamic", - "mass": 1.0, - "restitution": 1.0, - "collisionShape": { - "type": "Sphere", - "radius": 1.0 - } - } - ] - }, - { - "id": "Ball43", - "components": [ - { - "type": "RenderComponent", - "mesh": "project://Avocado.mesh", - "material": "WhiteMaterial" - }, - { - "type": "TransformComponent", - "position": [0.0, 10.0, -15.0], - "rotation": [0.0, 0.0, 0.0], - "scale": [1.0, 1.0, 1.0] - }, - { - "type": "RigidbodyComponent", - "rigidbodyType": "Dynamic", - "mass": 1.0, - "restitution": 1.0, - "collisionShape": { - "type": "Sphere", - "radius": 1.0 - } - } - ] - }, - { - "id": "Ball44", - "components": [ - { - "type": "RenderComponent", - "mesh": "project://Avocado.mesh", - "material": "WhiteMaterial" - }, - { - "type": "TransformComponent", - "position": [0.0, 10.0, -15.0], - "rotation": [0.0, 0.0, 0.0], - "scale": [1.0, 1.0, 1.0] - }, - { - "type": "RigidbodyComponent", - "rigidbodyType": "Dynamic", - "mass": 1.0, - "restitution": 1.0, - "collisionShape": { - "type": "Sphere", - "radius": 1.0 - } - } - ] - }, - { - "id": "Ball45", - "components": [ - { - "type": "RenderComponent", - "mesh": "project://Avocado.mesh", - "material": "WhiteMaterial" - }, - { - "type": "TransformComponent", - "position": [0.0, 10.0, -15.0], - "rotation": [0.0, 0.0, 0.0], - "scale": [1.0, 1.0, 1.0] - }, - { - "type": "RigidbodyComponent", - "rigidbodyType": "Dynamic", - "mass": 1.0, - "restitution": 1.0, - "collisionShape": { - "type": "Sphere", - "radius": 1.0 - } - } - ] - }, - { - "id": "Ball46", - "components": [ - { - "type": "RenderComponent", - "mesh": "project://Avocado.mesh", - "material": "WhiteMaterial" - }, - { - "type": "TransformComponent", - "position": [0.0, 10.0, -15.0], - "rotation": [0.0, 0.0, 0.0], - "scale": [1.0, 1.0, 1.0] - }, - { - "type": "RigidbodyComponent", - "rigidbodyType": "Dynamic", - "mass": 1.0, - "restitution": 1.0, - "collisionShape": { - "type": "Sphere", - "radius": 1.0 - } - } - ] - }, - { - "id": "Ball47", - "components": [ - { - "type": "RenderComponent", - "mesh": "project://Avocado.mesh", - "material": "WhiteMaterial" - }, - { - "type": "TransformComponent", - "position": [0.0, 10.0, -15.0], - "rotation": [0.0, 0.0, 0.0], - "scale": [1.0, 1.0, 1.0] - }, - { - "type": "RigidbodyComponent", - "rigidbodyType": "Dynamic", - "mass": 1.0, - "restitution": 1.0, - "collisionShape": { - "type": "Sphere", - "radius": 1.0 - } - } - ] - }, - { - "id": "Ball48", - "components": [ - { - "type": "RenderComponent", - "mesh": "project://Avocado.mesh", - "material": "WhiteMaterial" - }, - { - "type": "TransformComponent", - "position": [0.0, 10.0, -15.0], - "rotation": [0.0, 0.0, 0.0], - "scale": [1.0, 1.0, 1.0] - }, - { - "type": "RigidbodyComponent", - "rigidbodyType": "Dynamic", - "mass": 1.0, - "restitution": 1.0, - "collisionShape": { - "type": "Sphere", - "radius": 1.0 - } - } - ] - }, - { - "id": "Ball49", - "components": [ - { - "type": "RenderComponent", - "mesh": "project://Avocado.mesh", - "material": "WhiteMaterial" - }, - { - "type": "TransformComponent", - "position": [0.0, 10.0, -15.0], - "rotation": [0.0, 0.0, 0.0], - "scale": [1.0, 1.0, 1.0] - }, - { - "type": "RigidbodyComponent", - "rigidbodyType": "Dynamic", - "mass": 1.0, - "restitution": 1.0, - "collisionShape": { - "type": "Sphere", - "radius": 1.0 - } - } - ] - }, - { - "id": "Ball50", - "components": [ - { - "type": "RenderComponent", - "mesh": "project://Avocado.mesh", - "material": "WhiteMaterial" - }, - { - "type": "TransformComponent", - "position": [0.0, 10.0, -15.0], - "rotation": [0.0, 0.0, 0.0], - "scale": [1.0, 1.0, 1.0] - }, - { - "type": "RigidbodyComponent", - "rigidbodyType": "Dynamic", - "mass": 1.0, - "restitution": 1.0, - "collisionShape": { - "type": "Sphere", - "radius": 1.0 - } - } - ] - }, - { - "id": "Ball51", - "components": [ - { - "type": "RenderComponent", - "mesh": "project://Avocado.mesh", - "material": "WhiteMaterial" - }, - { - "type": "TransformComponent", - "position": [0.0, 10.0, -15.0], - "rotation": [0.0, 0.0, 0.0], - "scale": [1.0, 1.0, 1.0] - }, - { - "type": "RigidbodyComponent", - "rigidbodyType": "Dynamic", - "mass": 1.0, - "restitution": 1.0, - "collisionShape": { - "type": "Sphere", - "radius": 1.0 - } - } - ] - }, - { - "id": "Ball52", - "components": [ - { - "type": "RenderComponent", - "mesh": "project://Avocado.mesh", - "material": "WhiteMaterial" - }, - { - "type": "TransformComponent", - "position": [0.0, 10.0, -15.0], - "rotation": [0.0, 0.0, 0.0], - "scale": [1.0, 1.0, 1.0] - }, - { - "type": "RigidbodyComponent", - "rigidbodyType": "Dynamic", - "mass": 1.0, - "restitution": 1.0, - "collisionShape": { - "type": "Sphere", - "radius": 1.0 - } - } - ] - }, - { - "id": "Ball53", - "components": [ - { - "type": "RenderComponent", - "mesh": "project://Avocado.mesh", - "material": "WhiteMaterial" - }, - { - "type": "TransformComponent", - "position": [0.0, 10.0, -15.0], - "rotation": [0.0, 0.0, 0.0], - "scale": [1.0, 1.0, 1.0] - }, - { - "type": "RigidbodyComponent", - "rigidbodyType": "Dynamic", - "mass": 1.0, - "restitution": 1.0, - "collisionShape": { - "type": "Sphere", - "radius": 1.0 - } - } - ] - }, - { - "id": "Ball54", - "components": [ - { - "type": "RenderComponent", - "mesh": "project://Avocado.mesh", - "material": "WhiteMaterial" - }, - { - "type": "TransformComponent", - "position": [0.0, 10.0, -15.0], - "rotation": [0.0, 0.0, 0.0], - "scale": [1.0, 1.0, 1.0] - }, - { - "type": "RigidbodyComponent", - "rigidbodyType": "Dynamic", - "mass": 1.0, - "restitution": 1.0, - "collisionShape": { - "type": "Sphere", - "radius": 1.0 - } - } - ] - }, - { - "id": "Ball55", - "components": [ - { - "type": "RenderComponent", - "mesh": "project://Avocado.mesh", - "material": "WhiteMaterial" - }, - { - "type": "TransformComponent", - "position": [0.0, 10.0, -15.0], - "rotation": [0.0, 0.0, 0.0], - "scale": [1.0, 1.0, 1.0] - }, - { - "type": "RigidbodyComponent", - "rigidbodyType": "Dynamic", - "mass": 1.0, - "restitution": 1.0, - "collisionShape": { - "type": "Sphere", - "radius": 1.0 - } - } - ] - }, - { - "id": "Ball56", - "components": [ - { - "type": "RenderComponent", - "mesh": "project://Avocado.mesh", - "material": "WhiteMaterial" - }, - { - "type": "TransformComponent", - "position": [0.0, 10.0, -15.0], - "rotation": [0.0, 0.0, 0.0], - "scale": [1.0, 1.0, 1.0] - }, - { - "type": "RigidbodyComponent", - "rigidbodyType": "Dynamic", - "mass": 1.0, - "restitution": 1.0, - "collisionShape": { - "type": "Sphere", - "radius": 1.0 - } - } - ] - }, - { - "id": "Ball57", - "components": [ - { - "type": "RenderComponent", - "mesh": "project://Avocado.mesh", - "material": "WhiteMaterial" - }, - { - "type": "TransformComponent", - "position": [0.0, 10.0, -15.0], - "rotation": [0.0, 0.0, 0.0], - "scale": [1.0, 1.0, 1.0] - }, - { - "type": "RigidbodyComponent", - "rigidbodyType": "Dynamic", - "mass": 1.0, - "restitution": 1.0, - "collisionShape": { - "type": "Sphere", - "radius": 1.0 - } - } - ] - }, - { - "id": "Ball58", - "components": [ - { - "type": "RenderComponent", - "mesh": "project://Avocado.mesh", - "material": "WhiteMaterial" - }, - { - "type": "TransformComponent", - "position": [0.0, 10.0, -15.0], - "rotation": [0.0, 0.0, 0.0], - "scale": [1.0, 1.0, 1.0] - }, - { - "type": "RigidbodyComponent", - "rigidbodyType": "Dynamic", - "mass": 1.0, - "restitution": 1.0, - "collisionShape": { - "type": "Sphere", - "radius": 1.0 - } - } - ] - }, - { - "id": "Ball59", - "components": [ - { - "type": "RenderComponent", - "mesh": "project://Avocado.mesh", - "material": "WhiteMaterial" - }, - { - "type": "TransformComponent", - "position": [0.0, 10.0, -15.0], - "rotation": [0.0, 0.0, 0.0], - "scale": [1.0, 1.0, 1.0] - }, - { - "type": "RigidbodyComponent", - "rigidbodyType": "Dynamic", - "mass": 1.0, - "restitution": 1.0, - "collisionShape": { - "type": "Sphere", - "radius": 1.0 - } - } - ] - }, - { - "id": "Ball60", - "components": [ - { - "type": "RenderComponent", - "mesh": "project://Avocado.mesh", - "material": "WhiteMaterial" - }, - { - "type": "TransformComponent", - "position": [0.0, 10.0, -15.0], - "rotation": [0.0, 0.0, 0.0], - "scale": [1.0, 1.0, 1.0] - }, - { - "type": "RigidbodyComponent", - "rigidbodyType": "Dynamic", - "mass": 1.0, - "restitution": 1.0, - "collisionShape": { - "type": "Sphere", - "radius": 1.0 - } - } - ] - }, - { - "id": "Ball61", - "components": [ - { - "type": "RenderComponent", - "mesh": "project://Avocado.mesh", - "material": "WhiteMaterial" - }, - { - "type": "TransformComponent", - "position": [0.0, 10.0, -15.0], - "rotation": [0.0, 0.0, 0.0], - "scale": [1.0, 1.0, 1.0] - }, - { - "type": "RigidbodyComponent", - "rigidbodyType": "Dynamic", - "mass": 1.0, - "restitution": 1.0, - "collisionShape": { - "type": "Sphere", - "radius": 1.0 - } - } - ] - }, - { - "id": "Map", - "components": [ - { - "type": "TransformComponent", - "position": [0.0, 0.0, 0.0], - "rotation": [0.0, 0.0, 0.0], - "scale": [1.0, 1.0, 1.0] - } - ], - "children": [ - { - "id": "Ground", - "components": [ - { - "type": "TransformComponent", - "position": [0.0, -5.0, -15.0], - "rotation": [0.0, 0.0, 0.0], - "scale": [1.0, 1.0, 1.0] - }, - { - "type": "RigidbodyComponent", - "rigidbodyType": "Static", - "mass": 0.0, - "restitution": 1.0, - "collisionShape": { - "type": "Box", - "halfExtents": [100.0, 1.0, 100.0] - } - } - ] - }, - { - "id": "WallRight", - "components": [ - { - "type": "TransformComponent", - "position": [99.0, 0.0, -14.0], - "rotation": [0.0, 0.0, 0.0], - "scale": [1.0, 1.0, 1.0] - }, - { - "type": "RigidbodyComponent", - "rigidbodyType": "Static", - "mass": 0.0, - "restitution": 0.0, - "collisionShape": { - "type": "Box", - "halfExtents": [1.0, 4.0, 99.0] - } - } - ] - }, - { - "id": "WallLeft", - "components": [ - { - "type": "TransformComponent", - "position": [-99.0, 0.0, -14.0], - "rotation": [0.0, 0.0, 0.0], - "scale": [1.0, 1.0, 1.0] - }, - { - "type": "RigidbodyComponent", - "rigidbodyType": "Static", - "mass": 0.0, - "restitution": 0.0, - "collisionShape": { - "type": "Box", - "halfExtents": [1.0, 4.0, 99.0] - } - } - ] - }, - { - "id": "WallFront", - "components": [ - { - "type": "TransformComponent", - "position": [0.0, 0.0, 84.0], - "rotation": [0.0, 0.0, 0.0], - "scale": [1.0, 1.0, 1.0] - }, - { - "type": "RigidbodyComponent", - "rigidbodyType": "Static", - "mass": 0.0, - "restitution": 0.0, - "collisionShape": { - "type": "Box", - "halfExtents": [98.0, 4.0, 1.0] - } - } - ] - }, - { - "id": "WallBack", - "components": [ - { - "type": "TransformComponent", - "position": [0.0, 0.0, -114.0], - "rotation": [0.0, 0.0, 0.0], - "scale": [1.0, 1.0, 1.0] - }, - { - "type": "RigidbodyComponent", - "rigidbodyType": "Static", - "mass": 0.0, - "restitution": 0.0, - "collisionShape": { - "type": "Box", - "halfExtents": [100.0, 4.0, 1.0] - } - } - ] - } - ] - } - ], - "materials": [ - { - "id": "GreenMaterial", - "pipeline": "DefaultPipeline", - "baseColor": [0.0, 1.0, 0.0, 1.0] - "albedoTexture": "project://lost.tx", - }, - { - "id": "RedMaterial", - "pipeline": "DefaultPipeline", - "baseColor": [1.0, 0.0, 0.0, 1.0] - "albedoTexture": "project://lost.tx", - }, - { - "id": "BlueMaterial", - "pipeline": "DefaultPipeline", - "baseColor": [0.0, 0.0, 1.0, 1.0] - "albedoTexture": "project://lost.tx", - }, - { - "id": "WhiteMaterial", - "pipeline": "DefaultPipeline", - "baseColor": [1.0, 1.0, 0.0, 1.0] - "albedoTexture": "project://lost.tx", - }, - ], - - "pipelines": [ - { - "id": "DefaultPipeline", - "shaderStages": [ - { - "type": "Vertex", - "shaderPath": "shaders://default.vert" - }, - { - "type": "Fragment", - "shaderPath": "shaders://default.frag" - } - ] - } - ], - "activeCamera": "CameraTransformOverride.Camera.RotationHelper", -} diff --git a/res/project/res/scripts/MainScene/Camera.lua b/res/project/res/scripts/MainScene/Camera.lua deleted file mode 100644 index 8ff3834..0000000 --- a/res/project/res/scripts/MainScene/Camera.lua +++ /dev/null @@ -1,45 +0,0 @@ -this.on_init = function() - this.speed = 0.1 - this.original_position = this.position - this.angles = Vec3:new() - this.mouse_sens = 0.01 -end - -this.on_update = function() - local deltaMouseMovement = Input.getDeltaMousePos() - this.angles.y = this.angles.y - deltaMouseMovement.x * this.mouse_sens - this.eulerAngles = this.angles - - helper = this:getChild('RotationHelper') - - if Input.getKeyJustPressed(Input.KeyCode.Enter) then - gotoScene('SideScene') - end - if Input.getKeyJustPressed(Input.KeyCode.T) then - gotoScene('TestScene') - end - - - local pos = this.position - if Input.getKeyDown(Input.KeyCode.Up) then - pos = pos + helper.forward * this.speed - end - if Input.getKeyDown(Input.KeyCode.Down) then - pos = pos - helper.forward * this.speed - end - if Input.getKeyDown(Input.KeyCode.Right) then - pos = pos + helper.right * this.speed - end - if Input.getKeyDown(Input.KeyCode.Left) then - pos = pos - helper.right * this.speed - end - - if Input.getMouseButtonJustPressed(0) then - hit = rayCast(this.worldPosition, helper.forward, 300) - if(hit.hasHit) then - hit.object.position = hit.object.position + Vec3:new(0, 0, -15) - end - end - - this.position = pos -end diff --git a/res/project/res/scripts/MainScene/CameraHelper.lua b/res/project/res/scripts/MainScene/CameraHelper.lua deleted file mode 100644 index 41266f0..0000000 --- a/res/project/res/scripts/MainScene/CameraHelper.lua +++ /dev/null @@ -1,10 +0,0 @@ -this.on_init = function() - this.angles = Vec3:new() - this.mouse_sens = 0.01 -end - -this.on_update = function() - local deltaMouseMovement = Input.getDeltaMousePos() - this.angles.x = this.angles.x - deltaMouseMovement.y * this.mouse_sens - this.eulerAngles = this.angles -end diff --git a/res/project/res/scripts/MainScene/Child.lua b/res/project/res/scripts/MainScene/Child.lua deleted file mode 100644 index 2c4a2cf..0000000 --- a/res/project/res/scripts/MainScene/Child.lua +++ /dev/null @@ -1,14 +0,0 @@ -this.on_init = function () - this.custom_eulerangles = Vec3:new() - this.custom_angularvelocity = Vec3:new(0, 0.01, 0) -end - -this.on_fixedupdate = function () - if Input.getKeyDown(Input.KeyCode.Left) then - this.custom_eulerangles:add(Vec3:new(0,0.01,0)) - end - if Input.getKeyDown(Input.KeyCode.Right) then - this.custom_eulerangles:sub(Vec3:new(0,0.01,0)) - end - this.eulerAngles = this.custom_eulerangles -end diff --git a/res/project/res/scripts/MainScene/Player.lua b/res/project/res/scripts/MainScene/Player.lua deleted file mode 100644 index 90782f6..0000000 --- a/res/project/res/scripts/MainScene/Player.lua +++ /dev/null @@ -1,22 +0,0 @@ --- this.on_collisionenter = function(other) - -- other.position = other.position + Vec3:new(3.2, 0, 0) --- end - -this.on_update = function () - rb = this:getComponent(Rigidbody) - if Input.getKeyDown(Input.KeyCode.Space) then - rb:addForce(Vec3:new(0, 100, 0)) - end - if Input.getKeyDown(Input.KeyCode.D) then - rb:addForce(Vec3:new(10, 0, 0)) - end - if Input.getKeyDown(Input.KeyCode.A) then - rb:addForce(Vec3:new(-10, 0, 0)) - end - if Input.getKeyDown(Input.KeyCode.W) then - rb:addForce(Vec3:new(0, 0, -10)) - end - if Input.getKeyDown(Input.KeyCode.S) then - rb:addForce(Vec3:new(0, 0, 10)) - end -end diff --git a/res/project/res/scripts/SideScene/Camera.lua b/res/project/res/scripts/SideScene/Camera.lua deleted file mode 100644 index 906993d..0000000 --- a/res/project/res/scripts/SideScene/Camera.lua +++ /dev/null @@ -1,33 +0,0 @@ -this.on_init = function() - this.speed = 0.1 - this.original_position = this.position - this.cursor_locked = false -end - -this.on_fixedupdate = function() - if Input.getKeyJustPressed(Input.KeyCode.Enter) then - gotoScene('MainScene') - end - - if Input.getKeyDown(Input.KeyCode.L) then - if this.cursor_locked then - Input.unlockCursor() - else - Input.lockCursor() - end - this.cursor_locked = not this.cursor_locked - end - - if Input.getKeyDown(Input.KeyCode.Up) then - this.position = this.position - Vec3:new(0, 0, 1) * this.speed - end - if Input.getKeyDown(Input.KeyCode.Down) then - this.position = this.position + Vec3:new(0, 0, 1) * this.speed - end - if Input.getKeyDown(Input.KeyCode.Right) then - this.position = this.position + Vec3:new(1, 0, 0) * this.speed - end - if Input.getKeyDown(Input.KeyCode.Left) then - this.position = this.position - Vec3:new(1, 0, 0) * this.speed - end -end diff --git a/res/project/res/scripts/SideScene/Child.lua b/res/project/res/scripts/SideScene/Child.lua deleted file mode 100644 index 2c4a2cf..0000000 --- a/res/project/res/scripts/SideScene/Child.lua +++ /dev/null @@ -1,14 +0,0 @@ -this.on_init = function () - this.custom_eulerangles = Vec3:new() - this.custom_angularvelocity = Vec3:new(0, 0.01, 0) -end - -this.on_fixedupdate = function () - if Input.getKeyDown(Input.KeyCode.Left) then - this.custom_eulerangles:add(Vec3:new(0,0.01,0)) - end - if Input.getKeyDown(Input.KeyCode.Right) then - this.custom_eulerangles:sub(Vec3:new(0,0.01,0)) - end - this.eulerAngles = this.custom_eulerangles -end diff --git a/res/project/res/scripts/SideScene/Ghost.lua b/res/project/res/scripts/SideScene/Ghost.lua deleted file mode 100644 index 82e4f30..0000000 --- a/res/project/res/scripts/SideScene/Ghost.lua +++ /dev/null @@ -1,8 +0,0 @@ -this.on_collisionenter = function(other) - print(other.name) -end - -this.on_update = function () - local player = getObject('Player.Child') - this.position = player.position + Vec3:new(0, 10, 0) -end diff --git a/res/project/res/scripts/SideScene/Player.lua b/res/project/res/scripts/SideScene/Player.lua deleted file mode 100644 index 0588187..0000000 --- a/res/project/res/scripts/SideScene/Player.lua +++ /dev/null @@ -1,25 +0,0 @@ --- this.on_collisionenter = function(other) - -- other.position = other.position + Vec3:new(3.2, 0, 0) --- end -this.on_init = function() - -- print(this:getChild('Child').position:to_string()) -end - -this.on_update = function () - rb = this:getComponent(Rigidbody) - if Input.getKeyDown(Input.KeyCode.Space) then - rb:addForce(Vec3:new(0, 100, 0)) - end - if Input.getKeyDown(Input.KeyCode.D) then - rb:addForce(Vec3:new(10, 0, 0)) - end - if Input.getKeyDown(Input.KeyCode.A) then - rb:addForce(Vec3:new(-10, 0, 0)) - end - if Input.getKeyDown(Input.KeyCode.W) then - rb:addForce(Vec3:new(0, 0, -10)) - end - if Input.getKeyDown(Input.KeyCode.S) then - rb:addForce(Vec3:new(0, 0, 10)) - end -end diff --git a/res/project/res/scripts/TestScene/Camera.lua b/res/project/res/scripts/TestScene/Camera.lua deleted file mode 100644 index 61abb3d..0000000 --- a/res/project/res/scripts/TestScene/Camera.lua +++ /dev/null @@ -1,66 +0,0 @@ -this.on_init = function() - this.speed = 2.1 - this.original_position = this.position - this.angles = Vec3:new() - this.mouse_sens = 0.01 - this.cursor_locked = false -end - -this.toggleCursor = function() - if this.cursor_locked then - Input.unlockCursor() - else - Input.lockCursor() - end - this.cursor_locked = not this.cursor_locked -end - -this.on_update = function() - local deltaMouseMovement = Input.getDeltaMousePos() - this.angles.y = this.angles.y - deltaMouseMovement.x * this.mouse_sens - this.eulerAngles = this.angles - - helper = this:getChild('RotationHelper') - - if Input.getKeyJustPressed(Input.KeyCode.Enter) then - gotoScene('SideScene') - end - - local pos = this.position - if Input.getKeyDown(Input.KeyCode.Up) then - pos = pos + helper.forward * this.speed - end - if Input.getKeyDown(Input.KeyCode.Down) then - pos = pos - helper.forward * this.speed - end - if Input.getKeyDown(Input.KeyCode.Right) then - pos = pos + helper.right * this.speed - end - if Input.getKeyDown(Input.KeyCode.Left) then - pos = pos - helper.right * this.speed - end - - local mb0 = Input.getMouseButtonJustPressed(0) - local mb1 = Input.getMouseButtonJustPressed(1) - local mb2 = Input.getMouseButtonJustPressed(2) - - if mb0 or mb1 then - hit = rayCast(this.worldPosition, helper.forward, 300) - if(hit.hasHit) then - local hitForce = 1000 - rb = hit.object:getComponent(Rigidbody) - if mb0 then - rb:addForce(hit.hitNormal * -hitForce) - elseif mb1 then - rb:addForce(hit.hitNormal * hitForce) - end - end - end - - if mb2 then - this.toggleCursor() - end - - this.position = pos -end - diff --git a/res/project/res/scripts/TestScene/CameraHelper.lua b/res/project/res/scripts/TestScene/CameraHelper.lua deleted file mode 100644 index 41266f0..0000000 --- a/res/project/res/scripts/TestScene/CameraHelper.lua +++ /dev/null @@ -1,10 +0,0 @@ -this.on_init = function() - this.angles = Vec3:new() - this.mouse_sens = 0.01 -end - -this.on_update = function() - local deltaMouseMovement = Input.getDeltaMousePos() - this.angles.x = this.angles.x - deltaMouseMovement.y * this.mouse_sens - this.eulerAngles = this.angles -end diff --git a/res/project/res/scripts/TestScene/Child.lua b/res/project/res/scripts/TestScene/Child.lua deleted file mode 100644 index 2c4a2cf..0000000 --- a/res/project/res/scripts/TestScene/Child.lua +++ /dev/null @@ -1,14 +0,0 @@ -this.on_init = function () - this.custom_eulerangles = Vec3:new() - this.custom_angularvelocity = Vec3:new(0, 0.01, 0) -end - -this.on_fixedupdate = function () - if Input.getKeyDown(Input.KeyCode.Left) then - this.custom_eulerangles:add(Vec3:new(0,0.01,0)) - end - if Input.getKeyDown(Input.KeyCode.Right) then - this.custom_eulerangles:sub(Vec3:new(0,0.01,0)) - end - this.eulerAngles = this.custom_eulerangles -end diff --git a/res/project/res/scripts/TestScene/Player.lua b/res/project/res/scripts/TestScene/Player.lua deleted file mode 100644 index 90782f6..0000000 --- a/res/project/res/scripts/TestScene/Player.lua +++ /dev/null @@ -1,22 +0,0 @@ --- this.on_collisionenter = function(other) - -- other.position = other.position + Vec3:new(3.2, 0, 0) --- end - -this.on_update = function () - rb = this:getComponent(Rigidbody) - if Input.getKeyDown(Input.KeyCode.Space) then - rb:addForce(Vec3:new(0, 100, 0)) - end - if Input.getKeyDown(Input.KeyCode.D) then - rb:addForce(Vec3:new(10, 0, 0)) - end - if Input.getKeyDown(Input.KeyCode.A) then - rb:addForce(Vec3:new(-10, 0, 0)) - end - if Input.getKeyDown(Input.KeyCode.W) then - rb:addForce(Vec3:new(0, 0, -10)) - end - if Input.getKeyDown(Input.KeyCode.S) then - rb:addForce(Vec3:new(0, 0, 10)) - end -end diff --git a/res/project/res/shaders/default.frag b/res/project/res/shaders/default.frag deleted file mode 100644 index d7837bb..0000000 --- a/res/project/res/shaders/default.frag +++ /dev/null @@ -1,40 +0,0 @@ -#version 450 -#extension GL_EXT_nonuniform_qualifier : require - -struct Material { - vec3 baseColor; - uint index; -}; - -struct Light { - vec3 color; - uint intensity; -}; - -struct Scene { - uint lightsCount; -}; - -vec3 directional_light = vec3(-1.0,-1.0,-1.0); - -layout(set = 0, binding = 0) uniform SceneData { - layout(align = 16) Scene mesh; -} SceneBuffers[]; - -layout(set = 0, binding = 1) uniform LightBuffer { - layout(align = 16) Light lights[]; -} LightsBuffers; - -// layout(set = 2, binding = 4) uniform sampler2D texSampler[]; - -layout(location = 0) in vec3 normal; -layout(location = 1) in vec3 color; -layout(location = 2) flat in Material material; - -layout(location = 0) out vec4 outColor; - -void main() { - float intensity = ((dot(normalize(normal), normalize(directional_light)) +1)/2.0)+0.05; - - outColor = vec4(color * intensity, 1.0); -} diff --git a/res/project/res/shaders/default.vert b/res/project/res/shaders/default.vert deleted file mode 100644 index be17c40..0000000 --- a/res/project/res/shaders/default.vert +++ /dev/null @@ -1,75 +0,0 @@ -#version 450 -#extension GL_EXT_nonuniform_qualifier : require - -struct Material { - vec3 baseColor; - uint index; -}; - -struct Vertex { - vec4 position; - vec4 normal; - vec4 color; - vec2 uv[2]; -}; - -struct Light { - vec3 color; - uint intensity; -}; - -struct Scene { - uint lightsCount; -}; - -struct Mesh { - uint asd; -}; - -layout( push_constant ) uniform constants -{ - mat4 render_matrix; - uint indexBufferIndex; - uint vertexBufferIndex; - uint materialBufferIndex; -} PushConstants; - -layout(set = 1, binding = 0) uniform CameraParam { - mat4 projection; - mat4 view; -} Camera; - -layout(set = 2, binding = 0) buffer MeshBuffer { - layout(align = 16) Mesh mesh; -} MeshBuffers[]; - -layout(set = 2, binding = 1) buffer VertexBuffer { - layout(align = 16) Vertex vertices[]; -} VertexBuffers[]; - -layout(set = 2, binding = 2) buffer IndexBuffer { - uint indices[]; -} IndexBuffers[]; - -layout(set = 2, binding = 3) buffer MaterialBuffer { - layout(align = 16) Material materials[]; -} MaterialBuffers; - -layout(set = 2, binding = 4) uniform sampler2D texSampler[]; - -layout(location = 0) out vec3 normal; -layout(location = 1) out vec3 color; -layout(location = 2) out Material material; - -void main() -{ - material = MaterialBuffers.materials[ PushConstants.materialBufferIndex ]; - - uint index = IndexBuffers[ PushConstants.indexBufferIndex ].indices[gl_VertexIndex]; - Vertex vertex = VertexBuffers[ PushConstants.vertexBufferIndex ].vertices[ index ]; - - color = texture(texSampler[0],vertex.uv[0]).xyz; - - normal = vertex.normal.xyz; - gl_Position = Camera.projection * Camera.view * PushConstants.render_matrix * vec4(vertex.position.xyz, 1.0); -} diff --git a/scratch.md b/scratch.md deleted file mode 100644 index e45daff..0000000 --- a/scratch.md +++ /dev/null @@ -1,4 +0,0 @@ -- Add cross platform timer -- Add cross platform sleep function -- EV_EXPORT/EV_IMPORT events -- Remotery diff --git a/src/main.c b/src/main.c old mode 100644 new mode 100755 index dbb81d4..d5097c7 --- a/src/main.c +++ b/src/main.c @@ -240,7 +240,7 @@ int main(int argc, char **argv) } Renderer->run(); - sleep_ms(17); + /* sleep_ms(17); */ } unload_project(); diff --git a/subprojects/packagefiles/project_assets/meson.build b/subprojects/packagefiles/project_assets/meson.build new file mode 100755 index 0000000..07480e9 --- /dev/null +++ b/subprojects/packagefiles/project_assets/meson.build @@ -0,0 +1 @@ +project('project_assets') diff --git a/subprojects/project_assets.wrap b/subprojects/project_assets.wrap new file mode 100755 index 0000000..205f779 --- /dev/null +++ b/subprojects/project_assets.wrap @@ -0,0 +1,5 @@ +[wrap-git] +url = https://github.com/j3oss/evol-assets.git +revision = master + +patch_directory = project_assets