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.

16.0 KB
Raw Blame
{
  "version": 4,
  "name": "Planar Tiled Lights",
  "entities": [
    {
      "id": 1,
      "name": "Camera",
      "parent": null,
      "children": [],
      "visible": true,
      "components": [
        {
          "type": "Transform",
          "data": {
            "position": {
              "x": 0,
              "y": 3,
              "z": 6
            },
            "rotation": {
              "x": -0.22975292,
              "y": 0,
              "z": 0,
              "w": 0.97324899
            }
          }
        },
        {
          "type": "Camera",
          "data": {
            "projectionType": 1,
            "orthoSize": 6,
            "isActive": true,
            "clearFlags": 3,
            "nearPlane": 0.1,
            "farPlane": 100
          }
        }
      ]
    },
    {
      "id": 2,
      "name": "Mirror",
      "parent": null,
      "children": [],
      "visible": true,
      "components": [
        {
          "type": "Transform",
          "data": {
            "rotation": {
              "x": -0.70710678,
              "y": 0,
              "z": 0,
              "w": 0.70710678
            },
            "scale": {
              "x": 7,
              "y": 7,
              "z": 1
            }
          }
        },
        {
          "type": "MeshRenderer",
          "data": {
            "mesh": "/scenes/shadow-quad.esmesh",
            "material": "/scenes/mat-planar/mirror.esmaterial",
            "opaque": true,
            "lit": true,
            "enabled": true
          }
        },
        {
          "type": "PlanarReflection",
          "data": {
            "axis": 2,
            "quality": 1,
            "resolutionScale": 1,
            "maxSize": 512,
            "enabled": true
          }
        }
      ]
    },
    {
      "id": 3,
      "name": "Red",
      "parent": null,
      "children": [],
      "visible": true,
      "components": [
        {
          "type": "Transform",
          "data": {
            "position": {
              "x": -1.3,
              "y": 1,
              "z": 0
            },
            "scale": {
              "x": 0.01,
              "y": 0.01,
              "z": 0.01
            }
          }
        },
        {
          "type": "MeshRenderer",
          "data": {
            "mesh": "builtin:cube",
            "opaque": true,
            "cullBackfaces": true,
            "lit": true,
            "layer": 1,
            "color": {
              "r": 1,
              "g": 1,
              "b": 1,
              "a": 1
            }
          }
        }
      ]
    },
    {
      "id": 4,
      "name": "Green",
      "parent": null,
      "children": [],
      "visible": true,
      "components": [
        {
          "type": "Transform",
          "data": {
            "position": {
              "x": 1.3,
              "y": 0.7,
              "z": -0.8
            },
            "scale": {
              "x": 0.007,
              "y": 0.007,
              "z": 0.007
            }
          }
        },
        {
          "type": "MeshRenderer",
          "data": {
            "mesh": "builtin:cube",
            "opaque": true,
            "cullBackfaces": true,
            "lit": false,
            "layer": 2,
            "color": {
              "r": 0,
              "g": 1,
              "b": 0,
              "a": 1
            }
          }
        }
      ]
    },
    {
      "id": 5,
      "name": "Below plane",
      "parent": null,
      "children": [],
      "visible": true,
      "components": [
        {
          "type": "Transform",
          "data": {
            "position": {
              "x": 0,
              "y": -1,
              "z": 0
            },
            "scale": {
              "x": 0.007,
              "y": 0.007,
              "z": 0.007
            }
          }
        },
        {
          "type": "MeshRenderer",
          "data": {
            "mesh": "builtin:cube",
            "opaque": true,
            "lit": false,
            "color": {
              "r": 0,
              "g": 0,
              "b": 1,
              "a": 1
            }
          }
        }
      ]
    },
    {
      "id": 6,
      "name": "Second camera",
      "parent": null,
      "children": [],
      "visible": true,
      "components": [
        {
          "type": "Transform",
          "data": {
            "position": {
              "x": 1.5,
              "y": 3,
              "z": 6
            },
            "rotation": {
              "x": -0.22975292,
              "y": 0,
              "z": 0,
              "w": 0.97324899
            }
          }
        },
        {
          "type": "Camera",
          "data": {
            "projectionType": 1,
            "orthoSize": 6,
            "isActive": false,
            "clearFlags": 3,
            "nearPlane": 0.1,
            "farPlane": 100,
            "priority": 1,
            "viewport": {
              "x": 0.5,
              "y": 0,
              "z": 0.5,
              "w": 1
            }
          }
        }
      ]
    },
    {
      "id": 100,
      "name": "Distant light 0",
      "parent": null,
      "children": [],
      "visible": true,
      "components": [
        {
          "type": "Transform",
          "data": {
            "position": {
              "x": 100,
              "y": 0,
              "z": 0
            }
          }
        },
        {
          "type": "Light",
          "data": {
            "type": 0,
            "intensity": 10,
            "radius": 0.1,
            "color": {
              "r": 1,
              "g": 1,
              "b": 1,
              "a": 1
            },
            "enabled": true
          }
        }
      ]
    },
    {
      "id": 101,
      "name": "Distant light 1",
      "parent": null,
      "children": [],
      "visible": true,
      "components": [
        {
          "type": "Transform",
          "data": {
            "position": {
              "x": 101,
              "y": 0,
              "z": 0
            }
          }
        },
        {
          "type": "Light",
          "data": {
            "type": 0,
            "intensity": 10,
            "radius": 0.1,
            "color": {
              "r": 1,
              "g": 1,
              "b": 1,
              "a": 1
            },
            "enabled": true
          }
        }
      ]
    },
    {
      "id": 102,
      "name": "Distant light 2",
      "parent": null,
      "children": [],
      "visible": true,
      "components": [
        {
          "type": "Transform",
          "data": {
            "position": {
              "x": 102,
              "y": 0,
              "z": 0
            }
          }
        },
        {
          "type": "Light",
          "data": {
            "type": 0,
            "intensity": 10,
            "radius": 0.1,
            "color": {
              "r": 1,
              "g": 1,
              "b": 1,
              "a": 1
            },
            "enabled": true
          }
        }
      ]
    },
    {
      "id": 103,
      "name": "Distant light 3",
      "parent": null,
      "children": [],
      "visible": true,
      "components": [
        {
          "type": "Transform",
          "data": {
            "position": {
              "x": 103,
              "y": 0,
              "z": 0
            }
          }
        },
        {
          "type": "Light",
          "data": {
            "type": 0,
            "intensity": 10,
            "radius": 0.1,
            "color": {
              "r": 1,
              "g": 1,
              "b": 1,
              "a": 1
            },
            "enabled": true
          }
        }
      ]
    },
    {
      "id": 104,
      "name": "Distant light 4",
      "parent": null,
      "children": [],
      "visible": true,
      "components": [
        {
          "type": "Transform",
          "data": {
            "position": {
              "x": 104,
              "y": 0,
              "z": 0
            }
          }
        },
        {
          "type": "Light",
          "data": {
            "type": 0,
            "intensity": 10,
            "radius": 0.1,
            "color": {
              "r": 1,
              "g": 1,
              "b": 1,
              "a": 1
            },
            "enabled": true
          }
        }
      ]
    },
    {
      "id": 105,
      "name": "Distant light 5",
      "parent": null,
      "children": [],
      "visible": true,
      "components": [
        {
          "type": "Transform",
          "data": {
            "position": {
              "x": 105,
              "y": 0,
              "z": 0
            }
          }
        },
        {
          "type": "Light",
          "data": {
            "type": 0,
            "intensity": 10,
            "radius": 0.1,
            "color": {
              "r": 1,
              "g": 1,
              "b": 1,
              "a": 1
            },
            "enabled": true
          }
        }
      ]
    },
    {
      "id": 106,
      "name": "Distant light 6",
      "parent": null,
      "children": [],
      "visible": true,
      "components": [
        {
          "type": "Transform",
          "data": {
            "position": {
              "x": 106,
              "y": 0,
              "z": 0
            }
          }
        },
        {
          "type": "Light",
          "data": {
            "type": 0,
            "intensity": 10,
            "radius": 0.1,
            "color": {
              "r": 1,
              "g": 1,
              "b": 1,
              "a": 1
            },
            "enabled": true
          }
        }
      ]
    },
    {
      "id": 107,
      "name": "Distant light 7",
      "parent": null,
      "children": [],
      "visible": true,
      "components": [
        {
          "type": "Transform",
          "data": {
            "position": {
              "x": 107,
              "y": 0,
              "z": 0
            }
          }
        },
        {
          "type": "Light",
          "data": {
            "type": 0,
            "intensity": 10,
            "radius": 0.1,
            "color": {
              "r": 1,
              "g": 1,
              "b": 1,
              "a": 1
            },
            "enabled": true
          }
        }
      ]
    },
    {
      "id": 108,
      "name": "Distant light 8",
      "parent": null,
      "children": [],
      "visible": true,
      "components": [
        {
          "type": "Transform",
          "data": {
            "position": {
              "x": 108,
              "y": 0,
              "z": 0
            }
          }
        },
        {
          "type": "Light",
          "data": {
            "type": 0,
            "intensity": 10,
            "radius": 0.1,
            "color": {
              "r": 1,
              "g": 1,
              "b": 1,
              "a": 1
            },
            "enabled": true
          }
        }
      ]
    },
    {
      "id": 109,
      "name": "Distant light 9",
      "parent": null,
      "children": [],
      "visible": true,
      "components": [
        {
          "type": "Transform",
          "data": {
            "position": {
              "x": 109,
              "y": 0,
              "z": 0
            }
          }
        },
        {
          "type": "Light",
          "data": {
            "type": 0,
            "intensity": 10,
            "radius": 0.1,
            "color": {
              "r": 1,
              "g": 1,
              "b": 1,
              "a": 1
            },
            "enabled": true
          }
        }
      ]
    },
    {
      "id": 110,
      "name": "Distant light 10",
      "parent": null,
      "children": [],
      "visible": true,
      "components": [
        {
          "type": "Transform",
          "data": {
            "position": {
              "x": 110,
              "y": 0,
              "z": 0
            }
          }
        },
        {
          "type": "Light",
          "data": {
            "type": 0,
            "intensity": 10,
            "radius": 0.1,
            "color": {
              "r": 1,
              "g": 1,
              "b": 1,
              "a": 1
            },
            "enabled": true
          }
        }
      ]
    },
    {
      "id": 111,
      "name": "Distant light 11",
      "parent": null,
      "children": [],
      "visible": true,
      "components": [
        {
          "type": "Transform",
          "data": {
            "position": {
              "x": 111,
              "y": 0,
              "z": 0
            }
          }
        },
        {
          "type": "Light",
          "data": {
            "type": 0,
            "intensity": 10,
            "radius": 0.1,
            "color": {
              "r": 1,
              "g": 1,
              "b": 1,
              "a": 1
            },
            "enabled": true
          }
        }
      ]
    },
    {
      "id": 112,
      "name": "Distant light 12",
      "parent": null,
      "children": [],
      "visible": true,
      "components": [
        {
          "type": "Transform",
          "data": {
            "position": {
              "x": 112,
              "y": 0,
              "z": 0
            }
          }
        },
        {
          "type": "Light",
          "data": {
            "type": 0,
            "intensity": 10,
            "radius": 0.1,
            "color": {
              "r": 1,
              "g": 1,
              "b": 1,
              "a": 1
            },
            "enabled": true
          }
        }
      ]
    },
    {
      "id": 113,
      "name": "Distant light 13",
      "parent": null,
      "children": [],
      "visible": true,
      "components": [
        {
          "type": "Transform",
          "data": {
            "position": {
              "x": 113,
              "y": 0,
              "z": 0
            }
          }
        },
        {
          "type": "Light",
          "data": {
            "type": 0,
            "intensity": 10,
            "radius": 0.1,
            "color": {
              "r": 1,
              "g": 1,
              "b": 1,
              "a": 1
            },
            "enabled": true
          }
        }
      ]
    },
    {
      "id": 114,
      "name": "Distant light 14",
      "parent": null,
      "children": [],
      "visible": true,
      "components": [
        {
          "type": "Transform",
          "data": {
            "position": {
              "x": 114,
              "y": 0,
              "z": 0
            }
          }
        },
        {
          "type": "Light",
          "data": {
            "type": 0,
            "intensity": 10,
            "radius": 0.1,
            "color": {
              "r": 1,
              "g": 1,
              "b": 1,
              "a": 1
            },
            "enabled": true
          }
        }
      ]
    },
    {
      "id": 115,
      "name": "Distant light 15",
      "parent": null,
      "children": [],
      "visible": true,
      "components": [
        {
          "type": "Transform",
          "data": {
            "position": {
              "x": 115,
              "y": 0,
              "z": 0
            }
          }
        },
        {
          "type": "Light",
          "data": {
            "type": 0,
            "intensity": 10,
            "radius": 0.1,
            "color": {
              "r": 1,
              "g": 1,
              "b": 1,
              "a": 1
            },
            "enabled": true
          }
        }
      ]
    },
    {
      "id": 116,
      "name": "Local red light",
      "parent": null,
      "children": [],
      "visible": true,
      "components": [
        {
          "type": "Transform",
          "data": {
            "position": {
              "x": -1.3,
              "y": 1,
              "z": 1
            }
          }
        },
        {
          "type": "Light",
          "data": {
            "type": 0,
            "intensity": 8,
            "radius": 1,
            "color": {
              "r": 1,
              "g": 0,
              "b": 0,
              "a": 1
            },
            "enabled": true
          }
        }
      ]
    }
  ]
}