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.

feat: Add SceneToolbar with view/grid/gizmo controls

esengine1b6f1b632395
diff --git a/assets/.esengine/assets.db b/assets/.esengine/assets.db
index 1e2b612fb..0898a1402 100644
--- a/assets/.esengine/assets.db
+++ b/assets/.esengine/assets.db
@@ -2,233 +2,233 @@
"version": "1.0",
"assets": [
{
- "guid": "d6dbbbb3-87ce-a096-8027-f7b9d7129e6f",
- "path": "assets\\scripts\\EnemyAI.js",
- "name": "EnemyAI.js",
- "type": 4,
+ "guid": "ca417dff-fe94-4361-ec9b-16504f048514",
+ "path": "F:\\microes\\assets\\prefabs\\Bullet.prefab",
+ "name": "Bullet.prefab",
+ "type": 7,
"fileSize": 0,
- "lastModified": 1769503001,
+ "lastModified": 1769503002,
"isDirectory": false
},
{
- "guid": "8283ad01-d8a2-48ae-c4e7-c1f8f0de7955",
- "path": "F:\\microes\\assets\\scripts\\UIManager.js",
- "name": "UIManager.js",
- "type": 4,
+ "guid": "7d86b8df-60d3-330a-ae99-ae597a929a9b",
+ "path": "assets\\textures\\player.png",
+ "name": "player.png",
+ "type": 2,
"fileSize": 0,
- "lastModified": 1769503001,
+ "lastModified": 1769503002,
"isDirectory": false
},
{
- "guid": "04f5ced8-9d11-fa20-d612-06f12e563341",
- "path": "assets\\prefabs\\Coin.prefab",
- "name": "Coin.prefab",
- "type": 7,
+ "guid": "e11483d8-2203-6eff-1b7e-0932b819f1c9",
+ "path": "assets\\audio\\sfx_attack.wav",
+ "name": "sfx_attack.wav",
+ "type": 3,
"fileSize": 0,
"lastModified": 1769503001,
"isDirectory": false
},
{
- "guid": "a6dd418b-dd75-0249-f26e-bb1b4cc294c8",
- "path": "F:\\microes\\assets\\shaders\\postprocess.glsl",
- "name": "postprocess.glsl",
- "type": 5,
+ "guid": "0e48ebc1-25c8-2588-29aa-fb40564e2355",
+ "path": "assets\\scenes\\MainMenu.scene",
+ "name": "MainMenu.scene",
+ "type": 6,
"fileSize": 0,
"lastModified": 1769503002,
"isDirectory": false
},
{
- "guid": "835ed25e-a75f-3a42-0953-d9af26b1cc87",
- "path": "F:\\microes\\assets\\test.txt",
- "name": "test.txt",
- "type": 0,
- "fileSize": 5,
- "lastModified": 1769488063,
+ "guid": "a424334b-4399-6ab1-440c-7da10d865e15",
+ "path": "assets\\scripts\\UIManager.js",
+ "name": "UIManager.js",
+ "type": 4,
+ "fileSize": 0,
+ "lastModified": 1769503001,
"isDirectory": false
},
{
- "guid": "83dd6048-d8fa-b62a-47d1-6f17771c459f",
- "path": "F:\\microes\\assets\\scripts",
- "name": "scripts",
+ "guid": "32dd883f-81c7-59a9-8229-5920e8152da1",
+ "path": "assets\\prefabs",
+ "name": "prefabs",
"type": 1,
"fileSize": 0,
- "lastModified": 1769503002,
+ "lastModified": 1769503001,
"isDirectory": true
},
{
- "guid": "c6113f63-03d0-811d-550a-8f26f331233d",
- "path": "assets\\textures\\tileset.png",
- "name": "tileset.png",
- "type": 2,
+ "guid": "78390dfc-f548-9908-8279-6b3064ea26b3",
+ "path": "F:\\microes\\assets\\textures",
+ "name": "textures",
+ "type": 1,
"fileSize": 0,
"lastModified": 1769503002,
- "isDirectory": false
+ "isDirectory": true
},
{
- "guid": "6e88b347-db2d-b526-87c6-301569094b15",
- "path": "F:\\microes\\assets\\audio\\sfx_explosion.wav",
- "name": "sfx_explosion.wav",
- "type": 3,
+ "guid": "e704f3d4-170b-fecb-d4f9-4534e5056d78",
+ "path": "assets\\shaders\\particle.glsl",
+ "name": "particle.glsl",
+ "type": 5,
"fileSize": 0,
"lastModified": 1769503001,
"isDirectory": false
},
{
- "guid": "90db01ce-eadb-5131-35ee-a55e9f60bb4d",
- "path": "assets\\shaders\\water.glsl",
- "name": "water.glsl",
+ "guid": "4b48ff38-aeb0-7a1b-38ec-03ad938736e9",
+ "path": "F:\\microes\\assets\\shaders\\sprite.glsl",
+ "name": "sprite.glsl",
"type": 5,
"fileSize": 0,
- "lastModified": 1769503001,
+ "lastModified": 1769503002,
"isDirectory": false
},
{
- "guid": "b55ead52-b974-950b-26a3-a227e2ac41e9",
- "path": "assets\\audio\\sfx_coin.wav",
- "name": "sfx_coin.wav",
- "type": 3,
- "fileSize": 0,
- "lastModified": 1769503002,
+ "guid": "ce792685-9959-2c9f-d909-597cab98305a",
+ "path": "F:\\microes\\assets\\fonts\\lucide_new.ttf",
+ "name": "lucide_new.ttf",
+ "type": 8,
+ "fileSize": 793848,
+ "lastModified": 1769653162,
"isDirectory": false
},
{
- "guid": "f928d327-1c23-3d66-2009-d4d3daea8e31",
- "path": "F:\\microes\\assets\\textures\\skybox.png",
- "name": "skybox.png",
- "type": 2,
+ "guid": "86ed9e0d-442c-a047-9b51-09011c881685",
+ "path": "assets\\audio",
+ "name": "audio",
+ "type": 1,
"fileSize": 0,
"lastModified": 1769503001,
- "isDirectory": false
+ "isDirectory": true
},
{
- "guid": "30c0a678-ec31-5c3c-f60c-2b982d208861",
- "path": "F:\\microes\\assets\\textures\\background.png",
- "name": "background.png",
- "type": 2,
+ "guid": "0dd456da-eb9c-cdac-c429-b918b2f78b00",
+ "path": "F:\\microes\\assets\\shaders\\particle.glsl",
+ "name": "particle.glsl",
+ "type": 5,
"fileSize": 0,
"lastModified": 1769503002,
"isDirectory": false
},
{
- "guid": "fb6e1999-a210-5293-9dc9-f648e6e8fc1f",
- "path": "assets\\shaders\\sprite.glsl",
- "name": "sprite.glsl",
- "type": 5,
+ "guid": "f29a2ee0-016a-f018-436a-9c11731f251a",
+ "path": "F:\\microes\\assets\\scripts\\Inventory.js",
+ "name": "Inventory.js",
+ "type": 4,
"fileSize": 0,
"lastModified": 1769503002,
"isDirectory": false
},
{
- "guid": "539c3218-76fb-bed8-1442-3c43ae5be464",
- "path": "F:\\microes\\assets\\textures\\tileset.png",
- "name": "tileset.png",
- "type": 2,
+ "guid": "49fa3441-7d74-bf79-c116-717b849b78ce",
+ "path": "F:\\microes\\assets\\prefabs\\Player.prefab",
+ "name": "Player.prefab",
+ "type": 7,
"fileSize": 0,
- "lastModified": 1769503001,
- "isDirectory": false
- },
- {
- "guid": "9db35f84-665c-e687-86b1-cc78a3934216",
- "path": "assets\\test.txt",
- "name": "test.txt",
- "type": 0,
- "fileSize": 5,
- "lastModified": 1769488062,
+ "lastModified": 1769503002,
"isDirectory": false
},
{
- "guid": "7fe2a865-bb30-1847-62e3-d289b5616a3a",
- "path": "F:\\microes\\assets\\scenes\\BossRoom.scene",
- "name": "BossRoom.scene",
- "type": 6,
+ "guid": "d3d9a556-8861-fbc2-504a-151ef73f41de",
+ "path": "F:\\microes\\assets\\textures\\player.png",
+ "name": "player.png",
+ "type": 2,
"fileSize": 0,
- "lastModified": 1769503001,
+ "lastModified": 1769503002,
"isDirectory": false
},
{
- "guid": "abf642da-9512-d0bd-e306-e1bce616320c",
- "path": "F:\\microes\\assets\\scenes\\Level2.scene",
- "name": "Level2.scene",
- "type": 6,
+ "guid": "602e5d05-e6b5-3cbe-a3a4-857b4290f255",
+ "path": "assets\\scripts\\CameraFollow.js",
+ "name": "CameraFollow.js",
+ "type": 4,
"fileSize": 0,
"lastModified": 1769503002,
"isDirectory": false
},
{
- "guid": "bbbdbf23-cecf-5053-0ebe-f3daf5b9e103",
- "path": "assets\\prefabs\\Explosion.prefab",
- "name": "Explosion.prefab",
- "type": 7,
+ "guid": "ca89cb26-11ee-a95a-940a-4d952d33b936",
+ "path": "F:\\microes\\assets\\scenes\\MainMenu.scene",
+ "name": "MainMenu.scene",
+ "type": 6,
"fileSize": 0,
"lastModified": 1769503002,
"isDirectory": false
},
{
- "guid": "ab8960b7-4b05-8029-7577-571c44b9c394",
- "path": "F:\\microes\\assets\\fonts",
+ "guid": "83d5664f-9f0b-4687-73b2-b854c5e6d5cf",
+ "path": "assets\\fonts",
"name": "fonts",
"type": 1,
"fileSize": 0,
- "lastModified": 1769653161,
+ "lastModified": 1769501795,
"isDirectory": true
},
{
- "guid": "0f5a7d56-b021-7cfe-9ffd-b6deba57b565",
- "path": "assets\\textures\\ui_panel.png",
- "name": "ui_panel.png",
+ "guid": "d0e72f1c-981f-5995-dade-848b8b18813e",
+ "path": "assets\\textures\\background.png",
+ "name": "background.png",
"type": 2,
"fileSize": 0,
- "lastModified": 1769503001,
+ "lastModified": 1769503002,
"isDirectory": false
},
{
- "guid": "0926ee8f-8eef-58fa-8d75-0ac49a8bf2b1",
- "path": "F:\\microes\\assets\\scenes",
- "name": "scenes",
- "type": 1,
- "fileSize": 0,
- "lastModified": 1769503001,
- "isDirectory": true
- },
- {
- "guid": "ff5ba3b5-d524-f202-72ae-a40add555353",
- "path": "assets\\scenes\\Level2.scene",
- "name": "Level2.scene",
- "type": 6,
+ "guid": "182aa6a4-c774-8473-5238-49e1d28f1c5d",
+ "path": "assets\\prefabs\\Enemy.prefab",
+ "name": "Enemy.prefab",
+ "type": 7,
"fileSize": 0,
"lastModified": 1769503002,
"isDirectory": false
},
{
- "guid": "e0220f45-6261-175f-883b-ba80783788f2",
- "path": "assets\\textures",
- "name": "textures",
- "type": 1,
+ "guid": "458ea613-0ce1-0325-3f9c-9f6937eafacf",
+ "path": "assets\\prefabs\\Player.prefab",
+ "name": "Player.prefab",
+ "type": 7,
"fileSize": 0,
"lastModified": 1769503001,
- "isDirectory": true
+ "isDirectory": false
},
{
- "guid": "090ed68c-0dbe-382c-e163-5ad3bc22abad",
- "path": "F:\\microes\\assets\\scenes\\Level1.scene",
- "name": "Level1.scene",
- "type": 6,
+ "guid": "a9993ed8-9802-fb1c-f5e4-15864011fa2c",
+ "path": "F:\\microes\\assets\\textures\\test.png",
+ "name": "test.png",
+ "type": 2,
+ "fileSize": 6,
+ "lastModified": 1769488063,
+ "isDirectory": false
+ },
+ {
+ "guid": "6837963f-192a-0bcb-80e2-1cb45a8e35e7",
+ "path": "assets\\scripts\\PlayerController.js",
+ "name": "PlayerController.js",
+ "type": 4,
"fileSize": 0,
"lastModified": 1769503002,
"isDirectory": false
},
{
- "guid": "44626f54-604d-ae12-0f2e-2087f068acbf",
- "path": "F:\\microes\\assets\\prefabs\\Enemy.prefab",
- "name": "Enemy.prefab",
- "type": 7,
+ "guid": "3750f28c-b12f-4245-2036-9c552be15aea",
+ "path": "F:\\microes\\assets\\fonts\\lucide.ttf",
+ "name": "lucide.ttf",
+ "type": 8,
+ "fileSize": 793848,
+ "lastModified": 1769501796,
+ "isDirectory": false
+ },
+ {
+ "guid": "02f1f294-5a7f-d28b-7095-a04518207f9c",
+ "path": "F:\\microes\\assets\\scripts\\GameManager.js",
+ "name": "GameManager.js",
+ "type": 4,
"fileSize": 0,
"lastModified": 1769503001,
"isDirectory": false
},
{
- "guid": "986b148c-b4ea-cf89-2e04-37dc26624976",
- "path": "F:\\microes\\assets\\textures\\particle.png",
+ "guid": "3cc64ba4-5416-2768-7eff-dbba531179c4",
+ "path": "assets\\textures\\particle.png",
"name": "particle.png",
"type": 2,
"fileSize": 0,
@@ -236,598 +236,598 @@
"isDirectory": false
},
{
- "guid": "234c30b6-359c-51c1-a526-a970984ad90a",
- "path": "F:\\microes\\assets\\textures\\enemy.png",
- "name": "enemy.png",
- "type": 2,
+ "guid": "6f4b1d08-8b77-b7eb-629d-c2ea4efba441",
+ "path": "F:\\microes\\assets\\prefabs\\Coin.prefab",
+ "name": "Coin.prefab",
+ "type": 7,
"fileSize": 0,
"lastModified": 1769503001,
"isDirectory": false
},
{
- "guid": "38633421-fb34-4766-58e7-b4ba7c8b5ee3",
- "path": "assets\\audio\\sfx_explosion.wav",
- "name": "sfx_explosion.wav",
- "type": 3,
+ "guid": "9d4aa6d5-4f32-3634-e6fa-2c79467a2a9c",
+ "path": "F:\\microes\\assets\\shaders",
+ "name": "shaders",
+ "type": 1,
"fileSize": 0,
"lastModified": 1769503002,
- "isDirectory": false
+ "isDirectory": true
},
{
- "guid": "02f457d5-e200-7f62-6850-7612ed829a63",
- "path": "assets\\scenes\\BossRoom.scene",
- "name": "BossRoom.scene",
- "type": 6,
+ "guid": "88f4512c-08fc-7521-0720-aa75e35defbc",
+ "path": "assets\\audio\\bgm_main.mp3",
+ "name": "bgm_main.mp3",
+ "type": 3,
"fileSize": 0,
- "lastModified": 1769503002,
+ "lastModified": 1769503001,
"isDirectory": false
},
{
- "guid": "b162bd84-eee3-1b79-807c-c64d2c64cb2b",
- "path": "F:\\microes\\assets\\scripts\\PlayerController.js",
- "name": "PlayerController.js",
- "type": 4,
- "fileSize": 0,
- "lastModified": 1769503002,
+ "guid": "a638dc81-b60d-567f-6820-13f4e9998407",
+ "path": "assets\\.esengine\\assets.db",
+ "name": "assets.db",
+ "type": 0,
+ "fileSize": 2186,
+ "lastModified": 1769502460,
"isDirectory": false
},
{
- "guid": "c6908b3b-7d16-8e81-5c2d-c65c46fee0d4",
- "path": "assets\\audio\\bgm_battle.mp3",
- "name": "bgm_battle.mp3",
+ "guid": "e19fb621-dd86-3c0c-6b10-142a848c6a14",
+ "path": "assets\\audio\\sfx_jump.wav",
+ "name": "sfx_jump.wav",
"type": 3,
"fileSize": 0,
"lastModified": 1769503002,
"isDirectory": false
},
{
- "guid": "d11c2d62-5870-5040-3e1a-bf5bc046b98a",
- "path": "F:\\microes\\assets\\textures\\ui_button.png",
- "name": "ui_button.png",
- "type": 2,
+ "guid": "cf70754c-26ba-346d-c01d-ff9fc29a6e9e",
+ "path": "assets\\.esengine",
+ "name": ".esengine",
+ "type": 1,
+ "fileSize": 0,
+ "lastModified": 1769495857,
+ "isDirectory": true
+ },
+ {
+ "guid": "2402078f-7772-c860-8bce-dfdb1fc37788",
+ "path": "F:\\microes\\assets\\audio\\bgm_main.mp3",
+ "name": "bgm_main.mp3",
+ "type": 3,
"fileSize": 0,
"lastModified": 1769503002,
"isDirectory": false
},
{
- "guid": "d44064b6-5cd8-29c4-8dc3-e6f0b71c6ad1",
- "path": "F:\\microes\\assets\\textures\\ui_panel.png",
- "name": "ui_panel.png",
- "type": 2,
+ "guid": "44626f54-604d-ae12-0f2e-2087f068acbf",
+ "path": "F:\\microes\\assets\\prefabs\\Enemy.prefab",
+ "name": "Enemy.prefab",
+ "type": 7,
"fileSize": 0,
"lastModified": 1769503001,
"isDirectory": false
},
{
- "guid": "bca66dcd-f892-9c43-f176-62ac939c4de4",
- "path": "F:\\microes\\assets\\audio\\sfx_attack.wav",
- "name": "sfx_attack.wav",
- "type": 3,
+ "guid": "986b148c-b4ea-cf89-2e04-37dc26624976",
+ "path": "F:\\microes\\assets\\textures\\particle.png",
+ "name": "particle.png",
+ "type": 2,
"fileSize": 0,
"lastModified": 1769503002,
"isDirectory": false
},
{
- "guid": "57c85655-8b7d-e5b6-d5a6-80eb2b0b49d3",
- "path": "assets\\scripts\\Inventory.js",
- "name": "Inventory.js",
- "type": 4,
+ "guid": "234c30b6-359c-51c1-a526-a970984ad90a",
+ "path": "F:\\microes\\assets\\textures\\enemy.png",
+ "name": "enemy.png",
+ "type": 2,
"fileSize": 0,
"lastModified": 1769503002,
"isDirectory": false
},
{
- "guid": "f543cca8-b481-a8be-8507-770c03c75eab",
- "path": "assets\\scenes",
- "name": "scenes",
+ "guid": "e0220f45-6261-175f-883b-ba80783788f2",
+ "path": "assets\\textures",
+ "name": "textures",
"type": 1,
"fileSize": 0,
- "lastModified": 1769503002,
+ "lastModified": 1769503001,
"isDirectory": true
},
{
- "guid": "c71b2168-6faf-8d98-2ce8-4175ecfc98f2",
- "path": "assets\\prefabs\\Bullet.prefab",
- "name": "Bullet.prefab",
- "type": 7,
+ "guid": "090ed68c-0dbe-382c-e163-5ad3bc22abad",
+ "path": "F:\\microes\\assets\\scenes\\Level1.scene",
+ "name": "Level1.scene",
+ "type": 6,
"fileSize": 0,
"lastModified": 1769503002,
"isDirectory": false
},
{
- "guid": "6a7bd38a-6b72-be37-a497-9628dafb35e1",
- "path": "F:\\microes\\assets\\.esengine\\assets.db",
- "name": "assets.db",
- "type": 0,
- "fileSize": 23550,
- "lastModified": 1769685192,
+ "guid": "22bdfe10-0ff6-620f-56ec-26a8142aec33",
+ "path": "assets\\textures\\skybox.png",
+ "name": "skybox.png",
+ "type": 2,
+ "fileSize": 0,
+ "lastModified": 1769503001,
"isDirectory": false
},
{
- "guid": "08719359-3487-beb2-0d62-f54a2a8634c4",
- "path": "assets\\shaders",
- "name": "shaders",
- "type": 1,
+ "guid": "ff5ba3b5-d524-f202-72ae-a40add555353",
+ "path": "assets\\scenes\\Level2.scene",
+ "name": "Level2.scene",
+ "type": 6,
"fileSize": 0,
"lastModified": 1769503002,
- "isDirectory": true
+ "isDirectory": false
},
{
- "guid": "6650f3d3-a906-b4a9-1873-b75759499bf8",
- "path": "F:\\microes\\assets\\audio\\sfx_jump.wav",
- "name": "sfx_jump.wav",
- "type": 3,
+ "guid": "0926ee8f-8eef-58fa-8d75-0ac49a8bf2b1",
+ "path": "F:\\microes\\assets\\scenes",
+ "name": "scenes",
+ "type": 1,
"fileSize": 0,
"lastModified": 1769503001,
- "isDirectory": false
- },
- {
- "guid": "a19bf5bf-7a78-8cbd-00c8-8f38cf141628",
- "path": "F:\\microes\\assets\\fonts\\msyh.ttc",
- "name": "msyh.ttc",
- "type": 0,
- "fileSize": 19704352,
- "lastModified": 1769511857,
- "isDirectory": false
+ "isDirectory": true
},
{
- "guid": "c771ea16-ad7f-3333-df52-9426cff8a384",
- "path": "assets\\textures\\ui_button.png",
- "name": "ui_button.png",
- "type": 2,
+ "guid": "bbbdbf23-cecf-5053-0ebe-f3daf5b9e103",
+ "path": "assets\\prefabs\\Explosion.prefab",
+ "name": "Explosion.prefab",
+ "type": 7,
"fileSize": 0,
"lastModified": 1769503002,
"isDirectory": false
},
{
- "guid": "06d02285-6f13-7665-e142-87cc08b9f6b8",
- "path": "assets\\fonts\\lucide.ttf",
- "name": "lucide.ttf",
- "type": 8,
- "fileSize": 793848,
- "lastModified": 1769501796,
+ "guid": "0f5a7d56-b021-7cfe-9ffd-b6deba57b565",
+ "path": "assets\\textures\\ui_panel.png",
+ "name": "ui_panel.png",
+ "type": 2,
+ "fileSize": 0,
+ "lastModified": 1769503001,
"isDirectory": false
},
{
- "guid": "ce69c963-c0ea-0fb2-c96c-bf1afc0e0802",
- "path": "assets\\shaders\\postprocess.glsl",
- "name": "postprocess.glsl",
- "type": 5,
+ "guid": "ab8960b7-4b05-8029-7577-571c44b9c394",
+ "path": "F:\\microes\\assets\\fonts",
+ "name": "fonts",
+ "type": 1,
"fileSize": 0,
- "lastModified": 1769503002,
- "isDirectory": false
+ "lastModified": 1769653161,
+ "isDirectory": true
},
{
- "guid": "99c227eb-f8d3-d0e8-843b-ceb126687e8b",
- "path": "F:\\microes\\assets\\audio",
- "name": "audio",
- "type": 1,
+ "guid": "abf642da-9512-d0bd-e306-e1bce616320c",
+ "path": "F:\\microes\\assets\\scenes\\Level2.scene",
+ "name": "Level2.scene",
+ "type": 6,
"fileSize": 0,
"lastModified": 1769503002,
- "isDirectory": true
+ "isDirectory": false
},
{
- "guid": "1c90475d-0d57-c627-f004-15d52bee4319",
- "path": "F:\\microes\\assets\\shaders\\water.glsl",
- "name": "water.glsl",
- "type": 5,
+ "guid": "7fe2a865-bb30-1847-62e3-d289b5616a3a",
+ "path": "F:\\microes\\assets\\scenes\\BossRoom.scene",
+ "name": "BossRoom.scene",
+ "type": 6,
"fileSize": 0,
"lastModified": 1769503002,
"isDirectory": false
},
{
- "guid": "9d69bbdf-276b-8f14-cc66-10e8dfcdb283",
- "path": "F:\\microes\\assets\\scripts\\CameraFollow.js",
- "name": "CameraFollow.js",
+ "guid": "d6dbbbb3-87ce-a096-8027-f7b9d7129e6f",
+ "path": "assets\\scripts\\EnemyAI.js",
+ "name": "EnemyAI.js",
"type": 4,
"fileSize": 0,
"lastModified": 1769503001,
"isDirectory": false
},
{
- "guid": "f23cff38-7fcd-d864-b487-6ca733c33582",
- "path": "F:\\microes\\assets\\scripts\\EnemyAI.js",
- "name": "EnemyAI.js",
+ "guid": "8283ad01-d8a2-48ae-c4e7-c1f8f0de7955",
+ "path": "F:\\microes\\assets\\scripts\\UIManager.js",
+ "name": "UIManager.js",
"type": 4,
"fileSize": 0,
"lastModified": 1769503002,
"isDirectory": false
},
{
- "guid": "cc395f8f-d6f9-a23d-db3b-7253b437aa8a",
- "path": "F:\\microes\\assets\\.esengine",
- "name": ".esengine",
- "type": 1,
+ "guid": "04f5ced8-9d11-fa20-d612-06f12e563341",
+ "path": "assets\\prefabs\\Coin.prefab",
+ "name": "Coin.prefab",
+ "type": 7,
"fileSize": 0,
- "lastModified": 1769670136,
- "isDirectory": true
+ "lastModified": 1769503001,
+ "isDirectory": false
},
{
- "guid": "b9c53311-d99a-e00b-9ba2-358e123efa4e",
- "path": "assets\\scripts\\GameManager.js",
- "name": "GameManager.js",
- "type": 4,
+ "guid": "a6dd418b-dd75-0249-f26e-bb1b4cc294c8",
+ "path": "F:\\microes\\assets\\shaders\\postprocess.glsl",
+ "name": "postprocess.glsl",
+ "type": 5,
"fileSize": 0,
- "lastModified": 1769503002,
+ "lastModified": 1769503001,
"isDirectory": false
},
{
- "guid": "44aa95ad-d460-37e0-041f-c6a4449f8b17",
- "path": "assets\\textures\\test.png",
- "name": "test.png",
- "type": 2,
- "fileSize": 6,
+ "guid": "835ed25e-a75f-3a42-0953-d9af26b1cc87",
+ "path": "F:\\microes\\assets\\test.txt",
+ "name": "test.txt",
+ "type": 0,
+ "fileSize": 5,
"lastModified": 1769488063,
"isDirectory": false
},
{
- "guid": "4f4e6a0b-08fb-1c62-5a27-830f643cacff",
- "path": "F:\\microes\\assets\\prefabs",
- "name": "prefabs",
+ "guid": "83dd6048-d8fa-b62a-47d1-6f17771c459f",
+ "path": "F:\\microes\\assets\\scripts",
+ "name": "scripts",
"type": 1,
"fileSize": 0,
"lastModified": 1769503002,
"isDirectory": true
},
{
- "guid": "e1d87090-38ce-2d60-5bdd-1f928fdaf88a",
- "path": "assets\\scenes\\Level1.scene",
- "name": "Level1.scene",
- "type": 6,
+ "guid": "9db35f84-665c-e687-86b1-cc78a3934216",
+ "path": "assets\\test.txt",
+ "name": "test.txt",
+ "type": 0,
+ "fileSize": 5,
+ "lastModified": 1769488062,
+ "isDirectory": false
+ },
+ {
+ "guid": "30c0a678-ec31-5c3c-f60c-2b982d208861",
+ "path": "F:\\microes\\assets\\textures\\background.png",
+ "name": "background.png",
+ "type": 2,
"fileSize": 0,
"lastModified": 1769503002,
"isDirectory": false
},
{
- "guid": "53cf7de5-ae26-2632-e022-e9108f6bbc2c",
- "path": "F:\\microes\\assets\\audio\\sfx_coin.wav",
- "name": "sfx_coin.wav",
- "type": 3,
+ "guid": "f928d327-1c23-3d66-2009-d4d3daea8e31",
+ "path": "F:\\microes\\assets\\textures\\skybox.png",
+ "name": "skybox.png",
+ "type": 2,
"fileSize": 0,
"lastModified": 1769503002,
"isDirectory": false
},
{
- "guid": "0b354ef8-0528-35e8-b628-bed14b4960db",
- "path": "F:\\microes\\assets\\audio\\bgm_battle.mp3",
- "name": "bgm_battle.mp3",
- "type": 3,
- "fileSize": 0,
- "lastModified": 1769503001,
- "isDirectory": false
- },
- {
- "guid": "22bdfe10-0ff6-620f-56ec-26a8142aec33",
- "path": "assets\\textures\\skybox.png",
- "name": "skybox.png",
- "type": 2,
+ "guid": "90db01ce-eadb-5131-35ee-a55e9f60bb4d",
+ "path": "assets\\shaders\\water.glsl",
+ "name": "water.glsl",
+ "type": 5,
"fileSize": 0,
"lastModified": 1769503001,
"isDirectory": false
},
{
- "guid": "ed1cf9a5-9d96-50d7-e385-82c605f70a63",
- "path": "F:\\microes\\assets\\prefabs\\Explosion.prefab",
- "name": "Explosion.prefab",
- "type": 7,
+ "guid": "6e88b347-db2d-b526-87c6-301569094b15",
+ "path": "F:\\microes\\assets\\audio\\sfx_explosion.wav",
+ "name": "sfx_explosion.wav",
+ "type": 3,
"fileSize": 0,
"lastModified": 1769503002,
"isDirectory": false
},
{
- "guid": "08964537-6809-2c47-8997-7bbf1c75029f",
- "path": "assets\\scripts",
- "name": "scripts",
- "type": 1,
+ "guid": "b55ead52-b974-950b-26a3-a227e2ac41e9",
+ "path": "assets\\audio\\sfx_coin.wav",
+ "name": "sfx_coin.wav",
+ "type": 3,
"fileSize": 0,
"lastModified": 1769503002,
- "isDirectory": true
+ "isDirectory": false
},
{
- "guid": "8af759e0-a053-8e8c-1e34-48843f734d2f",
- "path": "assets\\textures\\enemy.png",
- "name": "enemy.png",
+ "guid": "c6113f63-03d0-811d-550a-8f26f331233d",
+ "path": "assets\\textures\\tileset.png",
+ "name": "tileset.png",
"type": 2,
"fileSize": 0,
"lastModified": 1769503002,
"isDirectory": false
},
{
- "guid": "2402078f-7772-c860-8bce-dfdb1fc37788",
- "path": "F:\\microes\\assets\\audio\\bgm_main.mp3",
- "name": "bgm_main.mp3",
+ "guid": "bca66dcd-f892-9c43-f176-62ac939c4de4",
+ "path": "F:\\microes\\assets\\audio\\sfx_attack.wav",
+ "name": "sfx_attack.wav",
"type": 3,
"fileSize": 0,
"lastModified": 1769503002,
"isDirectory": false
},
{
- "guid": "cf70754c-26ba-346d-c01d-ff9fc29a6e9e",
- "path": "assets\\.esengine",
- "name": ".esengine",
- "type": 1,
+ "guid": "57c85655-8b7d-e5b6-d5a6-80eb2b0b49d3",
+ "path": "assets\\scripts\\Inventory.js",
+ "name": "Inventory.js",
+ "type": 4,
"fileSize": 0,
- "lastModified": 1769495857,
- "isDirectory": true
+ "lastModified": 1769503002,
+ "isDirectory": false
},
{
- "guid": "e19fb621-dd86-3c0c-6b10-142a848c6a14",
- "path": "assets\\audio\\sfx_jump.wav",
- "name": "sfx_jump.wav",
- "type": 3,
+ "guid": "539c3218-76fb-bed8-1442-3c43ae5be464",
+ "path": "F:\\microes\\assets\\textures\\tileset.png",
+ "name": "tileset.png",
+ "type": 2,
"fileSize": 0,
"lastModified": 1769503002,
"isDirectory": false
},
{
- "guid": "a638dc81-b60d-567f-6820-13f4e9998407",
- "path": "assets\\.esengine\\assets.db",
- "name": "assets.db",
- "type": 0,
- "fileSize": 2186,
- "lastModified": 1769502460,
+ "guid": "fb6e1999-a210-5293-9dc9-f648e6e8fc1f",
+ "path": "assets\\shaders\\sprite.glsl",
+ "name": "sprite.glsl",
+ "type": 5,
+ "fileSize": 0,
+ "lastModified": 1769503002,
"isDirectory": false
},
{
- "guid": "88f4512c-08fc-7521-0720-aa75e35defbc",
- "path": "assets\\audio\\bgm_main.mp3",
- "name": "bgm_main.mp3",
+ "guid": "38633421-fb34-4766-58e7-b4ba7c8b5ee3",
+ "path": "assets\\audio\\sfx_explosion.wav",
+ "name": "sfx_explosion.wav",
"type": 3,
"fileSize": 0,
- "lastModified": 1769503001,
+ "lastModified": 1769503002,
"isDirectory": false
},
{
- "guid": "9d4aa6d5-4f32-3634-e6fa-2c79467a2a9c",
- "path": "F:\\microes\\assets\\shaders",
- "name": "shaders",
- "type": 1,
+ "guid": "02f457d5-e200-7f62-6850-7612ed829a63",
+ "path": "assets\\scenes\\BossRoom.scene",
+ "name": "BossRoom.scene",
+ "type": 6,
"fileSize": 0,
"lastModified": 1769503002,
- "isDirectory": true
+ "isDirectory": false
},
{
- "guid": "6f4b1d08-8b77-b7eb-629d-c2ea4efba441",
- "path": "F:\\microes\\assets\\prefabs\\Coin.prefab",
- "name": "Coin.prefab",
- "type": 7,
+ "guid": "b162bd84-eee3-1b79-807c-c64d2c64cb2b",
+ "path": "F:\\microes\\assets\\scripts\\PlayerController.js",
+ "name": "PlayerController.js",
+ "type": 4,
"fileSize": 0,
"lastModified": 1769503001,
"isDirectory": false
},
{
- "guid": "3cc64ba4-5416-2768-7eff-dbba531179c4",
- "path": "assets\\textures\\particle.png",
- "name": "particle.png",
+ "guid": "d44064b6-5cd8-29c4-8dc3-e6f0b71c6ad1",
+ "path": "F:\\microes\\assets\\textures\\ui_panel.png",
+ "name": "ui_panel.png",
"type": 2,
"fileSize": 0,
- "lastModified": 1769503001,
+ "lastModified": 1769503002,
"isDirectory": false
},
{
- "guid": "02f1f294-5a7f-d28b-7095-a04518207f9c",
- "path": "F:\\microes\\assets\\scripts\\GameManager.js",
- "name": "GameManager.js",
- "type": 4,
+ "guid": "d11c2d62-5870-5040-3e1a-bf5bc046b98a",
+ "path": "F:\\microes\\assets\\textures\\ui_button.png",
+ "name": "ui_button.png",
+ "type": 2,
"fileSize": 0,
- "lastModified": 1769503001,
- "isDirectory": false
- },
- {
- "guid": "3750f28c-b12f-4245-2036-9c552be15aea",
- "path": "F:\\microes\\assets\\fonts\\lucide.ttf",
- "name": "lucide.ttf",
- "type": 8,
- "fileSize": 793848,
- "lastModified": 1769501795,
+ "lastModified": 1769503002,
"isDirectory": false
},
{
- "guid": "6837963f-192a-0bcb-80e2-1cb45a8e35e7",
- "path": "assets\\scripts\\PlayerController.js",
- "name": "PlayerController.js",
- "type": 4,
+ "guid": "c6908b3b-7d16-8e81-5c2d-c65c46fee0d4",
+ "path": "assets\\audio\\bgm_battle.mp3",
+ "name": "bgm_battle.mp3",
+ "type": 3,
"fileSize": 0,
"lastModified": 1769503002,
"isDirectory": false
},
{
- "guid": "a9993ed8-9802-fb1c-f5e4-15864011fa2c",
- "path": "F:\\microes\\assets\\textures\\test.png",
- "name": "test.png",
- "type": 2,
- "fileSize": 6,
- "lastModified": 1769488062,
+ "guid": "0b354ef8-0528-35e8-b628-bed14b4960db",
+ "path": "F:\\microes\\assets\\audio\\bgm_battle.mp3",
+ "name": "bgm_battle.mp3",
+ "type": 3,
+ "fileSize": 0,
+ "lastModified": 1769503002,
"isDirectory": false
},
{
- "guid": "458ea613-0ce1-0325-3f9c-9f6937eafacf",
- "path": "assets\\prefabs\\Player.prefab",
- "name": "Player.prefab",
- "type": 7,
+ "guid": "f543cca8-b481-a8be-8507-770c03c75eab",
+ "path": "assets\\scenes",
+ "name": "scenes",
+ "type": 1,
"fileSize": 0,
- "lastModified": 1769503001,
- "isDirectory": false
+ "lastModified": 1769503002,
+ "isDirectory": true
},
{
- "guid": "182aa6a4-c774-8473-5238-49e1d28f1c5d",
- "path": "assets\\prefabs\\Enemy.prefab",
- "name": "Enemy.prefab",
+ "guid": "c71b2168-6faf-8d98-2ce8-4175ecfc98f2",
+ "path": "assets\\prefabs\\Bullet.prefab",
+ "name": "Bullet.prefab",
"type": 7,
"fileSize": 0,
"lastModified": 1769503002,
"isDirectory": false
},
{
- "guid": "d0e72f1c-981f-5995-dade-848b8b18813e",
- "path": "assets\\textures\\background.png",
- "name": "background.png",
- "type": 2,
- "fileSize": 0,
- "lastModified": 1769503002,
+ "guid": "6a7bd38a-6b72-be37-a497-9628dafb35e1",
+ "path": "F:\\microes\\assets\\.esengine\\assets.db",
+ "name": "assets.db",
+ "type": 0,
+ "fileSize": 23550,
+ "lastModified": 1769685418,
"isDirectory": false
},
{
- "guid": "83d5664f-9f0b-4687-73b2-b854c5e6d5cf",
- "path": "assets\\fonts",
- "name": "fonts",
+ "guid": "08719359-3487-beb2-0d62-f54a2a8634c4",
+ "path": "assets\\shaders",
+ "name": "shaders",
"type": 1,
"fileSize": 0,
- "lastModified": 1769501795,
+ "lastModified": 1769503002,
"isDirectory": true
},
{
- "guid": "ca89cb26-11ee-a95a-940a-4d952d33b936",
- "path": "F:\\microes\\assets\\scenes\\MainMenu.scene",
- "name": "MainMenu.scene",
- "type": 6,
+ "guid": "6650f3d3-a906-b4a9-1873-b75759499bf8",
+ "path": "F:\\microes\\assets\\audio\\sfx_jump.wav",
+ "name": "sfx_jump.wav",
+ "type": 3,
"fileSize": 0,
- "lastModified": 1769503002,
+ "lastModified": 1769503001,
"isDirectory": false
},
{
- "guid": "602e5d05-e6b5-3cbe-a3a4-857b4290f255",
- "path": "assets\\scripts\\CameraFollow.js",
- "name": "CameraFollow.js",
- "type": 4,
- "fileSize": 0,
- "lastModified": 1769503002,
+ "guid": "a19bf5bf-7a78-8cbd-00c8-8f38cf141628",
+ "path": "F:\\microes\\assets\\fonts\\msyh.ttc",
+ "name": "msyh.ttc",
+ "type": 0,
+ "fileSize": 19704352,
+ "lastModified": 1769511857,
"isDirectory": false
},
{
- "guid": "d3d9a556-8861-fbc2-504a-151ef73f41de",
- "path": "F:\\microes\\assets\\textures\\player.png",
- "name": "player.png",
+ "guid": "c771ea16-ad7f-3333-df52-9426cff8a384",
+ "path": "assets\\textures\\ui_button.png",
+ "name": "ui_button.png",
"type": 2,
"fileSize": 0,
"lastModified": 1769503002,
"isDirectory": false
},
{
- "guid": "49fa3441-7d74-bf79-c116-717b849b78ce",
- "path": "F:\\microes\\assets\\prefabs\\Player.prefab",
- "name": "Player.prefab",
- "type": 7,
- "fileSize": 0,
- "lastModified": 1769503002,
- "isDirectory": false
- },
- {
- "guid": "f29a2ee0-016a-f018-436a-9c11731f251a",
- "path": "F:\\microes\\assets\\scripts\\Inventory.js",
- "name": "Inventory.js",
- "type": 4,
- "fileSize": 0,
- "lastModified": 1769503001,
+ "guid": "06d02285-6f13-7665-e142-87cc08b9f6b8",
+ "path": "assets\\fonts\\lucide.ttf",
+ "name": "lucide.ttf",
+ "type": 8,
+ "fileSize": 793848,
+ "lastModified": 1769501796,
"isDirectory": false
},
{
- "guid": "0dd456da-eb9c-cdac-c429-b918b2f78b00",
- "path": "F:\\microes\\assets\\shaders\\particle.glsl",
- "name": "particle.glsl",
+ "guid": "ce69c963-c0ea-0fb2-c96c-bf1afc0e0802",
+ "path": "assets\\shaders\\postprocess.glsl",
+ "name": "postprocess.glsl",
"type": 5,
"fileSize": 0,
- "lastModified": 1769503001,
+ "lastModified": 1769503002,
"isDirectory": false
},
{
- "guid": "86ed9e0d-442c-a047-9b51-09011c881685",
- "path": "assets\\audio",
+ "guid": "99c227eb-f8d3-d0e8-843b-ceb126687e8b",
+ "path": "F:\\microes\\assets\\audio",
"name": "audio",
"type": 1,
"fileSize": 0,
- "lastModified": 1769503001,
+ "lastModified": 1769503002,
"isDirectory": true
},
{
- "guid": "ce792685-9959-2c9f-d909-597cab98305a",
- "path": "F:\\microes\\assets\\fonts\\lucide_new.ttf",
- "name": "lucide_new.ttf",
- "type": 8,
- "fileSize": 793848,
- "lastModified": 1769653162,
- "isDirectory": false
- },
- {
- "guid": "4b48ff38-aeb0-7a1b-38ec-03ad938736e9",
- "path": "F:\\microes\\assets\\shaders\\sprite.glsl",
- "name": "sprite.glsl",
+ "guid": "1c90475d-0d57-c627-f004-15d52bee4319",
+ "path": "F:\\microes\\assets\\shaders\\water.glsl",
+ "name": "water.glsl",
"type": 5,
"fileSize": 0,
"lastModified": 1769503002,
"isDirectory": false
},
{
- "guid": "e704f3d4-170b-fecb-d4f9-4534e5056d78",
- "path": "assets\\shaders\\particle.glsl",
- "name": "particle.glsl",
- "type": 5,
+ "guid": "9d69bbdf-276b-8f14-cc66-10e8dfcdb283",
+ "path": "F:\\microes\\assets\\scripts\\CameraFollow.js",
+ "name": "CameraFollow.js",
+ "type": 4,
"fileSize": 0,
- "lastModified": 1769503001,
+ "lastModified": 1769503002,
"isDirectory": false
},
{
- "guid": "78390dfc-f548-9908-8279-6b3064ea26b3",
- "path": "F:\\microes\\assets\\textures",
- "name": "textures",
- "type": 1,
+ "guid": "f23cff38-7fcd-d864-b487-6ca733c33582",
+ "path": "F:\\microes\\assets\\scripts\\EnemyAI.js",
+ "name": "EnemyAI.js",
+ "type": 4,
"fileSize": 0,
"lastModified": 1769503001,
- "isDirectory": true
+ "isDirectory": false
},
{
- "guid": "32dd883f-81c7-59a9-8229-5920e8152da1",
- "path": "assets\\prefabs",
- "name": "prefabs",
+ "guid": "cc395f8f-d6f9-a23d-db3b-7253b437aa8a",
+ "path": "F:\\microes\\assets\\.esengine",
+ "name": ".esengine",
"type": 1,
"fileSize": 0,
- "lastModified": 1769503001,
+ "lastModified": 1769670136,
"isDirectory": true
},
{
- "guid": "a424334b-4399-6ab1-440c-7da10d865e15",
- "path": "assets\\scripts\\UIManager.js",
- "name": "UIManager.js",
+ "guid": "b9c53311-d99a-e00b-9ba2-358e123efa4e",
+ "path": "assets\\scripts\\GameManager.js",
+ "name": "GameManager.js",
"type": 4,
"fileSize": 0,
- "lastModified": 1769503001,
+ "lastModified": 1769503002,
"isDirectory": false
},
{
- "guid": "0e48ebc1-25c8-2588-29aa-fb40564e2355",
- "path": "assets\\scenes\\MainMenu.scene",
- "name": "MainMenu.scene",
+ "guid": "44aa95ad-d460-37e0-041f-c6a4449f8b17",
+ "path": "assets\\textures\\test.png",
+ "name": "test.png",
+ "type": 2,
+ "fileSize": 6,
+ "lastModified": 1769488063,
+ "isDirectory": false
+ },
+ {
+ "guid": "4f4e6a0b-08fb-1c62-5a27-830f643cacff",
+ "path": "F:\\microes\\assets\\prefabs",
+ "name": "prefabs",
+ "type": 1,
+ "fileSize": 0,
+ "lastModified": 1769503002,
+ "isDirectory": true
+ },
+ {
+ "guid": "e1d87090-38ce-2d60-5bdd-1f928fdaf88a",
+ "path": "assets\\scenes\\Level1.scene",
+ "name": "Level1.scene",
"type": 6,
"fileSize": 0,
"lastModified": 1769503002,
"isDirectory": false
},
{
- "guid": "e11483d8-2203-6eff-1b7e-0932b819f1c9",
- "path": "assets\\audio\\sfx_attack.wav",
- "name": "sfx_attack.wav",
+ "guid": "53cf7de5-ae26-2632-e022-e9108f6bbc2c",
+ "path": "F:\\microes\\assets\\audio\\sfx_coin.wav",
+ "name": "sfx_coin.wav",
"type": 3,
"fileSize": 0,
- "lastModified": 1769503001,
+ "lastModified": 1769503002,
"isDirectory": false
},
{
- "guid": "7d86b8df-60d3-330a-ae99-ae597a929a9b",
- "path": "assets\\textures\\player.png",
- "name": "player.png",
- "type": 2,
+ "guid": "08964537-6809-2c47-8997-7bbf1c75029f",
+ "path": "assets\\scripts",
+ "name": "scripts",
+ "type": 1,
"fileSize": 0,
"lastModified": 1769503002,
- "isDirectory": false
+ "isDirectory": true
},
{
- "guid": "ca417dff-fe94-4361-ec9b-16504f048514",
- "path": "F:\\microes\\assets\\prefabs\\Bullet.prefab",
- "name": "Bullet.prefab",
+ "guid": "ed1cf9a5-9d96-50d7-e385-82c605f70a63",
+ "path": "F:\\microes\\assets\\prefabs\\Explosion.prefab",
+ "name": "Explosion.prefab",
"type": 7,
"fileSize": 0,
"lastModified": 1769503001,
"isDirectory": false
+ },
+ {
+ "guid": "8af759e0-a053-8e8c-1e34-48843f734d2f",
+ "path": "assets\\textures\\enemy.png",
+ "name": "enemy.png",
+ "type": 2,
+ "fileSize": 0,
+ "lastModified": 1769503002,
+ "isDirectory": false
}
]
}
diff --git a/bindings/esengine.d.ts b/bindings/esengine.d.ts
index 26b436867..10383c0ee 100644
--- a/bindings/esengine.d.ts
+++ b/bindings/esengine.d.ts
@@ -55,6 +55,14 @@ declare namespace Module {
priority: number;
}
+ interface Canvas {
+ designResolution: any;
+ pixelsPerUnit: number;
+ scaleMode: any;
+ matchWidthOrHeight: number;
+ backgroundColor: Vec4;
+ }
+
interface Parent {
entity: Entity;
}
@@ -114,6 +122,12 @@ declare namespace Module {
addCamera(entity: Entity, component: Camera): Camera;
removeCamera(entity: Entity): void;
+ // Canvas component
+ hasCanvas(entity: Entity): boolean;
+ getCanvas(entity: Entity): Canvas;
+ addCanvas(entity: Entity, component: Canvas): Canvas;
+ removeCanvas(entity: Entity): void;
+
// Parent component
hasParent(entity: Entity): boolean;
getParent(entity: Entity): Parent;
diff --git a/src/esengine/bindings/WebBindings.generated.cpp b/src/esengine/bindings/WebBindings.generated.cpp
index 6611f50e5..61b9e1a2c 100644
--- a/src/esengine/bindings/WebBindings.generated.cpp
+++ b/src/esengine/bindings/WebBindings.generated.cpp
@@ -15,6 +15,7 @@
#include "../math/Math.hpp"
#include "../ecs/components/Camera.hpp"
+#include "../ecs/components/Canvas.hpp"
#include "../ecs/components/Hierarchy.hpp"
#include "../ecs/components/Sprite.hpp"
#include "../ecs/components/Transform.hpp"
@@ -80,6 +81,15 @@ EMSCRIPTEN_BINDINGS(esengine_components) {
.field("priority", &esengine::ecs::Camera::priority)
;
+ // Canvas component
+ value_object<esengine::ecs::Canvas>("Canvas")
+ .field("designResolution", &esengine::ecs::Canvas::designResolution)
+ .field("pixelsPerUnit", &esengine::ecs::Canvas::pixelsPerUnit)
+ .field("scaleMode", &esengine::ecs::Canvas::scaleMode)
+ .field("matchWidthOrHeight", &esengine::ecs::Canvas::matchWidthOrHeight)
+ .field("backgroundColor", &esengine::ecs::Canvas::backgroundColor)
+ ;
+
// Parent component
value_object<esengine::ecs::Parent>("Parent")
.field("entity", &esengine::ecs::Parent::entity)
@@ -164,6 +174,20 @@ EMSCRIPTEN_BINDINGS(esengine_registry) {
self.remove<esengine::ecs::Camera>(e);
}))
+ // Canvas component
+ .function("hasCanvas", optional_override([](ecs::Registry& self, Entity e) {
+ return self.has<esengine::ecs::Canvas>(e);
+ }))
+ .function("getCanvas", optional_override([](ecs::Registry& self, Entity e) -> esengine::ecs::Canvas& {
+ return self.get<esengine::ecs::Canvas>(e);
+ }))
+ .function("addCanvas", optional_override([](ecs::Registry& self, Entity e, const esengine::ecs::Canvas& c) -> esengine::ecs::Canvas& {
+ return self.emplaceOrReplace<esengine::ecs::Canvas>(e, c);
+ }))
+ .function("removeCanvas", optional_override([](ecs::Registry& self, Entity e) {
+ self.remove<esengine::ecs::Canvas>(e);
+ }))
+
// Parent component
.function("hasParent", optional_override([](ecs::Registry& self, Entity e) {
return self.has<esengine::ecs::Parent>(e);
diff --git a/src/esengine/editor/CMakeLists.txt b/src/esengine/editor/CMakeLists.txt
index 241b2c587..480fb2eb9 100644
--- a/src/esengine/editor/CMakeLists.txt
+++ b/src/esengine/editor/CMakeLists.txt
@@ -45,6 +45,7 @@ set(EDITOR_SOURCES
widgets/DrawerPanel.cpp
widgets/EditorRootContainer.cpp
widgets/EditorToolbar.cpp
+ widgets/SceneToolbar.cpp
)
set(EDITOR_HEADERS
@@ -105,6 +106,7 @@ set(EDITOR_HEADERS
widgets/DrawerPanel.hpp
widgets/EditorRootContainer.hpp
widgets/EditorToolbar.hpp
+ widgets/SceneToolbar.hpp
)
# Create editor executable
diff --git a/src/esengine/editor/panels/SceneViewPanel.cpp b/src/esengine/editor/panels/SceneViewPanel.cpp
index 28fb3af64..c86289e33 100644
--- a/src/esengine/editor/panels/SceneViewPanel.cpp
+++ b/src/esengine/editor/panels/SceneViewPanel.cpp
@@ -97,6 +97,20 @@ SceneViewPanel::SceneViewPanel(ecs::Registry& registry, EntitySelection& selecti
camera_.setFocalPoint(glm::vec3(0.0f));
camera_.setDistance(10.0f);
+ toolbar_ = makeUnique<SceneToolbar>(ui::WidgetId("scene_toolbar"));
+
+ sink(toolbar_->onViewModeChanged).connect([this](ViewMode mode) {
+ setViewMode(mode);
+ });
+
+ sink(toolbar_->onGridVisibilityChanged).connect([this](bool visible) {
+ gridVisible_ = visible;
+ });
+
+ sink(toolbar_->onGizmosVisibilityChanged).connect([this](bool visible) {
+ gizmosVisible_ = visible;
+ });
+
setMinSize(glm::vec2(200.0f, 200.0f));
}
@@ -131,8 +145,16 @@ void SceneViewPanel::render(ui::UIBatchRenderer& renderer) {
const ui::Rect& bounds = getBounds();
- u32 newWidth = static_cast<u32>(bounds.width);
- u32 newHeight = static_cast<u32>(bounds.height);
+ ui::Rect toolbarBounds = {bounds.x, bounds.y, bounds.width, SceneToolbar::HEIGHT};
+ viewportBounds_ = {
+ bounds.x,
+ bounds.y + SceneToolbar::HEIGHT,
+ bounds.width,
+ bounds.height - SceneToolbar::HEIGHT
+ };
+
+ u32 newWidth = static_cast<u32>(viewportBounds_.width);
+ u32 newHeight = static_cast<u32>(viewportBounds_.height);
if (newWidth != viewportWidth_ || newHeight != viewportHeight_) {
setViewportSize(newWidth, newHeight);
@@ -146,7 +168,7 @@ void SceneViewPanel::render(ui::UIBatchRenderer& renderer) {
renderSceneToTexture();
renderer.drawTexturedRect(
- bounds,
+ viewportBounds_,
framebuffer_->getColorAttachment(),
glm::vec4(1.0f),
glm::vec2(0.0f, 1.0f),
@@ -154,15 +176,28 @@ void SceneViewPanel::render(ui::UIBatchRenderer& renderer) {
);
renderer.flush();
- if (viewMode_ == ViewMode::Mode3D) {
- renderAxisGizmo();
- } else {
- renderAxisGizmo2D();
+ if (gizmosVisible_) {
+ if (viewMode_ == ViewMode::Mode3D) {
+ renderAxisGizmo();
+ } else {
+ renderAxisGizmo2D();
+ }
}
}
+
+ if (toolbar_) {
+ toolbar_->setContext(getContext());
+ toolbar_->measure(toolbarBounds.width, toolbarBounds.height);
+ toolbar_->layout(toolbarBounds);
+ toolbar_->render(renderer);
+ }
}
bool SceneViewPanel::onMouseDown(const ui::MouseButtonEvent& event) {
+ if (toolbar_ && toolbar_->getBounds().contains(event.x, event.y)) {
+ return toolbar_->onMouseDown(event);
+ }
+
if (viewMode_ == ViewMode::Mode3D) {
if (event.button == ui::MouseButton::Left && !event.alt && !event.ctrl && !event.shift) {
i32 axisHit = hitTestAxisGizmo(event.x, event.y);
@@ -190,6 +225,9 @@ bool SceneViewPanel::onMouseUp(const ui::MouseButtonEvent& event) {
}
bool SceneViewPanel::onMouseMove(const ui::MouseMoveEvent& event) {
+ if (toolbar_) {
+ toolbar_->onMouseMove(event);
+ }
camera_.onMouseMove(event);
return true;
}
@@ -232,16 +270,22 @@ void SceneViewPanel::renderSceneContent() {
glm::mat4 viewProj = proj * view;
if (viewMode_ == ViewMode::Mode2D) {
- if (!grid2DInitialized_) {
- initGrid2DData();
+ if (gridVisible_) {
+ if (!grid2DInitialized_) {
+ initGrid2DData();
+ }
+ renderGrid2D(viewProj);
+ }
+ if (gizmosVisible_) {
+ renderCanvasGizmo(viewProj);
}
- renderGrid2D(viewProj);
- renderCanvasGizmo(viewProj);
} else {
- if (!gridInitialized_) {
- initGridData();
+ if (gridVisible_) {
+ if (!gridInitialized_) {
+ initGridData();
+ }
+ renderGrid(viewProj);
}
- renderGrid(viewProj);
}
renderSprites(viewProj);
}
diff --git a/src/esengine/editor/panels/SceneViewPanel.hpp b/src/esengine/editor/panels/SceneViewPanel.hpp
index 9e1afacac..e090b2d18 100644
--- a/src/esengine/editor/panels/SceneViewPanel.hpp
+++ b/src/esengine/editor/panels/SceneViewPanel.hpp
@@ -25,6 +25,7 @@
#include "../../resource/ResourceManager.hpp"
#include "../core/Selection.hpp"
#include "../widgets/EditorToolbar.hpp"
+#include "../widgets/SceneToolbar.hpp"
namespace esengine::editor {
@@ -155,6 +156,11 @@ private:
Unique<VertexArray> canvasGizmoVAO_;
bool canvasGizmoInitialized_ = false;
+
+ Unique<SceneToolbar> toolbar_;
+ bool gridVisible_ = true;
+ bool gizmosVisible_ = true;
+ ui::Rect viewportBounds_;
};
} // namespace esengine::editor
diff --git a/src/esengine/editor/widgets/SceneToolbar.cpp b/src/esengine/editor/widgets/SceneToolbar.cpp
new file mode 100644
index 000000000..2bd9b1a4f
--- /dev/null
+++ b/src/esengine/editor/widgets/SceneToolbar.cpp
@@ -0,0 +1,187 @@
+/**
+ * @file SceneToolbar.cpp
+ * @brief Scene view toolbar implementation
+ *
+ * @author ESEngine Team
+ * @date 2026
+ *
+ * @copyright Copyright (c) 2026 ESEngine Team
+ * Licensed under the MIT License.
+ */
+
+#include "SceneToolbar.hpp"
+#include "../../ui/rendering/UIBatchRenderer.hpp"
+#include "../../ui/UIContext.hpp"
+#include "../../ui/icons/Icons.hpp"
+
+#if ES_FEATURE_SDF_FONT
+#include "../../ui/font/MSDFFont.hpp"
+#endif
+
+namespace esengine::editor {
+
+namespace icons = ui::icons;
+
+// =============================================================================
+// Constructor
+// =============================================================================
+
+SceneToolbar::SceneToolbar(const ui::WidgetId& id)
+ : Widget(id) {
+ setHeight(ui::SizeValue::px(HEIGHT));
+}
+
+// =============================================================================
+// State Setters
+// =============================================================================
+
+void SceneToolbar::setViewMode(ViewMode mode) {
+ if (viewMode_ != mode) {
+ viewMode_ = mode;
+ onViewModeChanged.publish(mode);
+ }
+}
+
+void SceneToolbar::setGridVisible(bool visible) {
+ if (gridVisible_ != visible) {
+ gridVisible_ = visible;
+ onGridVisibilityChanged.publish(visible);
+ }
+}
+
+void SceneToolbar::setGizmosVisible(bool visible) {
+ if (gizmosVisible_ != visible) {
+ gizmosVisible_ = visible;
+ onGizmosVisibilityChanged.publish(visible);
+ }
+}
+
+void SceneToolbar::setGizmoMode(GizmoMode mode) {
+ if (gizmoMode_ != mode) {
+ gizmoMode_ = mode;
+ onGizmoModeChanged.publish(mode);
+ }
+}
+
+// =============================================================================
+// Rendering
+// =============================================================================
+
+void SceneToolbar::render(ui::UIBatchRenderer& renderer) {
+ ui::UIContext* ctx = getContext();
+ if (!ctx) return;
+
+ const ui::Rect& bounds = getBounds();
+ updateButtonBounds();
+
+ constexpr glm::vec4 bgColor{0.12f, 0.12f, 0.14f, 0.95f};
+ constexpr glm::vec4 borderColor{0.2f, 0.2f, 0.22f, 1.0f};
+ constexpr glm::vec4 buttonBg{0.2f, 0.2f, 0.22f, 1.0f};
+ constexpr glm::vec4 buttonHover{0.28f, 0.28f, 0.30f, 1.0f};
+ constexpr glm::vec4 activeBg{0.3f, 0.5f, 0.8f, 0.8f};
+ constexpr glm::vec4 textColor{0.85f, 0.85f, 0.85f, 1.0f};
+
+ renderer.drawRect(bounds, bgColor);
+ renderer.drawRect({bounds.x, bounds.y + bounds.height - 1.0f, bounds.width, 1.0f}, borderColor);
+
+#if ES_FEATURE_SDF_FONT
+ ui::MSDFFont* iconFont = ctx->getIconMSDFFont();
+ if (!iconFont) return;
+
+ auto drawButton = [&](const ui::Rect& btnBounds, const char* icon, bool active, bool hovered) {
+ glm::vec4 bg = active ? activeBg : (hovered ? buttonHover : buttonBg);
+ renderer.drawRoundedRect(btnBounds, bg, ui::CornerRadii::all(4.0f));
+ renderer.drawTextInBounds(icon, btnBounds, *iconFont, 16.0f, textColor,
+ ui::HAlign::Center, ui::VAlign::Center);
+ };
+
+ drawButton(viewMode2DButtonBounds_, icons::Square, viewMode_ == ViewMode::Mode2D, hoveredButton_ == 0);
+ drawButton(viewMode3DButtonBounds_, icons::Box, viewMode_ == ViewMode::Mode3D, hoveredButton_ == 1);
+
+ f32 separatorX = viewMode3DButtonBounds_.x + viewMode3DButtonBounds_.width + 8.0f;
+ renderer.drawRect({separatorX, bounds.y + 6.0f, 1.0f, bounds.height - 12.0f}, glm::vec4(0.3f, 0.3f, 0.32f, 1.0f));
+
+ drawButton(gridButtonBounds_, icons::Grid, gridVisible_, hoveredButton_ == 2);
+ drawButton(gizmosButtonBounds_, icons::Move3d, gizmosVisible_, hoveredButton_ == 3);
+
+ f32 separator2X = gizmosButtonBounds_.x + gizmosButtonBounds_.width + 8.0f;
+ renderer.drawRect({separator2X, bounds.y + 6.0f, 1.0f, bounds.height - 12.0f}, glm::vec4(0.3f, 0.3f, 0.32f, 1.0f));
+
+ drawButton(translateButtonBounds_, icons::Move, gizmoMode_ == GizmoMode::Translate, hoveredButton_ == 4);
+ drawButton(rotateButtonBounds_, icons::Rotate3d, gizmoMode_ == GizmoMode::Rotate, hoveredButton_ == 5);
+ drawButton(scaleButtonBounds_, icons::Scale3d, gizmoMode_ == GizmoMode::Scale, hoveredButton_ == 6);
+#endif
+}
+
+// =============================================================================
+// Input Handling
+// =============================================================================
+
+bool SceneToolbar::onMouseDown(const ui::MouseButtonEvent& event) {
+ if (event.button != ui::MouseButton::Left) {
+ return false;
+ }
+
+ i32 btn = getHoveredButton(event.x, event.y);
+
+ switch (btn) {
+ case 0: setViewMode(ViewMode::Mode2D); return true;
+ case 1: setViewMode(ViewMode::Mode3D); return true;
+ case 2: setGridVisible(!gridVisible_); return true;
+ case 3: setGizmosVisible(!gizmosVisible_); return true;
+ case 4: setGizmoMode(GizmoMode::Translate); return true;
+ case 5: setGizmoMode(GizmoMode::Rotate); return true;
+ case 6: setGizmoMode(GizmoMode::Scale); return true;
+ }
+
+ return false;
+}
+
+bool SceneToolbar::onMouseMove(const ui::MouseMoveEvent& event) {
+ hoveredButton_ = getHoveredButton(event.x, event.y);
+ return false;
+}
+
+// =============================================================================
+// Private Methods
+// =============================================================================
+
+void SceneToolbar::updateButtonBounds() {
+ const ui::Rect& bounds = getBounds();
+
+ constexpr f32 btnSize = 24.0f;
+ constexpr f32 padding = 4.0f;
+ constexpr f32 groupGap = 16.0f;
+
+ f32 y = bounds.y + (bounds.height - btnSize) * 0.5f;
+ f32 x = bounds.x + padding;
+
+ viewMode2DButtonBounds_ = {x, y, btnSize, btnSize};
+ x += btnSize + 2.0f;
+ viewMode3DButtonBounds_ = {x, y, btnSize, btnSize};
+ x += btnSize + groupGap;
+
+ gridButtonBounds_ = {x, y, btnSize, btnSize};
+ x += btnSize + 2.0f;
+ gizmosButtonBounds_ = {x, y, btnSize, btnSize};
+ x += btnSize + groupGap;
+
+ translateButtonBounds_ = {x, y, btnSize, btnSize};
+ x += btnSize + 2.0f;
+ rotateButtonBounds_ = {x, y, btnSize, btnSize};
+ x += btnSize + 2.0f;
+ scaleButtonBounds_ = {x, y, btnSize, btnSize};
+}
+
+i32 SceneToolbar::getHoveredButton(f32 x, f32 y) const {
+ if (viewMode2DButtonBounds_.contains(x, y)) return 0;
+ if (viewMode3DButtonBounds_.contains(x, y)) return 1;
+ if (gridButtonBounds_.contains(x, y)) return 2;
+ if (gizmosButtonBounds_.contains(x, y)) return 3;
+ if (translateButtonBounds_.contains(x, y)) return 4;
+ if (rotateButtonBounds_.contains(x, y)) return 5;
+ if (scaleButtonBounds_.contains(x, y)) return 6;
+ return -1;
+}
+
+} // namespace esengine::editor
diff --git a/src/esengine/editor/widgets/SceneToolbar.hpp b/src/esengine/editor/widgets/SceneToolbar.hpp
new file mode 100644
index 000000000..876bc30b7
--- /dev/null
+++ b/src/esengine/editor/widgets/SceneToolbar.hpp
@@ -0,0 +1,91 @@
+/**
+ * @file SceneToolbar.hpp
+ * @brief Scene view toolbar for view controls and gizmo modes
+ *
+ * @author ESEngine Team
+ * @date 2026
+ *
+ * @copyright Copyright (c) 2026 ESEngine Team
+ * Licensed under the MIT License.
+ */
+#pragma once
+
+// =============================================================================
+// Includes
+// =============================================================================
+
+#include "../../ui/widgets/Widget.hpp"
+#include "../../events/Signal.hpp"
+#include "../gizmo/TransformGizmo.hpp"
+#include "EditorToolbar.hpp"
+
+namespace esengine::editor {
+
+// =============================================================================
+// SceneToolbar Class
+// =============================================================================
+
+/**
+ * @brief Toolbar embedded in SceneViewPanel for view and gizmo controls
+ */
+class SceneToolbar : public ui::Widget {
+public:
+ static constexpr f32 HEIGHT = 32.0f;
+
+ explicit SceneToolbar(const ui::WidgetId& id);
+ ~SceneToolbar() override = default;
+
+ // =========================================================================
+ // State Accessors
+ // =========================================================================
+
+ ViewMode getViewMode() const { return viewMode_; }
+ void setViewMode(ViewMode mode);
+
+ bool isGridVisible() const { return gridVisible_; }
+ void setGridVisible(bool visible);
+
+ bool isGizmosVisible() const { return gizmosVisible_; }
+ void setGizmosVisible(bool visible);
+
+ GizmoMode getGizmoMode() const { return gizmoMode_; }
+ void setGizmoMode(GizmoMode mode);
+
+ // =========================================================================
+ // Signals
+ // =========================================================================
+
+ Signal<void(ViewMode)> onViewModeChanged;
+ Signal<void(bool)> onGridVisibilityChanged;
+ Signal<void(bool)> onGizmosVisibilityChanged;
+ Signal<void(GizmoMode)> onGizmoModeChanged;
+
+ // =========================================================================
+ // Widget Interface
+ // =========================================================================
+
+ void render(ui::UIBatchRenderer& renderer) override;
+ bool onMouseDown(const ui::MouseButtonEvent& event) override;
+ bool onMouseMove(const ui::MouseMoveEvent& event) override;
+
+private:
+ void updateButtonBounds();
+ i32 getHoveredButton(f32 x, f32 y) const;
+
+ ViewMode viewMode_ = ViewMode::Mode3D;
+ bool gridVisible_ = true;
+ bool gizmosVisible_ = true;
+ GizmoMode gizmoMode_ = GizmoMode::Translate;
+
+ ui::Rect viewMode2DButtonBounds_;
+ ui::Rect viewMode3DButtonBounds_;
+ ui::Rect gridButtonBounds_;
+ ui::Rect gizmosButtonBounds_;
+ ui::Rect translateButtonBounds_;
+ ui::Rect rotateButtonBounds_;
+ ui::Rect scaleButtonBounds_;
+
+ i32 hoveredButton_ = -1;
+};
+
+} // namespace esengine::editor
diff --git a/src/esengine/scripting/bindings/ECSBindings.generated.cpp b/src/esengine/scripting/bindings/ECSBindings.generated.cpp
index 8fdae22ae..999824c30 100644
--- a/src/esengine/scripting/bindings/ECSBindings.generated.cpp
+++ b/src/esengine/scripting/bindings/ECSBindings.generated.cpp
@@ -14,6 +14,7 @@
#include "../../math/Math.hpp"
#include "../../ecs/components/Camera.hpp"
+#include "../../ecs/components/Canvas.hpp"
#include "../../ecs/components/Hierarchy.hpp"
#include "../../ecs/components/Sprite.hpp"
#include "../../ecs/components/Transform.hpp"
@@ -147,6 +148,50 @@ static JSValue js_Registry_addCamera(JSContext* ctx, JSValueConst this_val, int
return JS_UNDEFINED;
}
+// =============================================================================
+// Canvas Component Bindings
+// =============================================================================
+
+static JSValue js_Registry_getCanvas(JSContext* ctx, JSValueConst this_val, int argc, JSValueConst* argv) {
+ u32 entity;
+ JS_ToUint32(ctx, &entity, argv[0]);
+ if (!g_registry->has<esengine::ecs::Canvas>(entity)) {
+ return JS_ThrowReferenceError(ctx, "Entity does not have Canvas component");
+ }
+ auto& comp = g_registry->get<esengine::ecs::Canvas>(entity);
+ JSValue obj = JS_NewObject(ctx);
+ // TODO: Add converter for glm::uvec2
+ JS_SetPropertyStr(ctx, obj, "pixelsPerUnit", JS_NewFloat64(ctx, comp.pixelsPerUnit));
+ // TODO: Add converter for CanvasScaleMode
+ JS_SetPropertyStr(ctx, obj, "matchWidthOrHeight", JS_NewFloat64(ctx, comp.matchWidthOrHeight));
+ // TODO: Add converter for glm::vec4
+ return obj;
+}
+
+static JSValue js_Registry_addCanvas(JSContext* ctx, JSValueConst this_val, int argc, JSValueConst* argv) {
+ u32 entity;
+ JS_ToUint32(ctx, &entity, argv[0]);
+ esengine::ecs::Canvas comp;
+ JSValue designResolutionVal = JS_GetPropertyStr(ctx, argv[1], "designResolution");
+ JS_FreeValue(ctx, designResolutionVal);
+ JSValue pixelsPerUnitVal = JS_GetPropertyStr(ctx, argv[1], "pixelsPerUnit");
+ double dpixelsPerUnit;
+ JS_ToFloat64(ctx, &dpixelsPerUnit, pixelsPerUnitVal);
+ comp.pixelsPerUnit = static_cast<f32>(dpixelsPerUnit);
+ JS_FreeValue(ctx, pixelsPerUnitVal);
+ JSValue scaleModeVal = JS_GetPropertyStr(ctx, argv[1], "scaleMode");
+ JS_FreeValue(ctx, scaleModeVal);
+ JSValue matchWidthOrHeightVal = JS_GetPropertyStr(ctx, argv[1], "matchWidthOrHeight");
+ double dmatchWidthOrHeight;
+ JS_ToFloat64(ctx, &dmatchWidthOrHeight, matchWidthOrHeightVal);
+ comp.matchWidthOrHeight = static_cast<f32>(dmatchWidthOrHeight);
+ JS_FreeValue(ctx, matchWidthOrHeightVal);
+ JSValue backgroundColorVal = JS_GetPropertyStr(ctx, argv[1], "backgroundColor");
+ JS_FreeValue(ctx, backgroundColorVal);
+ g_registry->emplaceOrReplace<esengine::ecs::Canvas>(entity, comp);
+ return JS_UNDEFINED;
+}
+
// =============================================================================
// Parent Component Bindings
// =============================================================================
@@ -386,6 +431,12 @@ void bindECS(ScriptContext& ctx, ecs::Registry& registry) {
JS_SetPropertyStr(jsCtx, registryObj, "addCamera",
JS_NewCFunction(jsCtx, js_Registry_addCamera, "addCamera", 2));
+ // Canvas component
+ JS_SetPropertyStr(jsCtx, registryObj, "getCanvas",
+ JS_NewCFunction(jsCtx, js_Registry_getCanvas, "getCanvas", 1));
+ JS_SetPropertyStr(jsCtx, registryObj, "addCanvas",
+ JS_NewCFunction(jsCtx, js_Registry_addCanvas, "addCanvas", 2));
+
// Parent component
JS_SetPropertyStr(jsCtx, registryObj, "getParent",
JS_NewCFunction(jsCtx, js_Registry_getParent, "getParent", 1));