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.

4.5 KB
Raw Blame
{
  "version": 4,
  "name": "A HUD over a PERSPECTIVE camera. There is no world rectangle to lay a screen out in here, which is why this scene draws nothing at all until the screen has a coordinate domain of its own. The camera is driven far away at runtime by the gate that pairs with this one: the world blob leaves the frame and the two corners do not move a pixel.",
  "entities": [
    {
      "id": 0,
      "name": "Camera",
      "parent": null,
      "children": [],
      "visible": true,
      "components": [
        {
          "type": "Transform",
          "data": {
            "position": {
              "x": 0,
              "y": 0,
              "z": 300
            }
          }
        },
        {
          "type": "Camera",
          "data": {
            "projectionType": 0,
            "fov": 60,
            "nearPlane": 0.1,
            "farPlane": 1000,
            "isActive": true,
            "priority": 0
          }
        }
      ]
    },
    {
      "id": 1,
      "name": "WorldBlob",
      "parent": null,
      "children": [],
      "visible": true,
      "components": [
        {
          "type": "Transform",
          "data": {
            "position": {
              "x": 153.96,
              "y": 86.6,
              "z": 0
            },
            "scale": {
              "x": 0.4,
              "y": 0.4,
              "z": 1
            }
          }
        },
        {
          "type": "MeshRenderer",
          "data": {
            "color": {
              "r": 0,
              "g": 0,
              "b": 1,
              "a": 1
            },
            "layer": 0,
            "enabled": true,
            "opaque": true,
            "mesh": "/scenes/textured-quad.esmesh"
          }
        }
      ]
    },
    {
      "id": 2,
      "name": "Canvas",
      "parent": null,
      "children": [
        3,
        4
      ],
      "visible": true,
      "components": [
        {
          "type": "Transform",
          "data": {
            "position": {
              "x": 0,
              "y": 0,
              "z": 0
            }
          }
        },
        {
          "type": "Canvas",
          "data": {
            "designResolution": {
              "x": 1920,
              "y": 1080
            },
            "scaleMode": 1
          }
        },
        {
          "type": "UINode",
          "data": {}
        }
      ]
    },
    {
      "id": 3,
      "name": "TopLeftQuadrant",
      "parent": 2,
      "children": [],
      "visible": true,
      "components": [
        {
          "type": "Transform",
          "data": {
            "position": {
              "x": 0,
              "y": 0,
              "z": 0
            }
          }
        },
        {
          "type": "UINode",
          "data": {
            "position": 1,
            "width": {
              "value": 50,
              "unit": 1
            },
            "height": {
              "value": 50,
              "unit": 1
            },
            "insetTop": {
              "value": 0,
              "unit": 0
            },
            "insetLeft": {
              "value": 0,
              "unit": 0
            }
          }
        },
        {
          "type": "UIVisual",
          "data": {
            "visualType": 1,
            "color": {
              "r": 1,
              "g": 0,
              "b": 0,
              "a": 1
            },
            "enabled": true
          }
        }
      ]
    },
    {
      "id": 4,
      "name": "BottomRightQuadrant",
      "parent": 2,
      "children": [],
      "visible": true,
      "components": [
        {
          "type": "Transform",
          "data": {
            "position": {
              "x": 0,
              "y": 0,
              "z": 0
            }
          }
        },
        {
          "type": "UINode",
          "data": {
            "position": 1,
            "width": {
              "value": 50,
              "unit": 1
            },
            "height": {
              "value": 50,
              "unit": 1
            },
            "insetBottom": {
              "value": 0,
              "unit": 0
            },
            "insetRight": {
              "value": 0,
              "unit": 0
            }
          }
        },
        {
          "type": "UIVisual",
          "data": {
            "visualType": 1,
            "color": {
              "r": 0,
              "g": 1,
              "b": 0,
              "a": 1
            },
            "enabled": true
          }
        }
      ]
    }
  ]
}