Skip to content

A fast 2D and 3D game engine — TypeScript SDK, C++/WebAssembly core, visual editor. Ship one project to web, desktop, WeChat MiniGames, playable ads, and native Android / iOS.

17.8 KB
Raw Blame
{
  "version": 4,
  "name": "ThirdPersonGym",
  "entities": [
    {
      "id": 0,
      "name": "Camera",
      "parent": null,
      "children": [],
      "visible": true,
      "components": [
        {
          "type": "Transform",
          "data": {
            "position": {
              "x": 0,
              "y": 200,
              "z": 500
            }
          }
        },
        {
          "type": "Camera",
          "data": {
            "projectionType": 0,
            "fov": 55,
            "nearPlane": 10,
            "farPlane": 4000,
            "isActive": true,
            "priority": 0
          }
        },
        {
          "type": "ThirdPersonCamera",
          "data": {
            "target": 5,
            "distance": 420,
            "pitch": 18
          }
        },
        {
          "type": "PostProcessVolume",
          "data": {
            "isGlobal": true,
            "priority": 0,
            "weight": 1,
            "effects": [
              {
                "type": "ssao",
                "enabled": true,
                "uniforms": {
                  "u_radius": 70,
                  "u_intensity": 1,
                  "u_bias": 0.12,
                  "u_power": 1.6
                }
              }
            ]
          }
        }
      ]
    },
    {
      "id": 1,
      "name": "Ground",
      "parent": null,
      "children": [],
      "visible": true,
      "components": [
        {
          "type": "Transform",
          "data": {
            "position": {
              "x": -200,
              "y": -20,
              "z": -300
            },
            "scale": {
              "x": 30.0,
              "y": 0.4,
              "z": 24.0
            }
          }
        },
        {
          "type": "RigidBody3D",
          "data": {
            "bodyType": 0
          }
        },
        {
          "type": "BoxCollider3D",
          "data": {
            "halfExtents": {
              "x": 1500.0,
              "y": 20.0,
              "z": 1200.0
            },
            "friction": 0.6
          }
        },
        {
          "type": "MeshRenderer",
          "data": {
            "mesh": "builtin:cube",
            "lit": true,
            "opaque": true,
            "cullBackfaces": true,
            "color": {
              "r": 0.3,
              "g": 0.34,
              "b": 0.3,
              "a": 1
            }
          }
        }
      ]
    },
    {
      "id": 2,
      "name": "Wall",
      "parent": null,
      "children": [],
      "visible": true,
      "components": [
        {
          "type": "Transform",
          "data": {
            "position": {
              "x": 420,
              "y": 120,
              "z": -520
            },
            "scale": {
              "x": 3.0,
              "y": 2.4,
              "z": 0.4
            }
          }
        },
        {
          "type": "RigidBody3D",
          "data": {
            "bodyType": 0
          }
        },
        {
          "type": "BoxCollider3D",
          "data": {
            "halfExtents": {
              "x": 150.0,
              "y": 120.0,
              "z": 20.0
            },
            "friction": 0.6
          }
        },
        {
          "type": "MeshRenderer",
          "data": {
            "mesh": "builtin:cube",
            "lit": true,
            "opaque": true,
            "cullBackfaces": true,
            "color": {
              "r": 0.45,
              "g": 0.3,
              "b": 0.28,
              "a": 1
            }
          }
        }
      ]
    },
    {
      "id": 3,
      "name": "Step",
      "parent": null,
      "children": [],
      "visible": true,
      "components": [
        {
          "type": "Transform",
          "data": {
            "position": {
              "x": -400,
              "y": 15,
              "z": -520
            },
            "scale": {
              "x": 3.0,
              "y": 0.3,
              "z": 4.0
            }
          }
        },
        {
          "type": "RigidBody3D",
          "data": {
            "bodyType": 0
          }
        },
        {
          "type": "BoxCollider3D",
          "data": {
            "halfExtents": {
              "x": 150.0,
              "y": 15.0,
              "z": 200.0
            },
            "friction": 0.6
          }
        },
        {
          "type": "MeshRenderer",
          "data": {
            "mesh": "builtin:cube",
            "lit": true,
            "opaque": true,
            "cullBackfaces": true,
            "color": {
              "r": 0.36,
              "g": 0.32,
              "b": 0.28,
              "a": 1
            }
          }
        }
      ]
    },
    {
      "id": 4,
      "name": "Ramp",
      "parent": null,
      "children": [],
      "visible": true,
      "components": [
        {
          "type": "Transform",
          "data": {
            "position": {
              "x": 0,
              "y": 40,
              "z": -520
            },
            "rotation": {
              "w": 0.9945218953682733,
              "x": 0.10452846326765347,
              "y": 0,
              "z": 0
            },
            "scale": {
              "x": 3.0,
              "y": 0.3,
              "z": 8.0
            }
          }
        },
        {
          "type": "RigidBody3D",
          "data": {
            "bodyType": 0
          }
        },
        {
          "type": "BoxCollider3D",
          "data": {
            "halfExtents": {
              "x": 150.0,
              "y": 15.0,
              "z": 400.0
            },
            "friction": 0.6
          }
        },
        {
          "type": "MeshRenderer",
          "data": {
            "mesh": "builtin:cube",
            "lit": true,
            "opaque": true,
            "cullBackfaces": true,
            "color": {
              "r": 0.33,
              "g": 0.36,
              "b": 0.4,
              "a": 1
            }
          }
        }
      ]
    },
    {
      "id": 5,
      "name": "Player",
      "parent": null,
      "children": [
        6,
        7,
        8,
        13
      ],
      "visible": true,
      "components": [
        {
          "type": "Transform",
          "data": {
            "position": {
              "x": 0,
              "y": 80,
              "z": 120
            }
          }
        },
        {
          "type": "CharacterController3D",
          "data": {
            "radius": 30,
            "halfHeight": 30,
            "stepHeight": 40,
            "snapDown": 50
          }
        },
        {
          "type": "ThirdPersonController",
          "data": {
            "camera": 0,
            "moveSpeed": 320,
            "jumpSpeed": 520,
            "idleThreshold": 8
          }
        },
        {
          "type": "Animator",
          "data": {
            "controller": "assets/models/locomotion.esanimator",
            "currentState": "",
            "enabled": true
          }
        },
        {
          "type": "AnimatorRootMotion",
          "data": {
            "enabled": true
          }
        },
        {
          "type": "MeleeAttack",
          "data": {
            "radius": 70,
            "damage": 25,
            "anchor": 14
          }
        },
        {
          "type": "Health",
          "data": {
            "current": 100,
            "max": 100
          }
        }
      ]
    },
    {
      "id": 6,
      "name": "Bone0",
      "parent": 5,
      "children": [],
      "visible": true,
      "components": [
        {
          "type": "Transform",
          "data": {
            "position": {
              "x": 0,
              "y": 0,
              "z": 0
            }
          }
        }
      ]
    },
    {
      "id": 7,
      "name": "Bone1",
      "parent": 5,
      "children": [
        14
      ],
      "visible": true,
      "components": [
        {
          "type": "Transform",
          "data": {
            "position": {
              "x": 60,
              "y": 0,
              "z": 0
            }
          }
        }
      ]
    },
    {
      "id": 8,
      "name": "Body",
      "parent": 5,
      "children": [],
      "visible": true,
      "components": [
        {
          "type": "Transform",
          "data": {
            "position": {
              "x": 0,
              "y": 0,
              "z": 0
            }
          }
        },
        {
          "type": "MeshRenderer",
          "data": {
            "mesh": "assets/models/skinned-fade.esmesh",
            "lit": true,
            "opaque": true,
            "color": {
              "r": 0.35,
              "g": 0.75,
              "b": 0.45,
              "a": 1
            }
          }
        },
        {
          "type": "MeshSkin",
          "data": {
            "joints": [
              6,
              7
            ]
          }
        }
      ]
    },
    {
      "id": 9,
      "name": "Sun",
      "parent": null,
      "children": [],
      "visible": true,
      "components": [
        {
          "type": "Transform",
          "data": {
            "position": {
              "x": 0,
              "y": 0,
              "z": 0
            },
            "rotation": {
              "w": 0.83394695,
              "x": -0.52086316,
              "y": 0.18230211,
              "z": 0
            }
          }
        },
        {
          "type": "Light",
          "data": {
            "type": 1,
            "intensity": 1.05,
            "enabled": true,
            "color": {
              "r": 1,
              "g": 0.96,
              "b": 0.9,
              "a": 1
            }
          }
        }
      ]
    },
    {
      "id": 10,
      "name": "Sky",
      "parent": null,
      "children": [],
      "visible": true,
      "components": [
        {
          "type": "Transform",
          "data": {
            "position": {
              "x": 0,
              "y": 0,
              "z": 0
            }
          }
        },
        {
          "type": "Light",
          "data": {
            "type": 2,
            "intensity": 0.42,
            "enabled": true,
            "color": {
              "r": 0.55,
              "g": 0.66,
              "b": 0.85,
              "a": 1
            }
          }
        }
      ]
    },
    {
      "id": 11,
      "name": "HighStep",
      "parent": null,
      "children": [],
      "visible": true,
      "components": [
        {
          "type": "Transform",
          "data": {
            "position": {
              "x": -800,
              "y": 45,
              "z": -520
            },
            "scale": {
              "x": 3.0,
              "y": 0.9,
              "z": 4.0
            }
          }
        },
        {
          "type": "RigidBody3D",
          "data": {
            "bodyType": 0
          }
        },
        {
          "type": "BoxCollider3D",
          "data": {
            "halfExtents": {
              "x": 150,
              "y": 45,
              "z": 200
            },
            "friction": 0.6
          }
        },
        {
          "type": "MeshRenderer",
          "data": {
            "mesh": "builtin:cube",
            "lit": true,
            "opaque": true,
            "cullBackfaces": true,
            "color": {
              "r": 0.45,
              "g": 0.28,
              "b": 0.3,
              "a": 1
            }
          }
        }
      ]
    },
    {
      "id": 12,
      "name": "BackWall",
      "parent": null,
      "children": [],
      "visible": true,
      "components": [
        {
          "type": "Transform",
          "data": {
            "position": {
              "x": 420,
              "y": 120,
              "z": 400
            },
            "scale": {
              "x": 4.0,
              "y": 2.4,
              "z": 0.4
            }
          }
        },
        {
          "type": "RigidBody3D",
          "data": {
            "bodyType": 0
          }
        },
        {
          "type": "BoxCollider3D",
          "data": {
            "halfExtents": {
              "x": 200,
              "y": 120,
              "z": 20
            },
            "friction": 0.6
          }
        },
        {
          "type": "MeshRenderer",
          "data": {
            "mesh": "builtin:cube",
            "lit": true,
            "opaque": true,
            "cullBackfaces": true,
            "color": {
              "r": 0.4,
              "g": 0.34,
              "b": 0.44,
              "a": 1
            }
          }
        }
      ]
    },
    {
      "id": 13,
      "name": "FootDust",
      "parent": 5,
      "children": [],
      "visible": true,
      "components": [
        {
          "type": "Transform",
          "data": {
            "position": {
              "x": 0,
              "y": -78,
              "z": 0
            }
          }
        },
        {
          "type": "ParticleEmitter",
          "data": {
            "rate": 0,
            "burstCount": 12,
            "burstInterval": 0,
            "duration": 0.05,
            "looping": false,
            "playOnStart": false,
            "maxParticles": 64,
            "lifetimeMin": 0.6,
            "lifetimeMax": 1.0,
            "shape": 5,
            "shapeRadius": 18,
            "speedMin": 18,
            "speedMax": 42,
            "startSizeMin": 10,
            "startSizeMax": 16,
            "endSizeMin": 22,
            "endSizeMax": 30,
            "sizeEasing": 2,
            "startColor": {
              "r": 0.74,
              "g": 0.68,
              "b": 0.56,
              "a": 0.35
            },
            "endColor": {
              "r": 0.66,
              "g": 0.62,
              "b": 0.54,
              "a": 0.0
            },
            "gravity": {
              "x": 0,
              "y": 26,
              "z": 0
            },
            "damping": 1.6,
            "blendMode": 0,
            "layer": 0,
            "simulationSpace": 0
          }
        }
      ]
    },
    {
      "id": 14,
      "name": "HitAnchor",
      "parent": 7,
      "children": [],
      "visible": true,
      "components": [
        {
          "type": "Transform",
          "data": {
            "position": {
              "x": 80,
              "y": 0,
              "z": 0
            }
          }
        }
      ]
    },
    {
      "id": 15,
      "name": "DummyA",
      "parent": null,
      "children": [],
      "visible": true,
      "components": [
        {
          "type": "Transform",
          "data": {
            "position": {
              "x": 129,
              "y": 60,
              "z": 17
            }
          }
        },
        {
          "type": "RigidBody3D",
          "data": {
            "bodyType": 0
          }
        },
        {
          "type": "BoxCollider3D",
          "data": {
            "halfExtents": {
              "x": 25,
              "y": 60,
              "z": 25
            },
            "isSensor": true
          }
        },
        {
          "type": "MeshRenderer",
          "data": {
            "mesh": "builtin:cube",
            "lit": true,
            "opaque": true,
            "cullBackfaces": true,
            "color": {
              "r": 0.78,
              "g": 0.35,
              "b": 0.32,
              "a": 1
            }
          }
        },
        {
          "type": "Health",
          "data": {
            "current": 100,
            "max": 100
          }
        }
      ]
    },
    {
      "id": 17,
      "name": "DummyB",
      "parent": null,
      "children": [],
      "visible": true,
      "components": [
        {
          "type": "Transform",
          "data": {
            "position": {
              "x": -129,
              "y": 60,
              "z": 17
            }
          }
        },
        {
          "type": "RigidBody3D",
          "data": {
            "bodyType": 0
          }
        },
        {
          "type": "BoxCollider3D",
          "data": {
            "halfExtents": {
              "x": 25,
              "y": 60,
              "z": 25
            },
            "isSensor": true
          }
        },
        {
          "type": "MeshRenderer",
          "data": {
            "mesh": "builtin:cube",
            "lit": true,
            "opaque": true,
            "cullBackfaces": true,
            "color": {
              "r": 0.35,
              "g": 0.42,
              "b": 0.72,
              "a": 1
            }
          }
        },
        {
          "type": "Health",
          "data": {
            "current": 100,
            "max": 100
          }
        }
      ]
    },
    {
      "id": 18,
      "name": "HitSpark",
      "parent": null,
      "children": [],
      "visible": true,
      "components": [
        {
          "type": "Transform",
          "data": {
            "position": {
              "x": 0,
              "y": -4000,
              "z": 0
            }
          }
        },
        {
          "type": "ParticleEmitter",
          "data": {
            "rate": 0,
            "burstCount": 18,
            "burstInterval": 0,
            "duration": 0.05,
            "looping": false,
            "playOnStart": false,
            "maxParticles": 72,
            "lifetimeMin": 0.5,
            "lifetimeMax": 0.9,
            "shape": 4,
            "shapeRadius": 12,
            "speedMin": 90,
            "speedMax": 240,
            "startSizeMin": 8,
            "startSizeMax": 14,
            "endSizeMin": 0,
            "endSizeMax": 4,
            "startColor": {
              "r": 1.0,
              "g": 0.82,
              "b": 0.45,
              "a": 1.0
            },
            "endColor": {
              "r": 0.95,
              "g": 0.32,
              "b": 0.2,
              "a": 0.0
            },
            "gravity": {
              "x": 0,
              "y": -320,
              "z": 0
            },
            "damping": 2.0,
            "blendMode": 1,
            "layer": 0,
            "simulationSpace": 0
          }
        }
      ]
    }
  ]
}