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.

19.3 KB
Raw Blame
{
  "version": 4,
  "name": "Main",
  "entities": [
    {
      "id": 0,
      "name": "Camera",
      "parent": null,
      "children": [],
      "components": [
        {
          "type": "Transform",
          "data": {
            "position": {
              "x": 0,
              "y": 0,
              "z": 10
            }
          }
        },
        {
          "type": "Camera",
          "data": {
            "projectionType": 1,
            "orthoSize": 300,
            "isActive": true,
            "priority": 0
          }
        }
      ],
      "visible": true
    },
    {
      "id": 1,
      "name": "Canvas",
      "parent": null,
      "children": [
        2,
        3,
        16,
        4,
        6,
        8,
        10,
        12,
        14
      ],
      "components": [
        {
          "type": "Transform",
          "data": {}
        },
        {
          "type": "Canvas",
          "data": {
            "designResolution": {
              "x": 800,
              "y": 600
            },
            "scaleMode": 2
          }
        },
        {
          "type": "UINode",
          "data": {}
        }
      ],
      "visible": true
    },
    {
      "id": 2,
      "name": "Title",
      "parent": 1,
      "children": [],
      "components": [
        {
          "type": "Transform",
          "data": {}
        },
        {
          "type": "UINode",
          "data": {
            "position": 1,
            "width": {
              "value": 500.0,
              "unit": 0
            },
            "insetLeft": {
              "value": 50.0,
              "unit": 1
            },
            "marginLeft": {
              "value": -250.0,
              "unit": 0
            },
            "height": {
              "value": 50.0,
              "unit": 0
            },
            "insetTop": {
              "value": 0.0,
              "unit": 1
            },
            "marginTop": {
              "value": 50.0,
              "unit": 0
            }
          }
        },
        {
          "type": "Text",
          "data": {
            "content": "Drag & Focus Demo",
            "fontSize": 28,
            "color": {
              "r": 1,
              "g": 1,
              "b": 1,
              "a": 1
            },
            "align": 1,
            "verticalAlign": 1
          }
        }
      ],
      "visible": true
    },
    {
      "id": 3,
      "name": "Subtitle",
      "parent": 1,
      "children": [],
      "components": [
        {
          "type": "Transform",
          "data": {}
        },
        {
          "type": "UINode",
          "data": {
            "position": 1,
            "width": {
              "value": 500.0,
              "unit": 0
            },
            "insetLeft": {
              "value": 50.0,
              "unit": 1
            },
            "marginLeft": {
              "value": -250.0,
              "unit": 0
            },
            "height": {
              "value": 30.0,
              "unit": 0
            },
            "insetTop": {
              "value": 0.0,
              "unit": 1
            },
            "marginTop": {
              "value": 80.0,
              "unit": 0
            }
          }
        },
        {
          "type": "Text",
          "data": {
            "content": "Drag cards to rearrange · Tab to cycle focus",
            "fontSize": 16,
            "color": {
              "r": 0.6,
              "g": 0.6,
              "b": 0.6,
              "a": 1
            },
            "align": 1,
            "verticalAlign": 1
          }
        }
      ],
      "visible": true
    },
    {
      "id": 4,
      "name": "Card1",
      "parent": 1,
      "children": [
        5
      ],
      "components": [
        {
          "type": "Transform",
          "data": {}
        },
        {
          "type": "UINode",
          "data": {
            "position": 1,
            "width": {
              "value": 100.0,
              "unit": 0
            },
            "insetLeft": {
              "value": 50.0,
              "unit": 1
            },
            "marginLeft": {
              "value": -400.0,
              "unit": 0
            },
            "height": {
              "value": 80.0,
              "unit": 0
            },
            "insetTop": {
              "value": 50.0,
              "unit": 1
            }
          }
        },
        {
          "type": "UIVisual",
          "data": {
            "visualType": 1,
            "color": {
              "r": 0.4,
              "g": 0.613,
              "b": 0.8,
              "a": 1
            }
          }
        },
        {
          "type": "Interactable",
          "data": {}
        },
        {
          "type": "Draggable",
          "data": {}
        },
        {
          "type": "Focusable",
          "data": {}
        }
      ],
      "visible": true
    },
    {
      "id": 5,
      "name": "Card1Label",
      "parent": 4,
      "children": [],
      "components": [
        {
          "type": "Transform",
          "data": {}
        },
        {
          "type": "UINode",
          "data": {
            "position": 1,
            "insetLeft": {
              "value": 0.0,
              "unit": 1
            },
            "insetRight": {
              "value": 0.0,
              "unit": 1
            },
            "insetBottom": {
              "value": 0.0,
              "unit": 1
            },
            "insetTop": {
              "value": 0.0,
              "unit": 1
            }
          }
        },
        {
          "type": "Text",
          "data": {
            "content": "Card 1",
            "fontSize": 18,
            "color": {
              "r": 1,
              "g": 1,
              "b": 1,
              "a": 1
            },
            "align": 1,
            "verticalAlign": 1
          }
        }
      ],
      "visible": true
    },
    {
      "id": 6,
      "name": "Card2",
      "parent": 1,
      "children": [
        7
      ],
      "components": [
        {
          "type": "Transform",
          "data": {}
        },
        {
          "type": "UINode",
          "data": {
            "position": 1,
            "width": {
              "value": 100.0,
              "unit": 0
            },
            "insetLeft": {
              "value": 50.0,
              "unit": 1
            },
            "marginLeft": {
              "value": -280.0,
              "unit": 0
            },
            "height": {
              "value": 80.0,
              "unit": 0
            },
            "insetTop": {
              "value": 50.0,
              "unit": 1
            }
          }
        },
        {
          "type": "UIVisual",
          "data": {
            "visualType": 1,
            "color": {
              "r": 0.587,
              "g": 0.4,
              "b": 0.8,
              "a": 1
            }
          }
        },
        {
          "type": "Interactable",
          "data": {}
        },
        {
          "type": "Draggable",
          "data": {}
        },
        {
          "type": "Focusable",
          "data": {}
        }
      ],
      "visible": true
    },
    {
      "id": 7,
      "name": "Card2Label",
      "parent": 6,
      "children": [],
      "components": [
        {
          "type": "Transform",
          "data": {}
        },
        {
          "type": "UINode",
          "data": {
            "position": 1,
            "insetLeft": {
              "value": 0.0,
              "unit": 1
            },
            "insetRight": {
              "value": 0.0,
              "unit": 1
            },
            "insetBottom": {
              "value": 0.0,
              "unit": 1
            },
            "insetTop": {
              "value": 0.0,
              "unit": 1
            }
          }
        },
        {
          "type": "Text",
          "data": {
            "content": "Card 2",
            "fontSize": 18,
            "color": {
              "r": 1,
              "g": 1,
              "b": 1,
              "a": 1
            },
            "align": 1,
            "verticalAlign": 1
          }
        }
      ],
      "visible": true
    },
    {
      "id": 8,
      "name": "Card3",
      "parent": 1,
      "children": [
        9
      ],
      "components": [
        {
          "type": "Transform",
          "data": {}
        },
        {
          "type": "UINode",
          "data": {
            "position": 1,
            "width": {
              "value": 100.0,
              "unit": 0
            },
            "insetLeft": {
              "value": 50.0,
              "unit": 1
            },
            "marginLeft": {
              "value": -160.0,
              "unit": 0
            },
            "height": {
              "value": 80.0,
              "unit": 0
            },
            "insetTop": {
              "value": 50.0,
              "unit": 1
            }
          }
        },
        {
          "type": "UIVisual",
          "data": {
            "visualType": 1,
            "color": {
              "r": 0.8,
              "g": 0.4,
              "b": 0.613,
              "a": 1
            }
          }
        },
        {
          "type": "Interactable",
          "data": {}
        },
        {
          "type": "Draggable",
          "data": {}
        },
        {
          "type": "Focusable",
          "data": {}
        }
      ],
      "visible": true
    },
    {
      "id": 9,
      "name": "Card3Label",
      "parent": 8,
      "children": [],
      "components": [
        {
          "type": "Transform",
          "data": {}
        },
        {
          "type": "UINode",
          "data": {
            "position": 1,
            "insetLeft": {
              "value": 0.0,
              "unit": 1
            },
            "insetRight": {
              "value": 0.0,
              "unit": 1
            },
            "insetBottom": {
              "value": 0.0,
              "unit": 1
            },
            "insetTop": {
              "value": 0.0,
              "unit": 1
            }
          }
        },
        {
          "type": "Text",
          "data": {
            "content": "Card 3",
            "fontSize": 18,
            "color": {
              "r": 1,
              "g": 1,
              "b": 1,
              "a": 1
            },
            "align": 1,
            "verticalAlign": 1
          }
        }
      ],
      "visible": true
    },
    {
      "id": 10,
      "name": "Card4",
      "parent": 1,
      "children": [
        11
      ],
      "components": [
        {
          "type": "Transform",
          "data": {}
        },
        {
          "type": "UINode",
          "data": {
            "position": 1,
            "width": {
              "value": 100.0,
              "unit": 0
            },
            "insetLeft": {
              "value": 50.0,
              "unit": 1
            },
            "marginLeft": {
              "value": -40.0,
              "unit": 0
            },
            "height": {
              "value": 80.0,
              "unit": 0
            },
            "insetTop": {
              "value": 50.0,
              "unit": 1
            }
          }
        },
        {
          "type": "UIVisual",
          "data": {
            "visualType": 1,
            "color": {
              "r": 0.8,
              "g": 0.587,
              "b": 0.4,
              "a": 1
            }
          }
        },
        {
          "type": "Interactable",
          "data": {}
        },
        {
          "type": "Draggable",
          "data": {}
        },
        {
          "type": "Focusable",
          "data": {}
        }
      ],
      "visible": true
    },
    {
      "id": 11,
      "name": "Card4Label",
      "parent": 10,
      "children": [],
      "components": [
        {
          "type": "Transform",
          "data": {}
        },
        {
          "type": "UINode",
          "data": {
            "position": 1,
            "insetLeft": {
              "value": 0.0,
              "unit": 1
            },
            "insetRight": {
              "value": 0.0,
              "unit": 1
            },
            "insetBottom": {
              "value": 0.0,
              "unit": 1
            },
            "insetTop": {
              "value": 0.0,
              "unit": 1
            }
          }
        },
        {
          "type": "Text",
          "data": {
            "content": "Card 4",
            "fontSize": 18,
            "color": {
              "r": 1,
              "g": 1,
              "b": 1,
              "a": 1
            },
            "align": 1,
            "verticalAlign": 1
          }
        }
      ],
      "visible": true
    },
    {
      "id": 12,
      "name": "Card5",
      "parent": 1,
      "children": [
        13
      ],
      "components": [
        {
          "type": "Transform",
          "data": {}
        },
        {
          "type": "UINode",
          "data": {
            "position": 1,
            "width": {
              "value": 100.0,
              "unit": 0
            },
            "insetLeft": {
              "value": 50.0,
              "unit": 1
            },
            "marginLeft": {
              "value": 80.0,
              "unit": 0
            },
            "height": {
              "value": 80.0,
              "unit": 0
            },
            "insetTop": {
              "value": 50.0,
              "unit": 1
            }
          }
        },
        {
          "type": "UIVisual",
          "data": {
            "visualType": 1,
            "color": {
              "r": 0.613,
              "g": 0.8,
              "b": 0.4,
              "a": 1
            }
          }
        },
        {
          "type": "Interactable",
          "data": {}
        },
        {
          "type": "Draggable",
          "data": {}
        },
        {
          "type": "Focusable",
          "data": {}
        }
      ],
      "visible": true
    },
    {
      "id": 13,
      "name": "Card5Label",
      "parent": 12,
      "children": [],
      "components": [
        {
          "type": "Transform",
          "data": {}
        },
        {
          "type": "UINode",
          "data": {
            "position": 1,
            "insetLeft": {
              "value": 0.0,
              "unit": 1
            },
            "insetRight": {
              "value": 0.0,
              "unit": 1
            },
            "insetBottom": {
              "value": 0.0,
              "unit": 1
            },
            "insetTop": {
              "value": 0.0,
              "unit": 1
            }
          }
        },
        {
          "type": "Text",
          "data": {
            "content": "Card 5",
            "fontSize": 18,
            "color": {
              "r": 1,
              "g": 1,
              "b": 1,
              "a": 1
            },
            "align": 1,
            "verticalAlign": 1
          }
        }
      ],
      "visible": true
    },
    {
      "id": 14,
      "name": "Card6",
      "parent": 1,
      "children": [
        15
      ],
      "components": [
        {
          "type": "Transform",
          "data": {}
        },
        {
          "type": "UINode",
          "data": {
            "position": 1,
            "width": {
              "value": 100.0,
              "unit": 0
            },
            "insetLeft": {
              "value": 50.0,
              "unit": 1
            },
            "marginLeft": {
              "value": 200.0,
              "unit": 0
            },
            "height": {
              "value": 80.0,
              "unit": 0
            },
            "insetTop": {
              "value": 50.0,
              "unit": 1
            }
          }
        },
        {
          "type": "UIVisual",
          "data": {
            "visualType": 1,
            "color": {
              "r": 0.4,
              "g": 0.8,
              "b": 0.587,
              "a": 1
            }
          }
        },
        {
          "type": "Interactable",
          "data": {}
        },
        {
          "type": "Draggable",
          "data": {}
        },
        {
          "type": "Focusable",
          "data": {}
        }
      ],
      "visible": true
    },
    {
      "id": 15,
      "name": "Card6Label",
      "parent": 14,
      "children": [],
      "components": [
        {
          "type": "Transform",
          "data": {}
        },
        {
          "type": "UINode",
          "data": {
            "position": 1,
            "insetLeft": {
              "value": 0.0,
              "unit": 1
            },
            "insetRight": {
              "value": 0.0,
              "unit": 1
            },
            "insetBottom": {
              "value": 0.0,
              "unit": 1
            },
            "insetTop": {
              "value": 0.0,
              "unit": 1
            }
          }
        },
        {
          "type": "Text",
          "data": {
            "content": "Card 6",
            "fontSize": 18,
            "color": {
              "r": 1,
              "g": 1,
              "b": 1,
              "a": 1
            },
            "align": 1,
            "verticalAlign": 1
          }
        }
      ],
      "visible": true
    },
    {
      "id": 16,
      "name": "DropZone",
      "parent": 1,
      "children": [
        17
      ],
      "components": [
        {
          "type": "Transform",
          "data": {}
        },
        {
          "type": "UINode",
          "data": {
            "position": 1,
            "width": {
              "value": 500.0,
              "unit": 0
            },
            "insetLeft": {
              "value": 50.0,
              "unit": 1
            },
            "marginLeft": {
              "value": -250.0,
              "unit": 0
            },
            "height": {
              "value": 120.0,
              "unit": 0
            },
            "insetTop": {
              "value": 100.0,
              "unit": 1
            },
            "marginTop": {
              "value": -160.0,
              "unit": 0
            }
          }
        },
        {
          "type": "UIVisual",
          "data": {
            "visualType": 1,
            "color": {
              "r": 0.14,
              "g": 0.14,
              "b": 0.16,
              "a": 0.55
            }
          }
        }
      ],
      "visible": true
    },
    {
      "id": 17,
      "name": "DropZoneLabel",
      "parent": 16,
      "children": [],
      "components": [
        {
          "type": "Transform",
          "data": {}
        },
        {
          "type": "UINode",
          "data": {
            "position": 1,
            "insetLeft": {
              "value": 0.0,
              "unit": 1
            },
            "insetRight": {
              "value": 0.0,
              "unit": 1
            },
            "insetBottom": {
              "value": 0.0,
              "unit": 1
            },
            "insetTop": {
              "value": 0.0,
              "unit": 1
            }
          }
        },
        {
          "type": "Text",
          "data": {
            "content": "Drop Zone",
            "fontSize": 20,
            "color": {
              "r": 0.4,
              "g": 0.4,
              "b": 0.4,
              "a": 1
            },
            "align": 1,
            "verticalAlign": 1
          }
        }
      ],
      "visible": true
    }
  ]
}