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
feat: Add Unity-style axis gizmo to SceneViewPanel
esengineba0515778f00
diff --git a/assets/.esengine/assets.db b/assets/.esengine/assets.dbindex 305269b7f..594a509fe 100644--- a/assets/.esengine/assets.db+++ b/assets/.esengine/assets.db@@ -2,215 +2,179 @@"version": "1.0","assets": [{- "guid": "fb6e1999-a210-5293-9dc9-f648e6e8fc1f",- "path": "assets\\shaders\\sprite.glsl",- "name": "sprite.glsl",- "type": 5,+ "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": "539c3218-76fb-bed8-1442-3c43ae5be464",- "path": "F:\\microes\\assets\\textures\\tileset.png",- "name": "tileset.png",+ "guid": "986b148c-b4ea-cf89-2e04-37dc26624976",+ "path": "F:\\microes\\assets\\textures\\particle.png",+ "name": "particle.png","type": 2,"fileSize": 0,- "lastModified": 1769503002,+ "lastModified": 1769503001,"isDirectory": false},{- "guid": "b9c53311-d99a-e00b-9ba2-358e123efa4e",- "path": "assets\\scripts\\GameManager.js",- "name": "GameManager.js",- "type": 4,+ "guid": "86ed9e0d-442c-a047-9b51-09011c881685",+ "path": "assets\\audio",+ "name": "audio",+ "type": 1,"fileSize": 0,- "lastModified": 1769503002,- "isDirectory": false+ "lastModified": 1769503001,+ "isDirectory": true},{- "guid": "44aa95ad-d460-37e0-041f-c6a4449f8b17",- "path": "assets\\textures\\test.png",- "name": "test.png",- "type": 2,- "fileSize": 6,- "lastModified": 1769488063,+ "guid": "0dd456da-eb9c-cdac-c429-b918b2f78b00",+ "path": "F:\\microes\\assets\\shaders\\particle.glsl",+ "name": "particle.glsl",+ "type": 5,+ "fileSize": 0,+ "lastModified": 1769503001,"isDirectory": false},{- "guid": "4f4e6a0b-08fb-1c62-5a27-830f643cacff",- "path": "F:\\microes\\assets\\prefabs",- "name": "prefabs",+ "guid": "99c227eb-f8d3-d0e8-843b-ceb126687e8b",+ "path": "F:\\microes\\assets\\audio",+ "name": "audio","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": "1c90475d-0d57-c627-f004-15d52bee4319",+ "path": "F:\\microes\\assets\\shaders\\water.glsl",+ "name": "water.glsl",+ "type": 5,"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": "9d69bbdf-276b-8f14-cc66-10e8dfcdb283",+ "path": "F:\\microes\\assets\\scripts\\CameraFollow.js",+ "name": "CameraFollow.js",+ "type": 4,"fileSize": 0,"lastModified": 1769503002,"isDirectory": false},{- "guid": "e704f3d4-170b-fecb-d4f9-4534e5056d78",- "path": "assets\\shaders\\particle.glsl",- "name": "particle.glsl",- "type": 5,+ "guid": "f23cff38-7fcd-d864-b487-6ca733c33582",+ "path": "F:\\microes\\assets\\scripts\\EnemyAI.js",+ "name": "EnemyAI.js",+ "type": 4,"fileSize": 0,"lastModified": 1769503001,"isDirectory": false},{- "guid": "78390dfc-f548-9908-8279-6b3064ea26b3",- "path": "F:\\microes\\assets\\textures",- "name": "textures",+ "guid": "cc395f8f-d6f9-a23d-db3b-7253b437aa8a",+ "path": "F:\\microes\\assets\\.esengine",+ "name": ".esengine","type": 1,"fileSize": 0,- "lastModified": 1769503001,+ "lastModified": 1769670137,"isDirectory": true},{- "guid": "a424334b-4399-6ab1-440c-7da10d865e15",- "path": "assets\\scripts\\UIManager.js",- "name": "UIManager.js",- "type": 4,+ "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": "32dd883f-81c7-59a9-8229-5920e8152da1",- "path": "assets\\prefabs",- "name": "prefabs",- "type": 1,- "fileSize": 0,- "lastModified": 1769503001,- "isDirectory": true- },- {- "guid": "08964537-6809-2c47-8997-7bbf1c75029f",- "path": "assets\\scripts",- "name": "scripts",- "type": 1,- "fileSize": 0,- "lastModified": 1769503002,- "isDirectory": true- },- {- "guid": "8af759e0-a053-8e8c-1e34-48843f734d2f",- "path": "assets\\textures\\enemy.png",- "name": "enemy.png",+ "guid": "d3d9a556-8861-fbc2-504a-151ef73f41de",+ "path": "F:\\microes\\assets\\textures\\player.png",+ "name": "player.png","type": 2,"fileSize": 0,"lastModified": 1769503002,"isDirectory": false},{- "guid": "ed1cf9a5-9d96-50d7-e385-82c605f70a63",- "path": "F:\\microes\\assets\\prefabs\\Explosion.prefab",- "name": "Explosion.prefab",- "type": 7,+ "guid": "f29a2ee0-016a-f018-436a-9c11731f251a",+ "path": "F:\\microes\\assets\\scripts\\Inventory.js",+ "name": "Inventory.js",+ "type": 4,"fileSize": 0,"lastModified": 1769503001,"isDirectory": false},{- "guid": "ff5ba3b5-d524-f202-72ae-a40add555353",- "path": "assets\\scenes\\Level2.scene",- "name": "Level2.scene",- "type": 6,- "fileSize": 0,- "lastModified": 1769503002,- "isDirectory": false- },- {- "guid": "08719359-3487-beb2-0d62-f54a2a8634c4",- "path": "assets\\shaders",- "name": "shaders",+ "guid": "f543cca8-b481-a8be-8507-770c03c75eab",+ "path": "assets\\scenes",+ "name": "scenes","type": 1,"fileSize": 0,"lastModified": 1769503002,"isDirectory": true},{- "guid": "6a7bd38a-6b72-be37-a497-9628dafb35e1",- "path": "F:\\microes\\assets\\.esengine\\assets.db",- "name": "assets.db",- "type": 0,- "fileSize": 23550,- "lastModified": 1769678227,+ "guid": "ce792685-9959-2c9f-d909-597cab98305a",+ "path": "F:\\microes\\assets\\fonts\\lucide_new.ttf",+ "name": "lucide_new.ttf",+ "type": 8,+ "fileSize": 793848,+ "lastModified": 1769653161,"isDirectory": false},{- "guid": "c71b2168-6faf-8d98-2ce8-4175ecfc98f2",- "path": "assets\\prefabs\\Bullet.prefab",- "name": "Bullet.prefab",- "type": 7,+ "guid": "b162bd84-eee3-1b79-807c-c64d2c64cb2b",+ "path": "F:\\microes\\assets\\scripts\\PlayerController.js",+ "name": "PlayerController.js",+ "type": 4,"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,- "isDirectory": false- },- {- "guid": "c771ea16-ad7f-3333-df52-9426cff8a384",- "path": "assets\\textures\\ui_button.png",- "name": "ui_button.png",- "type": 2,+ "guid": "02f457d5-e200-7f62-6850-7612ed829a63",+ "path": "assets\\scenes\\BossRoom.scene",+ "name": "BossRoom.scene",+ "type": 6,"fileSize": 0,"lastModified": 1769503002,"isDirectory": false},{- "guid": "a19bf5bf-7a78-8cbd-00c8-8f38cf141628",- "path": "F:\\microes\\assets\\fonts\\msyh.ttc",- "name": "msyh.ttc",- "type": 0,- "fileSize": 19704352,- "lastModified": 1769511857,+ "guid": "38633421-fb34-4766-58e7-b4ba7c8b5ee3",+ "path": "assets\\audio\\sfx_explosion.wav",+ "name": "sfx_explosion.wav",+ "type": 3,+ "fileSize": 0,+ "lastModified": 1769503002,"isDirectory": false},{- "guid": "ce69c963-c0ea-0fb2-c96c-bf1afc0e0802",- "path": "assets\\shaders\\postprocess.glsl",- "name": "postprocess.glsl",- "type": 5,+ "guid": "d44064b6-5cd8-29c4-8dc3-e6f0b71c6ad1",+ "path": "F:\\microes\\assets\\textures\\ui_panel.png",+ "name": "ui_panel.png",+ "type": 2,"fileSize": 0,"lastModified": 1769503002,"isDirectory": false},{- "guid": "6650f3d3-a906-b4a9-1873-b75759499bf8",- "path": "F:\\microes\\assets\\audio\\sfx_jump.wav",- "name": "sfx_jump.wav",- "type": 3,+ "guid": "602e5d05-e6b5-3cbe-a3a4-857b4290f255",+ "path": "assets\\scripts\\CameraFollow.js",+ "name": "CameraFollow.js",+ "type": 4,"fileSize": 0,"lastModified": 1769503002,"isDirectory": false},{- "guid": "0e48ebc1-25c8-2588-29aa-fb40564e2355",- "path": "assets\\scenes\\MainMenu.scene",+ "guid": "ca89cb26-11ee-a95a-940a-4d952d33b936",+ "path": "F:\\microes\\assets\\scenes\\MainMenu.scene","name": "MainMenu.scene","type": 6,"fileSize": 0,@@ -218,64 +182,55 @@"isDirectory": false},{- "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": "cf70754c-26ba-346d-c01d-ff9fc29a6e9e",- "path": "assets\\.esengine",- "name": ".esengine",+ "guid": "83d5664f-9f0b-4687-73b2-b854c5e6d5cf",+ "path": "assets\\fonts",+ "name": "fonts","type": 1,"fileSize": 0,- "lastModified": 1769495857,+ "lastModified": 1769501795,"isDirectory": true},{- "guid": "a638dc81-b60d-567f-6820-13f4e9998407",- "path": "assets\\.esengine\\assets.db",- "name": "assets.db",- "type": 0,- "fileSize": 2186,- "lastModified": 1769502460,+ "guid": "d0e72f1c-981f-5995-dade-848b8b18813e",+ "path": "assets\\textures\\background.png",+ "name": "background.png",+ "type": 2,+ "fileSize": 0,+ "lastModified": 1769503002,"isDirectory": false},{- "guid": "e19fb621-dd86-3c0c-6b10-142a848c6a14",- "path": "assets\\audio\\sfx_jump.wav",- "name": "sfx_jump.wav",- "type": 3,+ "guid": "182aa6a4-c774-8473-5238-49e1d28f1c5d",+ "path": "assets\\prefabs\\Enemy.prefab",+ "name": "Enemy.prefab",+ "type": 7,"fileSize": 0,"lastModified": 1769503002,"isDirectory": false},{- "guid": "986b148c-b4ea-cf89-2e04-37dc26624976",- "path": "F:\\microes\\assets\\textures\\particle.png",- "name": "particle.png",+ "guid": "a9993ed8-9802-fb1c-f5e4-15864011fa2c",+ "path": "F:\\microes\\assets\\textures\\test.png",+ "name": "test.png","type": 2,- "fileSize": 0,- "lastModified": 1769503002,+ "fileSize": 6,+ "lastModified": 1769488062,"isDirectory": false},{- "guid": "234c30b6-359c-51c1-a526-a970984ad90a",- "path": "F:\\microes\\assets\\textures\\enemy.png",- "name": "enemy.png",- "type": 2,+ "guid": "458ea613-0ce1-0325-3f9c-9f6937eafacf",+ "path": "assets\\prefabs\\Player.prefab",+ "name": "Player.prefab",+ "type": 7,"fileSize": 0,- "lastModified": 1769503002,+ "lastModified": 1769503001,"isDirectory": false},{- "guid": "44626f54-604d-ae12-0f2e-2087f068acbf",- "path": "F:\\microes\\assets\\prefabs\\Enemy.prefab",- "name": "Enemy.prefab",- "type": 7,+ "guid": "6837963f-192a-0bcb-80e2-1cb45a8e35e7",+ "path": "assets\\scripts\\PlayerController.js",+ "name": "PlayerController.js",+ "type": 4,"fileSize": 0,"lastModified": 1769503002,"isDirectory": false@@ -290,147 +245,201 @@"isDirectory": false},{- "guid": "458ea613-0ce1-0325-3f9c-9f6937eafacf",- "path": "assets\\prefabs\\Player.prefab",- "name": "Player.prefab",+ "guid": "6a7bd38a-6b72-be37-a497-9628dafb35e1",+ "path": "F:\\microes\\assets\\.esengine\\assets.db",+ "name": "assets.db",+ "type": 0,+ "fileSize": 23550,+ "lastModified": 1769679376,+ "isDirectory": false+ },+ {+ "guid": "c71b2168-6faf-8d98-2ce8-4175ecfc98f2",+ "path": "assets\\prefabs\\Bullet.prefab",+ "name": "Bullet.prefab","type": 7,"fileSize": 0,- "lastModified": 1769503001,+ "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": 1769488063,+ "guid": "78390dfc-f548-9908-8279-6b3064ea26b3",+ "path": "F:\\microes\\assets\\textures",+ "name": "textures",+ "type": 1,+ "fileSize": 0,+ "lastModified": 1769503001,+ "isDirectory": true+ },+ {+ "guid": "e704f3d4-170b-fecb-d4f9-4534e5056d78",+ "path": "assets\\shaders\\particle.glsl",+ "name": "particle.glsl",+ "type": 5,+ "fileSize": 0,+ "lastModified": 1769503001,"isDirectory": false},{- "guid": "6837963f-192a-0bcb-80e2-1cb45a8e35e7",- "path": "assets\\scripts\\PlayerController.js",- "name": "PlayerController.js",- "type": 4,+ "guid": "ff5ba3b5-d524-f202-72ae-a40add555353",+ "path": "assets\\scenes\\Level2.scene",+ "name": "Level2.scene",+ "type": 6,"fileSize": 0,"lastModified": 1769503002,"isDirectory": false},{- "guid": "182aa6a4-c774-8473-5238-49e1d28f1c5d",- "path": "assets\\prefabs\\Enemy.prefab",- "name": "Enemy.prefab",+ "guid": "0926ee8f-8eef-58fa-8d75-0ac49a8bf2b1",+ "path": "F:\\microes\\assets\\scenes",+ "name": "scenes",+ "type": 1,+ "fileSize": 0,+ "lastModified": 1769503002,+ "isDirectory": true+ },+ {+ "guid": "bbbdbf23-cecf-5053-0ebe-f3daf5b9e103",+ "path": "assets\\prefabs\\Explosion.prefab",+ "name": "Explosion.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,+ "guid": "ab8960b7-4b05-8029-7577-571c44b9c394",+ "path": "F:\\microes\\assets\\fonts",+ "name": "fonts",+ "type": 1,+ "fileSize": 0,+ "lastModified": 1769653161,+ "isDirectory": true+ },+ {+ "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": "abf642da-9512-d0bd-e306-e1bce616320c",+ "path": "F:\\microes\\assets\\scenes\\Level2.scene",+ "name": "Level2.scene",+ "type": 6,+ "fileSize": 0,+ "lastModified": 1769503002,+ "isDirectory": false+ },+ {+ "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": "83d5664f-9f0b-4687-73b2-b854c5e6d5cf",- "path": "assets\\fonts",- "name": "fonts",- "type": 1,+ "guid": "d6dbbbb3-87ce-a096-8027-f7b9d7129e6f",+ "path": "assets\\scripts\\EnemyAI.js",+ "name": "EnemyAI.js",+ "type": 4,"fileSize": 0,- "lastModified": 1769501795,- "isDirectory": true+ "lastModified": 1769503001,+ "isDirectory": false},{- "guid": "602e5d05-e6b5-3cbe-a3a4-857b4290f255",- "path": "assets\\scripts\\CameraFollow.js",- "name": "CameraFollow.js",+ "guid": "8283ad01-d8a2-48ae-c4e7-c1f8f0de7955",+ "path": "F:\\microes\\assets\\scripts\\UIManager.js",+ "name": "UIManager.js","type": 4,"fileSize": 0,- "lastModified": 1769503002,+ "lastModified": 1769503001,"isDirectory": false},{- "guid": "ca89cb26-11ee-a95a-940a-4d952d33b936",- "path": "F:\\microes\\assets\\scenes\\MainMenu.scene",- "name": "MainMenu.scene",- "type": 6,+ "guid": "04f5ced8-9d11-fa20-d612-06f12e563341",+ "path": "assets\\prefabs\\Coin.prefab",+ "name": "Coin.prefab",+ "type": 7,"fileSize": 0,- "lastModified": 1769503002,+ "lastModified": 1769503001,"isDirectory": false},{- "guid": "d44064b6-5cd8-29c4-8dc3-e6f0b71c6ad1",- "path": "F:\\microes\\assets\\textures\\ui_panel.png",- "name": "ui_panel.png",+ "guid": "3cc64ba4-5416-2768-7eff-dbba531179c4",+ "path": "assets\\textures\\particle.png",+ "name": "particle.png","type": 2,"fileSize": 0,"lastModified": 1769503001,"isDirectory": false},{- "guid": "ce792685-9959-2c9f-d909-597cab98305a",- "path": "F:\\microes\\assets\\fonts\\lucide_new.ttf",- "name": "lucide_new.ttf",- "type": 8,- "fileSize": 793848,- "lastModified": 1769653162,+ "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": "22bdfe10-0ff6-620f-56ec-26a8142aec33",- "path": "assets\\textures\\skybox.png",- "name": "skybox.png",- "type": 2,+ "guid": "0b354ef8-0528-35e8-b628-bed14b4960db",+ "path": "F:\\microes\\assets\\audio\\bgm_battle.mp3",+ "name": "bgm_battle.mp3",+ "type": 3,"fileSize": 0,- "lastModified": 1769503001,+ "lastModified": 1769503002,"isDirectory": false},{- "guid": "090ed68c-0dbe-382c-e163-5ad3bc22abad",- "path": "F:\\microes\\assets\\scenes\\Level1.scene",- "name": "Level1.scene",- "type": 6,+ "guid": "d11c2d62-5870-5040-3e1a-bf5bc046b98a",+ "path": "F:\\microes\\assets\\textures\\ui_button.png",+ "name": "ui_button.png",+ "type": 2,"fileSize": 0,- "lastModified": 1769503002,+ "lastModified": 1769503001,"isDirectory": false},{- "guid": "49fa3441-7d74-bf79-c116-717b849b78ce",- "path": "F:\\microes\\assets\\prefabs\\Player.prefab",- "name": "Player.prefab",- "type": 7,+ "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": "d3d9a556-8861-fbc2-504a-151ef73f41de",- "path": "F:\\microes\\assets\\textures\\player.png",- "name": "player.png",- "type": 2,+ "guid": "6f4b1d08-8b77-b7eb-629d-c2ea4efba441",+ "path": "F:\\microes\\assets\\prefabs\\Coin.prefab",+ "name": "Coin.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,+ "guid": "9d4aa6d5-4f32-3634-e6fa-2c79467a2a9c",+ "path": "F:\\microes\\assets\\shaders",+ "name": "shaders",+ "type": 1,"fileSize": 0,"lastModified": 1769503002,- "isDirectory": false+ "isDirectory": true},{- "guid": "bca66dcd-f892-9c43-f176-62ac939c4de4",- "path": "F:\\microes\\assets\\audio\\sfx_attack.wav",- "name": "sfx_attack.wav",+ "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},{@@ -443,98 +452,98 @@"isDirectory": false},{- "guid": "0dd456da-eb9c-cdac-c429-b918b2f78b00",- "path": "F:\\microes\\assets\\shaders\\particle.glsl",- "name": "particle.glsl",- "type": 5,+ "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": "86ed9e0d-442c-a047-9b51-09011c881685",- "path": "assets\\audio",- "name": "audio",- "type": 1,+ "guid": "a6dd418b-dd75-0249-f26e-bb1b4cc294c8",+ "path": "F:\\microes\\assets\\shaders\\postprocess.glsl",+ "name": "postprocess.glsl",+ "type": 5,"fileSize": 0,"lastModified": 1769503001,- "isDirectory": true+ "isDirectory": false},{- "guid": "99c227eb-f8d3-d0e8-843b-ceb126687e8b",- "path": "F:\\microes\\assets\\audio",- "name": "audio",+ "guid": "835ed25e-a75f-3a42-0953-d9af26b1cc87",+ "path": "F:\\microes\\assets\\test.txt",+ "name": "test.txt",+ "type": 0,+ "fileSize": 5,+ "lastModified": 1769488062,+ "isDirectory": false+ },+ {+ "guid": "83dd6048-d8fa-b62a-47d1-6f17771c459f",+ "path": "F:\\microes\\assets\\scripts",+ "name": "scripts","type": 1,"fileSize": 0,- "lastModified": 1769503001,+ "lastModified": 1769503002,"isDirectory": true},{- "guid": "1c90475d-0d57-c627-f004-15d52bee4319",- "path": "F:\\microes\\assets\\shaders\\water.glsl",- "name": "water.glsl",- "type": 5,+ "guid": "30c0a678-ec31-5c3c-f60c-2b982d208861",+ "path": "F:\\microes\\assets\\textures\\background.png",+ "name": "background.png",+ "type": 2,"fileSize": 0,"lastModified": 1769503001,"isDirectory": false},{- "guid": "9d69bbdf-276b-8f14-cc66-10e8dfcdb283",- "path": "F:\\microes\\assets\\scripts\\CameraFollow.js",- "name": "CameraFollow.js",- "type": 4,+ "guid": "f928d327-1c23-3d66-2009-d4d3daea8e31",+ "path": "F:\\microes\\assets\\textures\\skybox.png",+ "name": "skybox.png",+ "type": 2,"fileSize": 0,"lastModified": 1769503001,"isDirectory": false},{- "guid": "f543cca8-b481-a8be-8507-770c03c75eab",- "path": "assets\\scenes",- "name": "scenes",- "type": 1,- "fileSize": 0,- "lastModified": 1769503002,- "isDirectory": true- },- {- "guid": "f23cff38-7fcd-d864-b487-6ca733c33582",- "path": "F:\\microes\\assets\\scripts\\EnemyAI.js",- "name": "EnemyAI.js",- "type": 4,- "fileSize": 0,- "lastModified": 1769503002,+ "guid": "9db35f84-665c-e687-86b1-cc78a3934216",+ "path": "assets\\test.txt",+ "name": "test.txt",+ "type": 0,+ "fileSize": 5,+ "lastModified": 1769488062,"isDirectory": false},{- "guid": "cc395f8f-d6f9-a23d-db3b-7253b437aa8a",- "path": "F:\\microes\\assets\\.esengine",- "name": ".esengine",- "type": 1,+ "guid": "90db01ce-eadb-5131-35ee-a55e9f60bb4d",+ "path": "assets\\shaders\\water.glsl",+ "name": "water.glsl",+ "type": 5,"fileSize": 0,- "lastModified": 1769670136,- "isDirectory": true+ "lastModified": 1769503001,+ "isDirectory": false},{- "guid": "b162bd84-eee3-1b79-807c-c64d2c64cb2b",- "path": "F:\\microes\\assets\\scripts\\PlayerController.js",- "name": "PlayerController.js",- "type": 4,+ "guid": "b55ead52-b974-950b-26a3-a227e2ac41e9",+ "path": "assets\\audio\\sfx_coin.wav",+ "name": "sfx_coin.wav",+ "type": 3,"fileSize": 0,"lastModified": 1769503002,"isDirectory": false},{- "guid": "02f457d5-e200-7f62-6850-7612ed829a63",- "path": "assets\\scenes\\BossRoom.scene",- "name": "BossRoom.scene",- "type": 6,+ "guid": "c6113f63-03d0-811d-550a-8f26f331233d",+ "path": "assets\\textures\\tileset.png",+ "name": "tileset.png",+ "type": 2,"fileSize": 0,"lastModified": 1769503002,"isDirectory": false},{- "guid": "38633421-fb34-4766-58e7-b4ba7c8b5ee3",- "path": "assets\\audio\\sfx_explosion.wav",+ "guid": "6e88b347-db2d-b526-87c6-301569094b15",+ "path": "F:\\microes\\assets\\audio\\sfx_explosion.wav","name": "sfx_explosion.wav","type": 3,"fileSize": 0,@@ -542,251 +551,233 @@"isDirectory": false},{- "guid": "2402078f-7772-c860-8bce-dfdb1fc37788",- "path": "F:\\microes\\assets\\audio\\bgm_main.mp3",- "name": "bgm_main.mp3",- "type": 3,+ "guid": "a424334b-4399-6ab1-440c-7da10d865e15",+ "path": "assets\\scripts\\UIManager.js",+ "name": "UIManager.js",+ "type": 4,"fileSize": 0,- "lastModified": 1769503002,+ "lastModified": 1769503001,"isDirectory": false},{- "guid": "ca417dff-fe94-4361-ec9b-16504f048514",- "path": "F:\\microes\\assets\\prefabs\\Bullet.prefab",- "name": "Bullet.prefab",- "type": 7,+ "guid": "32dd883f-81c7-59a9-8229-5920e8152da1",+ "path": "assets\\prefabs",+ "name": "prefabs",+ "type": 1,+ "fileSize": 0,+ "lastModified": 1769503001,+ "isDirectory": true+ },+ {+ "guid": "4b48ff38-aeb0-7a1b-38ec-03ad938736e9",+ "path": "F:\\microes\\assets\\shaders\\sprite.glsl",+ "name": "sprite.glsl",+ "type": 5,"fileSize": 0,"lastModified": 1769503002,"isDirectory": false},{- "guid": "7d86b8df-60d3-330a-ae99-ae597a929a9b",- "path": "assets\\textures\\player.png",- "name": "player.png",- "type": 2,+ "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": "abf642da-9512-d0bd-e306-e1bce616320c",- "path": "F:\\microes\\assets\\scenes\\Level2.scene",- "name": "Level2.scene",- "type": 6,+ "guid": "22bdfe10-0ff6-620f-56ec-26a8142aec33",+ "path": "assets\\textures\\skybox.png",+ "name": "skybox.png",+ "type": 2,"fileSize": 0,- "lastModified": 1769503002,+ "lastModified": 1769503001,"isDirectory": false},{- "guid": "0926ee8f-8eef-58fa-8d75-0ac49a8bf2b1",- "path": "F:\\microes\\assets\\scenes",- "name": "scenes",+ "guid": "08719359-3487-beb2-0d62-f54a2a8634c4",+ "path": "assets\\shaders",+ "name": "shaders","type": 1,"fileSize": 0,- "lastModified": 1769503001,+ "lastModified": 1769503002,"isDirectory": true},{- "guid": "0f5a7d56-b021-7cfe-9ffd-b6deba57b565",- "path": "assets\\textures\\ui_panel.png",- "name": "ui_panel.png",- "type": 2,+ "guid": "6650f3d3-a906-b4a9-1873-b75759499bf8",+ "path": "F:\\microes\\assets\\audio\\sfx_jump.wav",+ "name": "sfx_jump.wav",+ "type": 3,"fileSize": 0,"lastModified": 1769503001,"isDirectory": false},{- "guid": "bbbdbf23-cecf-5053-0ebe-f3daf5b9e103",- "path": "assets\\prefabs\\Explosion.prefab",- "name": "Explosion.prefab",+ "guid": "44626f54-604d-ae12-0f2e-2087f068acbf",+ "path": "F:\\microes\\assets\\prefabs\\Enemy.prefab",+ "name": "Enemy.prefab","type": 7,"fileSize": 0,"lastModified": 1769503002,"isDirectory": false},{- "guid": "ab8960b7-4b05-8029-7577-571c44b9c394",- "path": "F:\\microes\\assets\\fonts",- "name": "fonts",- "type": 1,- "fileSize": 0,- "lastModified": 1769653161,- "isDirectory": true- },- {- "guid": "7fe2a865-bb30-1847-62e3-d289b5616a3a",- "path": "F:\\microes\\assets\\scenes\\BossRoom.scene",- "name": "BossRoom.scene",- "type": 6,+ "guid": "ce69c963-c0ea-0fb2-c96c-bf1afc0e0802",+ "path": "assets\\shaders\\postprocess.glsl",+ "name": "postprocess.glsl",+ "type": 5,"fileSize": 0,"lastModified": 1769503002,"isDirectory": false},{- "guid": "6e88b347-db2d-b526-87c6-301569094b15",- "path": "F:\\microes\\assets\\audio\\sfx_explosion.wav",- "name": "sfx_explosion.wav",- "type": 3,- "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": 1769511858,"isDirectory": false},{- "guid": "c6113f63-03d0-811d-550a-8f26f331233d",- "path": "assets\\textures\\tileset.png",- "name": "tileset.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": "b55ead52-b974-950b-26a3-a227e2ac41e9",- "path": "assets\\audio\\sfx_coin.wav",- "name": "sfx_coin.wav",- "type": 3,- "fileSize": 0,- "lastModified": 1769503002,+ "guid": "06d02285-6f13-7665-e142-87cc08b9f6b8",+ "path": "assets\\fonts\\lucide.ttf",+ "name": "lucide.ttf",+ "type": 8,+ "fileSize": 793848,+ "lastModified": 1769501796,"isDirectory": false},{- "guid": "90db01ce-eadb-5131-35ee-a55e9f60bb4d",- "path": "assets\\shaders\\water.glsl",- "name": "water.glsl",- "type": 5,+ "guid": "e0220f45-6261-175f-883b-ba80783788f2",+ "path": "assets\\textures",+ "name": "textures",+ "type": 1,"fileSize": 0,"lastModified": 1769503001,- "isDirectory": false+ "isDirectory": true},{- "guid": "d6dbbbb3-87ce-a096-8027-f7b9d7129e6f",- "path": "assets\\scripts\\EnemyAI.js",- "name": "EnemyAI.js",- "type": 4,+ "guid": "2402078f-7772-c860-8bce-dfdb1fc37788",+ "path": "F:\\microes\\assets\\audio\\bgm_main.mp3",+ "name": "bgm_main.mp3",+ "type": 3,"fileSize": 0,"lastModified": 1769503001,"isDirectory": false},{- "guid": "04f5ced8-9d11-fa20-d612-06f12e563341",- "path": "assets\\prefabs\\Coin.prefab",- "name": "Coin.prefab",- "type": 7,+ "guid": "0e48ebc1-25c8-2588-29aa-fb40564e2355",+ "path": "assets\\scenes\\MainMenu.scene",+ "name": "MainMenu.scene",+ "type": 6,"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": "e11483d8-2203-6eff-1b7e-0932b819f1c9",+ "path": "assets\\audio\\sfx_attack.wav",+ "name": "sfx_attack.wav",+ "type": 3,"fileSize": 0,- "lastModified": 1769503002,+ "lastModified": 1769503001,"isDirectory": false},{- "guid": "3cc64ba4-5416-2768-7eff-dbba531179c4",- "path": "assets\\textures\\particle.png",- "name": "particle.png",- "type": 2,+ "guid": "4f4e6a0b-08fb-1c62-5a27-830f643cacff",+ "path": "F:\\microes\\assets\\prefabs",+ "name": "prefabs",+ "type": 1,"fileSize": 0,"lastModified": 1769503001,- "isDirectory": false+ "isDirectory": true},{- "guid": "02f1f294-5a7f-d28b-7095-a04518207f9c",- "path": "F:\\microes\\assets\\scripts\\GameManager.js",- "name": "GameManager.js",- "type": 4,- "fileSize": 0,- "lastModified": 1769503002,+ "guid": "44aa95ad-d460-37e0-041f-c6a4449f8b17",+ "path": "assets\\textures\\test.png",+ "name": "test.png",+ "type": 2,+ "fileSize": 6,+ "lastModified": 1769488063,"isDirectory": false},{- "guid": "0b354ef8-0528-35e8-b628-bed14b4960db",- "path": "F:\\microes\\assets\\audio\\bgm_battle.mp3",- "name": "bgm_battle.mp3",- "type": 3,+ "guid": "b9c53311-d99a-e00b-9ba2-358e123efa4e",+ "path": "assets\\scripts\\GameManager.js",+ "name": "GameManager.js",+ "type": 4,"fileSize": 0,"lastModified": 1769503002,"isDirectory": false},{- "guid": "d11c2d62-5870-5040-3e1a-bf5bc046b98a",- "path": "F:\\microes\\assets\\textures\\ui_button.png",- "name": "ui_button.png",+ "guid": "539c3218-76fb-bed8-1442-3c43ae5be464",+ "path": "F:\\microes\\assets\\textures\\tileset.png",+ "name": "tileset.png","type": 2,"fileSize": 0,"lastModified": 1769503001,"isDirectory": false},{- "guid": "c6908b3b-7d16-8e81-5c2d-c65c46fee0d4",- "path": "assets\\audio\\bgm_battle.mp3",- "name": "bgm_battle.mp3",- "type": 3,+ "guid": "fb6e1999-a210-5293-9dc9-f648e6e8fc1f",+ "path": "assets\\shaders\\sprite.glsl",+ "name": "sprite.glsl",+ "type": 5,"fileSize": 0,"lastModified": 1769503002,"isDirectory": false},{- "guid": "e0220f45-6261-175f-883b-ba80783788f2",- "path": "assets\\textures",- "name": "textures",- "type": 1,- "fileSize": 0,- "lastModified": 1769503001,- "isDirectory": true- },- {- "guid": "6f4b1d08-8b77-b7eb-629d-c2ea4efba441",- "path": "F:\\microes\\assets\\prefabs\\Coin.prefab",- "name": "Coin.prefab",- "type": 7,+ "guid": "7d86b8df-60d3-330a-ae99-ae597a929a9b",+ "path": "assets\\textures\\player.png",+ "name": "player.png",+ "type": 2,"fileSize": 0,"lastModified": 1769503002,"isDirectory": false},{- "guid": "88f4512c-08fc-7521-0720-aa75e35defbc",- "path": "assets\\audio\\bgm_main.mp3",- "name": "bgm_main.mp3",- "type": 3,+ "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": "9d4aa6d5-4f32-3634-e6fa-2c79467a2a9c",- "path": "F:\\microes\\assets\\shaders",- "name": "shaders",- "type": 1,+ "guid": "e1d87090-38ce-2d60-5bdd-1f928fdaf88a",+ "path": "assets\\scenes\\Level1.scene",+ "name": "Level1.scene",+ "type": 6,"fileSize": 0,"lastModified": 1769503002,- "isDirectory": true+ "isDirectory": false},{- "guid": "a6dd418b-dd75-0249-f26e-bb1b4cc294c8",- "path": "F:\\microes\\assets\\shaders\\postprocess.glsl",- "name": "postprocess.glsl",- "type": 5,+ "guid": "53cf7de5-ae26-2632-e022-e9108f6bbc2c",+ "path": "F:\\microes\\assets\\audio\\sfx_coin.wav",+ "name": "sfx_coin.wav",+ "type": 3,"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,- "isDirectory": false- },- {- "guid": "83dd6048-d8fa-b62a-47d1-6f17771c459f",- "path": "F:\\microes\\assets\\scripts",+ "guid": "08964537-6809-2c47-8997-7bbf1c75029f",+ "path": "assets\\scripts","name": "scripts","type": 1,"fileSize": 0,@@ -794,40 +785,49 @@"isDirectory": true},{- "guid": "30c0a678-ec31-5c3c-f60c-2b982d208861",- "path": "F:\\microes\\assets\\textures\\background.png",- "name": "background.png",- "type": 2,+ "guid": "ed1cf9a5-9d96-50d7-e385-82c605f70a63",+ "path": "F:\\microes\\assets\\prefabs\\Explosion.prefab",+ "name": "Explosion.prefab",+ "type": 7,"fileSize": 0,"lastModified": 1769503002,"isDirectory": false},{- "guid": "f928d327-1c23-3d66-2009-d4d3daea8e31",- "path": "F:\\microes\\assets\\textures\\skybox.png",- "name": "skybox.png",+ "guid": "8af759e0-a053-8e8c-1e34-48843f734d2f",+ "path": "assets\\textures\\enemy.png",+ "name": "enemy.png","type": 2,"fileSize": 0,"lastModified": 1769503002,"isDirectory": false},{- "guid": "9db35f84-665c-e687-86b1-cc78a3934216",- "path": "assets\\test.txt",- "name": "test.txt",+ "guid": "a638dc81-b60d-567f-6820-13f4e9998407",+ "path": "assets\\.esengine\\assets.db",+ "name": "assets.db","type": 0,- "fileSize": 5,- "lastModified": 1769488062,+ "fileSize": 2186,+ "lastModified": 1769502460,"isDirectory": false},{- "guid": "4b48ff38-aeb0-7a1b-38ec-03ad938736e9",- "path": "F:\\microes\\assets\\shaders\\sprite.glsl",- "name": "sprite.glsl",- "type": 5,+ "guid": "e19fb621-dd86-3c0c-6b10-142a848c6a14",+ "path": "assets\\audio\\sfx_jump.wav",+ "name": "sfx_jump.wav",+ "type": 3,"fileSize": 0,- "lastModified": 1769503001,+ "lastModified": 1769503002,"isDirectory": false+ },+ {+ "guid": "cf70754c-26ba-346d-c01d-ff9fc29a6e9e",+ "path": "assets\\.esengine",+ "name": ".esengine",+ "type": 1,+ "fileSize": 0,+ "lastModified": 1769495857,+ "isDirectory": true}]}diff --git a/src/esengine/editor/camera/EditorCamera.cpp b/src/esengine/editor/camera/EditorCamera.cppindex b0e7de558..d560c0d71 100644--- a/src/esengine/editor/camera/EditorCamera.cpp+++ b/src/esengine/editor/camera/EditorCamera.cpp@@ -174,4 +174,10 @@ void EditorCamera::mouseZoom(f32 delta) {updateView();}+void EditorCamera::setRotation(f32 pitch, f32 yaw) {+ pitch_ = glm::clamp(pitch, -glm::half_pi<f32>() + 0.01f, glm::half_pi<f32>() - 0.01f);+ yaw_ = yaw;+ updateView();+}+} // namespace esengine::editordiff --git a/src/esengine/editor/camera/EditorCamera.hpp b/src/esengine/editor/camera/EditorCamera.hppindex 1e4672dfc..569a4555f 100644--- a/src/esengine/editor/camera/EditorCamera.hpp+++ b/src/esengine/editor/camera/EditorCamera.hpp@@ -154,6 +154,15 @@ public:/** @brief Gets the distance from focal point */f32 getDistance() const { return distance_; }+ /** @brief Gets pitch angle */+ f32 getPitch() const { return pitch_; }++ /** @brief Gets yaw angle */+ f32 getYaw() const { return yaw_; }++ /** @brief Sets pitch and yaw angles directly */+ void setRotation(f32 pitch, f32 yaw);+private:void updateView();glm::quat getOrientation() const;diff --git a/src/esengine/editor/panels/SceneViewPanel.cpp b/src/esengine/editor/panels/SceneViewPanel.cppindex 151b72902..a5641ef15 100644--- a/src/esengine/editor/panels/SceneViewPanel.cpp+++ b/src/esengine/editor/panels/SceneViewPanel.cpp@@ -46,6 +46,30 @@ const char* GRID_FRAGMENT_SHADER = R"(})";+const char* AXIS_VERTEX_SHADER = R"(+ attribute vec3 a_position;+ attribute vec4 a_color;++ uniform mat4 u_viewProj;++ varying vec4 v_color;++ void main() {+ gl_Position = u_viewProj * vec4(a_position, 1.0);+ v_color = a_color;+ }+)";++const char* AXIS_FRAGMENT_SHADER = R"(+ precision mediump float;++ varying vec4 v_color;++ void main() {+ gl_FragColor = v_color;+ }+)";+}namespace esengine::editor {@@ -114,10 +138,28 @@ void SceneViewPanel::render(ui::UIBatchRenderer& renderer) {glm::vec2(0.0f, 1.0f),glm::vec2(1.0f, 0.0f));++ renderer.flush();+ renderAxisGizmo();}}bool SceneViewPanel::onMouseDown(const ui::MouseButtonEvent& event) {+ if (event.button == ui::MouseButton::Left && !event.alt && !event.ctrl && !event.shift) {+ i32 axisHit = hitTestAxisGizmo(event.x, event.y);+ if (axisHit >= 0) {+ switch (axisHit) {+ case 0: setViewToRight(); break;+ case 1: setViewToTop(); break;+ case 2: setViewToFront(); break;+ case 3: setViewToLeft(); break;+ case 4: setViewToBottom(); break;+ case 5: setViewToBack(); break;+ }+ return true;+ }+ }+camera_.onMouseDown(event);return true;}@@ -277,4 +319,246 @@ void SceneViewPanel::updateFramebufferSize() {}}+void SceneViewPanel::initAxisGizmoData() {+ std::vector<f32> vertices;++ auto addVertex = [&vertices](const glm::vec3& pos, const glm::vec4& color) {+ vertices.insert(vertices.end(), {pos.x, pos.y, pos.z, color.r, color.g, color.b, color.a});+ };++ auto addCone = [&](const glm::vec3& base, const glm::vec3& tip, f32 radius,+ const glm::vec4& color, i32 segments = 16) {+ glm::vec3 dir = glm::normalize(tip - base);+ glm::vec3 up = glm::abs(dir.y) < 0.99f ? glm::vec3(0, 1, 0) : glm::vec3(1, 0, 0);+ glm::vec3 right = glm::normalize(glm::cross(dir, up));+ up = glm::cross(right, dir);++ for (i32 i = 0; i < segments; ++i) {+ f32 angle1 = (f32(i) / segments) * glm::two_pi<f32>();+ f32 angle2 = (f32(i + 1) / segments) * glm::two_pi<f32>();++ glm::vec3 p1 = base + (right * glm::cos(angle1) + up * glm::sin(angle1)) * radius;+ glm::vec3 p2 = base + (right * glm::cos(angle2) + up * glm::sin(angle2)) * radius;++ addVertex(tip, color);+ addVertex(p1, color);+ addVertex(p2, color);++ addVertex(base, color);+ addVertex(p2, color);+ addVertex(p1, color);+ }+ };++ auto addCylinder = [&](const glm::vec3& start, const glm::vec3& end, f32 radius,+ const glm::vec4& color, i32 segments = 10) {+ glm::vec3 dir = glm::normalize(end - start);+ glm::vec3 up = glm::abs(dir.y) < 0.99f ? glm::vec3(0, 1, 0) : glm::vec3(1, 0, 0);+ glm::vec3 right = glm::normalize(glm::cross(dir, up));+ up = glm::cross(right, dir);++ for (i32 i = 0; i < segments; ++i) {+ f32 angle1 = (f32(i) / segments) * glm::two_pi<f32>();+ f32 angle2 = (f32(i + 1) / segments) * glm::two_pi<f32>();++ glm::vec3 offset1 = (right * glm::cos(angle1) + up * glm::sin(angle1)) * radius;+ glm::vec3 offset2 = (right * glm::cos(angle2) + up * glm::sin(angle2)) * radius;++ glm::vec3 s1 = start + offset1, s2 = start + offset2;+ glm::vec3 e1 = end + offset1, e2 = end + offset2;++ addVertex(s1, color);+ addVertex(e1, color);+ addVertex(e2, color);++ addVertex(s1, color);+ addVertex(e2, color);+ addVertex(s2, color);+ }+ };++ auto addSphere = [&](const glm::vec3& center, f32 radius, const glm::vec4& color,+ i32 rings = 8, i32 sectors = 12) {+ for (i32 r = 0; r < rings; ++r) {+ f32 theta1 = (f32(r) / rings) * glm::pi<f32>();+ f32 theta2 = (f32(r + 1) / rings) * glm::pi<f32>();++ for (i32 s = 0; s < sectors; ++s) {+ f32 phi1 = (f32(s) / sectors) * glm::two_pi<f32>();+ f32 phi2 = (f32(s + 1) / sectors) * glm::two_pi<f32>();++ glm::vec3 n1(glm::sin(theta1) * glm::cos(phi1), glm::cos(theta1), glm::sin(theta1) * glm::sin(phi1));+ glm::vec3 n2(glm::sin(theta1) * glm::cos(phi2), glm::cos(theta1), glm::sin(theta1) * glm::sin(phi2));+ glm::vec3 n3(glm::sin(theta2) * glm::cos(phi2), glm::cos(theta2), glm::sin(theta2) * glm::sin(phi2));+ glm::vec3 n4(glm::sin(theta2) * glm::cos(phi1), glm::cos(theta2), glm::sin(theta2) * glm::sin(phi1));++ addVertex(center + n1 * radius, color);+ addVertex(center + n3 * radius, color);+ addVertex(center + n2 * radius, color);++ addVertex(center + n1 * radius, color);+ addVertex(center + n4 * radius, color);+ addVertex(center + n3 * radius, color);+ }+ }+ };++ glm::vec4 red(0.9f, 0.2f, 0.2f, 0.9f);+ glm::vec4 green(0.3f, 0.85f, 0.3f, 0.9f);+ glm::vec4 blue(0.3f, 0.5f, 0.95f, 0.9f);+ glm::vec4 dimRed(0.5f, 0.2f, 0.2f, 0.5f);+ glm::vec4 dimGreen(0.2f, 0.45f, 0.2f, 0.5f);+ glm::vec4 dimBlue(0.2f, 0.3f, 0.55f, 0.5f);+ glm::vec4 gray(0.45f, 0.45f, 0.5f, 0.85f);++ f32 shaftLen = 0.6f;+ f32 shaftRadius = 0.04f;+ f32 coneLen = 0.35f;+ f32 coneRadius = 0.12f;++ addCylinder(glm::vec3(0), glm::vec3(shaftLen, 0, 0), shaftRadius, red);+ addCone(glm::vec3(shaftLen, 0, 0), glm::vec3(shaftLen + coneLen, 0, 0), coneRadius, red);++ addCylinder(glm::vec3(0), glm::vec3(0, shaftLen, 0), shaftRadius, green);+ addCone(glm::vec3(0, shaftLen, 0), glm::vec3(0, shaftLen + coneLen, 0), coneRadius, green);++ addCylinder(glm::vec3(0), glm::vec3(0, 0, shaftLen), shaftRadius, blue);+ addCone(glm::vec3(0, 0, shaftLen), glm::vec3(0, 0, shaftLen + coneLen), coneRadius, blue);++ f32 backDist = 0.35f;+ f32 backRadius = 0.08f;+ addSphere(glm::vec3(-backDist, 0, 0), backRadius, dimRed);+ addSphere(glm::vec3(0, -backDist, 0), backRadius, dimGreen);+ addSphere(glm::vec3(0, 0, -backDist), backRadius, dimBlue);++ addSphere(glm::vec3(0), 0.1f, gray);++ axisVertexCount_ = static_cast<u32>(vertices.size() / 7);++ axisVAO_ = VertexArray::create();++ auto vbo = VertexBuffer::createRaw(vertices.data(), static_cast<u32>(vertices.size() * sizeof(f32)));+ vbo->setLayout({+ { ShaderDataType::Float3, "a_position" },+ { ShaderDataType::Float4, "a_color" }+ });++ axisVAO_->addVertexBuffer(Shared<VertexBuffer>(std::move(vbo)));++ axisShader_ = Shader::create(AXIS_VERTEX_SHADER, AXIS_FRAGMENT_SHADER);++ axisInitialized_ = true;+}++void SceneViewPanel::renderAxisGizmo() {+ if (!axisInitialized_) {+ initAxisGizmoData();+ }++ if (!axisVAO_ || !axisShader_) return;++ const ui::Rect& bounds = getBounds();+ f32 gizmoSize = 60.0f;+ f32 padding = 12.0f;++ axisGizmoCenter_ = glm::vec2(+ bounds.x + bounds.width - gizmoSize - padding,+ bounds.y + gizmoSize + padding+ );++ GLint savedViewport[4];+ glGetIntegerv(GL_VIEWPORT, savedViewport);++ f32 vpX = axisGizmoCenter_.x - gizmoSize;+ f32 vpY = savedViewport[3] - axisGizmoCenter_.y - gizmoSize;+ glViewport(static_cast<GLint>(vpX), static_cast<GLint>(vpY),+ static_cast<GLsizei>(gizmoSize * 2), static_cast<GLsizei>(gizmoSize * 2));++ glEnable(GL_DEPTH_TEST);+ glEnable(GL_BLEND);+ glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);+ glClear(GL_DEPTH_BUFFER_BIT);++ glm::mat4 rotation = glm::mat4_cast(glm::conjugate(glm::quat(glm::vec3(-camera_.getPitch(), -camera_.getYaw(), 0.0f))));+ glm::mat4 proj = glm::ortho(-1.5f, 1.5f, -1.5f, 1.5f, -10.0f, 10.0f);+ glm::mat4 viewProj = proj * rotation;++ axisShader_->bind();+ axisShader_->setUniform("u_viewProj", viewProj);++ axisVAO_->bind();+ glDrawArrays(GL_TRIANGLES, 0, static_cast<GLsizei>(axisVertexCount_));++ glDisable(GL_BLEND);+ glDisable(GL_DEPTH_TEST);+ glViewport(savedViewport[0], savedViewport[1], savedViewport[2], savedViewport[3]);+}++i32 SceneViewPanel::hitTestAxisGizmo(f32 x, f32 y) {+ f32 localX = x - axisGizmoCenter_.x;+ f32 localY = y - axisGizmoCenter_.y;++ f32 dist = glm::sqrt(localX * localX + localY * localY);+ if (dist > axisGizmoRadius_ * 2.0f) return -1;++ glm::quat camOrientation = glm::quat(glm::vec3(-camera_.getPitch(), -camera_.getYaw(), 0.0f));+ glm::mat4 rotation = glm::mat4_cast(glm::conjugate(camOrientation));++ f32 posAxisDist = 0.95f;+ f32 negAxisDist = 0.35f;+ f32 scale = axisGizmoRadius_ / 1.5f;++ glm::vec3 xPos = glm::vec3(rotation * glm::vec4(posAxisDist, 0, 0, 0));+ glm::vec3 yPos = glm::vec3(rotation * glm::vec4(0, posAxisDist, 0, 0));+ glm::vec3 zPos = glm::vec3(rotation * glm::vec4(0, 0, posAxisDist, 0));+ glm::vec3 xNeg = glm::vec3(rotation * glm::vec4(-negAxisDist, 0, 0, 0));+ glm::vec3 yNeg = glm::vec3(rotation * glm::vec4(0, -negAxisDist, 0, 0));+ glm::vec3 zNeg = glm::vec3(rotation * glm::vec4(0, 0, -negAxisDist, 0));++ glm::vec2 screenXPos = glm::vec2(xPos.x, -xPos.y) * scale;+ glm::vec2 screenYPos = glm::vec2(yPos.x, -yPos.y) * scale;+ glm::vec2 screenZPos = glm::vec2(zPos.x, -zPos.y) * scale;+ glm::vec2 screenXNeg = glm::vec2(xNeg.x, -xNeg.y) * scale;+ glm::vec2 screenYNeg = glm::vec2(yNeg.x, -yNeg.y) * scale;+ glm::vec2 screenZNeg = glm::vec2(zNeg.x, -zNeg.y) * scale;++ glm::vec2 clickPos(localX, localY);+ f32 threshold = 18.0f;+ f32 smallThreshold = 12.0f;++ if (glm::length(clickPos - screenXPos) < threshold) return 0;+ if (glm::length(clickPos - screenYPos) < threshold) return 1;+ if (glm::length(clickPos - screenZPos) < threshold) return 2;++ if (glm::length(clickPos - screenXNeg) < smallThreshold) return 3;+ if (glm::length(clickPos - screenYNeg) < smallThreshold) return 4;+ if (glm::length(clickPos - screenZNeg) < smallThreshold) return 5;++ return -1;+}++void SceneViewPanel::setViewToTop() {+ camera_.setRotation(glm::half_pi<f32>() - 0.01f, 0.0f);+}++void SceneViewPanel::setViewToBottom() {+ camera_.setRotation(-glm::half_pi<f32>() + 0.01f, 0.0f);+}++void SceneViewPanel::setViewToFront() {+ camera_.setRotation(0.0f, 0.0f);+}++void SceneViewPanel::setViewToBack() {+ camera_.setRotation(0.0f, glm::pi<f32>());+}++void SceneViewPanel::setViewToRight() {+ camera_.setRotation(0.0f, -glm::half_pi<f32>());+}++void SceneViewPanel::setViewToLeft() {+ camera_.setRotation(0.0f, glm::half_pi<f32>());+}+} // namespace esengine::editordiff --git a/src/esengine/editor/panels/SceneViewPanel.hpp b/src/esengine/editor/panels/SceneViewPanel.hppindex 1a6a310e7..e90324a0f 100644--- a/src/esengine/editor/panels/SceneViewPanel.hpp+++ b/src/esengine/editor/panels/SceneViewPanel.hpp@@ -83,13 +83,23 @@ public:bool onMouseMove(const ui::MouseMoveEvent& event) override;bool onScroll(const ui::ScrollEvent& event) override;+ void setViewToTop();+ void setViewToFront();+ void setViewToRight();+ void setViewToBack();+ void setViewToLeft();+ void setViewToBottom();+private:void renderSceneToTexture();void renderSceneContent();void renderGrid(const glm::mat4& viewProj);void renderSprites(const glm::mat4& viewProj);+ void renderAxisGizmo();void updateFramebufferSize();void initGridData();+ void initAxisGizmoData();+ i32 hitTestAxisGizmo(f32 x, f32 y);ecs::Registry& registry_;EntitySelection& selection_;@@ -102,6 +112,14 @@ private:u32 gridVertexCount_ = 0;bool gridInitialized_ = false;+ Unique<VertexArray> axisVAO_;+ Unique<Shader> axisShader_;+ u32 axisVertexCount_ = 0;+ bool axisInitialized_ = false;+ glm::vec2 axisGizmoCenter_{0.0f};+ f32 axisGizmoRadius_ = 50.0f;+ i32 hoveredAxis_ = -1;+u32 viewportWidth_ = 1280;u32 viewportHeight_ = 720;bool framebufferNeedsResize_ = false;