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.
TypeScript 2d-game-engine3d3d-game-engineandroidcppecsgame-editorgame-enginegamedeviostypescriptwebassemblywebglwebgpuwechat-minigame
{
"version": 4,
"name": "SDF Text in UIRect",
"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
],
"components": [
{
"type": "Transform",
"data": {}
},
{
"type": "Canvas",
"data": {
"designResolution": {
"x": 800,
"y": 600
},
"scaleMode": 2
}
},
{
"type": "UINode",
"data": {}
}
],
"visible": true
},
{
"id": 2,
"name": "Label",
"parent": 1,
"children": [],
"components": [
{
"type": "Transform",
"data": {}
},
{
"type": "UINode",
"data": {
"position": 1,
"width": {
"value": 440.0,
"unit": 0
},
"insetLeft": {
"value": 50.0,
"unit": 1
},
"marginLeft": {
"value": -220.0,
"unit": 0
},
"height": {
"value": 200.0,
"unit": 0
},
"insetTop": {
"value": 50.0,
"unit": 1
},
"marginTop": {
"value": -100.0,
"unit": 0
}
}
},
{
"type": "Text",
"data": {
"content": "Centered in its UIRect 矩形内居中并自动换行测试",
"fontFamily": "sans-serif",
"fontSize": 40,
"color": {
"r": 1,
"g": 1,
"b": 1,
"a": 1
},
"align": 1,
"verticalAlign": 1,
"wordWrap": true
}
}
],
"visible": true
}
]
}