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(input): add mobile controls and device services
yhh8506ecbf3c94
diff --git a/AGENTS.md b/AGENTS.mdindex 1eaef3a26..7b13c8fc4 100644--- a/AGENTS.md+++ b/AGENTS.md@@ -13,6 +13,9 @@# Delivery workflow+- Local verification must not launch the editor, Electron windows, or other visible+ apps. Use genuine headless browser and CLI checks; run editor acceptance in CI.+- After completing appropriate verification, commit and push changes directly tothe main branch (currently master). Do not create pull requests unless the userexplicitly requests one.diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 61266891f..5bd05dc86 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -14,6 +14,10 @@ published separately; it ships inside the editor.## [Unreleased]+### Added++- **Mobile controls share InputMap and device capability results.** Fixed/follow virtual joysticks and held buttons support independent touches, mouse Play preview, radial dead zones and cancellation. Web, mini-game and native adapters expose motion, vibration and screen wake with explicit unavailable/denied results; browser fullscreen and pointer lock observe exits. The Mobile Controls example demonstrates the workflow. Physical device acceptance remains pending.+### Fixed- **Sorted 2D batches join across emission index gaps.** Compatible transient quads reuse contiguous index ranges in painter order even when their producers emitted them apart, reducing UI and text draw calls without combining different clipping states or external buffers. Mixed sprite/text batches retain their original per-type entity statistics.@@ -23,6 +27,7 @@ published separately; it ships inside the editor.- **Runtime tree inspection indexes script component names once per snapshot.** Large script catalogues no longer require a name search for every component on every entity. The index is rebuilt for each group read, so registration, removal, aliases and context changes remain visible; builtin membership is still read from the current core.- **Selected runtime details reuse maintained hierarchy links.** Refreshing one entity reads its own parent and children instead of scanning every entity's parent. Child ordering still follows world storage, including after reparenting and draw-order edits; disabled children remain inspectable and native reparenting is read from the current core.+- **Widget prefabs preserve sibling paint order.** Serialization retains existing node identities while restoring children in authored order, so layered controls remain visible after scene loading. Virtual controls update before registered InputMap evaluation in the same frame.- **Runtime inspectors clear destroyed entity selections.** A selected entity that despawns now returns no detail row instead of an empty ghost entity, including when its native slot is reused. Requests without a live selection or tree avoid traversing the world; disabled live entities remain inspectable.diff --git a/build-tools/utils/xcodeProject.js b/build-tools/utils/xcodeProject.jsindex b0915292b..4f5bd662d 100644--- a/build-tools/utils/xcodeProject.js+++ b/build-tools/utils/xcodeProject.js@@ -47,7 +47,7 @@ const SYSTEM_FRAMEWORKS = [// Core Text names the font file the glyph rasterizer parses.'CoreText', 'Foundation',// miniaudio's CoreAudio backend, linked at build time (MA_NO_RUNTIME_LINKING).- 'AVFoundation', 'CoreAudio', 'AudioToolbox',+ 'AVFoundation', 'CoreAudio', 'AudioToolbox', 'CoreMotion', 'CoreHaptics',];/** Xcode's file type for an export resource, by extension. `folder` ships adiff --git a/desktop b/desktopindex d4e325adb..5b2a126ff 160000--- a/desktop+++ b/desktop@@ -1 +1 @@-Subproject commit d4e325adbbac51b307041163432bee8d3cf6ea2f+Subproject commit 5b2a126ff7130cb19cd5ed19c03cc6073bdffe39diff --git a/docs/astro/src/content/docs/scripting/input.mdx b/docs/astro/src/content/docs/scripting/input.mdxindex a2db169f9..5c7118471 100644--- a/docs/astro/src/content/docs/scripting/input.mdx+++ b/docs/astro/src/content/docs/scripting/input.mdx@@ -302,3 +302,50 @@ Each `*Down` reads held state; `*Pressed` / `*Released` are the this-frame edges- [Camera](/docs/graphics/camera/) — `screenToWorld` for arbitrary screen points.- [UI](/docs/ui/overview/) — UI consumes pointer input above the game world.++## Device capabilities++`Device.capabilities()` reports the host APIs it exposes. It does not certify+the physical sensor or vibration motor. Requests return `ok`, `unavailable`,+`denied`, or `failed`; check the result rather than catching unsupported-platform+exceptions.++```ts+const off = Device.motion.onChange(sample => {+ if (sample.gravity) console.log(sample.gravity);+});+// Call from the actual player gesture when the browser requires permission.+const result = await Device.motion.start({ accelerometer: true, gyroscope: false, rate: 'game' });+await Device.vibrate({ duration: 'short' });+await Device.keepScreenOn(true);+await Device.fullscreen(true);+await Device.pointerLock(true);+// Stop subscriptions and requests when the control layer is retired.+off();+await Device.motion.stop();+await Device.keepScreenOn(false);+```++Rates are `game` (about 16 ms), `ui` (60 ms), and `normal` (200 ms); host sampling+limits still apply. Acceleration and filtered gravity use m/s², gyro uses rad/s,+and filtered Web orientation uses degrees. Missing channels remain `null`.+Native and mini-game adapters expose raw acceleration/gyro and gravity filtering;+absolute orientation is unavailable there. Device axes are not rotated to the+screen, and no pose fusion is performed.++Web motion permission requests, fullscreen and pointer lock must run inside the+original player event. Use `createButton`'s `userGesture: true` option. Motion and+screen wake need HTTPS or localhost. `Device.onChange` observes fullscreen /+pointer-lock exits and suspension. Motion and requested wake state resume on+foreground; `stop()` and `keepScreenOn(false)` revoke that intent.++Vibration is short/long with optional light/medium/heavy short intensity where+reported supported. Web vibration cannot control intensity. Older native+binaries and platforms without the APIs return unavailable. Native support needs+the updated Android/iOS runtime, including its sensor, permission and framework+bindings. Use the Mobile Controls example for an end-to-end project.++Platform references: [Web motion permission](https://developer.mozilla.org/en-US/docs/Web/API/DeviceMotionEvent/requestPermission),+[screen wake](https://developer.mozilla.org/en-US/docs/Web/API/Screen_Wake_Lock_API),+[Android sensors](https://developer.android.com/ndk/reference/group/sensor),+[iOS CoreMotion](https://developer.apple.com/documentation/coremotion/cmmotionmanager).diff --git a/docs/astro/src/content/docs/ui/widgets.mdx b/docs/astro/src/content/docs/ui/widgets.mdxindex 63b2deeed..41c9a018b 100644--- a/docs/astro/src/content/docs/ui/widgets.mdx+++ b/docs/astro/src/content/docs/ui/widgets.mdx@@ -472,3 +472,34 @@ horizontal anchor never disturbs the vertical layout, and vice versa. See- [UI Binding](/docs/ui/data-binding/) — signals and two-way widget binding.- [UI Interaction](/docs/ui/interaction/) — focus, drag & drop, pointer events.- [UI Theme](/docs/ui/theming/) — tokens, roles, live theme swaps, the project theme.++## VirtualJoystick++A virtual joystick captures one pointer until it lifts or is cancelled. `inputId`+names its InputMap `Virtual` binding. Fixed mode measures from the node centre;+Follow mode starts at the captured finger. Radius, radial dead zone and return+speed are editable in the inspector. The handle returns visually to rest while+its input becomes zero immediately on release.++```ts+const stick = createVirtualJoystick({ world, parent: canvas, inputId: 'move',+ mode: VirtualJoystickMode.Fixed, radius: 50, deadZone: 0.15 });+const actions = defineInputMap({ Move: Axis2D(Virtual('move')) });+```++The editor's Create → UI palette includes the same generated prefab. Mouse drag+in Play uses the same capture as touch. Disable, hide, remove, cancel or background+a control to release its own contribution; other controls keep their outputs.+Custom base/handle visuals are supported.++## VirtualButton++`createVirtualButton({ world, events, parent: canvas, inputId: 'fire', text: 'Fire' })`+uses the normal button appearance and publishes a held scalar to `Virtual('fire')`.+It supports independent fingers, multiple fingers on the same button, and taps+completed between frames. Multiple controls can share a binding without one+control's removal clearing the others. Use an explicit stable owner with+`Input.setVirtualSource` for custom controls, then remove that owner at teardown.++The **Mobile Controls** example authors both controls in its scene and combines+them with keyboard bindings, optional tilt, and hit vibration.diff --git a/docs/astro/src/content/docs/zh-cn/scripting/input.mdx b/docs/astro/src/content/docs/zh-cn/scripting/input.mdxindex 9f815807d..3886c70e1 100644--- a/docs/astro/src/content/docs/zh-cn/scripting/input.mdx+++ b/docs/astro/src/content/docs/zh-cn/scripting/input.mdx@@ -283,3 +283,43 @@ key-up 边沿,处理器看到的它仍是按住的,与 DOM `event.shiftKey` 的- [相机](/docs/zh-cn/graphics/camera/) —— 对任意屏幕点用 `screenToWorld`。- [UI](/docs/zh-cn/ui/overview/) —— UI 在游戏世界之上消费指针输入。++## 设备能力++`Device.capabilities()` 报告宿主提供的 API,不代表已经验证了实体传感器或震动+马达。请求返回 `ok`、`unavailable`、`denied` 或 `failed`,不支持的平台用返回值+判断。++```ts+const off = Device.motion.onChange(sample => {+ if (sample.gravity) console.log(sample.gravity);+});+// 浏览器需要授权时,在真实用户手势中调用。+const result = await Device.motion.start({ accelerometer: true, gyroscope: false, rate: 'game' });+await Device.vibrate({ duration: 'short' });+await Device.keepScreenOn(true);+await Device.fullscreen(true);+await Device.pointerLock(true);+off();+await Device.motion.stop();+await Device.keepScreenOn(false);+```++采样率档位为 `game`(约 16 ms)、`ui`(60 ms)和 `normal`(200 ms),实际频率+受宿主限制。加速度和滤波重力使用 m/s²,陀螺仪使用 rad/s,Web 朝向使用度;+缺失通道保留 `null`。原生和小游戏提供原始加速度、陀螺仪及重力滤波,绝对+朝向不可用。轴遵循设备坐标,不自动随屏幕旋转,也不做姿态融合。++Web 体感授权、全屏和指针锁定需要在原始用户事件中调用,可使用按钮的+`userGesture: true`。体感与屏幕常亮需要 HTTPS 或 localhost。`Device.onChange`+观察退出全屏、退出指针锁定及暂停;切后台会暂停体感并释放常亮,切回后恢复+仍被请求的状态。`stop()` 和 `keepScreenOn(false)` 取消恢复意图。++震动支持短/长,并在宿主支持时提供短震动的 light/medium/heavy 三档强度;+Web 无法控制强度。旧原生二进制或没有对应 API 的平台返回不可用。原生支持+需要重建包含传感器、权限和框架绑定的新 Android/iOS 运行时。++平台依据:[Web 体感权限](https://developer.mozilla.org/en-US/docs/Web/API/DeviceMotionEvent/requestPermission)、+[屏幕常亮](https://developer.mozilla.org/en-US/docs/Web/API/Screen_Wake_Lock_API)、+[Android 传感器](https://developer.android.com/ndk/reference/group/sensor)、+[iOS CoreMotion](https://developer.apple.com/documentation/coremotion/cmmotionmanager)。diff --git a/docs/astro/src/content/docs/zh-cn/ui/widgets.mdx b/docs/astro/src/content/docs/zh-cn/ui/widgets.mdxindex de81dfa71..97566f781 100644--- a/docs/astro/src/content/docs/zh-cn/ui/widgets.mdx+++ b/docs/astro/src/content/docs/zh-cn/ui/widgets.mdx@@ -423,3 +423,30 @@ Slider、Dialog、TextInput 等丢进场景,再在 Details 里编辑。活在组- [UI 数据绑定](/docs/zh-cn/ui/data-binding/) —— 信号与控件双向绑定。- [UI 交互](/docs/zh-cn/ui/interaction/) —— 焦点、拖放、指针事件。- [UI 主题](/docs/zh-cn/ui/theming/) —— token、角色、主题热切换与项目主题。++## VirtualJoystick++虚拟摇杆捕获一根手指,直到松开或取消。`inputId` 对应 InputMap 的 `Virtual`+绑定。Fixed 模式以控件中心为原点;Follow 模式从捕获的触点起步。检查器可编辑+半径、径向死区和回弹速度。松开时输入立即归零,手柄随后回到中心。++```ts+const stick = createVirtualJoystick({ world, parent: canvas, inputId: 'move',+ mode: VirtualJoystickMode.Fixed, radius: 50, deadZone: 0.15 });+const actions = defineInputMap({ Move: Axis2D(Virtual('move')) });+```++编辑器 Create → UI 面板提供同一个生成预制体。Play 中的鼠标拖动和触控使用+同一套捕获机制。禁用、隐藏、移除、取消或切后台会释放该控件自己的贡献,+其他控件仍保持输出。可以提供自定义底座和手柄外观。++## VirtualButton++`createVirtualButton({ world, events, parent: canvas, inputId: 'fire', text: 'Fire' })`+复用普通按钮外观,向 `Virtual('fire')` 输出按住状态。不同按钮、同一按钮上的+多个触点,以及两帧之间完成的短按都能正常释放。多个控件共享绑定时,移除+其中一个不会清空其他控件。自定义控件可使用固定 owner 的 `Input.setVirtualSource`,+并在销毁时移除该 owner。++**Mobile Controls** 示例在场景中放置这两个控件,同时支持键盘、可选倾斜操控和+命中震动。diff --git a/docs/astro/src/data/apiStability.generated.json b/docs/astro/src/data/apiStability.generated.jsonindex e0df6f70e..91a638b18 100644--- a/docs/astro/src/data/apiStability.generated.json+++ b/docs/astro/src/data/apiStability.generated.json@@ -3,11 +3,24 @@"counts": {"public": 115,"beta": 103,- "experimental": 2175,+ "experimental": 2194,"deprecated": 3},- "total": 2393,+ "total": 2412,"subsystems": [+ {+ "id": "mobile-controls",+ "title": "Mobile controls & device services",+ "titleZh": "移动控件与设备能力",+ "tier": "experimental",+ "why": "software contracts and exports are verified; physical sensor, haptic and permission acceptance is pending across target devices",+ "whyZh": "软件契约与导出已验证;目标真机的传感器、震动和授权验收仍待完成",+ "entry": [+ "Device",+ "VirtualJoystick",+ "VirtualButton"+ ]+ },{"id": "ecs","title": "ECS",diff --git a/docs/astro/src/data/componentDocs.ts b/docs/astro/src/data/componentDocs.tsindex 2c6300a60..6bb91c241 100644--- a/docs/astro/src/data/componentDocs.ts+++ b/docs/astro/src/data/componentDocs.ts@@ -108,6 +108,8 @@ export const COMPONENT_DOCS: Record<string, ComponentDoc> = {UIGear: { category: 'ui', summary: 'Per-page field values a controller drives declaratively, authored from the Details panel.', doc: 'ui/controllers', anchor: 'gears', anchorZh: '属性绑定' },UIDialog: { category: 'ui', summary: 'A modal dialog surface — backdrop, result, and open/close state.', doc: 'ui/widgets', anchor: 'dialog', anchorZh: 'dialog-对话框' },UIDropdown: { category: 'ui', summary: 'A dropdown selector: its options and the selected index.', doc: 'ui/widgets', anchor: 'dropdown', anchorZh: 'dropdown-下拉框' },+ VirtualJoystick: { category: 'ui', summary: 'An independently captured fixed or follow joystick, feeding a named virtual InputMap axis.', doc: 'ui/widgets', anchor: 'virtualjoystick', anchorZh: 'virtualjoystick' },+ VirtualButton: { category: 'ui', summary: 'A held virtual InputMap action with independent pointer ownership and normal button appearance.', doc: 'ui/widgets', anchor: 'virtualbutton', anchorZh: 'virtualbutton' },UISlider: { category: 'ui', summary: 'A draggable value along a range, with an optional step.', doc: 'ui/widgets', anchor: 'slider', anchorZh: 'slider-滑块' },UIToggle: { category: 'ui', summary: 'A two-state widget — checkbox or switch — and its group membership.', doc: 'ui/widgets', anchor: 'toggle', anchorZh: 'toggle-开关' },UIToggleGroup: { category: 'ui', summary: 'Makes the toggles beneath it exclusive — a radio group or tab bar. Put it on their common ancestor.', doc: 'ui/widgets', anchor: 'toggle', anchorZh: 'toggle-开关' },diff --git a/docs/astro/src/data/components.generated.json b/docs/astro/src/data/components.generated.jsonindex 50f0178ca..74c1cab55 100644--- a/docs/astro/src/data/components.generated.json+++ b/docs/astro/src/data/components.generated.json@@ -5755,6 +5755,83 @@"playbackRate"]},+ {+ "name": "VirtualButton",+ "source": "ts",+ "fields": [+ {+ "key": "inputId",+ "type": "string",+ "default": "\"fire\""+ },+ {+ "key": "value",+ "type": "number",+ "default": "1"+ }+ ],+ "animatable": [+ "value"+ ]+ },+ {+ "name": "VirtualJoystick",+ "source": "ts",+ "fields": [+ {+ "key": "inputId",+ "type": "string",+ "default": "\"move\""+ },+ {+ "key": "mode",+ "type": "enum",+ "default": "Fixed",+ "values": [+ "Fixed",+ "Follow"+ ]+ },+ {+ "key": "radius",+ "type": "number",+ "default": "50",+ "range": "≥ 1"+ },+ {+ "key": "deadZone",+ "type": "number",+ "default": "0.15",+ "range": "0–0.99"+ },+ {+ "key": "returnSpeed",+ "type": "number",+ "default": "18",+ "range": "≥ 0"+ },+ {+ "key": "base",+ "type": "Entity",+ "default": "none",+ "advanced": true+ },+ {+ "key": "handle",+ "type": "Entity",+ "default": "none",+ "advanced": true+ }+ ],+ "animatable": [+ "mode",+ "radius",+ "deadZone",+ "returnSpeed",+ "base",+ "handle"+ ]+ },{"name": "WheelJoint2D","source": "ts",diff --git a/examples/README.md b/examples/README.mdindex 1ae3c0187..6d87f053b 100644--- a/examples/README.md+++ b/examples/README.md@@ -26,6 +26,7 @@ for your own game.| **tween-animation** | Animation | Ease positions, scales and colors over time. || **cutscene** | Animation | A code-free cutscene: an FSM state plays a timeline via the built-in `timeline.play` / `timeline.finished` names, then hands over to gameplay (R to replay). || **input-demo** | Input | Keyboard, mouse and pointer input with a motion trail. |+| **mobile-controls** | Input | A CC0 pixel-art training room with an authored multi-touch joystick, attack button, tilt and device controls. || **input-actions** | Input | Named, rebindable actions (`defineInputMap`) across keyboard + gamepad, plus swipe/pinch gestures with a mouse bridge. || **audio-demo** | Audio | One-shot SFX and a beat visualizer driven by playback. || **collision-layers** | Physics | Layer-based collision filtering between groups of bodies. |@@ -76,3 +77,9 @@ so this asset is not free to reuse the way the CC0 art is — see [ASSETS.md](./See [ARCHITECTURE.md](./ARCHITECTURE.md) for the layout every example follows and theconventions to keep them consistent.++## Visual quality++Upgrade examples incrementally, prioritizing 2D input, sprites/animation, tilemaps, UI and audio before specialized 3D showcases. Mobile Controls establishes the first art baseline: a coherent palette, readable objectives, editable scenery, textured controls and immediate interaction feedback.++Use original project art or assets with an explicitly verified redistribution license. Keep the source URL, asset version and license in each example, include only assets it uses, and keep editable originals when drawing controls. Validate the rendered project and interactions in hidden editor and packaged Web/mini-game checks after art changes.diff --git a/examples/mobile-controls/ASSET_LICENSES.md b/examples/mobile-controls/ASSET_LICENSES.mdnew file mode 100644index 000000000..9d486c1ff--- /dev/null+++ b/examples/mobile-controls/ASSET_LICENSES.md@@ -0,0 +1,38 @@+# Asset licenses++Dungeon textures in `assets/textures/` are unmodified tiles from **Tiny Dungeon 1.0**, by Kenney.++- Source: https://kenney.nl/assets/tiny-dungeon+- License: [Creative Commons CC0 1.0 Universal](https://creativecommons.org/publicdomain/zero/1.0/)+- Downloaded: 2026-10-13+- Original tile mapping: `floor.png` = `tile_0048.png`, `floor-worn.png` = `tile_0049.png`, `wall.png` = `tile_0040.png`, `knight.png` = `tile_0097.png`, `monster.png` = `tile_0110.png`, `chest.png` = `tile_0089.png`, `torch.png` = `tile_0125.png`, `stairs.png` = `tile_0069.png`.++## Included original license++```text+Tiny Dungeon (1.0)++ Created/distributed by Kenney (www.kenney.nl)+ Creation date: 05-07-2022++ ------------------------------++ License: (Creative Commons Zero, CC0)+ http://creativecommons.org/publicdomain/zero/1.0/++ This content is free to use in personal, educational and commercial projects.++ Support us by crediting Kenney or www.kenney.nl (this is not mandatory)++ ------------------------------++ Donate: http://support.kenney.nl+ Patreon: http://patreon.com/kenney/++ Follow on Twitter for updates:+ http://twitter.com/KenneyNL+```++## Control graphics++`stick-base.png`, `stick-handle.png`, and `attack-button.png` are original project graphics released under CC0 1.0 Universal. Editable vector sources are in `art/`.diff --git a/examples/mobile-controls/README.md b/examples/mobile-controls/README.mdnew file mode 100644index 000000000..f8d523aac--- /dev/null+++ b/examples/mobile-controls/README.md@@ -0,0 +1,40 @@+# Mobile Controls++Open this project from the editor's example gallery. The joystick and Fire button+are authored in the scene and remain visible in Edit. Play accepts a mouse drag,+independent fingers, or WASD / Space. Move near the monster and press Fire for+a hit and a vibration request. Every three hits relocate the monster.++The editable training room uses CC0 pixel art from Kenney Tiny Dungeon, nearest+texture filtering and explicit world layers. See [asset licenses](ASSET_LICENSES.md).++The top buttons request motion, screen wake, browser fullscreen and pointer lock+from the player's own release event. The status text displays the request result.+API availability is not proof that the current device has a sensor or motor.++- Web motion and screen wake require a secure context (HTTPS or localhost).+- iOS Safari asks for motion permission; denial is a returned `denied` result.+- Motion is paused and the wake lock released in the background, then requested+ again in the foreground while the game still wants them. Stop motion explicitly+ to prevent a restart.+- Acceleration/gravity use m/s², gyro uses rad/s, and orientation uses degrees.+ Values follow device axes, rather than automatically rotating with the screen.+ Missing channels are `null`. Gravity uses a low-pass filter, not pose fusion.+- Browser vibration has no intensity control. Mini-game short vibration accepts+ three strengths where its host exposes them; long vibration uses the host's+ fixed effect. Check `vibrationIntensity` before depending on amplitude control.+- Node, older native binaries, and host APIs without these features return+ `unavailable`. Native motion/haptics require a runtime rebuilt from these sources.++Validation commands from the repository root:++```text+pnpm --filter esengine exec vitest run tests/device.test.ts tests/virtual-controls.test.ts+node desktop/scripts/editor-checks/run.mjs mobile-controls+node tools/verify-golden.mjs --tier pr --only mobile-controls+```++The browser/mini-game contract host verifies export, rendering and input wiring.+It cannot certify WeChat base-library behavior, Safari permission prompts on a+phone, native sensor axes, vibration hardware, or real background/foreground+behavior. Those remain separate device acceptance checks.diff --git a/examples/mobile-controls/art/attack-button.svg b/examples/mobile-controls/art/attack-button.svgnew file mode 100644index 000000000..4d2b31a17--- /dev/null+++ b/examples/mobile-controls/art/attack-button.svg@@ -0,0 +1 @@+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64" width="64" height="64" shape-rendering="crispEdges"><polygon points="20,2 44,2 44,6 54,6 54,10 58,10 58,20 62,20 62,44 58,44 58,54 54,54 54,58 44,58 44,62 20,62 20,58 10,58 10,54 6,54 6,44 2,44 2,20 6,20 6,10 10,10 10,6 20,6" fill="#111b2c"/><polygon points="21.439999999999998,5.600000000000001 42.56,5.600000000000001 42.56,9.120000000000001 51.36,9.120000000000001 51.36,12.64 54.879999999999995,12.64 54.879999999999995,21.439999999999998 58.4,21.439999999999998 58.4,42.56 54.879999999999995,42.56 54.879999999999995,51.36 51.36,51.36 51.36,54.879999999999995 42.56,54.879999999999995 42.56,58.4 21.439999999999998,58.4 21.439999999999998,54.879999999999995 12.64,54.879999999999995 12.64,51.36 9.120000000000001,51.36 9.120000000000001,42.56 5.600000000000001,42.56 5.600000000000001,21.439999999999998 9.120000000000001,21.439999999999998 9.120000000000001,12.64 12.64,12.64 12.64,9.120000000000001 21.439999999999998,9.120000000000001" fill="#536881"/><polygon points="23.240000000000002,10.100000000000001 40.76,10.100000000000001 40.76,13.02 48.06,13.02 48.06,15.940000000000001 50.980000000000004,15.940000000000001 50.980000000000004,23.240000000000002 53.9,23.240000000000002 53.9,40.76 50.980000000000004,40.76 50.980000000000004,48.06 48.06,48.06 48.06,50.980000000000004 40.76,50.980000000000004 40.76,53.9 23.240000000000002,53.9 23.240000000000002,50.980000000000004 15.940000000000001,50.980000000000004 15.940000000000001,48.06 13.02,48.06 13.02,40.76 10.100000000000001,40.76 10.100000000000001,23.240000000000002 13.02,23.240000000000002 13.02,15.940000000000001 15.940000000000001,15.940000000000001 15.940000000000001,13.02 23.240000000000002,13.02" fill="#25394e"/><polygon points="23.84,9.599999999999998 40.16,9.599999999999998 40.16,12.32 46.96,12.32 46.96,15.04 49.68,15.04 49.68,21.84 52.400000000000006,21.84 52.400000000000006,38.16 49.68,38.16 49.68,44.96 46.96,44.96 46.96,47.68 40.16,47.68 40.16,50.400000000000006 23.84,50.400000000000006 23.84,47.68 17.04,47.68 17.04,44.96 14.32,44.96 14.32,38.16 11.599999999999998,38.16 11.599999999999998,21.84 14.32,21.84 14.32,15.04 17.04,15.04 17.04,12.32 23.84,12.32" fill="#df9952"/><polygon points="25.759999999999998,12.399999999999999 38.24,12.399999999999999 38.24,14.48 43.44,14.48 43.44,16.56 45.519999999999996,16.56 45.519999999999996,21.759999999999998 47.6,21.759999999999998 47.6,34.24 45.519999999999996,34.24 45.519999999999996,39.44 43.44,39.44 43.44,41.519999999999996 38.24,41.519999999999996 38.24,43.6 25.759999999999998,43.6 25.759999999999998,41.519999999999996 20.56,41.519999999999996 20.56,39.44 18.48,39.44 18.48,34.24 16.4,34.24 16.4,21.759999999999998 18.48,21.759999999999998 18.48,16.56 20.56,16.56 20.56,14.48 25.759999999999998,14.48" fill="#ffd18a"/><rect x="22" y="13" width="19" height="4" fill="#fff0ca"/><polygon points="21,39 25,43 43,25 43,17 35,17 17,35" fill="#523e42"/><polygon points="22,35 36,21 39,21 39,24 25,38" fill="#f6f7df"/><rect x="20" y="36" width="5" height="5" fill="#a56838"/></svg>diff --git a/examples/mobile-controls/art/attack-button.svg.meta b/examples/mobile-controls/art/attack-button.svg.metanew file mode 100644index 000000000..19a629a4a--- /dev/null+++ b/examples/mobile-controls/art/attack-button.svg.meta@@ -0,0 +1,26 @@+{+ "uuid": "66f52a6a-98bf-4b0c-8b13-3c2c6a9cbf60",+ "version": "2.0",+ "type": "texture",+ "importer": {+ "maxSize": 2048,+ "compress": "auto",+ "compressFormat": "uastc",+ "filterMode": "linear",+ "wrapMode": "repeat",+ "sRGB": true,+ "mipCoverage": 0,+ "sliceBorder": {+ "left": 0,+ "right": 0,+ "top": 0,+ "bottom": 0+ },+ "sheet": {+ "cellWidth": 0,+ "cellHeight": 0,+ "margin": 0,+ "spacing": 0+ }+ }+}diff --git a/examples/mobile-controls/art/stick-base.svg b/examples/mobile-controls/art/stick-base.svgnew file mode 100644index 000000000..e9da08281--- /dev/null+++ b/examples/mobile-controls/art/stick-base.svg@@ -0,0 +1 @@+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64" width="64" height="64" shape-rendering="crispEdges"><polygon points="20,2 44,2 44,6 54,6 54,10 58,10 58,20 62,20 62,44 58,44 58,54 54,54 54,58 44,58 44,62 20,62 20,58 10,58 10,54 6,54 6,44 2,44 2,20 6,20 6,10 10,10 10,6 20,6" fill="#111b2c"/><polygon points="21.439999999999998,5.600000000000001 42.56,5.600000000000001 42.56,9.120000000000001 51.36,9.120000000000001 51.36,12.64 54.879999999999995,12.64 54.879999999999995,21.439999999999998 58.4,21.439999999999998 58.4,42.56 54.879999999999995,42.56 54.879999999999995,51.36 51.36,51.36 51.36,54.879999999999995 42.56,54.879999999999995 42.56,58.4 21.439999999999998,58.4 21.439999999999998,54.879999999999995 12.64,54.879999999999995 12.64,51.36 9.120000000000001,51.36 9.120000000000001,42.56 5.600000000000001,42.56 5.600000000000001,21.439999999999998 9.120000000000001,21.439999999999998 9.120000000000001,12.64 12.64,12.64 12.64,9.120000000000001 21.439999999999998,9.120000000000001" fill="#536881"/><polygon points="23.240000000000002,10.100000000000001 40.76,10.100000000000001 40.76,13.02 48.06,13.02 48.06,15.940000000000001 50.980000000000004,15.940000000000001 50.980000000000004,23.240000000000002 53.9,23.240000000000002 53.9,40.76 50.980000000000004,40.76 50.980000000000004,48.06 48.06,48.06 48.06,50.980000000000004 40.76,50.980000000000004 40.76,53.9 23.240000000000002,53.9 23.240000000000002,50.980000000000004 15.940000000000001,50.980000000000004 15.940000000000001,48.06 13.02,48.06 13.02,40.76 10.100000000000001,40.76 10.100000000000001,23.240000000000002 13.02,23.240000000000002 13.02,15.940000000000001 15.940000000000001,15.940000000000001 15.940000000000001,13.02 23.240000000000002,13.02" fill="#25394e"/><polygon points="24.560000000000002,13.399999999999999 39.44,13.399999999999999 39.44,15.879999999999999 45.64,15.879999999999999 45.64,18.36 48.120000000000005,18.36 48.120000000000005,24.560000000000002 50.6,24.560000000000002 50.6,39.44 48.120000000000005,39.44 48.120000000000005,45.64 45.64,45.64 45.64,48.120000000000005 39.44,48.120000000000005 39.44,50.6 24.560000000000002,50.6 24.560000000000002,48.120000000000005 18.36,48.120000000000005 18.36,45.64 15.879999999999999,45.64 15.879999999999999,39.44 13.399999999999999,39.44 13.399999999999999,24.560000000000002 15.879999999999999,24.560000000000002 15.879999999999999,18.36 18.36,18.36 18.36,15.879999999999999 24.560000000000002,15.879999999999999" fill="#17273b"/><polygon points="26.240000000000002,17.6 37.76,17.6 37.76,19.52 42.56,19.52 42.56,21.44 44.480000000000004,21.44 44.480000000000004,26.240000000000002 46.4,26.240000000000002 46.4,37.76 44.480000000000004,37.76 44.480000000000004,42.56 42.56,42.56 42.56,44.480000000000004 37.76,44.480000000000004 37.76,46.4 26.240000000000002,46.4 26.240000000000002,44.480000000000004 21.44,44.480000000000004 21.44,42.56 19.52,42.56 19.52,37.76 17.6,37.76 17.6,26.240000000000002 19.52,26.240000000000002 19.52,21.44 21.44,21.44 21.44,19.52 26.240000000000002,19.52" fill="#203348"/><rect x="30" y="7" width="4" height="6" fill="#a4bcc9"/><rect x="30" y="51" width="4" height="6" fill="#a4bcc9"/><rect x="7" y="30" width="6" height="4" fill="#a4bcc9"/><rect x="51" y="30" width="6" height="4" fill="#a4bcc9"/></svg>diff --git a/examples/mobile-controls/art/stick-base.svg.meta b/examples/mobile-controls/art/stick-base.svg.metanew file mode 100644index 000000000..573db6ad3--- /dev/null+++ b/examples/mobile-controls/art/stick-base.svg.meta@@ -0,0 +1,26 @@+{+ "uuid": "da3600b9-3ff8-43f3-874d-10d90cac949b",+ "version": "2.0",+ "type": "texture",+ "importer": {+ "maxSize": 2048,+ "compress": "auto",+ "compressFormat": "uastc",+ "filterMode": "linear",+ "wrapMode": "repeat",+ "sRGB": true,+ "mipCoverage": 0,+ "sliceBorder": {+ "left": 0,+ "right": 0,+ "top": 0,+ "bottom": 0+ },+ "sheet": {+ "cellWidth": 0,+ "cellHeight": 0,+ "margin": 0,+ "spacing": 0+ }+ }+}diff --git a/examples/mobile-controls/art/stick-handle.svg b/examples/mobile-controls/art/stick-handle.svgnew file mode 100644index 000000000..ecd399e54--- /dev/null+++ b/examples/mobile-controls/art/stick-handle.svg@@ -0,0 +1 @@+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64" width="64" height="64" shape-rendering="crispEdges"><polygon points="20,2 44,2 44,6 54,6 54,10 58,10 58,20 62,20 62,44 58,44 58,54 54,54 54,58 44,58 44,62 20,62 20,58 10,58 10,54 6,54 6,44 2,44 2,20 6,20 6,10 10,10 10,6 20,6" fill="#111b2c"/><polygon points="21.439999999999998,5.600000000000001 42.56,5.600000000000001 42.56,9.120000000000001 51.36,9.120000000000001 51.36,12.64 54.879999999999995,12.64 54.879999999999995,21.439999999999998 58.4,21.439999999999998 58.4,42.56 54.879999999999995,42.56 54.879999999999995,51.36 51.36,51.36 51.36,54.879999999999995 42.56,54.879999999999995 42.56,58.4 21.439999999999998,58.4 21.439999999999998,54.879999999999995 12.64,54.879999999999995 12.64,51.36 9.120000000000001,51.36 9.120000000000001,42.56 5.600000000000001,42.56 5.600000000000001,21.439999999999998 9.120000000000001,21.439999999999998 9.120000000000001,12.64 12.64,12.64 12.64,9.120000000000001 21.439999999999998,9.120000000000001" fill="#536881"/><polygon points="23.240000000000002,10.100000000000001 40.76,10.100000000000001 40.76,13.02 48.06,13.02 48.06,15.940000000000001 50.980000000000004,15.940000000000001 50.980000000000004,23.240000000000002 53.9,23.240000000000002 53.9,40.76 50.980000000000004,40.76 50.980000000000004,48.06 48.06,48.06 48.06,50.980000000000004 40.76,50.980000000000004 40.76,53.9 23.240000000000002,53.9 23.240000000000002,50.980000000000004 15.940000000000001,50.980000000000004 15.940000000000001,48.06 13.02,48.06 13.02,40.76 10.100000000000001,40.76 10.100000000000001,23.240000000000002 13.02,23.240000000000002 13.02,15.940000000000001 15.940000000000001,15.940000000000001 15.940000000000001,13.02 23.240000000000002,13.02" fill="#25394e"/><polygon points="23.84,9.599999999999998 40.16,9.599999999999998 40.16,12.32 46.96,12.32 46.96,15.04 49.68,15.04 49.68,21.84 52.400000000000006,21.84 52.400000000000006,38.16 49.68,38.16 49.68,44.96 46.96,44.96 46.96,47.68 40.16,47.68 40.16,50.400000000000006 23.84,50.400000000000006 23.84,47.68 17.04,47.68 17.04,44.96 14.32,44.96 14.32,38.16 11.599999999999998,38.16 11.599999999999998,21.84 14.32,21.84 14.32,15.04 17.04,15.04 17.04,12.32 23.84,12.32" fill="#56a9db"/><polygon points="25.759999999999998,12.399999999999999 38.24,12.399999999999999 38.24,14.48 43.44,14.48 43.44,16.56 45.519999999999996,16.56 45.519999999999996,21.759999999999998 47.6,21.759999999999998 47.6,34.24 45.519999999999996,34.24 45.519999999999996,39.44 43.44,39.44 43.44,41.519999999999996 38.24,41.519999999999996 38.24,43.6 25.759999999999998,43.6 25.759999999999998,41.519999999999996 20.56,41.519999999999996 20.56,39.44 18.48,39.44 18.48,34.24 16.4,34.24 16.4,21.759999999999998 18.48,21.759999999999998 18.48,16.56 20.56,16.56 20.56,14.48 25.759999999999998,14.48" fill="#91d8ea"/><rect x="22" y="13" width="19" height="4" fill="#d4f4fa"/><rect x="25" y="29" width="4" height="4" fill="#397aaa"/><rect x="35" y="29" width="4" height="4" fill="#397aaa"/><rect x="25" y="37" width="4" height="4" fill="#397aaa"/><rect x="35" y="37" width="4" height="4" fill="#397aaa"/></svg>diff --git a/examples/mobile-controls/art/stick-handle.svg.meta b/examples/mobile-controls/art/stick-handle.svg.metanew file mode 100644index 000000000..84b466cb7--- /dev/null+++ b/examples/mobile-controls/art/stick-handle.svg.meta@@ -0,0 +1,26 @@+{+ "uuid": "87f94e82-121d-4713-a76f-5292fb510981",+ "version": "2.0",+ "type": "texture",+ "importer": {+ "maxSize": 2048,+ "compress": "auto",+ "compressFormat": "uastc",+ "filterMode": "linear",+ "wrapMode": "repeat",+ "sRGB": true,+ "mipCoverage": 0,+ "sliceBorder": {+ "left": 0,+ "right": 0,+ "top": 0,+ "bottom": 0+ },+ "sheet": {+ "cellWidth": 0,+ "cellHeight": 0,+ "margin": 0,+ "spacing": 0+ }+ }+}diff --git a/examples/mobile-controls/assets/scenes/main.esscene b/examples/mobile-controls/assets/scenes/main.esscenenew file mode 100644index 000000000..2b1892893--- /dev/null+++ b/examples/mobile-controls/assets/scenes/main.esscene@@ -0,0 +1,9887 @@+{+ "version": 4,+ "name": "Main",+ "entities": [+ {+ "id": 0,+ "name": "Camera",+ "parent": null,+ "children": [],+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 0,+ "y": 0,+ "z": 10+ }+ }+ },+ {+ "type": "Camera",+ "data": {+ "projectionType": 1,+ "orthoSize": 225,+ "isActive": true,+ "priority": 0+ }+ }+ ],+ "visible": true+ },+ {+ "id": 1,+ "name": "Canvas",+ "parent": null,+ "children": [+ 255,+ 4,+ 7+ ],+ "components": [+ {+ "type": "Transform",+ "data": {}+ },+ {+ "type": "Canvas",+ "data": {+ "designResolution": {+ "x": 800,+ "y": 450+ },+ "scaleMode": 2+ }+ },+ {+ "type": "UINode",+ "data": {}+ }+ ],+ "visible": true+ },+ {+ "id": 255,+ "name": "Header panel",+ "parent": 1,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {}+ },+ {+ "type": "UINode",+ "data": {+ "position": 1,+ "width": {+ "unit": 0,+ "value": 800+ },+ "height": {+ "unit": 0,+ "value": 112+ },+ "insetLeft": {+ "unit": 0,+ "value": 0+ },+ "insetTop": {+ "unit": 0,+ "value": 0+ },+ "pointerEvents": 1+ }+ },+ {+ "type": "UIVisual",+ "data": {+ "visualType": 1,+ "color": {+ "r": 0.075,+ "g": 0.09,+ "b": 0.14,+ "a": 1+ }+ }+ }+ ]+ },+ {+ "id": 2,+ "name": "Player",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 0,+ "y": 0,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "size": {+ "x": 48,+ "y": 48+ },+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "texture": "@uuid:fd1904a3-fcd8-4904-89d9-61a0f9cf1282",+ "layer": 3+ }+ }+ ]+ },+ {+ "id": 3,+ "name": "Target",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 180,+ "y": 40,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "size": {+ "x": 48,+ "y": 48+ },+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "texture": "@uuid:a7e1d316-cf16-4502-b2e9-789c4e6cb5a7",+ "layer": 3+ }+ }+ ]+ },+ {+ "id": 4,+ "name": "VirtualJoystick",+ "parent": 1,+ "children": [+ 6,+ 5+ ],+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 0,+ "y": 0,+ "z": 0+ },+ "rotation": {+ "w": 1,+ "x": 0,+ "y": 0,+ "z": 0+ },+ "scale": {+ "x": 1,+ "y": 1,+ "z": 1+ },+ "worldPosition": {+ "x": 0,+ "y": 0,+ "z": 0+ },+ "worldRotation": {+ "w": 1,+ "x": 0,+ "y": 0,+ "z": 0+ },+ "worldScale": {+ "x": 1,+ "y": 1,+ "z": 1+ }+ }+ },+ {+ "type": "UINode",+ "data": {+ "position": 1,+ "display": 0,+ "opacity": 1,+ "pointerEvents": 0,+ "width": {+ "unit": 0,+ "value": 110+ },+ "height": {+ "unit": 0,+ "value": 110+ },+ "minWidth": {+ "value": 0,+ "unit": 2+ },+ "minHeight": {+ "value": 0,+ "unit": 2+ },+ "maxWidth": {+ "value": 0,+ "unit": 2+ },+ "maxHeight": {+ "value": 0,+ "unit": 2+ },+ "flexGrow": 0,+ "flexShrink": 1,+ "flexBasis": {+ "value": 0,+ "unit": 2+ },+ "alignSelf": 0,+ "marginLeft": {+ "value": 0,+ "unit": 0+ },+ "marginTop": {+ "value": 0,+ "unit": 0+ },+ "marginRight": {+ "value": 0,+ "unit": 0+ },+ "marginBottom": {+ "value": 0,+ "unit": 0+ },+ "insetLeft": {+ "unit": 0,+ "value": 35+ },+ "insetTop": {+ "unit": 0,+ "value": 305+ },+ "insetRight": {+ "value": 0,+ "unit": 2+ },+ "insetBottom": {+ "value": 0,+ "unit": 2+ }+ }+ },+ {+ "type": "Interactable",+ "data": {+ "enabled": true,+ "blockRaycast": true,+ "raycastTarget": true+ }+ },+ {+ "type": "VirtualJoystick",+ "data": {+ "inputId": "move",+ "mode": 0,+ "radius": 50,+ "deadZone": 0.15,+ "returnSpeed": 18,+ "base": 6,+ "handle": 5+ }+ }+ ],+ "visible": true+ },+ {+ "id": 6,+ "name": "Node",+ "parent": 4,+ "children": [],+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 0,+ "y": 0,+ "z": 0+ },+ "rotation": {+ "w": 1,+ "x": 0,+ "y": 0,+ "z": 0+ },+ "scale": {+ "x": 1,+ "y": 1,+ "z": 1+ },+ "worldPosition": {+ "x": 0,+ "y": 0,+ "z": 0+ },+ "worldRotation": {+ "w": 1,+ "x": 0,+ "y": 0,+ "z": 0+ },+ "worldScale": {+ "x": 1,+ "y": 1,+ "z": 1+ }+ }+ },+ {+ "type": "UINode",+ "data": {+ "position": 1,+ "display": 0,+ "opacity": 1,+ "pointerEvents": 0,+ "width": {+ "value": 100,+ "unit": 0+ },+ "height": {+ "value": 100,+ "unit": 0+ },+ "minWidth": {+ "value": 0,+ "unit": 2+ },+ "minHeight": {+ "value": 0,+ "unit": 2+ },+ "maxWidth": {+ "value": 0,+ "unit": 2+ },+ "maxHeight": {+ "value": 0,+ "unit": 2+ },+ "flexGrow": 0,+ "flexShrink": 1,+ "flexBasis": {+ "value": 0,+ "unit": 2+ },+ "alignSelf": 0,+ "marginLeft": {+ "value": -50,+ "unit": 0+ },+ "marginTop": {+ "value": -50,+ "unit": 0+ },+ "marginRight": {+ "value": 0,+ "unit": 0+ },+ "marginBottom": {+ "value": 0,+ "unit": 0+ },+ "insetLeft": {+ "value": 50,+ "unit": 1+ },+ "insetTop": {+ "value": 50,+ "unit": 1+ },+ "insetRight": {+ "value": 0,+ "unit": 2+ },+ "insetBottom": {+ "value": 0,+ "unit": 2+ }+ }+ },+ {+ "type": "UIVisual",+ "data": {+ "visualType": 2,+ "texture": "@uuid:ccb36f07-73c7-4ed6-a0e8-50dd375049c4",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "fit": 0,+ "uvOffset": {+ "x": 0,+ "y": 0+ },+ "uvScale": {+ "x": 1,+ "y": 1+ },+ "sliceBorder": {+ "x": 0,+ "y": 0,+ "z": 0,+ "w": 0+ },+ "tileSize": {+ "x": 32,+ "y": 32+ },+ "fillMethod": 0,+ "fillOrigin": 0,+ "fillAmount": 1,+ "material": 0,+ "enabled": true+ }+ }+ ],+ "visible": true+ },+ {+ "id": 5,+ "name": "Node",+ "parent": 4,+ "children": [],+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 0,+ "y": 0,+ "z": 0+ },+ "rotation": {+ "w": 1,+ "x": 0,+ "y": 0,+ "z": 0+ },+ "scale": {+ "x": 1,+ "y": 1,+ "z": 1+ },+ "worldPosition": {+ "x": 0,+ "y": 0,+ "z": 0+ },+ "worldRotation": {+ "w": 1,+ "x": 0,+ "y": 0,+ "z": 0+ },+ "worldScale": {+ "x": 1,+ "y": 1,+ "z": 1+ }+ }+ },+ {+ "type": "UINode",+ "data": {+ "position": 1,+ "display": 0,+ "opacity": 1,+ "pointerEvents": 0,+ "width": {+ "value": 40,+ "unit": 0+ },+ "height": {+ "value": 40,+ "unit": 0+ },+ "minWidth": {+ "value": 0,+ "unit": 2+ },+ "minHeight": {+ "value": 0,+ "unit": 2+ },+ "maxWidth": {+ "value": 0,+ "unit": 2+ },+ "maxHeight": {+ "value": 0,+ "unit": 2+ },+ "flexGrow": 0,+ "flexShrink": 1,+ "flexBasis": {+ "value": 0,+ "unit": 2+ },+ "alignSelf": 0,+ "marginLeft": {+ "value": -20,+ "unit": 0+ },+ "marginTop": {+ "value": -20,+ "unit": 0+ },+ "marginRight": {+ "value": 0,+ "unit": 0+ },+ "marginBottom": {+ "value": 0,+ "unit": 0+ },+ "insetLeft": {+ "value": 50,+ "unit": 1+ },+ "insetTop": {+ "value": 50,+ "unit": 1+ },+ "insetRight": {+ "value": 0,+ "unit": 2+ },+ "insetBottom": {+ "value": 0,+ "unit": 2+ }+ }+ },+ {+ "type": "UIVisual",+ "data": {+ "visualType": 2,+ "texture": "@uuid:517537d0-dd64-4f30-863e-2c74b0f84557",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "fit": 0,+ "uvOffset": {+ "x": 0,+ "y": 0+ },+ "uvScale": {+ "x": 1,+ "y": 1+ },+ "sliceBorder": {+ "x": 0,+ "y": 0,+ "z": 0,+ "w": 0+ },+ "tileSize": {+ "x": 32,+ "y": 32+ },+ "fillMethod": 0,+ "fillOrigin": 0,+ "fillAmount": 1,+ "material": 0,+ "enabled": true+ }+ }+ ],+ "visible": true+ },+ {+ "id": 7,+ "name": "VirtualButton",+ "parent": 1,+ "children": [+ 8+ ],+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 0,+ "y": 0,+ "z": 0+ },+ "rotation": {+ "w": 1,+ "x": 0,+ "y": 0,+ "z": 0+ },+ "scale": {+ "x": 1,+ "y": 1,+ "z": 1+ },+ "worldPosition": {+ "x": 0,+ "y": 0,+ "z": 0+ },+ "worldRotation": {+ "w": 1,+ "x": 0,+ "y": 0,+ "z": 0+ },+ "worldScale": {+ "x": 1,+ "y": 1,+ "z": 1+ }+ }+ },+ {+ "type": "UINode",+ "data": {+ "position": 1,+ "display": 0,+ "opacity": 1,+ "pointerEvents": 0,+ "width": {+ "unit": 0,+ "value": 90+ },+ "height": {+ "unit": 0,+ "value": 90+ },+ "minWidth": {+ "value": 0,+ "unit": 2+ },+ "minHeight": {+ "value": 0,+ "unit": 2+ },+ "maxWidth": {+ "value": 0,+ "unit": 2+ },+ "maxHeight": {+ "value": 0,+ "unit": 2+ },+ "flexGrow": 0,+ "flexShrink": 1,+ "flexBasis": {+ "value": 0,+ "unit": 2+ },+ "alignSelf": 0,+ "marginLeft": {+ "value": 0,+ "unit": 0+ },+ "marginTop": {+ "value": 0,+ "unit": 0+ },+ "marginRight": {+ "value": 0,+ "unit": 0+ },+ "marginBottom": {+ "value": 0,+ "unit": 0+ },+ "insetLeft": {+ "unit": 0,+ "value": 640+ },+ "insetTop": {+ "unit": 0,+ "value": 325+ },+ "insetRight": {+ "value": 0,+ "unit": 0+ },+ "insetBottom": {+ "value": 0,+ "unit": 0+ }+ }+ },+ {+ "type": "UIVisual",+ "data": {+ "visualType": 2,+ "texture": "@uuid:f208bb9e-bb1a-4419-aec0-1855696c3ff3",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "fit": 0,+ "uvOffset": {+ "x": 0,+ "y": 0+ },+ "uvScale": {+ "x": 1,+ "y": 1+ },+ "sliceBorder": {+ "x": 0,+ "y": 0,+ "z": 0,+ "w": 0+ },+ "tileSize": {+ "x": 32,+ "y": 32+ },+ "fillMethod": 0,+ "fillOrigin": 0,+ "fillAmount": 1,+ "material": 0,+ "enabled": true+ }+ },+ {+ "type": "Interactable",+ "data": {+ "enabled": true,+ "blockRaycast": true,+ "raycastTarget": true+ }+ },+ {+ "type": "UIController",+ "data": {+ "controllers": [+ {+ "name": "$interaction",+ "pages": [+ "normal",+ "hover",+ "pressed",+ "disabled",+ "focused"+ ],+ "current": "normal"+ }+ ]+ }+ },+ {+ "type": "UIGear",+ "data": {+ "bindings": [+ {+ "controller": "$interaction",+ "component": "UIVisual",+ "property": "color",+ "pages": {+ "normal": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "hover": {+ "r": 1,+ "g": 1,+ "b": 0.85,+ "a": 1+ },+ "pressed": {+ "r": 0.72,+ "g": 0.65,+ "b": 0.6,+ "a": 1+ },+ "disabled": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 0.4+ },+ "focused": {+ "r": 1,+ "g": 1,+ "b": 0.85,+ "a": 1+ }+ }+ }+ ]+ }+ },+ {+ "type": "VirtualButton",+ "data": {+ "inputId": "fire",+ "value": 1+ }+ }+ ],+ "visible": true+ },+ {+ "id": 8,+ "name": "Label",+ "parent": 7,+ "children": [],+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 0,+ "y": 0,+ "z": 0+ },+ "rotation": {+ "w": 1,+ "x": 0,+ "y": 0,+ "z": 0+ },+ "scale": {+ "x": 1,+ "y": 1,+ "z": 1+ },+ "worldPosition": {+ "x": 0,+ "y": 0,+ "z": 0+ },+ "worldRotation": {+ "w": 1,+ "x": 0,+ "y": 0,+ "z": 0+ },+ "worldScale": {+ "x": 1,+ "y": 1,+ "z": 1+ }+ }+ },+ {+ "type": "UINode",+ "data": {+ "position": 1,+ "display": 0,+ "opacity": 1,+ "pointerEvents": 0,+ "width": {+ "value": 0,+ "unit": 2+ },+ "height": {+ "unit": 0,+ "value": 22+ },+ "minWidth": {+ "value": 0,+ "unit": 2+ },+ "minHeight": {+ "value": 0,+ "unit": 2+ },+ "maxWidth": {+ "value": 0,+ "unit": 2+ },+ "maxHeight": {+ "value": 0,+ "unit": 2+ },+ "flexGrow": 0,+ "flexShrink": 1,+ "flexBasis": {+ "value": 0,+ "unit": 2+ },+ "alignSelf": 0,+ "marginLeft": {+ "value": 0,+ "unit": 0+ },+ "marginTop": {+ "value": 0,+ "unit": 0+ },+ "marginRight": {+ "value": 0,+ "unit": 0+ },+ "marginBottom": {+ "value": 0,+ "unit": 0+ },+ "insetLeft": {+ "value": 0,+ "unit": 0+ },+ "insetTop": {+ "unit": 0,+ "value": 85+ },+ "insetRight": {+ "value": 0,+ "unit": 0+ },+ "insetBottom": {+ "unit": 2,+ "value": 0+ }+ }+ },+ {+ "type": "Text",+ "data": {+ "content": "Fire",+ "i18nKey": "",+ "font": 0,+ "fontFamily": "",+ "fontSize": 14,+ "color": {+ "r": 0.92,+ "g": 0.92,+ "b": 0.94,+ "a": 1+ },+ "align": 1,+ "verticalAlign": 1,+ "wordWrap": false,+ "overflow": 0,+ "lineHeight": 1.2,+ "bold": false,+ "italic": false,+ "strokeColor": {+ "r": 0,+ "g": 0,+ "b": 0,+ "a": 1+ },+ "strokeWidth": 0,+ "shadowColor": {+ "r": 0,+ "g": 0,+ "b": 0,+ "a": 1+ },+ "shadowBlur": 0,+ "shadowOffsetX": 0,+ "shadowOffsetY": 0,+ "richText": false,+ "renderMode": 0,+ "layer": 0,+ "enabled": true+ }+ }+ ],+ "visible": true+ },+ {+ "id": 9,+ "name": "Wall 00-00",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -368,+ "y": 112,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:70da71e4-b54b-4d3d-9f95-c27e199a1771",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 10,+ "name": "Wall 01-00",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -336,+ "y": 112,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:70da71e4-b54b-4d3d-9f95-c27e199a1771",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 11,+ "name": "Wall 02-00",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -304,+ "y": 112,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:70da71e4-b54b-4d3d-9f95-c27e199a1771",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 12,+ "name": "Wall 03-00",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -272,+ "y": 112,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:70da71e4-b54b-4d3d-9f95-c27e199a1771",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 13,+ "name": "Wall 04-00",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -240,+ "y": 112,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:70da71e4-b54b-4d3d-9f95-c27e199a1771",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 14,+ "name": "Wall 05-00",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -208,+ "y": 112,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:70da71e4-b54b-4d3d-9f95-c27e199a1771",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 15,+ "name": "Wall 06-00",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -176,+ "y": 112,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:70da71e4-b54b-4d3d-9f95-c27e199a1771",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 16,+ "name": "Wall 07-00",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -144,+ "y": 112,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:70da71e4-b54b-4d3d-9f95-c27e199a1771",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 17,+ "name": "Wall 08-00",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -112,+ "y": 112,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:70da71e4-b54b-4d3d-9f95-c27e199a1771",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 18,+ "name": "Wall 09-00",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -80,+ "y": 112,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:70da71e4-b54b-4d3d-9f95-c27e199a1771",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 19,+ "name": "Wall 10-00",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -48,+ "y": 112,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:70da71e4-b54b-4d3d-9f95-c27e199a1771",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 20,+ "name": "Wall 11-00",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -16,+ "y": 112,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:70da71e4-b54b-4d3d-9f95-c27e199a1771",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 21,+ "name": "Wall 12-00",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 16,+ "y": 112,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:70da71e4-b54b-4d3d-9f95-c27e199a1771",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 22,+ "name": "Wall 13-00",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 48,+ "y": 112,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:70da71e4-b54b-4d3d-9f95-c27e199a1771",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 23,+ "name": "Wall 14-00",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 80,+ "y": 112,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:70da71e4-b54b-4d3d-9f95-c27e199a1771",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 24,+ "name": "Wall 15-00",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 112,+ "y": 112,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:70da71e4-b54b-4d3d-9f95-c27e199a1771",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 25,+ "name": "Wall 16-00",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 144,+ "y": 112,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:70da71e4-b54b-4d3d-9f95-c27e199a1771",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 26,+ "name": "Wall 17-00",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 176,+ "y": 112,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:70da71e4-b54b-4d3d-9f95-c27e199a1771",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 27,+ "name": "Wall 18-00",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 208,+ "y": 112,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:70da71e4-b54b-4d3d-9f95-c27e199a1771",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 28,+ "name": "Wall 19-00",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 240,+ "y": 112,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:70da71e4-b54b-4d3d-9f95-c27e199a1771",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 29,+ "name": "Wall 20-00",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 272,+ "y": 112,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:70da71e4-b54b-4d3d-9f95-c27e199a1771",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 30,+ "name": "Wall 21-00",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 304,+ "y": 112,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:70da71e4-b54b-4d3d-9f95-c27e199a1771",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 31,+ "name": "Wall 22-00",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 336,+ "y": 112,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:70da71e4-b54b-4d3d-9f95-c27e199a1771",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 32,+ "name": "Wall 23-00",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 368,+ "y": 112,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:70da71e4-b54b-4d3d-9f95-c27e199a1771",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 33,+ "name": "Wall 00-01",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -368,+ "y": 80,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:70da71e4-b54b-4d3d-9f95-c27e199a1771",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 34,+ "name": "Floor 01-01",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -336,+ "y": 80,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:8b6e7a02-3778-4179-9fe0-3ce2f3cb213e",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 35,+ "name": "Floor 02-01",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -304,+ "y": 80,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:dd3e075d-703c-4888-a3e2-576d202f5bd3",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 36,+ "name": "Floor 03-01",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -272,+ "y": 80,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:8b6e7a02-3778-4179-9fe0-3ce2f3cb213e",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 37,+ "name": "Floor 04-01",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -240,+ "y": 80,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:8b6e7a02-3778-4179-9fe0-3ce2f3cb213e",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 38,+ "name": "Floor 05-01",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -208,+ "y": 80,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:8b6e7a02-3778-4179-9fe0-3ce2f3cb213e",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 39,+ "name": "Floor 06-01",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -176,+ "y": 80,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:8b6e7a02-3778-4179-9fe0-3ce2f3cb213e",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 40,+ "name": "Floor 07-01",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -144,+ "y": 80,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:dd3e075d-703c-4888-a3e2-576d202f5bd3",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 41,+ "name": "Floor 08-01",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -112,+ "y": 80,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:8b6e7a02-3778-4179-9fe0-3ce2f3cb213e",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 42,+ "name": "Floor 09-01",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -80,+ "y": 80,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:8b6e7a02-3778-4179-9fe0-3ce2f3cb213e",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 43,+ "name": "Floor 10-01",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -48,+ "y": 80,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:8b6e7a02-3778-4179-9fe0-3ce2f3cb213e",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 44,+ "name": "Floor 11-01",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -16,+ "y": 80,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:8b6e7a02-3778-4179-9fe0-3ce2f3cb213e",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 45,+ "name": "Floor 12-01",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 16,+ "y": 80,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:dd3e075d-703c-4888-a3e2-576d202f5bd3",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 46,+ "name": "Floor 13-01",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 48,+ "y": 80,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:8b6e7a02-3778-4179-9fe0-3ce2f3cb213e",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 47,+ "name": "Floor 14-01",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 80,+ "y": 80,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:8b6e7a02-3778-4179-9fe0-3ce2f3cb213e",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 48,+ "name": "Floor 15-01",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 112,+ "y": 80,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:8b6e7a02-3778-4179-9fe0-3ce2f3cb213e",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 49,+ "name": "Floor 16-01",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 144,+ "y": 80,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:8b6e7a02-3778-4179-9fe0-3ce2f3cb213e",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 50,+ "name": "Floor 17-01",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 176,+ "y": 80,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:dd3e075d-703c-4888-a3e2-576d202f5bd3",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 51,+ "name": "Floor 18-01",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 208,+ "y": 80,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:8b6e7a02-3778-4179-9fe0-3ce2f3cb213e",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 52,+ "name": "Floor 19-01",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 240,+ "y": 80,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:8b6e7a02-3778-4179-9fe0-3ce2f3cb213e",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 53,+ "name": "Floor 20-01",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 272,+ "y": 80,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:8b6e7a02-3778-4179-9fe0-3ce2f3cb213e",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 54,+ "name": "Floor 21-01",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 304,+ "y": 80,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:8b6e7a02-3778-4179-9fe0-3ce2f3cb213e",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 55,+ "name": "Floor 22-01",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 336,+ "y": 80,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:dd3e075d-703c-4888-a3e2-576d202f5bd3",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 56,+ "name": "Wall 23-01",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 368,+ "y": 80,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:70da71e4-b54b-4d3d-9f95-c27e199a1771",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 57,+ "name": "Wall 00-02",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -368,+ "y": 48,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:70da71e4-b54b-4d3d-9f95-c27e199a1771",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 58,+ "name": "Floor 01-02",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -336,+ "y": 48,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:8b6e7a02-3778-4179-9fe0-3ce2f3cb213e",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 59,+ "name": "Floor 02-02",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -304,+ "y": 48,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:8b6e7a02-3778-4179-9fe0-3ce2f3cb213e",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 60,+ "name": "Floor 03-02",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -272,+ "y": 48,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:8b6e7a02-3778-4179-9fe0-3ce2f3cb213e",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 61,+ "name": "Floor 04-02",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -240,+ "y": 48,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:dd3e075d-703c-4888-a3e2-576d202f5bd3",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 62,+ "name": "Floor 05-02",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -208,+ "y": 48,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:8b6e7a02-3778-4179-9fe0-3ce2f3cb213e",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 63,+ "name": "Floor 06-02",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -176,+ "y": 48,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:8b6e7a02-3778-4179-9fe0-3ce2f3cb213e",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 64,+ "name": "Floor 07-02",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -144,+ "y": 48,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:8b6e7a02-3778-4179-9fe0-3ce2f3cb213e",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 65,+ "name": "Floor 08-02",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -112,+ "y": 48,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:8b6e7a02-3778-4179-9fe0-3ce2f3cb213e",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 66,+ "name": "Floor 09-02",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -80,+ "y": 48,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:dd3e075d-703c-4888-a3e2-576d202f5bd3",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 67,+ "name": "Floor 10-02",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -48,+ "y": 48,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:8b6e7a02-3778-4179-9fe0-3ce2f3cb213e",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 68,+ "name": "Floor 11-02",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -16,+ "y": 48,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:8b6e7a02-3778-4179-9fe0-3ce2f3cb213e",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 69,+ "name": "Floor 12-02",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 16,+ "y": 48,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:8b6e7a02-3778-4179-9fe0-3ce2f3cb213e",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 70,+ "name": "Floor 13-02",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 48,+ "y": 48,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:8b6e7a02-3778-4179-9fe0-3ce2f3cb213e",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 71,+ "name": "Floor 14-02",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 80,+ "y": 48,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:dd3e075d-703c-4888-a3e2-576d202f5bd3",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 72,+ "name": "Floor 15-02",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 112,+ "y": 48,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:8b6e7a02-3778-4179-9fe0-3ce2f3cb213e",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 73,+ "name": "Floor 16-02",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 144,+ "y": 48,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:8b6e7a02-3778-4179-9fe0-3ce2f3cb213e",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 74,+ "name": "Floor 17-02",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 176,+ "y": 48,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:8b6e7a02-3778-4179-9fe0-3ce2f3cb213e",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 75,+ "name": "Floor 18-02",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 208,+ "y": 48,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:8b6e7a02-3778-4179-9fe0-3ce2f3cb213e",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 76,+ "name": "Floor 19-02",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 240,+ "y": 48,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:dd3e075d-703c-4888-a3e2-576d202f5bd3",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 77,+ "name": "Floor 20-02",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 272,+ "y": 48,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:8b6e7a02-3778-4179-9fe0-3ce2f3cb213e",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 78,+ "name": "Floor 21-02",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 304,+ "y": 48,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:8b6e7a02-3778-4179-9fe0-3ce2f3cb213e",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 79,+ "name": "Floor 22-02",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 336,+ "y": 48,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:8b6e7a02-3778-4179-9fe0-3ce2f3cb213e",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 80,+ "name": "Wall 23-02",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 368,+ "y": 48,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:70da71e4-b54b-4d3d-9f95-c27e199a1771",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 81,+ "name": "Wall 00-03",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -368,+ "y": 16,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:70da71e4-b54b-4d3d-9f95-c27e199a1771",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 82,+ "name": "Floor 01-03",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -336,+ "y": 16,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:dd3e075d-703c-4888-a3e2-576d202f5bd3",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 83,+ "name": "Floor 02-03",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -304,+ "y": 16,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:8b6e7a02-3778-4179-9fe0-3ce2f3cb213e",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 84,+ "name": "Floor 03-03",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -272,+ "y": 16,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:8b6e7a02-3778-4179-9fe0-3ce2f3cb213e",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 85,+ "name": "Floor 04-03",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -240,+ "y": 16,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:8b6e7a02-3778-4179-9fe0-3ce2f3cb213e",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 86,+ "name": "Floor 05-03",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -208,+ "y": 16,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:8b6e7a02-3778-4179-9fe0-3ce2f3cb213e",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 87,+ "name": "Floor 06-03",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -176,+ "y": 16,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:dd3e075d-703c-4888-a3e2-576d202f5bd3",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 88,+ "name": "Floor 07-03",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -144,+ "y": 16,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:8b6e7a02-3778-4179-9fe0-3ce2f3cb213e",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 89,+ "name": "Floor 08-03",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -112,+ "y": 16,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:8b6e7a02-3778-4179-9fe0-3ce2f3cb213e",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 90,+ "name": "Floor 09-03",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -80,+ "y": 16,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:8b6e7a02-3778-4179-9fe0-3ce2f3cb213e",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 91,+ "name": "Floor 10-03",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -48,+ "y": 16,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:8b6e7a02-3778-4179-9fe0-3ce2f3cb213e",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 92,+ "name": "Floor 11-03",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -16,+ "y": 16,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:dd3e075d-703c-4888-a3e2-576d202f5bd3",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 93,+ "name": "Floor 12-03",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 16,+ "y": 16,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:8b6e7a02-3778-4179-9fe0-3ce2f3cb213e",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 94,+ "name": "Floor 13-03",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 48,+ "y": 16,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:8b6e7a02-3778-4179-9fe0-3ce2f3cb213e",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 95,+ "name": "Floor 14-03",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 80,+ "y": 16,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:8b6e7a02-3778-4179-9fe0-3ce2f3cb213e",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 96,+ "name": "Floor 15-03",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 112,+ "y": 16,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:8b6e7a02-3778-4179-9fe0-3ce2f3cb213e",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 97,+ "name": "Floor 16-03",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 144,+ "y": 16,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:dd3e075d-703c-4888-a3e2-576d202f5bd3",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 98,+ "name": "Floor 17-03",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 176,+ "y": 16,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:8b6e7a02-3778-4179-9fe0-3ce2f3cb213e",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 99,+ "name": "Floor 18-03",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 208,+ "y": 16,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:8b6e7a02-3778-4179-9fe0-3ce2f3cb213e",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 100,+ "name": "Floor 19-03",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 240,+ "y": 16,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:8b6e7a02-3778-4179-9fe0-3ce2f3cb213e",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 101,+ "name": "Floor 20-03",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 272,+ "y": 16,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:8b6e7a02-3778-4179-9fe0-3ce2f3cb213e",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 102,+ "name": "Floor 21-03",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 304,+ "y": 16,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:dd3e075d-703c-4888-a3e2-576d202f5bd3",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 103,+ "name": "Floor 22-03",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 336,+ "y": 16,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:8b6e7a02-3778-4179-9fe0-3ce2f3cb213e",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 104,+ "name": "Wall 23-03",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 368,+ "y": 16,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:70da71e4-b54b-4d3d-9f95-c27e199a1771",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 105,+ "name": "Wall 00-04",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -368,+ "y": -16,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:70da71e4-b54b-4d3d-9f95-c27e199a1771",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 106,+ "name": "Floor 01-04",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -336,+ "y": -16,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:8b6e7a02-3778-4179-9fe0-3ce2f3cb213e",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 107,+ "name": "Floor 02-04",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -304,+ "y": -16,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:8b6e7a02-3778-4179-9fe0-3ce2f3cb213e",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 108,+ "name": "Floor 03-04",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -272,+ "y": -16,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:dd3e075d-703c-4888-a3e2-576d202f5bd3",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 109,+ "name": "Floor 04-04",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -240,+ "y": -16,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:8b6e7a02-3778-4179-9fe0-3ce2f3cb213e",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 110,+ "name": "Floor 05-04",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -208,+ "y": -16,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:8b6e7a02-3778-4179-9fe0-3ce2f3cb213e",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 111,+ "name": "Floor 06-04",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -176,+ "y": -16,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:8b6e7a02-3778-4179-9fe0-3ce2f3cb213e",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 112,+ "name": "Floor 07-04",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -144,+ "y": -16,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:8b6e7a02-3778-4179-9fe0-3ce2f3cb213e",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 113,+ "name": "Floor 08-04",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -112,+ "y": -16,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:dd3e075d-703c-4888-a3e2-576d202f5bd3",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 114,+ "name": "Floor 09-04",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -80,+ "y": -16,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:8b6e7a02-3778-4179-9fe0-3ce2f3cb213e",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 115,+ "name": "Floor 10-04",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -48,+ "y": -16,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:8b6e7a02-3778-4179-9fe0-3ce2f3cb213e",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 116,+ "name": "Floor 11-04",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -16,+ "y": -16,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:8b6e7a02-3778-4179-9fe0-3ce2f3cb213e",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 117,+ "name": "Floor 12-04",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 16,+ "y": -16,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:8b6e7a02-3778-4179-9fe0-3ce2f3cb213e",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 118,+ "name": "Floor 13-04",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 48,+ "y": -16,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:dd3e075d-703c-4888-a3e2-576d202f5bd3",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 119,+ "name": "Floor 14-04",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 80,+ "y": -16,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:8b6e7a02-3778-4179-9fe0-3ce2f3cb213e",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 120,+ "name": "Floor 15-04",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 112,+ "y": -16,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:8b6e7a02-3778-4179-9fe0-3ce2f3cb213e",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 121,+ "name": "Floor 16-04",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 144,+ "y": -16,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:8b6e7a02-3778-4179-9fe0-3ce2f3cb213e",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 122,+ "name": "Floor 17-04",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 176,+ "y": -16,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:8b6e7a02-3778-4179-9fe0-3ce2f3cb213e",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 123,+ "name": "Floor 18-04",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 208,+ "y": -16,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:dd3e075d-703c-4888-a3e2-576d202f5bd3",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 124,+ "name": "Floor 19-04",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 240,+ "y": -16,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:8b6e7a02-3778-4179-9fe0-3ce2f3cb213e",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 125,+ "name": "Floor 20-04",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 272,+ "y": -16,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:8b6e7a02-3778-4179-9fe0-3ce2f3cb213e",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 126,+ "name": "Floor 21-04",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 304,+ "y": -16,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:8b6e7a02-3778-4179-9fe0-3ce2f3cb213e",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 127,+ "name": "Floor 22-04",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 336,+ "y": -16,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:8b6e7a02-3778-4179-9fe0-3ce2f3cb213e",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 128,+ "name": "Wall 23-04",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 368,+ "y": -16,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:70da71e4-b54b-4d3d-9f95-c27e199a1771",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 129,+ "name": "Wall 00-05",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -368,+ "y": -48,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:70da71e4-b54b-4d3d-9f95-c27e199a1771",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 130,+ "name": "Floor 01-05",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -336,+ "y": -48,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:8b6e7a02-3778-4179-9fe0-3ce2f3cb213e",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 131,+ "name": "Floor 02-05",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -304,+ "y": -48,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:8b6e7a02-3778-4179-9fe0-3ce2f3cb213e",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 132,+ "name": "Floor 03-05",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -272,+ "y": -48,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:8b6e7a02-3778-4179-9fe0-3ce2f3cb213e",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 133,+ "name": "Floor 04-05",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -240,+ "y": -48,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:8b6e7a02-3778-4179-9fe0-3ce2f3cb213e",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 134,+ "name": "Floor 05-05",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -208,+ "y": -48,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:dd3e075d-703c-4888-a3e2-576d202f5bd3",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 135,+ "name": "Floor 06-05",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -176,+ "y": -48,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:8b6e7a02-3778-4179-9fe0-3ce2f3cb213e",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 136,+ "name": "Floor 07-05",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -144,+ "y": -48,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:8b6e7a02-3778-4179-9fe0-3ce2f3cb213e",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 137,+ "name": "Floor 08-05",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -112,+ "y": -48,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:8b6e7a02-3778-4179-9fe0-3ce2f3cb213e",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 138,+ "name": "Floor 09-05",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -80,+ "y": -48,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:8b6e7a02-3778-4179-9fe0-3ce2f3cb213e",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 139,+ "name": "Floor 10-05",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -48,+ "y": -48,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:dd3e075d-703c-4888-a3e2-576d202f5bd3",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 140,+ "name": "Floor 11-05",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -16,+ "y": -48,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:8b6e7a02-3778-4179-9fe0-3ce2f3cb213e",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 141,+ "name": "Floor 12-05",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 16,+ "y": -48,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:8b6e7a02-3778-4179-9fe0-3ce2f3cb213e",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 142,+ "name": "Floor 13-05",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 48,+ "y": -48,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:8b6e7a02-3778-4179-9fe0-3ce2f3cb213e",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 143,+ "name": "Floor 14-05",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 80,+ "y": -48,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:8b6e7a02-3778-4179-9fe0-3ce2f3cb213e",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 144,+ "name": "Floor 15-05",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 112,+ "y": -48,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:dd3e075d-703c-4888-a3e2-576d202f5bd3",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 145,+ "name": "Floor 16-05",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 144,+ "y": -48,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:8b6e7a02-3778-4179-9fe0-3ce2f3cb213e",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 146,+ "name": "Floor 17-05",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 176,+ "y": -48,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:8b6e7a02-3778-4179-9fe0-3ce2f3cb213e",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 147,+ "name": "Floor 18-05",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 208,+ "y": -48,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:8b6e7a02-3778-4179-9fe0-3ce2f3cb213e",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 148,+ "name": "Floor 19-05",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 240,+ "y": -48,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:8b6e7a02-3778-4179-9fe0-3ce2f3cb213e",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 149,+ "name": "Floor 20-05",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 272,+ "y": -48,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:dd3e075d-703c-4888-a3e2-576d202f5bd3",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 150,+ "name": "Floor 21-05",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 304,+ "y": -48,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:8b6e7a02-3778-4179-9fe0-3ce2f3cb213e",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 151,+ "name": "Floor 22-05",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 336,+ "y": -48,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:8b6e7a02-3778-4179-9fe0-3ce2f3cb213e",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 152,+ "name": "Wall 23-05",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 368,+ "y": -48,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:70da71e4-b54b-4d3d-9f95-c27e199a1771",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 153,+ "name": "Wall 00-06",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -368,+ "y": -80,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:70da71e4-b54b-4d3d-9f95-c27e199a1771",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 154,+ "name": "Floor 01-06",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -336,+ "y": -80,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:8b6e7a02-3778-4179-9fe0-3ce2f3cb213e",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 155,+ "name": "Floor 02-06",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -304,+ "y": -80,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:dd3e075d-703c-4888-a3e2-576d202f5bd3",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 156,+ "name": "Floor 03-06",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -272,+ "y": -80,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:8b6e7a02-3778-4179-9fe0-3ce2f3cb213e",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 157,+ "name": "Floor 04-06",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -240,+ "y": -80,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:8b6e7a02-3778-4179-9fe0-3ce2f3cb213e",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 158,+ "name": "Floor 05-06",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -208,+ "y": -80,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:8b6e7a02-3778-4179-9fe0-3ce2f3cb213e",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 159,+ "name": "Floor 06-06",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -176,+ "y": -80,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:8b6e7a02-3778-4179-9fe0-3ce2f3cb213e",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 160,+ "name": "Floor 07-06",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -144,+ "y": -80,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:dd3e075d-703c-4888-a3e2-576d202f5bd3",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 161,+ "name": "Floor 08-06",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -112,+ "y": -80,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:8b6e7a02-3778-4179-9fe0-3ce2f3cb213e",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 162,+ "name": "Floor 09-06",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -80,+ "y": -80,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:8b6e7a02-3778-4179-9fe0-3ce2f3cb213e",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 163,+ "name": "Floor 10-06",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -48,+ "y": -80,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:8b6e7a02-3778-4179-9fe0-3ce2f3cb213e",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 164,+ "name": "Floor 11-06",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -16,+ "y": -80,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:8b6e7a02-3778-4179-9fe0-3ce2f3cb213e",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 165,+ "name": "Floor 12-06",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 16,+ "y": -80,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:dd3e075d-703c-4888-a3e2-576d202f5bd3",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 166,+ "name": "Floor 13-06",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 48,+ "y": -80,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:8b6e7a02-3778-4179-9fe0-3ce2f3cb213e",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 167,+ "name": "Floor 14-06",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 80,+ "y": -80,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:8b6e7a02-3778-4179-9fe0-3ce2f3cb213e",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 168,+ "name": "Floor 15-06",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 112,+ "y": -80,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:8b6e7a02-3778-4179-9fe0-3ce2f3cb213e",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 169,+ "name": "Floor 16-06",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 144,+ "y": -80,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:8b6e7a02-3778-4179-9fe0-3ce2f3cb213e",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 170,+ "name": "Floor 17-06",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 176,+ "y": -80,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:dd3e075d-703c-4888-a3e2-576d202f5bd3",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 171,+ "name": "Floor 18-06",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 208,+ "y": -80,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:8b6e7a02-3778-4179-9fe0-3ce2f3cb213e",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 172,+ "name": "Floor 19-06",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 240,+ "y": -80,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:8b6e7a02-3778-4179-9fe0-3ce2f3cb213e",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 173,+ "name": "Floor 20-06",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 272,+ "y": -80,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:8b6e7a02-3778-4179-9fe0-3ce2f3cb213e",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 174,+ "name": "Floor 21-06",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 304,+ "y": -80,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:8b6e7a02-3778-4179-9fe0-3ce2f3cb213e",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 175,+ "name": "Floor 22-06",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 336,+ "y": -80,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:dd3e075d-703c-4888-a3e2-576d202f5bd3",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 176,+ "name": "Wall 23-06",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 368,+ "y": -80,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:70da71e4-b54b-4d3d-9f95-c27e199a1771",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 177,+ "name": "Wall 00-07",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -368,+ "y": -112,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:70da71e4-b54b-4d3d-9f95-c27e199a1771",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 178,+ "name": "Floor 01-07",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -336,+ "y": -112,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:8b6e7a02-3778-4179-9fe0-3ce2f3cb213e",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 179,+ "name": "Floor 02-07",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -304,+ "y": -112,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:8b6e7a02-3778-4179-9fe0-3ce2f3cb213e",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 180,+ "name": "Floor 03-07",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -272,+ "y": -112,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:8b6e7a02-3778-4179-9fe0-3ce2f3cb213e",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 181,+ "name": "Floor 04-07",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -240,+ "y": -112,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:dd3e075d-703c-4888-a3e2-576d202f5bd3",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 182,+ "name": "Floor 05-07",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -208,+ "y": -112,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:8b6e7a02-3778-4179-9fe0-3ce2f3cb213e",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 183,+ "name": "Floor 06-07",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -176,+ "y": -112,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:8b6e7a02-3778-4179-9fe0-3ce2f3cb213e",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 184,+ "name": "Floor 07-07",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -144,+ "y": -112,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:8b6e7a02-3778-4179-9fe0-3ce2f3cb213e",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 185,+ "name": "Floor 08-07",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -112,+ "y": -112,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:8b6e7a02-3778-4179-9fe0-3ce2f3cb213e",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 186,+ "name": "Floor 09-07",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -80,+ "y": -112,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:dd3e075d-703c-4888-a3e2-576d202f5bd3",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 187,+ "name": "Floor 10-07",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -48,+ "y": -112,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:8b6e7a02-3778-4179-9fe0-3ce2f3cb213e",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 188,+ "name": "Floor 11-07",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -16,+ "y": -112,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:8b6e7a02-3778-4179-9fe0-3ce2f3cb213e",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 189,+ "name": "Floor 12-07",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 16,+ "y": -112,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:8b6e7a02-3778-4179-9fe0-3ce2f3cb213e",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 190,+ "name": "Floor 13-07",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 48,+ "y": -112,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:8b6e7a02-3778-4179-9fe0-3ce2f3cb213e",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 191,+ "name": "Floor 14-07",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 80,+ "y": -112,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:dd3e075d-703c-4888-a3e2-576d202f5bd3",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 192,+ "name": "Floor 15-07",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 112,+ "y": -112,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:8b6e7a02-3778-4179-9fe0-3ce2f3cb213e",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 193,+ "name": "Floor 16-07",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 144,+ "y": -112,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:8b6e7a02-3778-4179-9fe0-3ce2f3cb213e",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 194,+ "name": "Floor 17-07",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 176,+ "y": -112,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:8b6e7a02-3778-4179-9fe0-3ce2f3cb213e",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 195,+ "name": "Floor 18-07",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 208,+ "y": -112,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:8b6e7a02-3778-4179-9fe0-3ce2f3cb213e",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 196,+ "name": "Floor 19-07",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 240,+ "y": -112,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:dd3e075d-703c-4888-a3e2-576d202f5bd3",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 197,+ "name": "Floor 20-07",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 272,+ "y": -112,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:8b6e7a02-3778-4179-9fe0-3ce2f3cb213e",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 198,+ "name": "Floor 21-07",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 304,+ "y": -112,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:8b6e7a02-3778-4179-9fe0-3ce2f3cb213e",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 199,+ "name": "Floor 22-07",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 336,+ "y": -112,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:8b6e7a02-3778-4179-9fe0-3ce2f3cb213e",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 200,+ "name": "Wall 23-07",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 368,+ "y": -112,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:70da71e4-b54b-4d3d-9f95-c27e199a1771",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 201,+ "name": "Wall 00-08",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -368,+ "y": -144,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:70da71e4-b54b-4d3d-9f95-c27e199a1771",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 202,+ "name": "Floor 01-08",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -336,+ "y": -144,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:dd3e075d-703c-4888-a3e2-576d202f5bd3",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 203,+ "name": "Floor 02-08",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -304,+ "y": -144,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:8b6e7a02-3778-4179-9fe0-3ce2f3cb213e",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 204,+ "name": "Floor 03-08",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -272,+ "y": -144,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:8b6e7a02-3778-4179-9fe0-3ce2f3cb213e",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 205,+ "name": "Floor 04-08",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -240,+ "y": -144,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:8b6e7a02-3778-4179-9fe0-3ce2f3cb213e",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 206,+ "name": "Floor 05-08",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -208,+ "y": -144,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:8b6e7a02-3778-4179-9fe0-3ce2f3cb213e",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 207,+ "name": "Floor 06-08",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -176,+ "y": -144,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:dd3e075d-703c-4888-a3e2-576d202f5bd3",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 208,+ "name": "Floor 07-08",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -144,+ "y": -144,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:8b6e7a02-3778-4179-9fe0-3ce2f3cb213e",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 209,+ "name": "Floor 08-08",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -112,+ "y": -144,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:8b6e7a02-3778-4179-9fe0-3ce2f3cb213e",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 210,+ "name": "Floor 09-08",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -80,+ "y": -144,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:8b6e7a02-3778-4179-9fe0-3ce2f3cb213e",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 211,+ "name": "Floor 10-08",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -48,+ "y": -144,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:8b6e7a02-3778-4179-9fe0-3ce2f3cb213e",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 212,+ "name": "Floor 11-08",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -16,+ "y": -144,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:dd3e075d-703c-4888-a3e2-576d202f5bd3",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 213,+ "name": "Floor 12-08",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 16,+ "y": -144,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:8b6e7a02-3778-4179-9fe0-3ce2f3cb213e",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 214,+ "name": "Floor 13-08",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 48,+ "y": -144,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:8b6e7a02-3778-4179-9fe0-3ce2f3cb213e",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 215,+ "name": "Floor 14-08",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 80,+ "y": -144,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:8b6e7a02-3778-4179-9fe0-3ce2f3cb213e",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 216,+ "name": "Floor 15-08",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 112,+ "y": -144,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:8b6e7a02-3778-4179-9fe0-3ce2f3cb213e",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 217,+ "name": "Floor 16-08",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 144,+ "y": -144,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:dd3e075d-703c-4888-a3e2-576d202f5bd3",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 218,+ "name": "Floor 17-08",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 176,+ "y": -144,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:8b6e7a02-3778-4179-9fe0-3ce2f3cb213e",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 219,+ "name": "Floor 18-08",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 208,+ "y": -144,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:8b6e7a02-3778-4179-9fe0-3ce2f3cb213e",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 220,+ "name": "Floor 19-08",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 240,+ "y": -144,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:8b6e7a02-3778-4179-9fe0-3ce2f3cb213e",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 221,+ "name": "Floor 20-08",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 272,+ "y": -144,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:8b6e7a02-3778-4179-9fe0-3ce2f3cb213e",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 222,+ "name": "Floor 21-08",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 304,+ "y": -144,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:dd3e075d-703c-4888-a3e2-576d202f5bd3",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 223,+ "name": "Floor 22-08",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 336,+ "y": -144,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:8b6e7a02-3778-4179-9fe0-3ce2f3cb213e",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 224,+ "name": "Wall 23-08",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 368,+ "y": -144,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:70da71e4-b54b-4d3d-9f95-c27e199a1771",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 225,+ "name": "Wall 00-09",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -368,+ "y": -176,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:70da71e4-b54b-4d3d-9f95-c27e199a1771",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 226,+ "name": "Wall 01-09",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -336,+ "y": -176,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:70da71e4-b54b-4d3d-9f95-c27e199a1771",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 227,+ "name": "Wall 02-09",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -304,+ "y": -176,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:70da71e4-b54b-4d3d-9f95-c27e199a1771",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 228,+ "name": "Wall 03-09",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -272,+ "y": -176,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:70da71e4-b54b-4d3d-9f95-c27e199a1771",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 229,+ "name": "Wall 04-09",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -240,+ "y": -176,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:70da71e4-b54b-4d3d-9f95-c27e199a1771",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 230,+ "name": "Wall 05-09",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -208,+ "y": -176,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:70da71e4-b54b-4d3d-9f95-c27e199a1771",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 231,+ "name": "Wall 06-09",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -176,+ "y": -176,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:70da71e4-b54b-4d3d-9f95-c27e199a1771",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 232,+ "name": "Wall 07-09",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -144,+ "y": -176,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:70da71e4-b54b-4d3d-9f95-c27e199a1771",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 233,+ "name": "Wall 08-09",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -112,+ "y": -176,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:70da71e4-b54b-4d3d-9f95-c27e199a1771",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 234,+ "name": "Wall 09-09",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -80,+ "y": -176,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:70da71e4-b54b-4d3d-9f95-c27e199a1771",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 235,+ "name": "Wall 10-09",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -48,+ "y": -176,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:70da71e4-b54b-4d3d-9f95-c27e199a1771",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 236,+ "name": "Wall 11-09",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -16,+ "y": -176,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:70da71e4-b54b-4d3d-9f95-c27e199a1771",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 237,+ "name": "Wall 12-09",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 16,+ "y": -176,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:70da71e4-b54b-4d3d-9f95-c27e199a1771",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 238,+ "name": "Wall 13-09",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 48,+ "y": -176,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:70da71e4-b54b-4d3d-9f95-c27e199a1771",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 239,+ "name": "Wall 14-09",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 80,+ "y": -176,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:70da71e4-b54b-4d3d-9f95-c27e199a1771",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 240,+ "name": "Wall 15-09",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 112,+ "y": -176,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:70da71e4-b54b-4d3d-9f95-c27e199a1771",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 241,+ "name": "Wall 16-09",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 144,+ "y": -176,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:70da71e4-b54b-4d3d-9f95-c27e199a1771",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 242,+ "name": "Wall 17-09",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 176,+ "y": -176,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:70da71e4-b54b-4d3d-9f95-c27e199a1771",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 243,+ "name": "Wall 18-09",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 208,+ "y": -176,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:70da71e4-b54b-4d3d-9f95-c27e199a1771",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 244,+ "name": "Wall 19-09",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 240,+ "y": -176,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:70da71e4-b54b-4d3d-9f95-c27e199a1771",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 245,+ "name": "Wall 20-09",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 272,+ "y": -176,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:70da71e4-b54b-4d3d-9f95-c27e199a1771",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 246,+ "name": "Wall 21-09",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 304,+ "y": -176,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:70da71e4-b54b-4d3d-9f95-c27e199a1771",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 247,+ "name": "Wall 22-09",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 336,+ "y": -176,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:70da71e4-b54b-4d3d-9f95-c27e199a1771",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 248,+ "name": "Wall 23-09",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 368,+ "y": -176,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:70da71e4-b54b-4d3d-9f95-c27e199a1771",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 32,+ "y": 32+ },+ "layer": 0+ }+ }+ ]+ },+ {+ "id": 249,+ "name": "Chest west",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -275,+ "y": 70,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:9ad264d0-bb5f-41c9-9cc6-b0f290325f11",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 40,+ "y": 40+ },+ "layer": 2+ }+ }+ ]+ },+ {+ "id": 250,+ "name": "Chest east",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 285,+ "y": 70,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:9ad264d0-bb5f-41c9-9cc6-b0f290325f11",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 40,+ "y": 40+ },+ "layer": 2+ }+ }+ ]+ },+ {+ "id": 251,+ "name": "Torch west",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -320,+ "y": 112,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:5d2a6dda-3d1c-4998-be0d-224d50c6c305",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 40,+ "y": 40+ },+ "layer": 2+ }+ }+ ]+ },+ {+ "id": 252,+ "name": "Torch east",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 320,+ "y": 112,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:5d2a6dda-3d1c-4998-be0d-224d50c6c305",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 40,+ "y": 40+ },+ "layer": 2+ }+ }+ ]+ },+ {+ "id": 253,+ "name": "Stairs west",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -310,+ "y": -75,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:cd75111b-628c-47a3-a292-df42e44bbd7e",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 40,+ "y": 40+ },+ "layer": 2+ }+ }+ ]+ },+ {+ "id": 254,+ "name": "Stairs east",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 310,+ "y": -75,+ "z": 0+ }+ }+ },+ {+ "type": "Sprite",+ "data": {+ "texture": "@uuid:cd75111b-628c-47a3-a292-df42e44bbd7e",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "size": {+ "x": 40,+ "y": 40+ },+ "layer": 2+ }+ }+ ]+ }+ ]+}diff --git a/examples/mobile-controls/assets/scenes/main.esscene.meta b/examples/mobile-controls/assets/scenes/main.esscene.metanew file mode 100644index 000000000..dc26ca40e--- /dev/null+++ b/examples/mobile-controls/assets/scenes/main.esscene.meta@@ -0,0 +1,8 @@+{+ "uuid": "66017c3d-abd9-43f2-b603-efe77cd4b278",+ "version": "2.0",+ "type": "scene",+ "importer": {+ "autoMigrate": true+ }+}diff --git a/examples/mobile-controls/assets/textures/attack-button.png b/examples/mobile-controls/assets/textures/attack-button.pngnew file mode 100644index 000000000..8b623b979Binary files /dev/null and b/examples/mobile-controls/assets/textures/attack-button.png differdiff --git a/examples/mobile-controls/assets/textures/attack-button.png.meta b/examples/mobile-controls/assets/textures/attack-button.png.metanew file mode 100644index 000000000..d537e4407--- /dev/null+++ b/examples/mobile-controls/assets/textures/attack-button.png.meta@@ -0,0 +1,17 @@+{+ "uuid": "f208bb9e-bb1a-4419-aec0-1855696c3ff3",+ "version": "2.0",+ "type": "texture",+ "importer": {+ "maxSize": 2048,+ "filterMode": "nearest",+ "wrapMode": "clamp",+ "premultiplyAlpha": false,+ "sliceBorder": {+ "left": 0,+ "right": 0,+ "top": 0,+ "bottom": 0+ }+ }+}diff --git a/examples/mobile-controls/assets/textures/chest.png b/examples/mobile-controls/assets/textures/chest.pngnew file mode 100644index 000000000..d46243520Binary files /dev/null and b/examples/mobile-controls/assets/textures/chest.png differdiff --git a/examples/mobile-controls/assets/textures/chest.png.meta b/examples/mobile-controls/assets/textures/chest.png.metanew file mode 100644index 000000000..584066620--- /dev/null+++ b/examples/mobile-controls/assets/textures/chest.png.meta@@ -0,0 +1,17 @@+{+ "uuid": "9ad264d0-bb5f-41c9-9cc6-b0f290325f11",+ "version": "2.0",+ "type": "texture",+ "importer": {+ "maxSize": 2048,+ "filterMode": "nearest",+ "wrapMode": "clamp",+ "premultiplyAlpha": false,+ "sliceBorder": {+ "left": 0,+ "right": 0,+ "top": 0,+ "bottom": 0+ }+ }+}diff --git a/examples/mobile-controls/assets/textures/floor-worn.png b/examples/mobile-controls/assets/textures/floor-worn.pngnew file mode 100644index 000000000..c7d072220Binary files /dev/null and b/examples/mobile-controls/assets/textures/floor-worn.png differdiff --git a/examples/mobile-controls/assets/textures/floor-worn.png.meta b/examples/mobile-controls/assets/textures/floor-worn.png.metanew file mode 100644index 000000000..efaab941f--- /dev/null+++ b/examples/mobile-controls/assets/textures/floor-worn.png.meta@@ -0,0 +1,17 @@+{+ "uuid": "dd3e075d-703c-4888-a3e2-576d202f5bd3",+ "version": "2.0",+ "type": "texture",+ "importer": {+ "maxSize": 2048,+ "filterMode": "nearest",+ "wrapMode": "clamp",+ "premultiplyAlpha": false,+ "sliceBorder": {+ "left": 0,+ "right": 0,+ "top": 0,+ "bottom": 0+ }+ }+}diff --git a/examples/mobile-controls/assets/textures/floor.png b/examples/mobile-controls/assets/textures/floor.pngnew file mode 100644index 000000000..6e59a442dBinary files /dev/null and b/examples/mobile-controls/assets/textures/floor.png differdiff --git a/examples/mobile-controls/assets/textures/floor.png.meta b/examples/mobile-controls/assets/textures/floor.png.metanew file mode 100644index 000000000..10752a263--- /dev/null+++ b/examples/mobile-controls/assets/textures/floor.png.meta@@ -0,0 +1,17 @@+{+ "uuid": "8b6e7a02-3778-4179-9fe0-3ce2f3cb213e",+ "version": "2.0",+ "type": "texture",+ "importer": {+ "maxSize": 2048,+ "filterMode": "nearest",+ "wrapMode": "clamp",+ "premultiplyAlpha": false,+ "sliceBorder": {+ "left": 0,+ "right": 0,+ "top": 0,+ "bottom": 0+ }+ }+}diff --git a/examples/mobile-controls/assets/textures/knight.png b/examples/mobile-controls/assets/textures/knight.pngnew file mode 100644index 000000000..b0106b2d4Binary files /dev/null and b/examples/mobile-controls/assets/textures/knight.png differdiff --git a/examples/mobile-controls/assets/textures/knight.png.meta b/examples/mobile-controls/assets/textures/knight.png.metanew file mode 100644index 000000000..e98ea51dc--- /dev/null+++ b/examples/mobile-controls/assets/textures/knight.png.meta@@ -0,0 +1,17 @@+{+ "uuid": "fd1904a3-fcd8-4904-89d9-61a0f9cf1282",+ "version": "2.0",+ "type": "texture",+ "importer": {+ "maxSize": 2048,+ "filterMode": "nearest",+ "wrapMode": "clamp",+ "premultiplyAlpha": false,+ "sliceBorder": {+ "left": 0,+ "right": 0,+ "top": 0,+ "bottom": 0+ }+ }+}diff --git a/examples/mobile-controls/assets/textures/monster.png b/examples/mobile-controls/assets/textures/monster.pngnew file mode 100644index 000000000..93866d105Binary files /dev/null and b/examples/mobile-controls/assets/textures/monster.png differdiff --git a/examples/mobile-controls/assets/textures/monster.png.meta b/examples/mobile-controls/assets/textures/monster.png.metanew file mode 100644index 000000000..3178a40a5--- /dev/null+++ b/examples/mobile-controls/assets/textures/monster.png.meta@@ -0,0 +1,17 @@+{+ "uuid": "a7e1d316-cf16-4502-b2e9-789c4e6cb5a7",+ "version": "2.0",+ "type": "texture",+ "importer": {+ "maxSize": 2048,+ "filterMode": "nearest",+ "wrapMode": "clamp",+ "premultiplyAlpha": false,+ "sliceBorder": {+ "left": 0,+ "right": 0,+ "top": 0,+ "bottom": 0+ }+ }+}diff --git a/examples/mobile-controls/assets/textures/stairs.png b/examples/mobile-controls/assets/textures/stairs.pngnew file mode 100644index 000000000..fceb76e2fBinary files /dev/null and b/examples/mobile-controls/assets/textures/stairs.png differdiff --git a/examples/mobile-controls/assets/textures/stairs.png.meta b/examples/mobile-controls/assets/textures/stairs.png.metanew file mode 100644index 000000000..79ecce49d--- /dev/null+++ b/examples/mobile-controls/assets/textures/stairs.png.meta@@ -0,0 +1,17 @@+{+ "uuid": "cd75111b-628c-47a3-a292-df42e44bbd7e",+ "version": "2.0",+ "type": "texture",+ "importer": {+ "maxSize": 2048,+ "filterMode": "nearest",+ "wrapMode": "clamp",+ "premultiplyAlpha": false,+ "sliceBorder": {+ "left": 0,+ "right": 0,+ "top": 0,+ "bottom": 0+ }+ }+}diff --git a/examples/mobile-controls/assets/textures/stick-base.png b/examples/mobile-controls/assets/textures/stick-base.pngnew file mode 100644index 000000000..c6164febeBinary files /dev/null and b/examples/mobile-controls/assets/textures/stick-base.png differdiff --git a/examples/mobile-controls/assets/textures/stick-base.png.meta b/examples/mobile-controls/assets/textures/stick-base.png.metanew file mode 100644index 000000000..39dffb361--- /dev/null+++ b/examples/mobile-controls/assets/textures/stick-base.png.meta@@ -0,0 +1,17 @@+{+ "uuid": "ccb36f07-73c7-4ed6-a0e8-50dd375049c4",+ "version": "2.0",+ "type": "texture",+ "importer": {+ "maxSize": 2048,+ "filterMode": "nearest",+ "wrapMode": "clamp",+ "premultiplyAlpha": false,+ "sliceBorder": {+ "left": 0,+ "right": 0,+ "top": 0,+ "bottom": 0+ }+ }+}diff --git a/examples/mobile-controls/assets/textures/stick-handle.png b/examples/mobile-controls/assets/textures/stick-handle.pngnew file mode 100644index 000000000..956cc7c5aBinary files /dev/null and b/examples/mobile-controls/assets/textures/stick-handle.png differdiff --git a/examples/mobile-controls/assets/textures/stick-handle.png.meta b/examples/mobile-controls/assets/textures/stick-handle.png.metanew file mode 100644index 000000000..2882934e5--- /dev/null+++ b/examples/mobile-controls/assets/textures/stick-handle.png.meta@@ -0,0 +1,17 @@+{+ "uuid": "517537d0-dd64-4f30-863e-2c74b0f84557",+ "version": "2.0",+ "type": "texture",+ "importer": {+ "maxSize": 2048,+ "filterMode": "nearest",+ "wrapMode": "clamp",+ "premultiplyAlpha": false,+ "sliceBorder": {+ "left": 0,+ "right": 0,+ "top": 0,+ "bottom": 0+ }+ }+}diff --git a/examples/mobile-controls/assets/textures/torch.png b/examples/mobile-controls/assets/textures/torch.pngnew file mode 100644index 000000000..3029b2048Binary files /dev/null and b/examples/mobile-controls/assets/textures/torch.png differdiff --git a/examples/mobile-controls/assets/textures/torch.png.meta b/examples/mobile-controls/assets/textures/torch.png.metanew file mode 100644index 000000000..39d0f33fd--- /dev/null+++ b/examples/mobile-controls/assets/textures/torch.png.meta@@ -0,0 +1,17 @@+{+ "uuid": "5d2a6dda-3d1c-4998-be0d-224d50c6c305",+ "version": "2.0",+ "type": "texture",+ "importer": {+ "maxSize": 2048,+ "filterMode": "nearest",+ "wrapMode": "clamp",+ "premultiplyAlpha": false,+ "sliceBorder": {+ "left": 0,+ "right": 0,+ "top": 0,+ "bottom": 0+ }+ }+}diff --git a/examples/mobile-controls/assets/textures/wall.png b/examples/mobile-controls/assets/textures/wall.pngnew file mode 100644index 000000000..1191cd300Binary files /dev/null and b/examples/mobile-controls/assets/textures/wall.png differdiff --git a/examples/mobile-controls/assets/textures/wall.png.meta b/examples/mobile-controls/assets/textures/wall.png.metanew file mode 100644index 000000000..35f09f7be--- /dev/null+++ b/examples/mobile-controls/assets/textures/wall.png.meta@@ -0,0 +1,17 @@+{+ "uuid": "70da71e4-b54b-4d3d-9f95-c27e199a1771",+ "version": "2.0",+ "type": "texture",+ "importer": {+ "maxSize": 2048,+ "filterMode": "nearest",+ "wrapMode": "clamp",+ "premultiplyAlpha": false,+ "sliceBorder": {+ "left": 0,+ "right": 0,+ "top": 0,+ "bottom": 0+ }+ }+}diff --git a/examples/mobile-controls/project.esproject b/examples/mobile-controls/project.esprojectnew file mode 100644index 000000000..eb04c4c5c--- /dev/null+++ b/examples/mobile-controls/project.esproject@@ -0,0 +1,13 @@+{+ "formatVersion": "1",+ "name": "Mobile Controls",+ "description": "Multi-touch virtual joystick and fire button, tilt controls, haptics, wake lock and browser display controls.",+ "tag": "Input",+ "version": "0.1.0",+ "defaultScene": "assets/scenes/main.esscene",+ "designResolution": {+ "width": 800,+ "height": 450+ },+ "spineVersion": "none"+}diff --git a/examples/mobile-controls/src/main.ts b/examples/mobile-controls/src/main.tsnew file mode 100644index 000000000..17dc1576e--- /dev/null+++ b/examples/mobile-controls/src/main.ts@@ -0,0 +1,92 @@+import {+ addStartupSystem, addSystemToSchedule, defineSystem, Schedule, Res, GetWorld,+ Input, InputMap, Axis2D, Button, Keys2D, Key, Virtual, Time, Transform, Sprite,+ UIEvents, Text, Name, UINode, UIPositionType, spawnUIEntity, createButton, px, Device,+ type Entity, type DeviceResult,+} from 'esengine';++const controls = new InputMap({ Move: Axis2D(Keys2D('KeyW', 'KeyS', 'KeyA', 'KeyD'), Virtual('move')),+ Fire: Button(Key('Space'), Virtual('fire')) });+let tilt = { x: 0, y: 0 };+let motion = false;+let status: Entity | null = null;+let message = 'Drag the left stick and hold Fire. WASD / Space also work.';+let hits = 0;+let hitFlash = 0;+let recoil = 0;+let misses = 0;+const report = (name: string) => (result: DeviceResult) => { message = `${name}: ${result.status}${result.reason ? ` (${result.reason})` : ''}`; };++addStartupSystem(defineSystem([Res(UIEvents), GetWorld()], (events, world) => {+ const canvas = world.findEntityByName('Canvas'); if (canvas === null) return;+ spawnUIEntity({ world, parent: canvas,+ node: { position: UIPositionType.Absolute, insetLeft: px(30), insetTop: px(6), width: px(740), height: px(22), pointerEvents: 1 },+ text: { content: 'DUNGEON TRAINING / MOBILE CONTROLS', fontSize: 17, bold: true, color: { r: 1, g: 0.76, b: 0.41, a: 1 } } });+ status = spawnUIEntity({ world, parent: canvas,+ node: { position: UIPositionType.Absolute, insetLeft: px(30), insetTop: px(78), width: px(740), height: px(32) },+ text: { content: message, fontSize: 13, color: { r: 0.68, g: 0.75, b: 0.86, a: 1 } } });+ world.insert(status, Name, { value: 'DeviceStatus' });+ const button = (text: string, left: number, onClick: () => void) => {+ const handle = createButton({ world, events, parent: canvas, userGesture: true,+ node: { position: UIPositionType.Absolute, insetLeft: px(left), insetTop: px(31), width: px(165), height: px(35) }, text, onClick });+ world.insert(handle.entity, Name, { value: text });+ };+ button('Tilt controls', 30, () => {+ if (motion) { motion = false; tilt = { x: 0, y: 0 }; void Device.motion.stop().then(report('Motion stopped')); return; }+ const caps = Device.capabilities();+ void Device.motion.start({ accelerometer: caps.accelerometer, gyroscope: caps.gyroscope }).then(result => {+ motion = result.status === 'ok'; report('Motion')(result);+ });+ });+ button('Keep awake', 220, () => { void Device.keepScreenOn(!Device.state().screenOn).then(report('Screen wake')); });+ button('Fullscreen', 410, () => { void Device.fullscreen(!Device.state().fullscreen).then(report('Fullscreen')); });+ button('Pointer lock', 600, () => { void Device.pointerLock(!Device.state().pointerLocked).then(report('Pointer lock')); });+ Device.motion.onChange(sample => {+ if (!motion || !sample.gravity) return;+ tilt = { x: Math.max(-1, Math.min(1, sample.gravity.x / 5)), y: Math.max(-1, Math.min(1, sample.gravity.y / 5)) };+ });+ Device.onChange(state => { if (!state.motionActive) tilt = { x: 0, y: 0 }; });+ const hint = spawnUIEntity({ world, parent: canvas,+ node: { position: UIPositionType.Absolute, insetLeft: px(230), insetTop: px(390), width: px(355), height: px(40) },+ visual: { color: { r: 0.075, g: 0.09, b: 0.14, a: 0.95 } },+ text: { content: 'Approach the monster, then attack.\nWASD / stick to move / Space / Fire to attack', fontSize: 13 } });+ world.insert(hint, UINode, { ...world.get(hint, UINode), pointerEvents: 1 });+}, { name: 'MobileControlsSetup' }));++addSystemToSchedule(Schedule.Update, defineSystem([Res(Input), Res(Time), GetWorld()], (input, time, world) => {+ controls.evaluate(input);+ const player = world.findEntityByName('Player'); const target = world.findEntityByName('Target');+ if (player === null || target === null) return;+ const axis = controls.axis2d('Move'); const transform = world.get(player, Transform);+ const speed = 180 * Math.min(time.delta, 0.05);+ transform.position.x = Math.max(-330, Math.min(330, transform.position.x + (axis.x + tilt.x) * speed));+ transform.position.y = Math.max(-138, Math.min(80, transform.position.y + (axis.y + tilt.y) * speed));+ world.insert(player, Transform, transform);+ const destination = world.get(target, Transform).position;+ hitFlash = Math.max(0, hitFlash - time.delta);+ recoil = Math.max(0, recoil - time.delta);+ const targetTransform = world.get(target, Transform);+ const targetScale = hitFlash > 0 ? 1 + Math.sin(hitFlash * 40) * 0.08 : 1;+ targetTransform.scale = { x: targetScale, y: targetScale, z: 1 };+ world.insert(target, Transform, targetTransform);+ world.insert(target, Sprite, { ...world.get(target, Sprite), color: hitFlash > 0+ ? { r: 1, g: 0.35, b: 0.25, a: 1 } : { r: 1, g: 1, b: 1, a: 1 } });+ transform.scale = { x: recoil > 0 ? 1.12 : 1, y: recoil > 0 ? 0.88 : 1, z: 1 };+ world.insert(player, Transform, transform);+ if (controls.pressed('Fire')) {+ recoil = 0.12;+ if (Math.hypot(destination.x - transform.position.x, destination.y - transform.position.y) < 85) {+ hits++; hitFlash = 0.3; message = `Hit! Training score: ${hits}`; void Device.vibrate({ duration: 'short', intensity: 'heavy' }).then(report('Hit vibration'));+ if (hits % 3 === 0) {+ targetTransform.position = { ...destination,+ x: destination.x > 0 ? -180 : 180, y: hits % 2 === 0 ? -40 : 40 };+ world.insert(target, Transform, targetTransform);+ }+ } else { misses++; message = `Out of reach - move closer to the monster. Misses: ${misses}`; }+ }+ if (status !== null && world.valid(status)) {+ const caps = Device.capabilities();+ const content = `${message}\nHits: ${hits} · Motion API: ${caps.accelerometer ? 'available' : 'unavailable'} · Vibration API: ${caps.vibration ? 'available' : 'unavailable'}`;+ if (world.get(status, Text).content !== content) world.insert(status, Text, { ...world.get(status, Text), content });+ }+}, { name: 'MobileControlsUpdate' }));diff --git a/examples/mobile-controls/thumbnail.png b/examples/mobile-controls/thumbnail.pngnew file mode 100644index 000000000..4865771c3Binary files /dev/null and b/examples/mobile-controls/thumbnail.png differdiff --git a/examples/mobile-controls/thumbnail.png.meta b/examples/mobile-controls/thumbnail.png.metanew file mode 100644index 000000000..40e107357--- /dev/null+++ b/examples/mobile-controls/thumbnail.png.meta@@ -0,0 +1,17 @@+{+ "uuid": "45bf8d4f-99ec-4309-a9fd-198d0972920c",+ "version": "2.0",+ "type": "texture",+ "importer": {+ "maxSize": 2048,+ "filterMode": "linear",+ "wrapMode": "clamp",+ "premultiplyAlpha": false,+ "sliceBorder": {+ "left": 0,+ "right": 0,+ "top": 0,+ "bottom": 0+ }+ }+}diff --git a/examples/mobile-controls/tsconfig.json b/examples/mobile-controls/tsconfig.jsonnew file mode 100644index 000000000..cc35d6c03--- /dev/null+++ b/examples/mobile-controls/tsconfig.json@@ -0,0 +1,37 @@+{+ "compilerOptions": {+ "target": "ES2020",+ "module": "ESNext",+ "moduleResolution": "bundler",+ "strict": true,+ "esModuleInterop": true,+ "skipLibCheck": true,+ "forceConsistentCasingInFileNames": true,+ "declaration": false,+ "outDir": "./dist",+ "rootDir": ".",+ "paths": {+ "esengine": ["./.esengine/sdk/index.d.ts"],+ "esengine/spine": ["./.esengine/sdk/spine/index.d.ts"],+ "esengine/tilemap": ["./.esengine/sdk/tilemap/index.d.ts"],+ "esengine/logic": ["./.esengine/sdk/logic/index.d.ts"],+ "esengine/debug-channel": ["./.esengine/sdk/debug-channel/index.d.ts"],+ "esengine/ai": ["./.esengine/sdk/ai/index.d.ts"],+ "esengine/replication": ["./.esengine/sdk/net/replication/index.d.ts"],+ "esengine/gameplay": ["./.esengine/sdk/gameplay/index.d.ts"],+ "esengine/dragonbones": ["./.esengine/sdk/dragonbones/index.d.ts"],+ "esengine/physics": ["./.esengine/sdk/physics/index.d.ts"],+ "esengine/physics3d": ["./.esengine/sdk/physics3d/index.d.ts"],+ "esengine/douyin": ["./.esengine/sdk/douyin/index.d.ts"],+ "esengine/kuaishou": ["./.esengine/sdk/kuaishou/index.d.ts"],+ "esengine/bilibili": ["./.esengine/sdk/bilibili/index.d.ts"],+ "esengine/quickgame": ["./.esengine/sdk/quickgame/index.d.ts"],+ "esengine/alipay": ["./.esengine/sdk/alipay/index.d.ts"],+ "esengine/huawei": ["./.esengine/sdk/huawei/index.d.ts"],+ "estella-plugin-*": ["./.esengine/packages/*"],+ "esengine/wasm": ["./.esengine/sdk/wasm.d.ts"]+ }+ },+ "include": ["src/**/*"],+ "exclude": ["node_modules"]+}diff --git a/native/CMakeLists.txt b/native/CMakeLists.txtindex 8a8e6bc89..0213e3ed3 100644--- a/native/CMakeLists.txt+++ b/native/CMakeLists.txt@@ -342,7 +342,7 @@ if(ESTELLA_QUICKJS_DIR)if(ESTELLA_IOS)# Static: the thin Xcode app (native/ios) links this plus the libraries# below. -ObjC on the app keeps the Obj-C classes in platform/ios.mm alive.- add_library(estella_js_host STATIC ${HOST_SOURCES} host/platform/ios.mm+ add_library(estella_js_host STATIC ${HOST_SOURCES} host/platform/ios.mm host/platform/ios_device.mmhost/platform/apple_common.mm)# miniaudio's CoreAudio backend uses AVAudioSession (Obj-C), so its TU must# be Objective-C++ on Apple; it also forces MA_NO_RUNTIME_LINKING there, so@@ -355,6 +355,7 @@ if(ESTELLA_QUICKJS_DIR)estella_video estella_spineestella_dragonbones qjs"-framework UIKit" "-framework QuartzCore" "-framework Foundation"+ "-framework CoreMotion" "-framework CoreHaptics""-framework AVFoundation" "-framework CoreAudio" "-framework AudioToolbox""-framework CoreText" "-framework CoreGraphics")# Merge host + engine + deps + Dawn into ONE archive, so the Xcode app is a@@ -419,7 +420,7 @@ if(ESTELLA_QUICKJS_DIR)else()# Android: plain C++; miniaudio dlopens AAudio/OpenSL at runtime (no extra# link libs). native_audio.cpp's Obj-C paths are __APPLE__-guarded out.- add_library(estella_js_host SHARED ${HOST_SOURCES} host/platform/android.cpp)+ add_library(estella_js_host SHARED ${HOST_SOURCES} host/platform/android.cpp host/platform/android_device.cpp)target_link_libraries(estella_js_host esengine estella_physics estella_physics3destella_video estella_spineestella_dragonbones qjs native_app_glue android log)diff --git a/native/android/host/AndroidManifest.xml.in b/native/android/host/AndroidManifest.xml.inindex bf7959031..6bdf74b72 100644--- a/native/android/host/AndroidManifest.xml.in+++ b/native/android/host/AndroidManifest.xml.in@@ -40,6 +40,7 @@<!-- Without it every socket the app opens is refused: a remote group's assets,a hot update and the debug channel all go over the network. A normalpermission, granted at install without asking. -->+ <uses-permission android:name="android.permission.VIBRATE" /><uses-permission android:name="android.permission.INTERNET" /><uses-feature android:name="android.hardware.vulkan.version" android:version="0x400003" android:required="true" /><!-- usesCleartextTraffic: a development build talks to a LAN server over plaindiff --git a/native/host/Host.hpp b/native/host/Host.hppindex 1c49fcfd3..0cb9462f8 100644--- a/native/host/Host.hpp+++ b/native/host/Host.hpp@@ -97,7 +97,21 @@ struct GamepadState {* @brief The platform seam: what the host needs that Android and iOS answer* differently. The glue implements it; host_core owns everything else.*/+struct MotionState {+ double timestamp = 0;+ float acceleration[3]{};+ float gyroscope[3]{};+ bool hasAcceleration = false;+ bool hasGyroscope = false;+};+struct Platform {+ virtual int deviceCapabilities() const { return 0; }+ virtual bool startMotion(bool, bool, int) { return false; }+ virtual void stopMotion() {}+ virtual bool pollMotion(MotionState&) { return false; }+ virtual bool vibrate(int, int) { return false; }+ virtual bool keepScreenOn(bool) { return false; }virtual ~Platform() = default;/** A packaged, project-relative file — the APK's `assets/` on Android, thediff --git a/native/host/bindings/DeviceBindings.cpp b/native/host/bindings/DeviceBindings.cppindex 09afcedfb..b3c9d9432 100644--- a/native/host/bindings/DeviceBindings.cpp+++ b/native/host/bindings/DeviceBindings.cpp@@ -57,10 +57,58 @@ JSValue js_deviceName(JSContext* ctx, JSValueConst, int, JSValueConst*) {return JS_NewString(ctx, deviceName().c_str());}+JSValue js_deviceCapabilities(JSContext* ctx, JSValueConst, int, JSValueConst*) {+ return JS_NewInt32(ctx, hostAlive() && host().platform ? host().platform->deviceCapabilities() : 0);+}+JSValue js_startMotion(JSContext* ctx, JSValueConst, int argc, JSValueConst* argv) {+ if (!hostAlive() || !host().platform || argc < 3) return JS_FALSE;+ int32_t interval = 16;+ if (JS_ToInt32(ctx, &interval, argv[2]) < 0) return JS_EXCEPTION;+ return JS_NewBool(ctx, host().platform->startMotion(JS_ToBool(ctx, argv[0]) > 0,+ JS_ToBool(ctx, argv[1]) > 0, interval));+}+JSValue js_stopMotion(JSContext*, JSValueConst, int, JSValueConst*) {+ if (hostAlive() && host().platform) host().platform->stopMotion();+ return JS_UNDEFINED;+}+JSValue motionVector(JSContext* ctx, const float* value) {+ JSValue object = JS_NewObject(ctx);+ JS_SetPropertyStr(ctx, object, "x", JS_NewFloat64(ctx, value[0]));+ JS_SetPropertyStr(ctx, object, "y", JS_NewFloat64(ctx, value[1]));+ JS_SetPropertyStr(ctx, object, "z", JS_NewFloat64(ctx, value[2]));+ return object;+}+JSValue js_pollMotion(JSContext* ctx, JSValueConst, int, JSValueConst*) {+ MotionState motion;+ if (!hostAlive() || !host().platform || !host().platform->pollMotion(motion)) return JS_NULL;+ JSValue result = JS_NewObject(ctx);+ JS_SetPropertyStr(ctx, result, "timestamp", JS_NewFloat64(ctx, motion.timestamp));+ JS_SetPropertyStr(ctx, result, "accelerationIncludingGravity", motion.hasAcceleration+ ? motionVector(ctx, motion.acceleration) : JS_NULL);+ JS_SetPropertyStr(ctx, result, "gyroscope", motion.hasGyroscope ? motionVector(ctx, motion.gyroscope) : JS_NULL);+ return result;+}+JSValue js_vibrate(JSContext* ctx, JSValueConst, int argc, JSValueConst* argv) {+ if (!hostAlive() || !host().platform || argc < 2) return JS_FALSE;+ int32_t duration = 15, intensity = 2;+ if (JS_ToInt32(ctx, &duration, argv[0]) < 0 || JS_ToInt32(ctx, &intensity, argv[1]) < 0) return JS_EXCEPTION;+ return JS_NewBool(ctx, host().platform->vibrate(duration, intensity));+}+JSValue js_keepScreenOn(JSContext* ctx, JSValueConst, int argc, JSValueConst* argv) {+ return JS_NewBool(ctx, hostAlive() && host().platform && argc > 0+ && host().platform->keepScreenOn(JS_ToBool(ctx, argv[0]) > 0));+}+} // namespacevoid registerDeviceBindings(HostState& h, JSValue global) {bindGlobal(h, global, "es_deviceName", js_deviceName, 0);+ bindGlobal(h, global, "es_deviceCapabilities", js_deviceCapabilities, 0);+ bindGlobal(h, global, "es_startMotion", js_startMotion, 3);+ bindGlobal(h, global, "es_stopMotion", js_stopMotion, 0);+ bindGlobal(h, global, "es_pollMotion", js_pollMotion, 0);+ bindGlobal(h, global, "es_vibrate", js_vibrate, 2);+ bindGlobal(h, global, "es_keepScreenOn", js_keepScreenOn, 1);}} // namespace eshostdiff --git a/native/host/platform/android.cpp b/native/host/platform/android.cppindex 78aced9e3..e92905a89 100644--- a/native/host/platform/android.cpp+++ b/native/host/platform/android.cpp@@ -33,6 +33,7 @@#include "Host.hpp"#include "media/glyph_raster.hpp" // GLYPH_BOLD / GLYPH_ITALIC, for the font match#include "platform/touch_stream.hpp"+#include "platform/android_device.hpp"#define LOG_TAG "EstellaSDK"@@ -165,6 +166,13 @@ void performHttp(JNIEnv* env, const eshost::FetchRequest& req, eshost::FetchResu}struct AndroidPlatform final : eshost::Platform {+ eshost::AndroidDevice device;+ int deviceCapabilities() const override { return device.capabilities(); }+ bool startMotion(bool a, bool g, int interval) override { return device.start(a, g, interval); }+ void stopMotion() override { device.stop(); }+ bool pollMotion(eshost::MotionState& out) override { return device.poll(out); }+ bool vibrate(int duration, int intensity) override { return device.vibrate(duration, intensity); }+ bool keepScreenOn(bool enabled) override { return device.keepScreenOn(enabled); }AAssetManager* assets = nullptr; // APK assets/ — the game + its contentANativeWindow* window = nullptr;ARect contentRect{};@@ -895,6 +903,7 @@ std::string queryCacheDir(ANativeActivity* activity) {} // namespacevoid android_main(android_app* app) {+ g_platform.device.activity = app->activity;g_platform.assets = app->activity->assetManager; // APK assets/ (the exported project)g_platform.vm = app->activity->vm; // for JNI HttpURLConnection (es_fetch)// Before boot: whether there is an editing surface decides whether the@@ -930,6 +939,8 @@ void android_main(android_app* app) {}if (id >= 0 && source) source->process(app, source);if (app->destroyRequested) {+ g_platform.device.stop();+ g_platform.device.activity = nullptr;framesResumed(false);return;}diff --git a/native/host/platform/android_device.cpp b/native/host/platform/android_device.cppnew file mode 100644index 000000000..c9f1eb5f5--- /dev/null+++ b/native/host/platform/android_device.cpp@@ -0,0 +1,142 @@+// SPDX-License-Identifier: Apache-2.0+// SPDX-FileCopyrightText: Copyright (c) 2024-present ESEngine Team+#include "platform/android_device.hpp"+#include <android/looper.h>+#include <android/window.h>+#include <algorithm>+#include <jni.h>++namespace eshost {+namespace {+struct JavaEnv {+ JavaVM* vm = nullptr;+ JNIEnv* env = nullptr;+ bool attached = false;+ bool frame = false;+ explicit JavaEnv(ANativeActivity* activity) {+ vm = activity ? activity->vm : nullptr;+ if (!vm) return;+ const int status = vm->GetEnv(reinterpret_cast<void**>(&env), JNI_VERSION_1_6);+ if (status == JNI_EDETACHED) {+ attached = vm->AttachCurrentThread(&env, nullptr) == JNI_OK;+ if (!attached) env = nullptr;+ } else if (status != JNI_OK) env = nullptr;+ if (env) { frame = env->PushLocalFrame(24) == JNI_OK; if (!frame) env->ExceptionClear(); }+ }+ ~JavaEnv() {+ if (env) { if (env->ExceptionCheck()) env->ExceptionClear(); if (frame) env->PopLocalFrame(nullptr); }+ if (attached) vm->DetachCurrentThread();+ }+ explicit operator bool() const { return env && frame; }+};+jobject vibrator(JNIEnv* env, ANativeActivity* activity) {+ jclass cls = env->GetObjectClass(activity->clazz);+ jmethodID get = env->GetMethodID(cls, "getSystemService", "(Ljava/lang/String;)Ljava/lang/Object;");+ if (!get || env->ExceptionCheck()) return nullptr;+ return env->CallObjectMethod(activity->clazz, get, env->NewStringUTF("vibrator"));+}+int vibrationFlags(ANativeActivity* activity) {+ JavaEnv java(activity); if (!java) return 0;+ JNIEnv* env = java.env;+ jobject motor = vibrator(env, activity); if (!motor || env->ExceptionCheck()) return 0;+ jclass cls = env->GetObjectClass(motor);+ jmethodID has = env->GetMethodID(cls, "hasVibrator", "()Z");+ if (!has || env->ExceptionCheck() || !env->CallBooleanMethod(motor, has)) return 0;+ jmethodID amplitude = env->GetMethodID(cls, "hasAmplitudeControl", "()Z");+ if (!amplitude || env->ExceptionCheck()) return 4;+ return 4 | (env->CallBooleanMethod(motor, amplitude) ? 16 : 0);+}+}+AndroidDevice::~AndroidDevice() { stop(); }+ASensorManager* AndroidDevice::manager() const {+ JavaEnv java(activity); if (!java) return nullptr;+ JNIEnv* env = java.env;+ jclass cls = env->GetObjectClass(activity->clazz);+ jmethodID get = env->GetMethodID(cls, "getPackageName", "()Ljava/lang/String;");+ if (!get || env->ExceptionCheck()) return nullptr;+ auto name = static_cast<jstring>(env->CallObjectMethod(activity->clazz, get));+ if (!name || env->ExceptionCheck()) return nullptr;+ const char* chars = env->GetStringUTFChars(name, nullptr);+ if (!chars) return nullptr;+ ASensorManager* result = ASensorManager_getInstanceForPackage(chars);+ env->ReleaseStringUTFChars(name, chars);+ return result;+}+int AndroidDevice::capabilities() const {+ int flags = activity ? 8 : 0;+ if (auto* m = manager()) {+ if (ASensorManager_getDefaultSensor(m, ASENSOR_TYPE_ACCELEROMETER)) flags |= 1;+ if (ASensorManager_getDefaultSensor(m, ASENSOR_TYPE_GYROSCOPE)) flags |= 2;+ }+ return flags | vibrationFlags(activity);+}+bool AndroidDevice::start(bool acceleration, bool gyroscope, int intervalMs) {+ stop();+ auto* m = manager(); auto* looper = ALooper_forThread();+ if (!m || !looper || (!acceleration && !gyroscope)) return false;+ acceleration_ = acceleration ? ASensorManager_getDefaultSensor(m, ASENSOR_TYPE_ACCELEROMETER) : nullptr;+ gyroscope_ = gyroscope ? ASensorManager_getDefaultSensor(m, ASENSOR_TYPE_GYROSCOPE) : nullptr;+ if ((acceleration && !acceleration_) || (gyroscope && !gyroscope_)) return false;+ manager_ = m;+ queue_ = ASensorManager_createEventQueue(m, looper, ALOOPER_POLL_CALLBACK, receive, this);+ if (!queue_) return false;+ for (const ASensor* sensor : { acceleration_, gyroscope_ }) {+ if (!sensor) continue;+ const int rate = std::max(std::max(1, intervalMs) * 1000, ASensor_getMinDelay(sensor));+ if (ASensorEventQueue_enableSensor(queue_, sensor) < 0+ || ASensorEventQueue_setEventRate(queue_, sensor, rate) < 0) { stop(); return false; }+ }+ return true;+}+void AndroidDevice::stop() {+ if (queue_) {+ if (acceleration_) ASensorEventQueue_disableSensor(queue_, acceleration_);+ if (gyroscope_) ASensorEventQueue_disableSensor(queue_, gyroscope_);+ if (manager_) ASensorManager_destroyEventQueue(manager_, queue_);+ }+ queue_ = nullptr; manager_ = nullptr; acceleration_ = nullptr; gyroscope_ = nullptr;+ sample_ = {}; fresh_ = false;+}+int AndroidDevice::receive(int, int, void* data) {+ auto& self = *static_cast<AndroidDevice*>(data);+ ASensorEvent event{};+ while (self.queue_ && ASensorEventQueue_getEvents(self.queue_, &event, 1) > 0) {+ float* target = nullptr;+ if (event.type == ASENSOR_TYPE_ACCELEROMETER) { target = self.sample_.acceleration; self.sample_.hasAcceleration = true; }+ if (event.type == ASENSOR_TYPE_GYROSCOPE) { target = self.sample_.gyroscope; self.sample_.hasGyroscope = true; }+ if (!target) continue;+ for (int i = 0; i < 3; ++i) target[i] = event.data[i];+ self.sample_.timestamp = static_cast<double>(event.timestamp) / 1000000.0;+ self.fresh_ = true;+ }+ return 1;+}+bool AndroidDevice::poll(MotionState& out) {+ if (!fresh_) return false;+ out = sample_; fresh_ = false; return true;+}+bool AndroidDevice::vibrate(int durationMs, int intensity) {+ JavaEnv java(activity); if (!java) return false;+ JNIEnv* env = java.env;+ jobject motor = vibrator(env, activity); if (!motor || env->ExceptionCheck()) return false;+ jclass cls = env->GetObjectClass(motor);+ jmethodID has = env->GetMethodID(cls, "hasVibrator", "()Z");+ if (!has || env->ExceptionCheck() || !env->CallBooleanMethod(motor, has)) return false;+ jclass effectClass = env->FindClass("android/os/VibrationEffect");+ if (!effectClass || env->ExceptionCheck()) return false;+ jmethodID create = env->GetStaticMethodID(effectClass, "createOneShot", "(JI)Landroid/os/VibrationEffect;");+ jmethodID trigger = env->GetMethodID(cls, "vibrate", "(Landroid/os/VibrationEffect;)V");+ if (!create || !trigger || env->ExceptionCheck()) return false;+ const int amplitude = intensity <= 1 ? 64 : intensity >= 3 ? 255 : 128;+ jobject effect = env->CallStaticObjectMethod(effectClass, create, static_cast<jlong>(std::max(1, durationMs)), amplitude);+ if (!effect || env->ExceptionCheck()) return false;+ env->CallVoidMethod(motor, trigger, effect);+ return !env->ExceptionCheck();+}+bool AndroidDevice::keepScreenOn(bool enabled) {+ if (!activity) return false;+ ANativeActivity_setWindowFlags(activity, enabled ? AWINDOW_FLAG_KEEP_SCREEN_ON : 0,+ enabled ? 0 : AWINDOW_FLAG_KEEP_SCREEN_ON);+ return true;+}+}diff --git a/native/host/platform/android_device.hpp b/native/host/platform/android_device.hppnew file mode 100644index 000000000..5959ab615--- /dev/null+++ b/native/host/platform/android_device.hpp@@ -0,0 +1,29 @@+// SPDX-License-Identifier: Apache-2.0+// SPDX-FileCopyrightText: Copyright (c) 2024-present ESEngine Team+#pragma once+#include "Host.hpp"+#include <android/native_activity.h>+#include <android/sensor.h>++namespace eshost {+class AndroidDevice {+public:+ ANativeActivity* activity = nullptr;+ ~AndroidDevice();+ int capabilities() const;+ bool start(bool acceleration, bool gyroscope, int intervalMs);+ void stop();+ bool poll(MotionState& out);+ bool vibrate(int durationMs, int intensity);+ bool keepScreenOn(bool enabled);+private:+ ASensorManager* manager() const;+ ASensorManager* manager_ = nullptr;+ ASensorEventQueue* queue_ = nullptr;+ const ASensor* acceleration_ = nullptr;+ const ASensor* gyroscope_ = nullptr;+ MotionState sample_{};+ bool fresh_ = false;+ static int receive(int, int, void* data);+};+}diff --git a/native/host/platform/ios.mm b/native/host/platform/ios.mmindex fcdd05aff..e2c13e417 100644--- a/native/host/platform/ios.mm+++ b/native/host/platform/ios.mm@@ -26,6 +26,7 @@#include "Host.hpp"#include "platform/apple_common.hpp" // Core Text + NSURLSession, shared with macOS#include "platform/touch_stream.hpp"+#include "platform/ios_device.hpp"using esengine::u32;using esengine::u8;@@ -47,6 +48,13 @@ using esengine::WebGPUDevice;namespace {struct IOSPlatform final : eshost::Platform {+ eshost::IOSDevice device;+ int deviceCapabilities() const override { return device.capabilities(); }+ bool startMotion(bool a, bool g, int interval) override { return device.start(a, g, interval); }+ void stopMotion() override { device.stop(); }+ bool pollMotion(eshost::MotionState& out) override { return device.poll(out); }+ bool vibrate(int duration, int intensity) override { return device.vibrate(duration, intensity); }+ bool keepScreenOn(bool enabled) override { return device.keepScreenOn(enabled); }SafeInsets contentInsets;SafeInsets safeAreaInsets() const override { return contentInsets; }CAMetalLayer* layer = nil;diff --git a/native/host/platform/ios_device.hpp b/native/host/platform/ios_device.hppnew file mode 100644index 000000000..e1d493a81--- /dev/null+++ b/native/host/platform/ios_device.hpp@@ -0,0 +1,21 @@+// SPDX-License-Identifier: Apache-2.0+// SPDX-FileCopyrightText: Copyright (c) 2024-present ESEngine Team+#pragma once+#include "Host.hpp"+@class CMMotionManager;+namespace eshost {+class IOSDevice {+public:+ IOSDevice();+ ~IOSDevice();+ int capabilities() const;+ bool start(bool acceleration, bool gyroscope, int intervalMs);+ void stop();+ bool poll(MotionState& out);+ bool vibrate(int durationMs, int intensity);+ bool keepScreenOn(bool enabled);+private:+ mutable CMMotionManager* manager_ = nullptr;+ double timestamp_ = 0;+};+}diff --git a/native/host/platform/ios_device.mm b/native/host/platform/ios_device.mmnew file mode 100644index 000000000..591c04e05--- /dev/null+++ b/native/host/platform/ios_device.mm@@ -0,0 +1,67 @@+// SPDX-License-Identifier: Apache-2.0+// SPDX-FileCopyrightText: Copyright (c) 2024-present ESEngine Team+#include "platform/ios_device.hpp"+#import <CoreMotion/CoreMotion.h>+#import <CoreHaptics/CoreHaptics.h>+#import <AudioToolbox/AudioToolbox.h>+#import <UIKit/UIKit.h>+#include <algorithm>++namespace eshost {+IOSDevice::IOSDevice() = default;+IOSDevice::~IOSDevice() { stop(); [manager_ release]; }+int IOSDevice::capabilities() const {+ if (!manager_) manager_ = [[CMMotionManager alloc] init];+ int flags = 8;+ if (manager_.accelerometerAvailable) flags |= 1;+ if (manager_.gyroAvailable) flags |= 2;+ if ([CHHapticEngine capabilitiesForHardware].supportsHaptics) flags |= 4 | 16;+ return flags;+}+bool IOSDevice::start(bool acceleration, bool gyroscope, int intervalMs) {+ stop();+ if (!manager_) (void)capabilities();+ if ((!acceleration && !gyroscope) || (acceleration && !manager_.accelerometerAvailable)+ || (gyroscope && !manager_.gyroAvailable)) return false;+ const double interval = std::max(1, intervalMs) / 1000.0;+ if (acceleration) { manager_.accelerometerUpdateInterval = interval; [manager_ startAccelerometerUpdates]; }+ if (gyroscope) { manager_.gyroUpdateInterval = interval; [manager_ startGyroUpdates]; }+ return true;+}+void IOSDevice::stop() {+ [manager_ stopAccelerometerUpdates]; [manager_ stopGyroUpdates]; timestamp_ = 0;+}+bool IOSDevice::poll(MotionState& out) {+ CMAccelerometerData* acceleration = manager_.accelerometerActive ? manager_.accelerometerData : nil;+ CMGyroData* gyroscope = manager_.gyroActive ? manager_.gyroData : nil;+ const double timestamp = std::max(acceleration ? acceleration.timestamp : 0, gyroscope ? gyroscope.timestamp : 0);+ if (timestamp <= timestamp_) return false;+ timestamp_ = timestamp; out = {}; out.timestamp = timestamp * 1000;+ if (acceleration) {+ out.hasAcceleration = true;+ // CoreMotion measures gravitational acceleration; Device's including-+ // gravity channel follows the accelerometer's proper-acceleration sign.+ out.acceleration[0] = static_cast<float>(-acceleration.acceleration.x * 9.80665);+ out.acceleration[1] = static_cast<float>(-acceleration.acceleration.y * 9.80665);+ out.acceleration[2] = static_cast<float>(-acceleration.acceleration.z * 9.80665);+ }+ if (gyroscope) {+ out.hasGyroscope = true;+ out.gyroscope[0] = static_cast<float>(gyroscope.rotationRate.x);+ out.gyroscope[1] = static_cast<float>(gyroscope.rotationRate.y);+ out.gyroscope[2] = static_cast<float>(gyroscope.rotationRate.z);+ }+ return true;+}+bool IOSDevice::vibrate(int durationMs, int intensity) {+ if (!([CHHapticEngine capabilitiesForHardware].supportsHaptics)) return false;+ if (durationMs >= 400) { AudioServicesPlaySystemSound(kSystemSoundID_Vibrate); return true; }+ const UIImpactFeedbackStyle style = intensity <= 1 ? UIImpactFeedbackStyleLight+ : intensity >= 3 ? UIImpactFeedbackStyleHeavy : UIImpactFeedbackStyleMedium;+ UIImpactFeedbackGenerator* feedback = [[UIImpactFeedbackGenerator alloc] initWithStyle:style];+ [feedback prepare]; [feedback impactOccurred]; [feedback release]; return true;+}+bool IOSDevice::keepScreenOn(bool enabled) {+ [UIApplication sharedApplication].idleTimerDisabled = enabled; return true;+}+}diff --git a/native/ios/App/Info.plist.in b/native/ios/App/Info.plist.inindex f0ba03100..f12055bf8 100644--- a/native/ios/App/Info.plist.in+++ b/native/ios/App/Info.plist.in@@ -9,6 +9,8 @@--><plist version="1.0"><dict>+ <key>NSMotionUsageDescription</key>+ <string>Motion controls let you tilt the device to control the game.</string><key>CFBundleDevelopmentRegion</key><string>en</string><key>CFBundleExecutable</key>diff --git a/native/ios/project.yml b/native/ios/project.ymlindex 321e796e9..6f3b98b55 100644--- a/native/ios/project.yml+++ b/native/ios/project.yml@@ -56,6 +56,8 @@ targets:- framework: ../../build/cmake/native-ios/Estella.xcframeworkembed: false- sdk: UIKit.framework+ - sdk: CoreMotion.framework+ - sdk: CoreHaptics.framework- sdk: Metal.framework- sdk: QuartzCore.framework- sdk: IOSurface.frameworkdiff --git a/sdk/etc/index.api.md b/sdk/etc/index.api.mdindex 36098d518..5de8c9ebe 100644--- a/sdk/etc/index.api.md+++ b/sdk/etc/index.api.md@@ -1,7 +1,7 @@# API surface — esengine/index<!-- Generated by tools/api-surface.mjs — do not edit. Run --update to accept changes. -->-Symbols: 115 public · 91 beta · 1559 experimental · 3 deprecated+Symbols: 115 public · 91 beta · 1578 experimental · 3 deprecated## ABI_LAYOUT_HASH — const @experimental```@@ -1379,7 +1379,7 @@ Record<string, PrefabData>## BUILTIN_UI_WIDGET_NAMES — const @experimental```-readonly ["Button", "Toggle", "Slider", "Dialog", "TextInput", "Progress", "Dropdown", "ListView", "ScrollView"]+readonly ["VirtualJoystick", "VirtualButton", "Button", "Toggle", "Slider", "Dialog", "TextInput", "Progress", "Dropdown", "ListView", "ScrollView"]```## BUNDLE_MODES — const @experimental@@ -2878,6 +2878,23 @@ pixels: Uint8Array<ArrayBufferLike>width: number```+## Device — const @experimental+```+{ capabilities: () => DeviceCapabilities; state: () => DeviceState; motion: { start: (options?: MotionOptions) => Promise<DeviceResult>; stop: () => Promise<DeviceResult>; onChange: (handler: (sample: MotionSample) => void) => () => void; }; vibrate: (options?: VibrationOptions) => Promise<DeviceResult>; keepScreenOn: (enabled: boolean) => Promise<DeviceResult>; fullscreen: (enabled: boolean, target?: unknown) => Promise<DeviceResult>; pointerLock: (enabled: boolean, target?: unknown) => Promise<DeviceResult>; onChange: (handler: (state: DeviceState) => void) => () => void; dispose: () => void; }+```++## DeviceCapabilities — interface @experimental+```+accelerometer: boolean+fullscreen: boolean+gyroscope: boolean+keepScreenOn: boolean+orientation: boolean+pointerLock: boolean+vibration: boolean+vibrationIntensity: boolean+```+## DeviceIdentity — interface @experimental```backend: string@@ -2908,11 +2925,30 @@ maxMemoryGB: number | undefinedmodelIncludes: string | undefined```+## DeviceRequestStatus — type @experimental+```+'ok' | 'unavailable' | 'denied' | 'failed'+```+## DeviceRestoredListener — type @experimental```(generation: number) => void```+## DeviceResult — interface @experimental+```+reason: string | undefined+status: DeviceRequestStatus+```++## DeviceState — interface @experimental+```+fullscreen: boolean+motionActive: boolean+pointerLocked: boolean+screenOn: boolean+```+## DeviceStatus — const @experimental```{ readonly Live: 0; readonly Lost: 1; readonly Recovering: 2; readonly Dead: 3; }@@ -4399,6 +4435,7 @@ static prototype: InputRouter## InputState — class @beta```+@internal cancelVirtualSources: () => voidbeginFixedStep: () => voidclearFrameState: () => voidclearVirtual: () => void@@ -4449,9 +4486,11 @@ noteMouseDown: (button: number) => voidnoteMouseUp: (button: number) => voidpointerOverUI: booleanreleaseGamepad: (index?: number) => void+removeVirtualSource: (owner: object) => voidscrollDeltaX: numberscrollDeltaY: numbersetVirtual: (id: string, x: number, y?: number) => void+setVirtualSource: (owner: object, id: string, x: number, y?: number) => voidtouchAvailable: booleantouches: Map<number, TouchPoint>touchesEnded: Map<number, TouchPoint>@@ -5311,6 +5350,19 @@ text: stringvalue: number```+## MotionOptions — interface @experimental+```+accelerometer: boolean | undefined+gyroscope: boolean | undefined+orientation: boolean | undefined+rate: MotionRate | undefined+```++## MotionRate — type @experimental+```+'normal' | 'ui' | 'game'+```+## MotionRegistry — class @experimental```context: (world: World, entity: Entity, params: MotionParams, resolveJoint?: JointResolver) => MotionContext@@ -5322,6 +5374,16 @@ static new (): MotionRegistrystatic prototype: MotionRegistry```+## MotionSample — interface @experimental+```+acceleration: Vec3 | null+accelerationIncludingGravity: Vec3 | null+gravity: Vec3 | null+gyroscope: Vec3 | null+orientation: Vec3 | null+timestamp: number+```+## MotionSpan — interface @experimental```from: number@@ -5908,6 +5970,7 @@ createRewardedAd: ((adUnitId: string) => PlatformRewardedAd | null) | undefinedcreateSocket: ((options: PlatformSocketOptions) => PlatformSocket) | undefinedcreateTextEditor: (() => PlatformTextEditor | null) | undefinedcreateVideoBackend: ((ctx: VideoBackendContext) => PlatformVideoBackend) | undefined+device: (() => DeviceBackend) | undefineddeviceName: (() => string) | undefineddevicePixelRatio: () => numberdeviceQualityInfo: (() => DeviceQualityInfo) | undefined@@ -9652,6 +9715,17 @@ name: stringtype: DataType```+## VibrationIntensity — type @experimental+```+'light' | 'medium' | 'heavy'+```++## VibrationOptions — interface @experimental+```+duration: "short" | "long" | undefined+intensity: VibrationIntensity | undefined+```+## Video — const @experimental```ComponentDef<VideoData>@@ -9756,6 +9830,73 @@ y: number(id: string) => Binding```+## VirtualButton — const @experimental+```+ComponentDef<VirtualButtonData>+```++## VirtualButtonData — interface @experimental+```+inputId: string+value: number+```++## VirtualButtonOptions — interface @experimental+```+background: UIVisualInit | undefined+disabled: boolean | undefined+events: EntityEventQueue+fadeDuration: number | undefined+focusable: boolean | undefined+inputId: string | undefined+node: UINodeInit | undefined+onClick: ((entity: Entity) => void) | undefined+parent: number | undefined+states: Record<string, ButtonStateVisual> | undefined+tabIndex: number | undefined+text: string | TextInit | undefined+userGesture: boolean | undefined+value: number | undefined+world: World+```++## VirtualJoystick — const @experimental+```+ComponentDef<VirtualJoystickData>+```++## VirtualJoystickData — interface @experimental+```+base: number+deadZone: number+handle: number+inputId: string+mode: VirtualJoystickMode+radius: number+returnSpeed: number+```++## VirtualJoystickMode — enum @experimental+```+Fixed = 0+Follow = 1+```++## VirtualJoystickOptions — interface @experimental+```+baseVisual: UIVisualInit | undefined+deadZone: number | undefined+disabled: boolean | undefined+handleVisual: UIVisualInit | undefined+inputId: string | undefined+mode: VirtualJoystickMode | undefined+node: UINodeInit | undefined+parent: number | undefined+radius: number | undefined+returnSpeed: number | undefined+world: World+```+## WORLD_DIR — const @experimental```"world"@@ -10805,6 +10946,16 @@ Plugin(opts: ToggleOptions): ToggleHandle```+## createVirtualButton — function @experimental+```+(options: VirtualButtonOptions): ButtonHandle+```++## createVirtualJoystick — function @experimental+```+(options: VirtualJoystickOptions): { entity: number; baseEntity: number; handleEntity: number; setDisabled: (disabled: boolean) => void; dispose: () => void; }+```+## createWeChatSideModuleHost — function @experimental```(factories: MiniGameSideModuleFactories, binarySuffix?: string): SideModuleHostdiff --git a/sdk/etc/index.native.api.md b/sdk/etc/index.native.api.mdindex 2ba6eab2a..2f28f1c26 100644--- a/sdk/etc/index.native.api.md+++ b/sdk/etc/index.native.api.md@@ -1,7 +1,7 @@# API surface — esengine/index.native<!-- Generated by tools/api-surface.mjs — do not edit. Run --update to accept changes. -->-Symbols: 115 public · 96 beta · 1578 experimental · 3 deprecated+Symbols: 115 public · 96 beta · 1597 experimental · 3 deprecated## ABI_LAYOUT_HASH — const @experimental```@@ -1379,7 +1379,7 @@ Record<string, PrefabData>## BUILTIN_UI_WIDGET_NAMES — const @experimental```-readonly ["Button", "Toggle", "Slider", "Dialog", "TextInput", "Progress", "Dropdown", "ListView", "ScrollView"]+readonly ["VirtualJoystick", "VirtualButton", "Button", "Toggle", "Slider", "Dialog", "TextInput", "Progress", "Dropdown", "ListView", "ScrollView"]```## BUNDLE_MODES — const @experimental@@ -2886,6 +2886,23 @@ pixels: Uint8Array<ArrayBufferLike>width: number```+## Device — const @experimental+```+{ capabilities: () => DeviceCapabilities; state: () => DeviceState; motion: { start: (options?: MotionOptions) => Promise<DeviceResult>; stop: () => Promise<DeviceResult>; onChange: (handler: (sample: MotionSample) => void) => () => void; }; vibrate: (options?: VibrationOptions) => Promise<DeviceResult>; keepScreenOn: (enabled: boolean) => Promise<DeviceResult>; fullscreen: (enabled: boolean, target?: unknown) => Promise<DeviceResult>; pointerLock: (enabled: boolean, target?: unknown) => Promise<DeviceResult>; onChange: (handler: (state: DeviceState) => void) => () => void; dispose: () => void; }+```++## DeviceCapabilities — interface @experimental+```+accelerometer: boolean+fullscreen: boolean+gyroscope: boolean+keepScreenOn: boolean+orientation: boolean+pointerLock: boolean+vibration: boolean+vibrationIntensity: boolean+```+## DeviceIdentity — interface @experimental```backend: string@@ -2916,11 +2933,30 @@ maxMemoryGB: number | undefinedmodelIncludes: string | undefined```+## DeviceRequestStatus — type @experimental+```+'ok' | 'unavailable' | 'denied' | 'failed'+```+## DeviceRestoredListener — type @experimental```(generation: number) => void```+## DeviceResult — interface @experimental+```+reason: string | undefined+status: DeviceRequestStatus+```++## DeviceState — interface @experimental+```+fullscreen: boolean+motionActive: boolean+pointerLocked: boolean+screenOn: boolean+```+## DeviceStatus — const @experimental```{ readonly Live: 0; readonly Lost: 1; readonly Recovering: 2; readonly Dead: 3; }@@ -4407,6 +4443,7 @@ static prototype: InputRouter## InputState — class @beta```+@internal cancelVirtualSources: () => voidbeginFixedStep: () => voidclearFrameState: () => voidclearVirtual: () => void@@ -4457,9 +4494,11 @@ noteMouseDown: (button: number) => voidnoteMouseUp: (button: number) => voidpointerOverUI: booleanreleaseGamepad: (index?: number) => void+removeVirtualSource: (owner: object) => voidscrollDeltaX: numberscrollDeltaY: numbersetVirtual: (id: string, x: number, y?: number) => void+setVirtualSource: (owner: object, id: string, x: number, y?: number) => voidtouchAvailable: booleantouches: Map<number, TouchPoint>touchesEnded: Map<number, TouchPoint>@@ -5324,6 +5363,19 @@ text: stringvalue: number```+## MotionOptions — interface @experimental+```+accelerometer: boolean | undefined+gyroscope: boolean | undefined+orientation: boolean | undefined+rate: MotionRate | undefined+```++## MotionRate — type @experimental+```+'normal' | 'ui' | 'game'+```+## MotionRegistry — class @experimental```context: (world: World, entity: Entity, params: MotionParams, resolveJoint?: JointResolver) => MotionContext@@ -5335,6 +5387,16 @@ static new (): MotionRegistrystatic prototype: MotionRegistry```+## MotionSample — interface @experimental+```+acceleration: Vec3 | null+accelerationIncludingGravity: Vec3 | null+gravity: Vec3 | null+gyroscope: Vec3 | null+orientation: Vec3 | null+timestamp: number+```+## MotionSpan — interface @experimental```from: number@@ -5381,6 +5443,7 @@ value: string## NativeBridge — interface @beta```audio: NativeAudioBridge | undefined+device: (() => DeviceBackend) | undefineddeviceName: (() => string) | undefineddevicePixelRatio: () => numberfetch: (url: string, options?: PlatformRequestOptions) => Promise<NativeFetchResult>@@ -5456,12 +5519,15 @@ es_audioStop: ((voiceId: number) => void) | undefinedes_audioSuspendAll: (() => void) | undefinedes_audioUnload: ((bufferId: number) => void) | undefinedes_audioVoiceState: ((voiceId: number) => { playing: boolean; currentTime: number; } | null) | undefined+es_deviceCapabilities: (() => number) | undefinedes_deviceName: (() => string) | undefinedes_devicePixelRatio: (() => number) | undefinedes_fetch: ((request: { url: string; method?: string; headers?: Record<string, string>; body?: string | ArrayBuffer; responseType?: string; }, callback: (result: { ok: boolean; status: number; statusText: string; headers: Record<string, string>; arrayBuffer?: ArrayBuffer; text?: string; error?: string; }) => void) => void) | undefinedes_getStorageItem: ((key: string) => string | null) | undefined+es_keepScreenOn: ((enabled: boolean) => boolean) | undefinedes_loadImagePixels: (pathOrBytes: string | ArrayBuffer) => { width: number; height: number; pixels: ArrayBuffer; } | nulles_pollGamepads: (() => { index: number; connected: boolean; buttons: number[]; axes: number[]; }[]) | undefined+es_pollMotion: (() => Pick<MotionSample, "timestamp" | "accelerationIncludingGravity" | "gyroscope"> | null) | undefinedes_rasterizeGlyph: ((request: PlatformGlyphRequest) => { pixels: ArrayBuffer; width: number; height: number; advance: number; bearingX: number; bearingY: number; } | null) | undefinedes_readAsset: (path: string) => ArrayBuffer | nulles_readCacheFile: ((key: string) => ArrayBuffer | null) | undefined@@ -5470,6 +5536,7 @@ es_removeStorageItem: ((key: string) => void) | undefinedes_safeAreaInsets: (() => { top: number; bottom: number; left: number; right: number; }) | undefinedes_setStorageItem: ((key: string, value: string) => void) | undefinedes_setWindowSize: ((width: number, height: number) => void) | undefined+es_startMotion: ((accelerometer: boolean, gyroscope: boolean, intervalMs: number) => boolean) | undefinedes_steam_available: (() => boolean) | undefinedes_steam_getStat: ((name: string) => number) | undefinedes_steam_identity: (() => { id: string; name: string; }) | undefined@@ -5479,10 +5546,12 @@ es_steam_setStat: ((name: string, value: number) => boolean) | undefinedes_steam_store: (() => boolean) | undefinedes_steam_unlock: ((id: string) => boolean) | undefinedes_steam_unlocked: ((id: string) => boolean) | undefined+es_stopMotion: (() => void) | undefinedes_storageKeys: (() => string[]) | undefinedes_textEditor_blur: (() => void) | undefinedes_textEditor_focus: ((value: string, selectionStart: number, selectionEnd: number, multiline: boolean, maxLength: number, password: boolean) => void) | undefinedes_textEditor_write: ((value: string, selectionStart: number, selectionEnd: number) => void) | undefined+es_vibrate: ((durationMs: number, intensity: number) => boolean) | undefinedes_writeCacheFile: ((key: string, bytes: ArrayBuffer | Uint8Array | string) => boolean) | undefinedes_writeDataFile: ((key: string, bytes: ArrayBuffer | Uint8Array | string) => boolean) | undefinedes_wsClose: ((id: number, code?: number, reason?: string) => void) | undefined@@ -5521,6 +5590,7 @@ createImage: () => PlatformImagecreateSocket: (options: PlatformSocketOptions) => PlatformSocketcreateTextEditor: () => PlatformTextEditor | nullcreateVideoBackend: (ctx: VideoBackendContext) => PlatformVideoBackend+device: () => DeviceBackenddeviceName: () => stringdevicePixelRatio: () => numberfetch: (url: string, options?: PlatformRequestOptions) => Promise<PlatformResponse>@@ -6103,6 +6173,7 @@ createRewardedAd: ((adUnitId: string) => PlatformRewardedAd | null) | undefinedcreateSocket: ((options: PlatformSocketOptions) => PlatformSocket) | undefinedcreateTextEditor: (() => PlatformTextEditor | null) | undefinedcreateVideoBackend: ((ctx: VideoBackendContext) => PlatformVideoBackend) | undefined+device: (() => DeviceBackend) | undefineddeviceName: (() => string) | undefineddevicePixelRatio: () => numberdeviceQualityInfo: (() => DeviceQualityInfo) | undefined@@ -9857,6 +9928,17 @@ name: stringtype: DataType```+## VibrationIntensity — type @experimental+```+'light' | 'medium' | 'heavy'+```++## VibrationOptions — interface @experimental+```+duration: "short" | "long" | undefined+intensity: VibrationIntensity | undefined+```+## Video — const @experimental```ComponentDef<VideoData>@@ -9961,6 +10043,73 @@ y: number(id: string) => Binding```+## VirtualButton — const @experimental+```+ComponentDef<VirtualButtonData>+```++## VirtualButtonData — interface @experimental+```+inputId: string+value: number+```++## VirtualButtonOptions — interface @experimental+```+background: UIVisualInit | undefined+disabled: boolean | undefined+events: EntityEventQueue+fadeDuration: number | undefined+focusable: boolean | undefined+inputId: string | undefined+node: UINodeInit | undefined+onClick: ((entity: Entity) => void) | undefined+parent: number | undefined+states: Record<string, ButtonStateVisual> | undefined+tabIndex: number | undefined+text: string | TextInit | undefined+userGesture: boolean | undefined+value: number | undefined+world: World+```++## VirtualJoystick — const @experimental+```+ComponentDef<VirtualJoystickData>+```++## VirtualJoystickData — interface @experimental+```+base: number+deadZone: number+handle: number+inputId: string+mode: VirtualJoystickMode+radius: number+returnSpeed: number+```++## VirtualJoystickMode — enum @experimental+```+Fixed = 0+Follow = 1+```++## VirtualJoystickOptions — interface @experimental+```+baseVisual: UIVisualInit | undefined+deadZone: number | undefined+disabled: boolean | undefined+handleVisual: UIVisualInit | undefined+inputId: string | undefined+mode: VirtualJoystickMode | undefined+node: UINodeInit | undefined+parent: number | undefined+radius: number | undefined+returnSpeed: number | undefined+world: World+```+## WORLD_DIR — const @experimental```"world"@@ -11050,6 +11199,16 @@ Plugin(opts: ToggleOptions): ToggleHandle```+## createVirtualButton — function @experimental+```+(options: VirtualButtonOptions): ButtonHandle+```++## createVirtualJoystick — function @experimental+```+(options: VirtualJoystickOptions): { entity: number; baseEntity: number; handleEntity: number; setDisabled: (disabled: boolean) => void; dispose: () => void; }+```+## createWeChatSideModuleHost — function @experimental```(factories: MiniGameSideModuleFactories, binarySuffix?: string): SideModuleHostdiff --git a/sdk/etc/index.node.api.md b/sdk/etc/index.node.api.mdindex 85b2352a6..92dd73f4f 100644--- a/sdk/etc/index.node.api.md+++ b/sdk/etc/index.node.api.md@@ -1,7 +1,7 @@# API surface — esengine/index.node<!-- Generated by tools/api-surface.mjs — do not edit. Run --update to accept changes. -->-Symbols: 115 public · 93 beta · 1558 experimental · 3 deprecated+Symbols: 115 public · 93 beta · 1577 experimental · 3 deprecated## ANCHOR_AXES — const @experimental```@@ -1374,7 +1374,7 @@ Record<string, PrefabData>## BUILTIN_UI_WIDGET_NAMES — const @experimental```-readonly ["Button", "Toggle", "Slider", "Dialog", "TextInput", "Progress", "Dropdown", "ListView", "ScrollView"]+readonly ["VirtualJoystick", "VirtualButton", "Button", "Toggle", "Slider", "Dialog", "TextInput", "Progress", "Dropdown", "ListView", "ScrollView"]```## BUNDLE_MODES — const @experimental@@ -2873,6 +2873,23 @@ pixels: Uint8Array<ArrayBufferLike>width: number```+## Device — const @experimental+```+{ capabilities: () => DeviceCapabilities; state: () => DeviceState; motion: { start: (options?: MotionOptions) => Promise<DeviceResult>; stop: () => Promise<DeviceResult>; onChange: (handler: (sample: MotionSample) => void) => () => void; }; vibrate: (options?: VibrationOptions) => Promise<DeviceResult>; keepScreenOn: (enabled: boolean) => Promise<DeviceResult>; fullscreen: (enabled: boolean, target?: unknown) => Promise<DeviceResult>; pointerLock: (enabled: boolean, target?: unknown) => Promise<DeviceResult>; onChange: (handler: (state: DeviceState) => void) => () => void; dispose: () => void; }+```++## DeviceCapabilities — interface @experimental+```+accelerometer: boolean+fullscreen: boolean+gyroscope: boolean+keepScreenOn: boolean+orientation: boolean+pointerLock: boolean+vibration: boolean+vibrationIntensity: boolean+```+## DeviceIdentity — interface @experimental```backend: string@@ -2903,11 +2920,30 @@ maxMemoryGB: number | undefinedmodelIncludes: string | undefined```+## DeviceRequestStatus — type @experimental+```+'ok' | 'unavailable' | 'denied' | 'failed'+```+## DeviceRestoredListener — type @experimental```(generation: number) => void```+## DeviceResult — interface @experimental+```+reason: string | undefined+status: DeviceRequestStatus+```++## DeviceState — interface @experimental+```+fullscreen: boolean+motionActive: boolean+pointerLocked: boolean+screenOn: boolean+```+## DeviceStatus — const @experimental```{ readonly Live: 0; readonly Lost: 1; readonly Recovering: 2; readonly Dead: 3; }@@ -4394,6 +4430,7 @@ static prototype: InputRouter## InputState — class @beta```+@internal cancelVirtualSources: () => voidbeginFixedStep: () => voidclearFrameState: () => voidclearVirtual: () => void@@ -4444,9 +4481,11 @@ noteMouseDown: (button: number) => voidnoteMouseUp: (button: number) => voidpointerOverUI: booleanreleaseGamepad: (index?: number) => void+removeVirtualSource: (owner: object) => voidscrollDeltaX: numberscrollDeltaY: numbersetVirtual: (id: string, x: number, y?: number) => void+setVirtualSource: (owner: object, id: string, x: number, y?: number) => voidtouchAvailable: booleantouches: Map<number, TouchPoint>touchesEnded: Map<number, TouchPoint>@@ -5306,6 +5345,19 @@ text: stringvalue: number```+## MotionOptions — interface @experimental+```+accelerometer: boolean | undefined+gyroscope: boolean | undefined+orientation: boolean | undefined+rate: MotionRate | undefined+```++## MotionRate — type @experimental+```+'normal' | 'ui' | 'game'+```+## MotionRegistry — class @experimental```context: (world: World, entity: Entity, params: MotionParams, resolveJoint?: JointResolver) => MotionContext@@ -5317,6 +5369,16 @@ static new (): MotionRegistrystatic prototype: MotionRegistry```+## MotionSample — interface @experimental+```+acceleration: Vec3 | null+accelerationIncludingGravity: Vec3 | null+gravity: Vec3 | null+gyroscope: Vec3 | null+orientation: Vec3 | null+timestamp: number+```+## MotionSpan — interface @experimental```from: number@@ -5903,6 +5965,7 @@ createRewardedAd: ((adUnitId: string) => PlatformRewardedAd | null) | undefinedcreateSocket: ((options: PlatformSocketOptions) => PlatformSocket) | undefinedcreateTextEditor: (() => PlatformTextEditor | null) | undefinedcreateVideoBackend: ((ctx: VideoBackendContext) => PlatformVideoBackend) | undefined+device: (() => DeviceBackend) | undefineddeviceName: (() => string) | undefineddevicePixelRatio: () => numberdeviceQualityInfo: (() => DeviceQualityInfo) | undefined@@ -9647,6 +9710,17 @@ name: stringtype: DataType```+## VibrationIntensity — type @experimental+```+'light' | 'medium' | 'heavy'+```++## VibrationOptions — interface @experimental+```+duration: "short" | "long" | undefined+intensity: VibrationIntensity | undefined+```+## Video — const @experimental```ComponentDef<VideoData>@@ -9751,6 +9825,73 @@ y: number(id: string) => Binding```+## VirtualButton — const @experimental+```+ComponentDef<VirtualButtonData>+```++## VirtualButtonData — interface @experimental+```+inputId: string+value: number+```++## VirtualButtonOptions — interface @experimental+```+background: UIVisualInit | undefined+disabled: boolean | undefined+events: EntityEventQueue+fadeDuration: number | undefined+focusable: boolean | undefined+inputId: string | undefined+node: UINodeInit | undefined+onClick: ((entity: Entity) => void) | undefined+parent: number | undefined+states: Record<string, ButtonStateVisual> | undefined+tabIndex: number | undefined+text: string | TextInit | undefined+userGesture: boolean | undefined+value: number | undefined+world: World+```++## VirtualJoystick — const @experimental+```+ComponentDef<VirtualJoystickData>+```++## VirtualJoystickData — interface @experimental+```+base: number+deadZone: number+handle: number+inputId: string+mode: VirtualJoystickMode+radius: number+returnSpeed: number+```++## VirtualJoystickMode — enum @experimental+```+Fixed = 0+Follow = 1+```++## VirtualJoystickOptions — interface @experimental+```+baseVisual: UIVisualInit | undefined+deadZone: number | undefined+disabled: boolean | undefined+handleVisual: UIVisualInit | undefined+inputId: string | undefined+mode: VirtualJoystickMode | undefined+node: UINodeInit | undefined+parent: number | undefined+radius: number | undefined+returnSpeed: number | undefined+world: World+```+## WORLD_DIR — const @experimental```"world"@@ -10800,6 +10941,16 @@ Plugin(opts: ToggleOptions): ToggleHandle```+## createVirtualButton — function @experimental+```+(options: VirtualButtonOptions): ButtonHandle+```++## createVirtualJoystick — function @experimental+```+(options: VirtualJoystickOptions): { entity: number; baseEntity: number; handleEntity: number; setDisabled: (disabled: boolean) => void; dispose: () => void; }+```+## createWeChatSideModuleHost — function @experimental```(factories: MiniGameSideModuleFactories, binarySuffix?: string): SideModuleHostdiff --git a/sdk/etc/minigame.api.md b/sdk/etc/minigame.api.mdindex 47cbf7682..66c60cc31 100644--- a/sdk/etc/minigame.api.md+++ b/sdk/etc/minigame.api.md@@ -1,7 +1,7 @@# API surface — esengine/minigame<!-- Generated by tools/api-surface.mjs — do not edit. Run --update to accept changes. -->-Symbols: 115 public · 91 beta · 1580 experimental · 3 deprecated+Symbols: 115 public · 91 beta · 1599 experimental · 3 deprecated## ANCHOR_AXES — const @experimental```@@ -1374,7 +1374,7 @@ Record<string, PrefabData>## BUILTIN_UI_WIDGET_NAMES — const @experimental```-readonly ["Button", "Toggle", "Slider", "Dialog", "TextInput", "Progress", "Dropdown", "ListView", "ScrollView"]+readonly ["VirtualJoystick", "VirtualButton", "Button", "Toggle", "Slider", "Dialog", "TextInput", "Progress", "Dropdown", "ListView", "ScrollView"]```## BUNDLE_MODES — const @experimental@@ -2873,6 +2873,23 @@ pixels: Uint8Array<ArrayBufferLike>width: number```+## Device — const @experimental+```+{ capabilities: () => DeviceCapabilities; state: () => DeviceState; motion: { start: (options?: MotionOptions) => Promise<DeviceResult>; stop: () => Promise<DeviceResult>; onChange: (handler: (sample: MotionSample) => void) => () => void; }; vibrate: (options?: VibrationOptions) => Promise<DeviceResult>; keepScreenOn: (enabled: boolean) => Promise<DeviceResult>; fullscreen: (enabled: boolean, target?: unknown) => Promise<DeviceResult>; pointerLock: (enabled: boolean, target?: unknown) => Promise<DeviceResult>; onChange: (handler: (state: DeviceState) => void) => () => void; dispose: () => void; }+```++## DeviceCapabilities — interface @experimental+```+accelerometer: boolean+fullscreen: boolean+gyroscope: boolean+keepScreenOn: boolean+orientation: boolean+pointerLock: boolean+vibration: boolean+vibrationIntensity: boolean+```+## DeviceIdentity — interface @experimental```backend: string@@ -2903,11 +2920,30 @@ maxMemoryGB: number | undefinedmodelIncludes: string | undefined```+## DeviceRequestStatus — type @experimental+```+'ok' | 'unavailable' | 'denied' | 'failed'+```+## DeviceRestoredListener — type @experimental```(generation: number) => void```+## DeviceResult — interface @experimental+```+reason: string | undefined+status: DeviceRequestStatus+```++## DeviceState — interface @experimental+```+fullscreen: boolean+motionActive: boolean+pointerLocked: boolean+screenOn: boolean+```+## DeviceStatus — const @experimental```{ readonly Live: 0; readonly Lost: 1; readonly Recovering: 2; readonly Dead: 3; }@@ -4394,6 +4430,7 @@ static prototype: InputRouter## InputState — class @beta```+@internal cancelVirtualSources: () => voidbeginFixedStep: () => voidclearFrameState: () => voidclearVirtual: () => void@@ -4444,9 +4481,11 @@ noteMouseDown: (button: number) => voidnoteMouseUp: (button: number) => voidpointerOverUI: booleanreleaseGamepad: (index?: number) => void+removeVirtualSource: (owner: object) => voidscrollDeltaX: numberscrollDeltaY: numbersetVirtual: (id: string, x: number, y?: number) => void+setVirtualSource: (owner: object, id: string, x: number, y?: number) => voidtouchAvailable: booleantouches: Map<number, TouchPoint>touchesEnded: Map<number, TouchPoint>@@ -5288,7 +5327,9 @@ getSystemInfoSync: () => MiniGameSystemInfohideLoading: (() => void) | undefinedloadSubpackage: ((opts: { name: string; success?: () => void; fail?: (err: unknown) => void; complete?: () => void; }) => void) | undefinedlogin: ((opts: { success?: (res: { code: string; }) => void; fail?: (err: unknown) => void; timeout?: number; }) => void) | undefined+offAccelerometerChange: ((handler: (value: Vec3) => void) => void) | undefinedoffError: ((cb: (error: string | { message?: string; stack?: string; }) => void) => void) | undefined+offGyroscopeChange: ((handler: (value: Vec3) => void) => void) | undefinedoffHide: ((cb: () => void) => void) | undefinedoffKeyDown: ((cb: (res: MiniGameKeyEvent) => void) => void) | undefinedoffKeyUp: ((cb: (res: MiniGameKeyEvent) => void) => void) | undefined@@ -5299,7 +5340,9 @@ offTouchEnd: (cb: (res: MiniGameTouchEvent) => void) => voidoffTouchMove: (cb: (res: MiniGameTouchEvent) => void) => voidoffTouchStart: (cb: (res: MiniGameTouchEvent) => void) => voidoffUnhandledRejection: ((cb: (res: { reason?: unknown; }) => void) => void) | undefined+onAccelerometerChange: ((handler: (value: Vec3) => void) => void) | undefinedonError: ((cb: (error: string | { message?: string; stack?: string; }) => void) => void) | undefined+onGyroscopeChange: ((handler: (value: Vec3) => void) => void) | undefinedonHide: ((cb: () => void) => void) | undefinedonKeyDown: ((cb: (res: MiniGameKeyEvent) => void) => void) | undefinedonKeyUp: ((cb: (res: MiniGameKeyEvent) => void) => void) | undefined@@ -5316,10 +5359,17 @@ operateGameRecorderVideo: ((opts: { title?: string; desc?: string; query?: strinremoveStorageSync: (key: string) => voidrequest: (opts: MiniGameRequestOptions) => voidrequestMidasPayment: ((opts: { mode: string; offerId: string; buyQuantity: number; zoneId?: string; currencyType?: string; platform?: string; env?: number; success?: () => void; fail?: (err: { errMsg?: string; errCode?: number; }) => void; }) => void) | undefined+setKeepScreenOn: ((options: Callbacks & { keepScreenOn: boolean; }) => void) | undefinedsetStorageSync: (key: string, value: string) => voidsetUserCloudStorage: ((opts: { KVDataList: MiniGameKVData[]; success?: () => void; fail?: (err: unknown) => void; complete?: () => void; }) => void) | undefinedshareAppMessage: ((opts: MiniGameShareOptions & { channel?: "video"; desc?: string; extra?: { videoPath: string; }; success?: () => void; fail?: (err: { errMsg?: string; }) => void; }) => void) | undefinedshowLoading: ((opts: { title: string; mask?: boolean; }) => void) | undefined+startAccelerometer: ((options: SensorOptions) => void) | undefined+startGyroscope: ((options: SensorOptions) => void) | undefined+stopAccelerometer: ((options: Callbacks) => void) | undefined+stopGyroscope: ((options: Callbacks) => void) | undefined+vibrateLong: ((options: Callbacks) => void) | undefined+vibrateShort: ((options: Callbacks & { type: "light" | "medium" | "heavy"; }) => void) | undefined```## MiniGameImage — interface @experimental@@ -5372,6 +5422,7 @@ createRewardedAd: (adUnitId: string) => PlatformRewardedAd | nullcreateScreenCanvas: () => MiniGameCanvascreateSocket: (options: PlatformSocketOptions) => PlatformSocketcreateVideoBackend: (ctx: VideoBackendContext) => PlatformVideoBackend+device: () => MiniGameDevicedeviceName: () => stringdevicePixelRatio: () => numberdeviceQualityInfo: () => { model?: string; memoryGB?: number; }@@ -5587,6 +5638,19 @@ text: stringvalue: number```+## MotionOptions — interface @experimental+```+accelerometer: boolean | undefined+gyroscope: boolean | undefined+orientation: boolean | undefined+rate: MotionRate | undefined+```++## MotionRate — type @experimental+```+'normal' | 'ui' | 'game'+```+## MotionRegistry — class @experimental```context: (world: World, entity: Entity, params: MotionParams, resolveJoint?: JointResolver) => MotionContext@@ -5598,6 +5662,16 @@ static new (): MotionRegistrystatic prototype: MotionRegistry```+## MotionSample — interface @experimental+```+acceleration: Vec3 | null+accelerationIncludingGravity: Vec3 | null+gravity: Vec3 | null+gyroscope: Vec3 | null+orientation: Vec3 | null+timestamp: number+```+## MotionSpan — interface @experimental```from: number@@ -6184,6 +6258,7 @@ createRewardedAd: ((adUnitId: string) => PlatformRewardedAd | null) | undefinedcreateSocket: ((options: PlatformSocketOptions) => PlatformSocket) | undefinedcreateTextEditor: (() => PlatformTextEditor | null) | undefinedcreateVideoBackend: ((ctx: VideoBackendContext) => PlatformVideoBackend) | undefined+device: (() => DeviceBackend) | undefineddeviceName: (() => string) | undefineddevicePixelRatio: () => numberdeviceQualityInfo: (() => DeviceQualityInfo) | undefined@@ -9928,6 +10003,17 @@ name: stringtype: DataType```+## VibrationIntensity — type @experimental+```+'light' | 'medium' | 'heavy'+```++## VibrationOptions — interface @experimental+```+duration: "short" | "long" | undefined+intensity: VibrationIntensity | undefined+```+## Video — const @experimental```ComponentDef<VideoData>@@ -10038,6 +10124,73 @@ y: number(id: string) => Binding```+## VirtualButton — const @experimental+```+ComponentDef<VirtualButtonData>+```++## VirtualButtonData — interface @experimental+```+inputId: string+value: number+```++## VirtualButtonOptions — interface @experimental+```+background: UIVisualInit | undefined+disabled: boolean | undefined+events: EntityEventQueue+fadeDuration: number | undefined+focusable: boolean | undefined+inputId: string | undefined+node: UINodeInit | undefined+onClick: ((entity: Entity) => void) | undefined+parent: number | undefined+states: Record<string, ButtonStateVisual> | undefined+tabIndex: number | undefined+text: string | TextInit | undefined+userGesture: boolean | undefined+value: number | undefined+world: World+```++## VirtualJoystick — const @experimental+```+ComponentDef<VirtualJoystickData>+```++## VirtualJoystickData — interface @experimental+```+base: number+deadZone: number+handle: number+inputId: string+mode: VirtualJoystickMode+radius: number+returnSpeed: number+```++## VirtualJoystickMode — enum @experimental+```+Fixed = 0+Follow = 1+```++## VirtualJoystickOptions — interface @experimental+```+baseVisual: UIVisualInit | undefined+deadZone: number | undefined+disabled: boolean | undefined+handleVisual: UIVisualInit | undefined+inputId: string | undefined+mode: VirtualJoystickMode | undefined+node: UINodeInit | undefined+parent: number | undefined+radius: number | undefined+returnSpeed: number | undefined+world: World+```+## WORLD_DIR — const @experimental```"world"@@ -11092,6 +11245,16 @@ Plugin(opts: ToggleOptions): ToggleHandle```+## createVirtualButton — function @experimental+```+(options: VirtualButtonOptions): ButtonHandle+```++## createVirtualJoystick — function @experimental+```+(options: VirtualJoystickOptions): { entity: number; baseEntity: number; handleEntity: number; setDisabled: (disabled: boolean) => void; dispose: () => void; }+```+## createWeChatSideModuleHost — function @experimental```(factories: MiniGameSideModuleFactories, binarySuffix?: string): SideModuleHostdiff --git a/sdk/etc/wechat.api.md b/sdk/etc/wechat.api.mdindex 50ef1424c..144af7a60 100644--- a/sdk/etc/wechat.api.md+++ b/sdk/etc/wechat.api.md@@ -1,7 +1,7 @@# API surface — esengine/wechat<!-- Generated by tools/api-surface.mjs — do not edit. Run --update to accept changes. -->-Symbols: 115 public · 91 beta · 1571 experimental · 3 deprecated+Symbols: 115 public · 91 beta · 1590 experimental · 3 deprecated## ANCHOR_AXES — const @experimental```@@ -1374,7 +1374,7 @@ Record<string, PrefabData>## BUILTIN_UI_WIDGET_NAMES — const @experimental```-readonly ["Button", "Toggle", "Slider", "Dialog", "TextInput", "Progress", "Dropdown", "ListView", "ScrollView"]+readonly ["VirtualJoystick", "VirtualButton", "Button", "Toggle", "Slider", "Dialog", "TextInput", "Progress", "Dropdown", "ListView", "ScrollView"]```## BUNDLE_MODES — const @experimental@@ -2873,6 +2873,23 @@ pixels: Uint8Array<ArrayBufferLike>width: number```+## Device — const @experimental+```+{ capabilities: () => DeviceCapabilities; state: () => DeviceState; motion: { start: (options?: MotionOptions) => Promise<DeviceResult>; stop: () => Promise<DeviceResult>; onChange: (handler: (sample: MotionSample) => void) => () => void; }; vibrate: (options?: VibrationOptions) => Promise<DeviceResult>; keepScreenOn: (enabled: boolean) => Promise<DeviceResult>; fullscreen: (enabled: boolean, target?: unknown) => Promise<DeviceResult>; pointerLock: (enabled: boolean, target?: unknown) => Promise<DeviceResult>; onChange: (handler: (state: DeviceState) => void) => () => void; dispose: () => void; }+```++## DeviceCapabilities — interface @experimental+```+accelerometer: boolean+fullscreen: boolean+gyroscope: boolean+keepScreenOn: boolean+orientation: boolean+pointerLock: boolean+vibration: boolean+vibrationIntensity: boolean+```+## DeviceIdentity — interface @experimental```backend: string@@ -2903,11 +2920,30 @@ maxMemoryGB: number | undefinedmodelIncludes: string | undefined```+## DeviceRequestStatus — type @experimental+```+'ok' | 'unavailable' | 'denied' | 'failed'+```+## DeviceRestoredListener — type @experimental```(generation: number) => void```+## DeviceResult — interface @experimental+```+reason: string | undefined+status: DeviceRequestStatus+```++## DeviceState — interface @experimental+```+fullscreen: boolean+motionActive: boolean+pointerLocked: boolean+screenOn: boolean+```+## DeviceStatus — const @experimental```{ readonly Live: 0; readonly Lost: 1; readonly Recovering: 2; readonly Dead: 3; }@@ -4401,6 +4437,7 @@ static prototype: InputRouter## InputState — class @beta```+@internal cancelVirtualSources: () => voidbeginFixedStep: () => voidclearFrameState: () => voidclearVirtual: () => void@@ -4451,9 +4488,11 @@ noteMouseDown: (button: number) => voidnoteMouseUp: (button: number) => voidpointerOverUI: booleanreleaseGamepad: (index?: number) => void+removeVirtualSource: (owner: object) => voidscrollDeltaX: numberscrollDeltaY: numbersetVirtual: (id: string, x: number, y?: number) => void+setVirtualSource: (owner: object, id: string, x: number, y?: number) => voidtouchAvailable: booleantouches: Map<number, TouchPoint>touchesEnded: Map<number, TouchPoint>@@ -5313,6 +5352,19 @@ text: stringvalue: number```+## MotionOptions — interface @experimental+```+accelerometer: boolean | undefined+gyroscope: boolean | undefined+orientation: boolean | undefined+rate: MotionRate | undefined+```++## MotionRate — type @experimental+```+'normal' | 'ui' | 'game'+```+## MotionRegistry — class @experimental```context: (world: World, entity: Entity, params: MotionParams, resolveJoint?: JointResolver) => MotionContext@@ -5324,6 +5376,16 @@ static new (): MotionRegistrystatic prototype: MotionRegistry```+## MotionSample — interface @experimental+```+acceleration: Vec3 | null+accelerationIncludingGravity: Vec3 | null+gravity: Vec3 | null+gyroscope: Vec3 | null+orientation: Vec3 | null+timestamp: number+```+## MotionSpan — interface @experimental```from: number@@ -5910,6 +5972,7 @@ createRewardedAd: ((adUnitId: string) => PlatformRewardedAd | null) | undefinedcreateSocket: ((options: PlatformSocketOptions) => PlatformSocket) | undefinedcreateTextEditor: (() => PlatformTextEditor | null) | undefinedcreateVideoBackend: ((ctx: VideoBackendContext) => PlatformVideoBackend) | undefined+device: (() => DeviceBackend) | undefineddeviceName: (() => string) | undefineddevicePixelRatio: () => numberdeviceQualityInfo: (() => DeviceQualityInfo) | undefined@@ -9654,6 +9717,17 @@ name: stringtype: DataType```+## VibrationIntensity — type @experimental+```+'light' | 'medium' | 'heavy'+```++## VibrationOptions — interface @experimental+```+duration: "short" | "long" | undefined+intensity: VibrationIntensity | undefined+```+## Video — const @experimental```ComponentDef<VideoData>@@ -9758,6 +9832,73 @@ y: number(id: string) => Binding```+## VirtualButton — const @experimental+```+ComponentDef<VirtualButtonData>+```++## VirtualButtonData — interface @experimental+```+inputId: string+value: number+```++## VirtualButtonOptions — interface @experimental+```+background: UIVisualInit | undefined+disabled: boolean | undefined+events: EntityEventQueue+fadeDuration: number | undefined+focusable: boolean | undefined+inputId: string | undefined+node: UINodeInit | undefined+onClick: ((entity: Entity) => void) | undefined+parent: number | undefined+states: Record<string, ButtonStateVisual> | undefined+tabIndex: number | undefined+text: string | TextInit | undefined+userGesture: boolean | undefined+value: number | undefined+world: World+```++## VirtualJoystick — const @experimental+```+ComponentDef<VirtualJoystickData>+```++## VirtualJoystickData — interface @experimental+```+base: number+deadZone: number+handle: number+inputId: string+mode: VirtualJoystickMode+radius: number+returnSpeed: number+```++## VirtualJoystickMode — enum @experimental+```+Fixed = 0+Follow = 1+```++## VirtualJoystickOptions — interface @experimental+```+baseVisual: UIVisualInit | undefined+deadZone: number | undefined+disabled: boolean | undefined+handleVisual: UIVisualInit | undefined+inputId: string | undefined+mode: VirtualJoystickMode | undefined+node: UINodeInit | undefined+parent: number | undefined+radius: number | undefined+returnSpeed: number | undefined+world: World+```+## WORLD_DIR — const @experimental```"world"@@ -10831,6 +10972,16 @@ Plugin(opts: ToggleOptions): ToggleHandle```+## createVirtualButton — function @experimental+```+(options: VirtualButtonOptions): ButtonHandle+```++## createVirtualJoystick — function @experimental+```+(options: VirtualJoystickOptions): { entity: number; baseEntity: number; handleEntity: number; setDisabled: (disabled: boolean) => void; dispose: () => void; }+```+## createWeChatSideModuleHost — function @experimental```(factories: MiniGameSideModuleFactories, binarySuffix?: string): SideModuleHostdiff --git a/sdk/src/core-sys.ts b/sdk/src/core-sys.tsindex 951b1d9ca..64ffb28f2 100644--- a/sdk/src/core-sys.ts+++ b/sdk/src/core-sys.ts@@ -387,3 +387,6 @@ export { AppContext, getDefaultContext, setDefaultContext, type EditorBridge } f* @experimental */export type { AotHost } from './ecs/aot/installAot';export type { AotManifest, AotSystemDecl } from './ecs/aot/AotSystems';++export { Device } from './device';+export type { DeviceResult, DeviceRequestStatus, DeviceCapabilities, DeviceState, MotionOptions, MotionSample, MotionRate, VibrationOptions, VibrationIntensity } from './device';diff --git a/sdk/src/core-ui.ts b/sdk/src/core-ui.tsindex 50ffcbca9..69b5339e5 100644--- a/sdk/src/core-ui.ts+++ b/sdk/src/core-ui.ts@@ -264,3 +264,5 @@ export {BUILTIN_UI_PREFABS,BUILTIN_UI_WIDGET_NAMES,} from './ui';++export { VirtualJoystick, VirtualButton, VirtualJoystickMode, createVirtualJoystick, createVirtualButton, type VirtualJoystickData, type VirtualButtonData, type VirtualJoystickOptions, type VirtualButtonOptions } from './ui';diff --git a/sdk/src/device/core.ts b/sdk/src/device/core.tsnew file mode 100644index 000000000..67d32263b--- /dev/null+++ b/sdk/src/device/core.ts@@ -0,0 +1,55 @@+// SPDX-License-Identifier: Apache-2.0+// SPDX-FileCopyrightText: Copyright (c) 2024-present ESEngine Team+import type { Vec3 } from '../types';+import { DEVICE_UNAVAILABLE, NO_DEVICE_CAPABILITIES, type DeviceBackend, type DeviceState, type MotionSample } from './types';++export function emptyMotion(): MotionSample {+ return { timestamp: 0, acceleration: null, accelerationIncludingGravity: null,+ gyroscope: null, gravity: null, orientation: null };+}+/** Shared filtering and event isolation; platform adapters supply raw measurements. */+export class DeviceEvents {+ readonly state: DeviceState = { fullscreen: false, pointerLocked: false, screenOn: false, motionActive: false };+ private motionHandlers = new Set<(sample: MotionSample) => void>();+ private stateHandlers = new Set<(state: DeviceState) => void>();+ private gravity: Vec3 | null = null;+ private orientation: Vec3 | null = null;+ onMotion(handler: (sample: MotionSample) => void): () => void {+ this.motionHandlers.add(handler); return () => this.motionHandlers.delete(handler);+ }+ onStateChange(handler: (state: DeviceState) => void): () => void {+ this.stateHandlers.add(handler); return () => this.stateHandlers.delete(handler);+ }+ update(patch: Partial<DeviceState>): void {+ if (!Object.entries(patch).some(([k, v]) => this.state[k as keyof DeviceState] !== v)) return;+ Object.assign(this.state, patch);+ for (const handler of this.stateHandlers) { try { handler({ ...this.state }); } catch { /* subscriber isolation */ } }+ }+ reset(): void { this.gravity = null; this.orientation = null; }+ emit(raw: MotionSample): void {+ if (!this.state.motionActive) return;+ if (raw.accelerationIncludingGravity) {+ const a = raw.accelerationIncludingGravity;+ const linear = raw.acceleration;+ const g = { x: a.x - (linear?.x ?? 0), y: a.y - (linear?.y ?? 0), z: a.z - (linear?.z ?? 0) };+ this.gravity = filter(this.gravity, g, false);+ }+ if (raw.orientation) this.orientation = filter(this.orientation, raw.orientation, true);+ const sample = { ...raw, gravity: this.gravity && { ...this.gravity }, orientation: this.orientation && { ...this.orientation } };+ for (const handler of this.motionHandlers) { try { handler(sample); } catch { /* subscriber isolation */ } }+ }+ dispose(): void { this.motionHandlers.clear(); this.stateHandlers.clear(); this.reset(); }+}+function filter(previous: Vec3 | null, next: Vec3, angles: boolean): Vec3 {+ if (!previous) return { ...next };+ const smooth = (a: number, b: number) => a + 0.15 * (angles ? ((b - a + 540) % 360) - 180 : b - a);+ return { x: smooth(previous.x, next.x), y: smooth(previous.y, next.y), z: smooth(previous.z, next.z) };+}+export function unavailableDevice(): DeviceBackend {+ const events = new DeviceEvents();+ const unavailable = async () => DEVICE_UNAVAILABLE;+ return { capabilities: () => ({ ...NO_DEVICE_CAPABILITIES }), state: () => ({ ...events.state }),+ startMotion: unavailable, stopMotion: unavailable, onMotion: h => events.onMotion(h),+ onStateChange: h => events.onStateChange(h), vibrate: unavailable,+ keepScreenOn: unavailable, fullscreen: unavailable, pointerLock: unavailable, dispose: () => events.dispose() };+}diff --git a/sdk/src/device/index.ts b/sdk/src/device/index.tsnew file mode 100644index 000000000..0590a4697--- /dev/null+++ b/sdk/src/device/index.ts@@ -0,0 +1,29 @@+// SPDX-License-Identifier: Apache-2.0+// SPDX-FileCopyrightText: Copyright (c) 2024-present ESEngine Team+import { getPlatform, isPlatformInitialized } from '../platform/base';+import { unavailableDevice } from './core';+import { deviceFailure, type DeviceBackend, type DeviceResult, type MotionOptions, type MotionSample, type DeviceState, type VibrationOptions } from './types';+export type * from './types';+const unavailable = unavailableDevice();+function backend(): DeviceBackend {+ return isPlatformInitialized() ? getPlatform().device?.() ?? unavailable : unavailable;+}+function invoke(call: (device: DeviceBackend) => Promise<DeviceResult>): Promise<DeviceResult> {+ try { return Promise.resolve(call(backend())).catch(deviceFailure); } catch (error) { return Promise.resolve(deviceFailure(error)); }+}+/** Requests requiring a player gesture must be called from the host event itself. */+export const Device = {+ capabilities: () => backend().capabilities(),+ state: () => backend().state(),+ motion: {+ start: (options?: MotionOptions) => invoke(d => d.startMotion(options)),+ stop: () => invoke(d => d.stopMotion()),+ onChange: (handler: (sample: MotionSample) => void) => backend().onMotion(handler),+ },+ vibrate: (options?: VibrationOptions) => invoke(d => d.vibrate(options)),+ keepScreenOn: (enabled: boolean) => invoke(d => d.keepScreenOn(enabled)),+ fullscreen: (enabled: boolean, target?: unknown) => invoke(d => d.fullscreen(enabled, target)),+ pointerLock: (enabled: boolean, target?: unknown) => invoke(d => d.pointerLock(enabled, target)),+ onChange: (handler: (state: DeviceState) => void) => backend().onStateChange(handler),+ dispose: () => backend().dispose(),+};diff --git a/sdk/src/device/minigame.ts b/sdk/src/device/minigame.tsnew file mode 100644index 000000000..e90db3e6e--- /dev/null+++ b/sdk/src/device/minigame.ts@@ -0,0 +1,149 @@+// SPDX-License-Identifier: Apache-2.0+// SPDX-FileCopyrightText: Copyright (c) 2024-present ESEngine Team+import { DeviceEvents, emptyMotion } from './core';+import { DEVICE_OK, DEVICE_UNAVAILABLE, NO_DEVICE_CAPABILITIES, deviceFailure,+ type DeviceBackend, type DeviceResult, type MotionOptions, type VibrationOptions } from './types';+import type { Vec3 } from '../types';++interface Callbacks { success?(): void; fail?(error: { errMsg?: string }): void }+interface SensorOptions extends Callbacks { interval?: 'normal' | 'ui' | 'game' }+export interface MiniGameDeviceHost {+ startAccelerometer?(options: SensorOptions): void;+ stopAccelerometer?(options: Callbacks): void;+ onAccelerometerChange?(handler: (value: Vec3) => void): void;+ offAccelerometerChange?(handler: (value: Vec3) => void): void;+ startGyroscope?(options: SensorOptions): void;+ stopGyroscope?(options: Callbacks): void;+ onGyroscopeChange?(handler: (value: Vec3) => void): void;+ offGyroscopeChange?(handler: (value: Vec3) => void): void;+ vibrateShort?(options: Callbacks & { type: 'light' | 'medium' | 'heavy' }): void;+ vibrateLong?(options: Callbacks): void;+ setKeepScreenOn?(options: Callbacks & { keepScreenOn: boolean }): void;+ onHide?(handler: () => void): void;+ offHide?(handler: () => void): void;+ onShow?(handler: () => void): void;+ offShow?(handler: () => void): void;+}+export class MiniGameDevice implements DeviceBackend {+ private readonly events = new DeviceEvents();+ private options: MotionOptions | null = null;+ private epoch = 0;+ private hidden = false;+ private disposed = false;+ private screenWanted = false;+ private screenEpoch = 0;+ private tail: Promise<unknown> = Promise.resolve();+ constructor(private readonly host: MiniGameDeviceHost, private readonly now: () => number = () => Date.now()) {+ host.onHide?.(this.hide); host.onShow?.(this.show);+ }+ capabilities() {+ const h = this.host;+ return { ...NO_DEVICE_CAPABILITIES,+ accelerometer: !!(h.startAccelerometer && h.stopAccelerometer && h.onAccelerometerChange && h.offAccelerometerChange),+ gyroscope: !!(h.startGyroscope && h.stopGyroscope && h.onGyroscopeChange && h.offGyroscopeChange),+ vibration: !!(h.vibrateShort || h.vibrateLong), vibrationIntensity: !!h.vibrateShort,+ keepScreenOn: !!h.setKeepScreenOn };+ }+ state() { return { ...this.events.state }; }+ onMotion(handler: Parameters<DeviceBackend['onMotion']>[0]) { return this.events.onMotion(handler); }+ onStateChange(handler: Parameters<DeviceBackend['onStateChange']>[0]) { return this.events.onStateChange(handler); }+ startMotion(options: MotionOptions = {}): Promise<DeviceResult> {+ const selected = { accelerometer: true, gyroscope: true, orientation: false, rate: 'game' as const, ...options };+ const caps = this.capabilities();+ if (this.disposed || selected.orientation || (!selected.accelerometer && !selected.gyroscope)+ || (selected.accelerometer && !caps.accelerometer) || (selected.gyroscope && !caps.gyroscope)) return Promise.resolve(DEVICE_UNAVAILABLE);+ this.options = selected;+ const epoch = ++this.epoch;+ return this.enqueue(async () => {+ await this.stopSensors();+ if (epoch !== this.epoch || this.hidden || this.disposed) return { status: 'failed', reason: 'Motion request cancelled' };+ this.events.reset();+ try {+ if (selected.accelerometer) this.host.onAccelerometerChange!(this.acceleration);+ if (selected.gyroscope) this.host.onGyroscopeChange!(this.gyroscope);+ for (const key of [selected.accelerometer && 'startAccelerometer', selected.gyroscope && 'startGyroscope'] as const) {+ if (!key) continue;+ const result = await this.call(key, { interval: selected.rate });+ if (result.status !== 'ok' || epoch !== this.epoch || this.hidden || this.disposed) {+ await this.stopSensors();+ return result.status !== 'ok' ? result : { status: 'failed', reason: 'Motion request cancelled' };+ }+ }+ this.events.update({ motionActive: true }); return DEVICE_OK;+ } catch (error) { await this.stopSensors(); return deviceFailure(error); }+ });+ }+ stopMotion(): Promise<DeviceResult> {+ ++this.epoch; this.options = null; this.events.update({ motionActive: false });+ return this.enqueue(async () => { await this.stopSensors(); this.events.reset(); return DEVICE_OK; });+ }+ vibrate(options: VibrationOptions = {}): Promise<DeviceResult> {+ if (this.disposed || this.hidden) return Promise.resolve(DEVICE_UNAVAILABLE);+ return options.duration === 'long' ? this.call('vibrateLong') : this.call('vibrateShort', { type: options.intensity ?? 'medium' });+ }+ async keepScreenOn(enabled: boolean): Promise<DeviceResult> {+ if (this.disposed) return DEVICE_UNAVAILABLE;+ this.screenWanted = enabled;+ const epoch = ++this.screenEpoch;+ const result = await this.call('setKeepScreenOn', { keepScreenOn: enabled && !this.hidden });+ if (epoch !== this.screenEpoch) {+ await this.call('setKeepScreenOn', { keepScreenOn: this.screenWanted && !this.hidden && !this.disposed });+ return { status: 'failed', reason: 'Screen wake request superseded' };+ }+ if (result.status === 'ok') this.events.update({ screenOn: enabled && !this.hidden && !this.disposed });+ return result;+ }+ async fullscreen(_enabled: boolean, _target?: unknown): Promise<DeviceResult> { return DEVICE_UNAVAILABLE; }+ async pointerLock(_enabled: boolean, _target?: unknown): Promise<DeviceResult> { return DEVICE_UNAVAILABLE; }+ dispose(): void {+ if (this.disposed) return;+ this.disposed = true; ++this.screenEpoch; void this.stopMotion(); this.screenWanted = false;+ void this.call('setKeepScreenOn', { keepScreenOn: false });+ this.host.offHide?.(this.hide); this.host.offShow?.(this.show); this.events.dispose();+ }+ private enqueue(task: () => Promise<DeviceResult>): Promise<DeviceResult> {+ const result = this.tail.then(task, task); this.tail = result; return result;+ }+ private call(key: 'startAccelerometer' | 'stopAccelerometer' | 'startGyroscope' | 'stopGyroscope'+ | 'vibrateShort' | 'vibrateLong' | 'setKeepScreenOn', options: Record<string, unknown> = {}): Promise<DeviceResult> {+ const method = this.host[key];+ if (!method) return Promise.resolve(DEVICE_UNAVAILABLE);+ return new Promise(resolve => {+ let done = false;+ const finish = (result: DeviceResult) => { if (done) return; done = true; clearTimeout(timeout); resolve(result); };+ const timeout = setTimeout(() => finish({ status: 'failed', reason: `${key} timed out` }), 3000);+ try {+ (method as (options: Record<string, unknown>) => void).call(this.host, { ...options,+ success: () => finish(DEVICE_OK), fail: (error: { errMsg?: string }) => {+ const reason = error?.errMsg ?? `${key} failed`;+ finish({ status: /not support|unsupported|not available|unavailable|不支持/i.test(reason) ? 'unavailable'+ : /auth|permission|denied/i.test(reason) ? 'denied' : 'failed', reason });+ } });+ } catch (error) { finish(deviceFailure(error)); }+ });+ }+ private async stopSensors(): Promise<void> {+ this.events.update({ motionActive: false });+ this.host.offAccelerometerChange?.(this.acceleration); this.host.offGyroscopeChange?.(this.gyroscope);+ await Promise.all([this.call('stopAccelerometer'), this.call('stopGyroscope')]);+ }+ private acceleration = (value: Vec3): void => {+ if (![value.x, value.y, value.z].every(Number.isFinite)) return;+ this.events.emit({ ...emptyMotion(), timestamp: this.now(),+ accelerationIncludingGravity: { x: value.x * 9.80665, y: value.y * 9.80665, z: value.z * 9.80665 } });+ };+ private gyroscope = (value: Vec3): void => {+ if (![value.x, value.y, value.z].every(Number.isFinite)) return;+ this.events.emit({ ...emptyMotion(), timestamp: this.now(), gyroscope: { ...value } });+ };+ private hide = (): void => {+ this.hidden = true; ++this.epoch; ++this.screenEpoch; this.events.update({ motionActive: false, screenOn: false });+ void this.enqueue(async () => { await this.stopSensors(); this.events.reset(); return DEVICE_OK; });+ if (this.screenWanted) void this.call('setKeepScreenOn', { keepScreenOn: false });+ };+ private show = (): void => {+ if (this.disposed) return;+ this.hidden = false; if (this.options) void this.startMotion(this.options);+ if (this.screenWanted) void this.keepScreenOn(true);+ };+}diff --git a/sdk/src/device/native.ts b/sdk/src/device/native.tsnew file mode 100644index 000000000..9a645f63a--- /dev/null+++ b/sdk/src/device/native.ts@@ -0,0 +1,98 @@+// SPDX-License-Identifier: Apache-2.0+// SPDX-FileCopyrightText: Copyright (c) 2024-present ESEngine Team+import { DeviceEvents, emptyMotion } from './core';+import { DEVICE_OK, DEVICE_UNAVAILABLE, NO_DEVICE_CAPABILITIES, deviceFailure,+ type DeviceBackend, type DeviceResult, type MotionOptions, type MotionSample, type VibrationOptions } from './types';+export interface NativeDeviceHost {+ es_deviceCapabilities?(): number;+ es_startMotion?(accelerometer: boolean, gyroscope: boolean, intervalMs: number): boolean;+ es_stopMotion?(): void;+ es_pollMotion?(): Pick<MotionSample, 'timestamp' | 'accelerationIncludingGravity' | 'gyroscope'> | null;+ es_vibrate?(durationMs: number, intensity: number): boolean;+ es_keepScreenOn?(enabled: boolean): boolean;+}+export class NativeDevice implements DeviceBackend {+ private readonly events = new DeviceEvents();+ private options: MotionOptions | null = null;+ private timer: ReturnType<typeof setTimeout> | null = null;+ private hidden = false;+ private disposed = false;+ private screenWanted = false;+ private readonly releases: (() => void)[] = [];+ constructor(private readonly host: NativeDeviceHost,+ lifecycle: { onHide?(handler: () => void): () => void; onShow?(handler: () => void): () => void } = {}) {+ const hide = lifecycle.onHide?.(this.hide), show = lifecycle.onShow?.(this.show);+ if (hide) this.releases.push(hide); if (show) this.releases.push(show);+ }+ capabilities() {+ let flags = 0; try { flags = this.host.es_deviceCapabilities?.() ?? 0; } catch { /* older host */ }+ const motion = !!(this.host.es_startMotion && this.host.es_stopMotion && this.host.es_pollMotion);+ return { ...NO_DEVICE_CAPABILITIES, accelerometer: motion && !!(flags & 1), gyroscope: motion && !!(flags & 2),+ vibration: !!this.host.es_vibrate && !!(flags & 4), vibrationIntensity: !!(flags & 16),+ keepScreenOn: !!this.host.es_keepScreenOn && !!(flags & 8) };+ }+ state() { return { ...this.events.state }; }+ onMotion(handler: Parameters<DeviceBackend['onMotion']>[0]) { return this.events.onMotion(handler); }+ onStateChange(handler: Parameters<DeviceBackend['onStateChange']>[0]) { return this.events.onStateChange(handler); }+ async startMotion(options: MotionOptions = {}): Promise<DeviceResult> {+ const selected = { accelerometer: true, gyroscope: true, orientation: false, rate: 'game' as const, ...options };+ const caps = this.capabilities();+ if (this.disposed || selected.orientation || (!selected.accelerometer && !selected.gyroscope)+ || (selected.accelerometer && !caps.accelerometer) || (selected.gyroscope && !caps.gyroscope)) return DEVICE_UNAVAILABLE;+ this.options = selected; this.pause(); this.events.reset();+ if (this.hidden) return { status: 'denied', reason: 'App is in the background' };+ try {+ const interval = selected.rate === 'normal' ? 200 : selected.rate === 'ui' ? 60 : 16;+ if (!this.host.es_startMotion!(selected.accelerometer, selected.gyroscope, interval)) return { status: 'failed', reason: 'Host refused sensors' };+ this.events.update({ motionActive: true }); this.poll(); return DEVICE_OK;+ } catch (error) { this.pause(); return deviceFailure(error); }+ }+ async stopMotion(): Promise<DeviceResult> { this.options = null; this.pause(); this.events.reset(); return DEVICE_OK; }+ async vibrate(options: VibrationOptions = {}): Promise<DeviceResult> {+ if (this.disposed || this.hidden || !this.capabilities().vibration) return DEVICE_UNAVAILABLE;+ try { return this.host.es_vibrate!(options.duration === 'long' ? 400 : 15,+ options.intensity === 'light' ? 1 : options.intensity === 'heavy' ? 3 : 2) ? DEVICE_OK : { status: 'failed' }; }+ catch (error) { return deviceFailure(error); }+ }+ async keepScreenOn(enabled: boolean): Promise<DeviceResult> {+ if (this.disposed || !this.capabilities().keepScreenOn) return DEVICE_UNAVAILABLE;+ this.screenWanted = enabled;+ try {+ const on = enabled && !this.hidden;+ if (!this.host.es_keepScreenOn!(on)) return { status: 'failed' };+ this.events.update({ screenOn: on }); return DEVICE_OK;+ } catch (error) { return deviceFailure(error); }+ }+ async fullscreen(_enabled: boolean, _target?: unknown): Promise<DeviceResult> { return DEVICE_UNAVAILABLE; }+ async pointerLock(_enabled: boolean, _target?: unknown): Promise<DeviceResult> { return DEVICE_UNAVAILABLE; }+ dispose(): void {+ if (this.disposed) return;+ this.disposed = true; this.options = null; this.pause();+ try { this.host.es_keepScreenOn?.(false); } catch { /* host teardown */ }+ for (const release of this.releases) release(); this.events.dispose();+ }+ private pause(): void {+ if (this.timer !== null) clearTimeout(this.timer); this.timer = null;+ this.events.update({ motionActive: false });+ try { this.host.es_stopMotion?.(); } catch { /* host teardown */ }+ }+ private poll = (): void => {+ if (!this.events.state.motionActive || this.disposed) return;+ try {+ const sample = this.host.es_pollMotion?.();+ if (sample) this.events.emit({ ...emptyMotion(), ...sample });+ } catch { this.pause(); return; }+ const interval = this.options?.rate === 'normal' ? 200 : this.options?.rate === 'ui' ? 60 : 16;+ this.timer = setTimeout(this.poll, interval);+ };+ private hide = (): void => {+ this.hidden = true; this.pause(); this.events.reset();+ try { this.host.es_keepScreenOn?.(false); } catch { /* lifecycle must still proceed */ }+ this.events.update({ screenOn: false });+ };+ private show = (): void => {+ if (this.disposed) return;+ this.hidden = false; if (this.options) void this.startMotion(this.options);+ if (this.screenWanted) void this.keepScreenOn(true);+ };+}diff --git a/sdk/src/device/types.ts b/sdk/src/device/types.tsnew file mode 100644index 000000000..1fb6f0870--- /dev/null+++ b/sdk/src/device/types.ts@@ -0,0 +1,62 @@+// SPDX-License-Identifier: Apache-2.0+// SPDX-FileCopyrightText: Copyright (c) 2024-present ESEngine Team+import type { Vec3 } from '../types';++export type DeviceRequestStatus = 'ok' | 'unavailable' | 'denied' | 'failed';+export interface DeviceResult { status: DeviceRequestStatus; reason?: string }+export interface DeviceCapabilities {+ accelerometer: boolean;+ gyroscope: boolean;+ orientation: boolean;+ vibration: boolean;+ vibrationIntensity: boolean;+ keepScreenOn: boolean;+ fullscreen: boolean;+ pointerLock: boolean;+}+export type MotionRate = 'normal' | 'ui' | 'game';+export interface MotionOptions {+ accelerometer?: boolean;+ gyroscope?: boolean;+ orientation?: boolean;+ rate?: MotionRate;+}+/** SI units: acceleration/gravity in m/s², angular velocity in rad/s.+ * Orientation angles are degrees; unavailable channels are null. */+export interface MotionSample {+ timestamp: number;+ acceleration: Vec3 | null;+ accelerationIncludingGravity: Vec3 | null;+ gyroscope: Vec3 | null;+ gravity: Vec3 | null;+ orientation: Vec3 | null;+}+export type VibrationIntensity = 'light' | 'medium' | 'heavy';+export interface VibrationOptions { duration?: 'short' | 'long'; intensity?: VibrationIntensity }+export interface DeviceState { fullscreen: boolean; pointerLocked: boolean; screenOn: boolean; motionActive: boolean }+export interface DeviceBackend {+ capabilities(): DeviceCapabilities;+ state(): DeviceState;+ startMotion(options?: MotionOptions): Promise<DeviceResult>;+ stopMotion(): Promise<DeviceResult>;+ onMotion(handler: (sample: MotionSample) => void): () => void;+ onStateChange(handler: (state: DeviceState) => void): () => void;+ vibrate(options?: VibrationOptions): Promise<DeviceResult>;+ keepScreenOn(enabled: boolean): Promise<DeviceResult>;+ fullscreen(enabled: boolean, target?: unknown): Promise<DeviceResult>;+ pointerLock(enabled: boolean, target?: unknown): Promise<DeviceResult>;+ dispose(): void;+}+export const DEVICE_OK: DeviceResult = { status: 'ok' };+export const DEVICE_UNAVAILABLE: DeviceResult = { status: 'unavailable' };+export const NO_DEVICE_CAPABILITIES: DeviceCapabilities = {+ accelerometer: false, gyroscope: false, orientation: false,+ vibration: false, vibrationIntensity: false, keepScreenOn: false,+ fullscreen: false, pointerLock: false,+};+export function deviceFailure(error: unknown): DeviceResult {+ const name = (error as { name?: string })?.name;+ return { status: name === 'NotSupportedError' ? 'unavailable'+ : name === 'NotAllowedError' || name === 'SecurityError' ? 'denied' : 'failed',+ reason: error instanceof Error ? error.message : String(error) };+}diff --git a/sdk/src/device/web.ts b/sdk/src/device/web.tsnew file mode 100644index 000000000..b94e16aa9--- /dev/null+++ b/sdk/src/device/web.ts@@ -0,0 +1,176 @@+// SPDX-License-Identifier: Apache-2.0+// SPDX-FileCopyrightText: Copyright (c) 2024-present ESEngine Team+import { DeviceEvents, emptyMotion } from './core';+import { DEVICE_OK, DEVICE_UNAVAILABLE, deviceFailure, type DeviceBackend, type DeviceCapabilities, type DeviceResult,+ type MotionOptions, type VibrationOptions } from './types';++type PermissionEvent = { requestPermission?: () => Promise<string> };+type WakeSentinel = { released: boolean; release(): Promise<void>; addEventListener(type: string, listener: () => void): void };+type WakeNavigator = Navigator & { wakeLock?: { request(type: 'screen'): Promise<WakeSentinel> } };++export class WebDevice implements DeviceBackend {+ private readonly events = new DeviceEvents();+ private options: MotionOptions | null = null;+ private motionEpoch = 0;+ private wakeEpoch = 0;+ private wakeWanted = false;+ private wake: WakeSentinel | null = null;+ private disposed = false;+ private lastMotion = 0;+ constructor(private readonly win: Window = window, private readonly doc: Document = document,+ private readonly nav: WakeNavigator = navigator as WakeNavigator) {+ doc.addEventListener('visibilitychange', this.visibility);+ win.addEventListener('pagehide', this.hide);+ win.addEventListener('pageshow', this.visibility);+ doc.addEventListener('fullscreenchange', this.screenChanged);+ doc.addEventListener('pointerlockchange', this.screenChanged);+ }+ capabilities(): DeviceCapabilities {+ const scope = this.win as Window & { DeviceMotionEvent?: PermissionEvent; DeviceOrientationEvent?: PermissionEvent };+ return { accelerometer: !!scope.DeviceMotionEvent, gyroscope: !!scope.DeviceMotionEvent,+ orientation: !!scope.DeviceOrientationEvent, vibration: typeof this.nav.vibrate === 'function',+ vibrationIntensity: false, keepScreenOn: !!this.nav.wakeLock,+ fullscreen: typeof this.doc.documentElement?.requestFullscreen === 'function',+ pointerLock: typeof this.doc.documentElement?.requestPointerLock === 'function' };+ }+ state() { return { ...this.events.state }; }+ onMotion(handler: Parameters<DeviceBackend['onMotion']>[0]) { return this.events.onMotion(handler); }+ onStateChange(handler: Parameters<DeviceBackend['onStateChange']>[0]) { return this.events.onStateChange(handler); }+ async startMotion(options: MotionOptions = {}): Promise<DeviceResult> {+ const chosen = { accelerometer: true, gyroscope: true, orientation: false, rate: 'game' as const, ...options };+ const caps = this.capabilities();+ if (this.disposed || (!chosen.accelerometer && !chosen.gyroscope && !chosen.orientation)+ || (chosen.accelerometer && !caps.accelerometer) || (chosen.gyroscope && !caps.gyroscope)+ || (chosen.orientation && !caps.orientation)) return DEVICE_UNAVAILABLE;+ const epoch = ++this.motionEpoch;+ const scope = this.win as Window & { DeviceMotionEvent?: PermissionEvent; DeviceOrientationEvent?: PermissionEvent };+ try {+ // Invoke both synchronously: iOS requires the original player gesture.+ const requests: Promise<string>[] = [];+ if (chosen.accelerometer || chosen.gyroscope) {+ const event = scope.DeviceMotionEvent;+ if (event?.requestPermission) requests.push(event.requestPermission());+ }+ if (chosen.orientation) {+ const event = scope.DeviceOrientationEvent;+ if (event?.requestPermission) requests.push(event.requestPermission());+ }+ const permissions = await Promise.all(requests);+ if (epoch !== this.motionEpoch || this.disposed) return { status: 'failed', reason: 'Motion request cancelled' };+ if (permissions.some(p => p !== 'granted')) return { status: 'denied' };+ this.unbindMotion(); this.events.reset(); this.lastMotion = 0; this.options = chosen;+ if (!this.doc.hidden) this.bindMotion();+ return DEVICE_OK;+ } catch (error) { return deviceFailure(error); }+ }+ async stopMotion(): Promise<DeviceResult> {+ ++this.motionEpoch; this.options = null; this.unbindMotion(); this.events.reset(); return DEVICE_OK;+ }+ async vibrate(options: VibrationOptions = {}): Promise<DeviceResult> {+ if (this.disposed || !this.capabilities().vibration) return DEVICE_UNAVAILABLE;+ try { return this.nav.vibrate(options.duration === 'long' ? 400 : 15) ? DEVICE_OK : { status: 'denied' }; }+ catch (error) { return deviceFailure(error); }+ }+ async keepScreenOn(enabled: boolean): Promise<DeviceResult> {+ if (this.disposed || !this.nav.wakeLock) return DEVICE_UNAVAILABLE;+ this.wakeWanted = enabled;+ const epoch = ++this.wakeEpoch;+ if (!enabled) { await this.releaseWake(); return DEVICE_OK; }+ if (this.doc.hidden) return { status: 'denied', reason: 'Document is hidden' };+ if (this.wake && !this.wake.released) return DEVICE_OK;+ try {+ const sentinel = await this.nav.wakeLock.request('screen');+ if (epoch !== this.wakeEpoch || !this.wakeWanted || this.doc.hidden || this.disposed) {+ await sentinel.release(); return { status: 'failed', reason: 'Screen wake request cancelled' };+ }+ this.wake = sentinel; this.events.update({ screenOn: !sentinel.released });+ sentinel.addEventListener('release', () => {+ if (this.wake !== sentinel) return;+ this.wake = null; this.events.update({ screenOn: false });+ });+ return DEVICE_OK;+ } catch (error) { return deviceFailure(error); }+ }+ async fullscreen(enabled: boolean, target?: unknown): Promise<DeviceResult> {+ const element = (target ?? this.doc.documentElement) as Element;+ if (this.disposed || (enabled ? typeof element?.requestFullscreen !== 'function' : typeof this.doc.exitFullscreen !== 'function')) return DEVICE_UNAVAILABLE;+ try {+ if (enabled) await element.requestFullscreen();+ else if (this.doc.fullscreenElement) await this.doc.exitFullscreen();+ this.screenChanged(); return DEVICE_OK;+ } catch (error) { return deviceFailure(error); }+ }+ pointerLock(enabled: boolean, target?: unknown): Promise<DeviceResult> {+ const element = (target ?? this.doc.documentElement) as Element;+ if (this.disposed || (enabled ? typeof element?.requestPointerLock !== 'function' : typeof this.doc.exitPointerLock !== 'function')) return Promise.resolve(DEVICE_UNAVAILABLE);+ if ((enabled && this.doc.pointerLockElement === element) || (!enabled && !this.doc.pointerLockElement)) return Promise.resolve(DEVICE_OK);+ return new Promise(resolve => {+ let done = false;+ const finish = (result: DeviceResult) => {+ if (done) return; done = true; clearTimeout(timeout);+ this.doc.removeEventListener('pointerlockchange', changed);+ this.doc.removeEventListener('pointerlockerror', denied);+ this.screenChanged(); resolve(result);+ };+ const changed = () => finish((enabled ? this.doc.pointerLockElement === element : !this.doc.pointerLockElement)+ ? DEVICE_OK : { status: 'failed', reason: 'Pointer lock request interrupted' });+ const denied = () => finish({ status: 'denied', reason: 'Pointer lock requires a player gesture' });+ const timeout = setTimeout(() => finish({ status: 'failed', reason: 'Pointer lock request timed out' }), 2000);+ this.doc.addEventListener('pointerlockchange', changed);+ this.doc.addEventListener('pointerlockerror', denied);+ try {+ if (enabled) {+ const request = element.requestPointerLock() as unknown as Promise<void> | undefined;+ request?.catch(error => finish(deviceFailure(error)));+ } else this.doc.exitPointerLock();+ } catch (error) { finish(deviceFailure(error)); }+ });+ }+ dispose(): void {+ if (this.disposed) return;+ this.disposed = true; void this.stopMotion(); this.wakeWanted = false; ++this.wakeEpoch; void this.releaseWake();+ this.doc.removeEventListener('visibilitychange', this.visibility);+ this.win.removeEventListener('pagehide', this.hide); this.win.removeEventListener('pageshow', this.visibility);+ this.doc.removeEventListener('fullscreenchange', this.screenChanged);+ this.doc.removeEventListener('pointerlockchange', this.screenChanged); this.events.dispose();+ }+ private bindMotion(): void {+ if (!this.options || this.disposed) return;+ if (this.options.accelerometer || this.options.gyroscope) this.win.addEventListener('devicemotion', this.motion);+ if (this.options.orientation) this.win.addEventListener('deviceorientation', this.orientation);+ this.events.update({ motionActive: true });+ }+ private unbindMotion(): void {+ this.win.removeEventListener('devicemotion', this.motion); this.win.removeEventListener('deviceorientation', this.orientation);+ this.events.update({ motionActive: false });+ }+ private motion = (event: DeviceMotionEvent): void => {+ const timestamp = event.timeStamp;+ const interval = this.options?.rate === 'normal' ? 200 : this.options?.rate === 'ui' ? 60 : 16;+ if (this.lastMotion && timestamp - this.lastMotion < interval) return;+ this.lastMotion = timestamp;+ const vector = (v: DeviceMotionEventAcceleration | null) => v && v.x !== null && v.y !== null && v.z !== null+ ? { x: v.x, y: v.y, z: v.z } : null;+ const r = event.rotationRate; const rad = Math.PI / 180;+ this.events.emit({ ...emptyMotion(), timestamp,+ acceleration: this.options?.accelerometer ? vector(event.acceleration) : null,+ accelerationIncludingGravity: this.options?.accelerometer ? vector(event.accelerationIncludingGravity) : null,+ gyroscope: this.options?.gyroscope && r && r.alpha !== null && r.beta !== null && r.gamma !== null+ ? { x: r.beta * rad, y: r.gamma * rad, z: r.alpha * rad } : null });+ };+ private orientation = (event: DeviceOrientationEvent): void => {+ if (event.alpha === null || event.beta === null || event.gamma === null) return;+ this.events.emit({ ...emptyMotion(), timestamp: event.timeStamp,+ orientation: { x: event.beta, y: event.gamma, z: event.alpha } });+ };+ private screenChanged = (): void => { this.events.update({ fullscreen: !!this.doc.fullscreenElement, pointerLocked: !!this.doc.pointerLockElement }); };+ private hide = (): void => { this.unbindMotion(); this.events.reset(); ++this.wakeEpoch; void this.releaseWake(); };+ private visibility = (): void => {+ if (this.doc.hidden) this.hide();+ else { this.bindMotion(); if (this.wakeWanted) void this.keepScreenOn(true); }+ };+ private async releaseWake(): Promise<void> {+ const sentinel = this.wake; this.wake = null; this.events.update({ screenOn: false });+ try { await sentinel?.release(); } catch { /* platform already released it */ }+ }+}diff --git a/sdk/src/ecs/systemLabels.ts b/sdk/src/ecs/systemLabels.tsindex a0fae1168..728ae808a 100644--- a/sdk/src/ecs/systemLabels.ts+++ b/sdk/src/ecs/systemLabels.ts@@ -23,6 +23,7 @@ export const SystemLabel = {UILayoutLate: 'UILayoutLateSystem',UIRenderOrder: 'UIRenderOrderSystem',UIInteraction: 'UIInteractionSystem',+ VirtualControls: 'VirtualControlsSystem',ListView: 'ListViewSystem',Text: 'TextSystem',Focus: 'FocusSystem',diff --git a/sdk/src/input/input.ts b/sdk/src/input/input.tsindex 8a57d60e1..e67ebf50a 100644--- a/sdk/src/input/input.ts+++ b/sdk/src/input/input.ts@@ -220,6 +220,7 @@ export class InputState {* is touched and what is read stay one object when the layout moves.*/private virtual_ = new Map<string, Vec2>();+ private virtualSources_ = new Map<object, { id: string; x: number; y: number }>();/** Set a named virtual input; held until overwritten, so stopping means* writing zero. `y` defaults to 0 for button/1D use. */@@ -229,12 +230,32 @@ export class InputState {}getVirtual(id: string): Vec2 {- return this.virtual_.get(id) ?? ZERO_VIRTUAL;+ const value = this.virtual_.get(id) ?? ZERO_VIRTUAL;+ let x = value.x, y = value.y, contributed = false;+ for (const source of this.virtualSources_.values()) {+ if (source.id !== id) continue;+ contributed = true; x += source.x; y += source.y;+ }+ return contributed ? { x: Math.max(-1, Math.min(1, x)), y: Math.max(-1, Math.min(1, y)) } : value;+ }++ /** A control owns only its contribution, even when several share a binding. */+ setVirtualSource(owner: object, id: string, x: number, y = 0): void {+ if (x === 0 && y === 0) { this.virtualSources_.delete(owner); return; }+ const source = this.virtualSources_.get(owner);+ if (source) { source.id = id; source.x = x; source.y = y; }+ else this.virtualSources_.set(owner, { id, x, y });}+ removeVirtualSource(owner: object): void { this.virtualSources_.delete(owner); }++ /** @internal Host cancellation releases managed controls, leaving manual values to their writer. */+ cancelVirtualSources(): void { this.virtualSources_.clear(); }+/** Drop every virtual input — used when a control layer is torn down. */clearVirtual(): void {this.virtual_.clear();+ this.virtualSources_.clear();}// — Gamepad (polled each frame; edges via current/prev diff, not events) —@@ -477,6 +498,7 @@ export function inputEventCallbacks(state: InputState): InputEventCallbacks {state.keysDown.clear();state.mouseButtons.clear();state.touches.clear();+ state.cancelVirtualSources();state.clearFrameState();state.keysPressedFixed.clear();state.keysReleasedFixed.clear();diff --git a/sdk/src/input/inputMap.ts b/sdk/src/input/inputMap.tsindex dc7d75cf1..d19a08094 100644--- a/sdk/src/input/inputMap.ts+++ b/sdk/src/input/inputMap.ts@@ -14,6 +14,7 @@*/import { Schedule, defineSystem, addSystemToSchedule } from '../ecs/system';import { Res } from '../ecs/resource';+import { SystemLabel } from '../ecs/systemLabels';import { Input, InputState, GamepadAxis, GamepadButton } from './input';import { Storage } from '../util/storage';import type { Vec2 } from '../types';@@ -366,7 +367,7 @@ export function defineInputMap(actions: Record<string, ActionDef>): InputMap {// PreUpdate: after gamepad poll (First) + always-current event input, before gameplay (Update).addSystemToSchedule(Schedule.PreUpdate,- defineSystem([Res(Input)], (input) => map.evaluate(input), { name: 'InputMapEval' }),+ defineSystem([Res(Input)], (input) => map.evaluate(input), { name: 'InputMapEval', runAfter: [SystemLabel.UIInteraction, SystemLabel.VirtualControls] }),);return map;}diff --git a/sdk/src/platform/minigame/adapter.ts b/sdk/src/platform/minigame/adapter.tsindex cbe44004a..cde56435e 100644--- a/sdk/src/platform/minigame/adapter.ts+++ b/sdk/src/platform/minigame/adapter.ts@@ -46,8 +46,11 @@ import { MiniGameAudioBackend } from '../../audio/MiniGameAudioBackend';import { MiniGameSocket } from '../../net/MiniGameSocket';import { WasmVideoBackend } from '../../video/WasmVideoBackend';import { createMiniGameRecorder } from './recorder';+import { MiniGameDevice } from '../../device/minigame';export class MiniGamePlatformAdapter implements PlatformAdapter {+ private device_: MiniGameDevice | null = null;+ device(): MiniGameDevice { return this.device_ ??= new MiniGameDevice(this.g_); }readonly name: PlatformAdapter['name'];/** Every vendor built on this adapter answers `isMiniGame()` — no name list. */readonly family = 'minigame' as const;diff --git a/sdk/src/platform/minigame/api.ts b/sdk/src/platform/minigame/api.tsindex 9b836a33d..9e66cd0c3 100644--- a/sdk/src/platform/minigame/api.ts+++ b/sdk/src/platform/minigame/api.ts@@ -16,6 +16,7 @@* video, sockets — are methods on `MiniGameProfile`, not derived from the global.*/+import type { MiniGameDeviceHost } from '../../device/minigame';import type { PlatformAudioBackend } from '../../audio/PlatformAudioBackend';import type { PlatformVideoBackend, VideoBackendContext } from '../../video/PlatformVideoBackend';import type {@@ -254,7 +255,7 @@ export interface MiniGameSocketTask {* memory-pressure signal, app show/hide). The adapter probes for them at use* time, so a vendor missing one degrades gracefully rather than throwing.*/-export interface MiniGameGlobal {+export interface MiniGameGlobal extends MiniGameDeviceHost {/** The writable directory a game may keep files in (`wx.env.USER_DATA_PATH`). */env?: { USER_DATA_PATH?: string };createCanvas(): MiniGameCanvas;diff --git a/sdk/src/platform/native/adapter.ts b/sdk/src/platform/native/adapter.tsindex b170584c3..f9e7d7d4b 100644--- a/sdk/src/platform/native/adapter.ts+++ b/sdk/src/platform/native/adapter.ts@@ -31,6 +31,7 @@ import type {PlatformSocketOptions,} from '../types';import { NativeSocket } from './socket';+import { unavailableDevice } from '../../device/core';import type { PlatformAudioBackend } from '../../audio/PlatformAudioBackend';import type { PlatformVideoBackend, VideoBackendContext } from '../../video/PlatformVideoBackend';import { WasmVideoBackend } from '../../video/WasmVideoBackend';@@ -44,6 +45,8 @@ import type { NativeBridge, NativeInputListener } from './bridge';export class NativePlatformAdapter implements PlatformAdapter {readonly name = 'native' as const;+ device() { return this.bridge_.device?.() ?? this.unavailableDevice_; }+ private readonly unavailableDevice_ = unavailableDevice();private inputCleanup_: (() => void) | null = null;constructor(private readonly bridge_: NativeBridge) {diff --git a/sdk/src/platform/native/bridge.ts b/sdk/src/platform/native/bridge.tsindex 553d87284..1da279413 100644--- a/sdk/src/platform/native/bridge.ts+++ b/sdk/src/platform/native/bridge.ts@@ -169,6 +169,7 @@ export interface NativeAudioBridge {* DOM canvas on native).*/export interface NativeBridge {+ device?(): import('../../device/types').DeviceBackend;/** Read a project-relative (packaged) file, or an absolute http(s) URL. */readFile(path: string): Promise<ArrayBuffer>;fileExists(path: string): Promise<boolean>;diff --git a/sdk/src/platform/native/hostBridge.ts b/sdk/src/platform/native/hostBridge.tsindex 14c349877..5735b1838 100644--- a/sdk/src/platform/native/hostBridge.ts+++ b/sdk/src/platform/native/hostBridge.ts@@ -20,6 +20,7 @@ import type {import type { PlatformGlyph, PlatformGlyphRequest, PlatformRequestOptions } from '../types';import { assertHostEnvironment } from './hostEnvironment';import { cacheEntryName } from '../cacheEntryName';+import { NativeDevice, type NativeDeviceHost } from '../../device/native';import { hasAudioBindings } from '../../ecs/bridge/nativeBindings';/** Touch phases the host reports, matching the order it dispatches. */@@ -32,7 +33,7 @@ const POINTER_DOWN = 0;const POINTER_MOVE = 1;/** The `es_*` primitives a native host binds. Required unless marked optional. */-export interface NativeHostBindings {+export interface NativeHostBindings extends NativeDeviceHost {/** A packaged file's bytes, or null when it is not in the package. */es_readAsset(path: string): ArrayBuffer | null;/** Decode a packaged image to top-first RGBA, or null on failure. */@@ -192,8 +193,10 @@ export function createHostBridge(const audio = hostAudio(bindings, scope);const textEditor = hostTextEditor(bindings, scope);const lifecycle = hostLifecycle(scope);+ let device: NativeDevice | null = null;return {+ device: () => device ??= new NativeDevice(bindings, lifecycle),readFile: (path) => {const bytes = bindings.es_readAsset(path);return bytes ? Promise.resolve(bytes) : Promise.reject(new Error(`asset not found: ${path}`));diff --git a/sdk/src/platform/types.ts b/sdk/src/platform/types.tsindex aaccc7664..e0d8c4120 100644--- a/sdk/src/platform/types.ts+++ b/sdk/src/platform/types.ts@@ -371,6 +371,8 @@ export type PlatformName = 'web' | 'wechat' | 'douyin' | 'node' | 'native' | (stexport type PlatformFamily = 'minigame';export interface PlatformAdapter {+ /** Lazy device services, so unused games bind no sensor/lifecycle listeners. */+ device?(): import('../device/types').DeviceBackend;deviceQualityInfo?(): DeviceQualityInfo;readonly name: PlatformName;diff --git a/sdk/src/platform/web.ts b/sdk/src/platform/web.tsindex 88bbbad7d..814dd1e93 100644--- a/sdk/src/platform/web.ts+++ b/sdk/src/platform/web.ts@@ -28,6 +28,7 @@ import type { PlatformVideoBackend } from '../video/PlatformVideoBackend';import { GameSocket } from '../net/GameSocket';import { createPrimaryPointer } from './primaryPointer';import { createWebRecorder } from './webRecorder';+import { WebDevice } from '../device/web';const WHEEL_LINE_HEIGHT = 16;@@ -36,6 +37,8 @@ const WHEEL_LINE_HEIGHT = 16;// =============================================================================class WebPlatformAdapter implements PlatformAdapter {+ private device_: WebDevice | null = null;+ device(): WebDevice { return this.device_ ??= new WebDevice(); }readonly name = 'web' as const;private inputCleanup_: (() => void) | null = null;private recorder_: PlatformScreenRecorder | null | undefined;diff --git a/sdk/src/ui/behavior/plugin.ts b/sdk/src/ui/behavior/plugin.tsindex b0217d3b0..3e78cac13 100644--- a/sdk/src/ui/behavior/plugin.ts+++ b/sdk/src/ui/behavior/plugin.ts@@ -30,6 +30,7 @@ import { UIToggle, UIToggleGroup, createToggleSystem } from './toggle';import { UIDropdown, createDropdownSystem } from './dropdown';import { createScrollbarSystem } from './scrollbar';import { registerComponent } from '../../ecs/component';+import { VirtualJoystick, VirtualButton, createVirtualControlSystem } from './virtual-controls';/** Screen-px slop before a press becomes a scroll drag (matches Draggable). */const SCROLL_DRAG_THRESHOLD_PX = 5;@@ -89,7 +90,14 @@ export class UIBehaviorPlugin implements Plugin {this.scrollContainers_?.detach(entity);}+ private readonly controlCleanup_ = new WeakMap<App, () => void>();++ cleanup(app?: App): void {+ if (app) { this.controlCleanup_.get(app)?.(); this.controlCleanup_.delete(app); }+ }+build(app: App): void {+ this.cleanup(app);// UIInteractionPlugin (declared as our dependency) owns the// UIEvents resource and wires onDespawn cleanup. We just grab// the queue so our systems emit into the same bus.@@ -118,6 +126,13 @@ export class UIBehaviorPlugin implements Plugin {{ runIf: playModeOnly },);+ registerComponent('VirtualJoystick', VirtualJoystick);+ registerComponent('VirtualButton', VirtualButton);+ const virtualControls = createVirtualControlSystem(world, events);+ this.controlCleanup_.set(app, virtualControls.dispose);+ app.addSystemToSchedule(Schedule.PreUpdate, virtualControls.system,+ { runAfter: [SystemLabel.UIInteraction], runIf: playModeOnly });+registerComponent('UISlider', UISlider);app.addSystemToSchedule(Schedule.Update,diff --git a/sdk/src/ui/behavior/virtual-controls.ts b/sdk/src/ui/behavior/virtual-controls.tsnew file mode 100644index 000000000..535381b55--- /dev/null+++ b/sdk/src/ui/behavior/virtual-controls.ts@@ -0,0 +1,163 @@+// SPDX-License-Identifier: Apache-2.0+// SPDX-FileCopyrightText: Copyright (c) 2024-present ESEngine Team+import { defineComponent, Transform } from '../../ecs/component';+import { defineSystem } from '../../ecs/system';+import { Res, Time, type TimeData } from '../../ecs/resource';+import { SystemLabel } from '../../ecs/systemLabels';+import { Input, type InputState } from '../../input/input';+import type { World } from '../../ecs/world';+import type { Entity, Vec2 } from '../../types';+import { worldEngineApi } from '../../ecs/bridge/engineApi';+import { UINode, UIPointerEvents } from '../core/ui-node';+import { px, DimensionUnit } from '../core/dimension';+import { UIEventType, type UIEventQueue } from '../core/events';+import { Interactable } from '../input/interactable';+import { UIControlPointers, type ControlPointer } from '../input/control-pointers';+import { isScreenEntity } from '../util/ui-pick';+import { walkParentChain } from '../util/helpers';++export enum VirtualJoystickMode { Fixed = 0, Follow = 1 }+export interface VirtualJoystickData {+ inputId: string;+ mode: VirtualJoystickMode;+ radius: number;+ deadZone: number;+ returnSpeed: number;+ base: Entity;+ handle: Entity;+}+export interface VirtualButtonData { inputId: string; value: number }+export const VirtualJoystick = defineComponent<VirtualJoystickData>('VirtualJoystick', {+ inputId: 'move', mode: VirtualJoystickMode.Fixed, radius: 50, deadZone: 0.15,+ returnSpeed: 18, base: 0 as Entity, handle: 0 as Entity,+}, { entityFields: ['base', 'handle'], fields: {+ mode: { enum: [{ label: 'Fixed', value: VirtualJoystickMode.Fixed }, { label: 'Follow', value: VirtualJoystickMode.Follow }] },+ radius: { min: 1, unit: 'px' }, deadZone: { min: 0, max: 0.99, slider: true },+ returnSpeed: { min: 0 }, base: { advanced: true }, handle: { advanced: true },+} });+export const VirtualButton = defineComponent<VirtualButtonData>('VirtualButton', { inputId: 'fire', value: 1 });++/** A radial dead zone preserves direction and reaches one at the rim. */+export function joystickAxis(x: number, y: number, radius: number, deadZone: number): Vec2 {+ const length = Math.hypot(x, y);+ const r = Number.isFinite(radius) ? Math.max(1, radius) : 50;+ const dead = Number.isFinite(deadZone) ? Math.max(0, Math.min(0.99, deadZone)) : 0.15;+ if (!Number.isFinite(length) || length <= r * dead) return { x: 0, y: 0 };+ const strength = Math.min(1, (length / r - dead) / (1 - dead));+ return { x: x / length * strength, y: y / length * strength };+}+interface ControlState {+ owner: object;+ pointer: number | null;+ buttons: Set<number>;+ origin: Vec2;+ thumb: Vec2;+ value: Vec2;+}+export function createVirtualControlSystem(world: World, events: UIEventQueue) {+ const states = new Map<Entity, ControlState>();+ const engine = worldEngineApi(world); const registry = world.getCppRegistry();+ let input: InputState | null = null;+ const release = (entity: Entity) => {+ const state = states.get(entity); if (!state) return;+ input?.removeVirtualSource(state.owner); states.delete(entity);+ };+ const offDespawn = world.onDespawn(release);+ const enabled = (entity: Entity) => {+ if (!world.valid(entity) || !world.isEntityActive(entity) || world.isDestructionPending(entity)+ || (world.has(entity, Interactable) && !world.get(entity, Interactable).enabled)+ || engine?.getUINodeHiddenInTree?.(registry!, entity)) return false;+ let blocked = world.has(entity, UINode) && world.get(entity, UINode).pointerEvents === UIPointerEvents.None;+ walkParentChain(world, entity, parent => {+ if (world.has(parent, UINode) && world.get(parent, UINode).pointerEvents === UIPointerEvents.None) blocked = true;+ return blocked;+ });+ return !blocked;+ };+ const getState = (entity: Entity): ControlState => {+ let state = states.get(entity);+ if (!state) { state = { owner: {}, pointer: null, buttons: new Set(), origin: { x: 0, y: 0 },+ thumb: { x: 0, y: 0 }, value: { x: 0, y: 0 } }; states.set(entity, state); }+ return state;+ };+ const point = (entity: Entity, pointer: ControlPointer): Vec2 => {+ const t = world.get(entity, Transform);+ const screen = isScreenEntity(world, entity);+ const x = (screen ? pointer.layoutX : pointer.worldX) - t.worldPosition.x;+ const y = (screen ? pointer.layoutY : pointer.worldY) - t.worldPosition.y;+ const q = t.worldRotation;+ const angle = Math.atan2(2 * (q.w * q.z + q.x * q.y), 1 - 2 * (q.y * q.y + q.z * q.z));+ return { x: (x * Math.cos(angle) + y * Math.sin(angle)) / (t.worldScale.x || 1),+ y: (-x * Math.sin(angle) + y * Math.cos(angle)) / (t.worldScale.y || 1) };+ };+ const positionChild = (entity: Entity, child: Entity, offset: Vec2) => {+ if (!world.valid(child) || !world.has(child, UINode)) return;+ const width = engine?.getUINodeComputedWidth?.(registry!, entity) ?? 0;+ const height = engine?.getUINodeComputedHeight?.(registry!, entity) ?? 0;+ const node = world.get(child, UINode);+ const x = width / 2 + offset.x;+ const y = height / 2 - offset.y;+ if (node.insetLeft.unit === DimensionUnit.Px && node.insetTop.unit === DimensionUnit.Px+ && node.insetLeft.value === x && node.insetTop.value === y) return;+ world.insert(child, UINode, { ...node, insetLeft: px(x), insetTop: px(y) });+ };+ return {+ system: defineSystem([Res(Input), Res(UIControlPointers), Res(Time)],+ (current: InputState, frame: { pointers: Map<number, ControlPointer> }, time: TimeData) => {+ input = current;+ for (const entity of states.keys()) if (!world.valid(entity)+ || (!world.has(entity, VirtualJoystick) && !world.has(entity, VirtualButton))) release(entity);+ for (const type of [VirtualJoystick, VirtualButton] as const) {+ for (const entity of world.getEntitiesWithComponents([type])) {+ if (!world.has(entity, Transform)) { release(entity); continue; }+ const state = getState(entity);+ const available = enabled(entity);+ const held = [...frame.pointers.values()].filter(p => available && p.entity === entity && p.down);+ let value: Vec2 = { x: 0, y: 0 };+ let id: string;+ if (type === VirtualJoystick) {+ const data = world.get(entity, VirtualJoystick);+ id = data.inputId;+ let pointer = held.find(p => p.id === state.pointer);+ if (!pointer) {+ state.pointer = null;+ pointer = held.find(p => p.pressed);+ if (pointer) {+ state.pointer = pointer.id;+ state.origin = data.mode === VirtualJoystickMode.Follow ? point(entity, pointer) : { x: 0, y: 0 };+ }+ }+ if (pointer) {+ const local = point(entity, pointer);+ const dx = local.x - state.origin.x, dy = local.y - state.origin.y;+ value = joystickAxis(dx, dy, data.radius, data.deadZone);+ const ratio = Math.min(1, Math.max(1, data.radius) / (Math.hypot(dx, dy) || 1));+ state.thumb = { x: dx * ratio, y: dy * ratio };+ } else {+ const spring = Math.exp(-Math.max(0, data.returnSpeed) * Math.max(0, time.delta));+ state.thumb = { x: state.thumb.x * spring, y: state.thumb.y * spring };+ if (Math.hypot(state.thumb.x, state.thumb.y) < 0.1 || data.returnSpeed <= 0) {+ state.thumb = { x: 0, y: 0 }; state.origin = { x: 0, y: 0 };+ }+ }+ positionChild(entity, data.base, state.origin);+ positionChild(entity, data.handle, { x: state.origin.x + state.thumb.x, y: state.origin.y + state.thumb.y });+ } else {+ const data = world.get(entity, VirtualButton); id = data.inputId;+ for (const pointer of [...state.buttons]) if (!held.some(p => p.id === pointer)) state.buttons.delete(pointer);+ for (const pointer of held) if (pointer.pressed) state.buttons.add(pointer.id);+ const tapped = available && [...frame.pointers.values()].some(p => p.pressed+ && !p.down && p.pressedEntity === entity);+ if (state.buttons.size || tapped) value.x = data.value;+ }+ current.setVirtualSource(state.owner, id, value.x, value.y);+ if (value.x !== state.value.x || value.y !== state.value.y) {+ state.value = value;+ events.emit(entity, UIEventType.Change, { value: { ...value } });+ }+ }+ }+ }, { name: SystemLabel.VirtualControls }),+ dispose: () => { offDespawn(); for (const entity of states.keys()) release(entity); },+ };+}diff --git a/sdk/src/ui/index.ts b/sdk/src/ui/index.tsindex 7f772bf39..02acad7ad 100644--- a/sdk/src/ui/index.ts+++ b/sdk/src/ui/index.ts@@ -523,3 +523,6 @@ export { submitTextBatch, TEXT_VERTEX_FLOATS } from './text/submit';export { ScreenOverlay, type ScreenOverlayData } from './core/screen-overlay';export { canvasRootEntities } from './core/canvas-roots';++export { VirtualJoystick, VirtualButton, VirtualJoystickMode, joystickAxis, type VirtualJoystickData, type VirtualButtonData } from './behavior/virtual-controls';+export { createVirtualJoystick, createVirtualButton, type VirtualJoystickOptions, type VirtualButtonOptions } from './widgets/virtual-controls';diff --git a/sdk/src/ui/input/control-pointers.ts b/sdk/src/ui/input/control-pointers.tsnew file mode 100644index 000000000..213eb3f5e--- /dev/null+++ b/sdk/src/ui/input/control-pointers.ts@@ -0,0 +1,17 @@+// SPDX-License-Identifier: Apache-2.0+// SPDX-FileCopyrightText: Copyright (c) 2024-present ESEngine Team+import { defineResource } from '../../ecs/resource';+import type { Entity } from '../../types';+export interface ControlPointer {+ id: number;+ down: boolean;+ pressed: boolean;+ entity: Entity | null;+ pressedEntity: Entity | null;+ layoutX: number;+ layoutY: number;+ worldX: number;+ worldY: number;+}+/** Per-app projection of the UI hit tester's captures; never a second raycast. */+export const UIControlPointers = defineResource<{ pointers: Map<number, ControlPointer> }>({ pointers: new Map() }, 'UIControlPointers');diff --git a/sdk/src/ui/input/interaction.ts b/sdk/src/ui/input/interaction.tsindex 2b9af3266..c5811eae3 100644--- a/sdk/src/ui/input/interaction.ts+++ b/sdk/src/ui/input/interaction.ts@@ -29,6 +29,7 @@ import { fireGestureClick, expireGestureFired } from './gestureClick';import { inputRouter } from '../../input/inputRouter';import { SystemLabel, PluginName } from '../../ecs/systemLabels';import type { UILayoutGenerationData } from '../layout/ui-layout-generation';+import { UIControlPointers, type ControlPointer } from './control-pointers';function emitWithBubbling(world: World,@@ -79,6 +80,8 @@ export class UIInteractionPlugin implements Plugin {// onto the world — a raycast per pointer, and the writes its verdicts// imply. Gestures (drag, scroll, slider) stay on the primary pointer.const book = new UiPointerBook();+ const controlPointers = new Map<number, ControlPointer>();+ app.insertResource(UIControlPointers, { pointers: controlPointers });/** Where each pointer last hit, so a settled pointer skips the raycast. */const lastHit = new UiPointerHitCache();let lastLayoutGen = -1;@@ -103,6 +106,7 @@ export class UIInteractionPlugin implements Plugin {this.releases_.set(app, () => {unregister();book.clear();+ controlPointers.clear();lastHit.clear();expireGestureFired(world);});@@ -129,6 +133,7 @@ export class UIInteractionPlugin implements Plugin {const dpr = platformDevicePixelRatio();const surfaceH = overlay.active ? overlay.surfaceH : camera.screenH;const pointers = uiPointersOf(input);+ controlPointers.clear();lastHit.retain(pointers);const layoutChanged = layoutGen.generation !== lastLayoutGen;lastLayoutGen = layoutGen.generation;@@ -155,6 +160,9 @@ export class UIInteractionPlugin implements Plugin {// drawn with, which is what keeps a click where the pixel is.const worldPointer = camera.valid ? screenToUiWorld(camera, glX, glY) : { x: 0, y: 0 };const layoutPointer = overlay.active ? screenToUiLayout(overlay, glX, glY) : worldPointer;+ controlPointers.set(pointer.id, { id: pointer.id, down: pointer.down, pressed: pointer.pressed,+ entity: null, pressedEntity: null, layoutX: layoutPointer.x, layoutY: layoutPointer.y,+ worldX: worldPointer.x, worldY: worldPointer.y });if (!primaryWritten && (pointer.down || !hasHeldPointer)) {primaryWritten = true;camera.worldMouseX = worldPointer.x;@@ -217,6 +225,11 @@ export class UIInteractionPlugin implements Plugin {}}book.prune(active);+ for (const pointer of controlPointers.values()) pointer.entity = book.heldBy(pointer.id);+ for (const event of pointerEvents) if (event.kind === 'press') {+ const pointer = controlPointers.get(event.pointer);+ if (pointer) pointer.pressedEntity = event.entity;+ }// `hovered` and `pressed` are facts about the ENTITY: true while// any pointer is over or holding it, false once none is.diff --git a/sdk/src/ui/input/pointerBook.ts b/sdk/src/ui/input/pointerBook.tsindex c4b91c88c..a8b4b01ed 100644--- a/sdk/src/ui/input/pointerBook.ts+++ b/sdk/src/ui/input/pointerBook.ts@@ -97,6 +97,7 @@ export function uiPointersOf(input: InputState): UiPointerSample[] {}export class UiPointerBook {+ heldBy(pointer: number): Entity | null { return this.pressedBy_.get(pointer) ?? null; }private hoveredBy_ = new Map<number, Entity>();private pressedBy_ = new Map<number, Entity>();private cancelled_ = new Set<Entity>();diff --git a/sdk/src/ui/widgets/prefabs/Slider.esprefab b/sdk/src/ui/widgets/prefabs/Slider.esprefabindex 98f19dc79..48916024b 100644--- a/sdk/src/ui/widgets/prefabs/Slider.esprefab+++ b/sdk/src/ui/widgets/prefabs/Slider.esprefab@@ -194,7 +194,7 @@"visible": true},{- "prefabEntityId": "1",+ "prefabEntityId": "2","name": "Node","parent": "0","children": [],@@ -244,8 +244,8 @@"opacity": 1,"pointerEvents": 0,"width": {- "value": 14,- "unit": 0+ "value": 0,+ "unit": 2},"height": {"value": 0,@@ -275,7 +275,7 @@},"alignSelf": 0,"marginLeft": {- "value": -7,+ "value": 0,"unit": 0},"marginTop": {@@ -291,8 +291,8 @@"unit": 0},"insetLeft": {- "value": 50,- "unit": 1+ "value": 0,+ "unit": 0},"insetTop": {"value": 0,@@ -300,7 +300,7 @@},"insetRight": {"value": 0,- "unit": 2+ "unit": 0},"insetBottom": {"value": 0,@@ -311,12 +311,12 @@{"type": "UIVisual","data": {- "visualType": 1,+ "visualType": 5,"texture": 0,"color": {- "r": 1,- "g": 1,- "b": 1,+ "r": 0.25,+ "g": 0.56,+ "b": 0.96,"a": 1},"fit": 0,@@ -340,7 +340,7 @@},"fillMethod": 0,"fillOrigin": 0,- "fillAmount": 1,+ "fillAmount": 0.5,"material": 0,"enabled": true}@@ -348,14 +348,14 @@{"type": "ThemeStyle","data": {- "visual": "onPrimary"+ "visual": "primary"}}],"visible": true},{- "prefabEntityId": "2",+ "prefabEntityId": "1","name": "Node","parent": "0","children": [],@@ -405,8 +405,8 @@"opacity": 1,"pointerEvents": 0,"width": {- "value": 0,- "unit": 2+ "value": 14,+ "unit": 0},"height": {"value": 0,@@ -436,7 +436,7 @@},"alignSelf": 0,"marginLeft": {- "value": 0,+ "value": -7,"unit": 0},"marginTop": {@@ -452,8 +452,8 @@"unit": 0},"insetLeft": {- "value": 0,- "unit": 0+ "value": 50,+ "unit": 1},"insetTop": {"value": 0,@@ -461,7 +461,7 @@},"insetRight": {"value": 0,- "unit": 0+ "unit": 2},"insetBottom": {"value": 0,@@ -472,12 +472,12 @@{"type": "UIVisual","data": {- "visualType": 5,+ "visualType": 1,"texture": 0,"color": {- "r": 0.25,- "g": 0.56,- "b": 0.96,+ "r": 1,+ "g": 1,+ "b": 1,"a": 1},"fit": 0,@@ -501,7 +501,7 @@},"fillMethod": 0,"fillOrigin": 0,- "fillAmount": 0.5,+ "fillAmount": 1,"material": 0,"enabled": true}@@ -509,7 +509,7 @@{"type": "ThemeStyle","data": {- "visual": "primary"+ "visual": "onPrimary"}}],diff --git a/sdk/src/ui/widgets/prefabs/VirtualButton.esprefab b/sdk/src/ui/widgets/prefabs/VirtualButton.esprefabnew file mode 100644index 000000000..3813b3186--- /dev/null+++ b/sdk/src/ui/widgets/prefabs/VirtualButton.esprefab@@ -0,0 +1,420 @@+{+ "version": "2",+ "name": "VirtualButton",+ "rootEntityId": "0",+ "entities": [+ {+ "prefabEntityId": "0",+ "name": "VirtualButton",+ "parent": null,+ "children": [+ "1"+ ],+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 0,+ "y": 0,+ "z": 0+ },+ "rotation": {+ "w": 1,+ "x": 0,+ "y": 0,+ "z": 0+ },+ "scale": {+ "x": 1,+ "y": 1,+ "z": 1+ },+ "worldPosition": {+ "x": 0,+ "y": 0,+ "z": 0+ },+ "worldRotation": {+ "w": 1,+ "x": 0,+ "y": 0,+ "z": 0+ },+ "worldScale": {+ "x": 1,+ "y": 1,+ "z": 1+ }+ }+ },+ {+ "type": "UINode",+ "data": {+ "position": 1,+ "display": 0,+ "opacity": 1,+ "pointerEvents": 0,+ "width": {+ "value": 0,+ "unit": 2+ },+ "height": {+ "value": 0,+ "unit": 2+ },+ "minWidth": {+ "value": 0,+ "unit": 2+ },+ "minHeight": {+ "value": 0,+ "unit": 2+ },+ "maxWidth": {+ "value": 0,+ "unit": 2+ },+ "maxHeight": {+ "value": 0,+ "unit": 2+ },+ "flexGrow": 0,+ "flexShrink": 1,+ "flexBasis": {+ "value": 0,+ "unit": 2+ },+ "alignSelf": 0,+ "marginLeft": {+ "value": 0,+ "unit": 0+ },+ "marginTop": {+ "value": 0,+ "unit": 0+ },+ "marginRight": {+ "value": 0,+ "unit": 0+ },+ "marginBottom": {+ "value": 0,+ "unit": 0+ },+ "insetLeft": {+ "value": 0,+ "unit": 0+ },+ "insetTop": {+ "value": 0,+ "unit": 0+ },+ "insetRight": {+ "value": 0,+ "unit": 0+ },+ "insetBottom": {+ "value": 0,+ "unit": 0+ }+ }+ },+ {+ "type": "UIVisual",+ "data": {+ "visualType": 1,+ "texture": 0,+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "fit": 0,+ "uvOffset": {+ "x": 0,+ "y": 0+ },+ "uvScale": {+ "x": 1,+ "y": 1+ },+ "sliceBorder": {+ "x": 0,+ "y": 0,+ "z": 0,+ "w": 0+ },+ "tileSize": {+ "x": 32,+ "y": 32+ },+ "fillMethod": 0,+ "fillOrigin": 0,+ "fillAmount": 1,+ "material": 0,+ "enabled": true+ }+ },+ {+ "type": "Interactable",+ "data": {+ "enabled": true,+ "blockRaycast": true,+ "raycastTarget": true+ }+ },+ {+ "type": "UIController",+ "data": {+ "controllers": [+ {+ "name": "$interaction",+ "pages": [+ "normal",+ "hover",+ "pressed",+ "disabled",+ "focused"+ ],+ "current": "normal"+ }+ ]+ }+ },+ {+ "type": "UIGear",+ "data": {+ "bindings": [+ {+ "controller": "$interaction",+ "component": "UIVisual",+ "property": "color",+ "pages": {+ "normal": {+ "r": 0.22,+ "g": 0.22,+ "b": 0.26,+ "a": 1+ },+ "hover": {+ "r": 0.28,+ "g": 0.28,+ "b": 0.32,+ "a": 1+ },+ "pressed": {+ "r": 0.18,+ "g": 0.18,+ "b": 0.22,+ "a": 1+ },+ "disabled": {+ "r": 0.22,+ "g": 0.22,+ "b": 0.26,+ "a": 0.5+ },+ "focused": {+ "r": 0.3,+ "g": 0.34,+ "b": 0.44,+ "a": 1+ }+ }+ }+ ]+ }+ },+ {+ "type": "ThemeStyle",+ "data": {+ "states": {+ "normal": "control",+ "hover": "controlHover",+ "pressed": "controlActive",+ "disabled": "control",+ "focused": "controlFocus"+ }+ }+ },+ {+ "type": "VirtualButton",+ "data": {+ "inputId": "fire",+ "value": 1+ }+ }+ ],+ "visible": true+ },+ {+ "prefabEntityId": "1",+ "name": "Label",+ "parent": "0",+ "children": [],+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 0,+ "y": 0,+ "z": 0+ },+ "rotation": {+ "w": 1,+ "x": 0,+ "y": 0,+ "z": 0+ },+ "scale": {+ "x": 1,+ "y": 1,+ "z": 1+ },+ "worldPosition": {+ "x": 0,+ "y": 0,+ "z": 0+ },+ "worldRotation": {+ "w": 1,+ "x": 0,+ "y": 0,+ "z": 0+ },+ "worldScale": {+ "x": 1,+ "y": 1,+ "z": 1+ }+ }+ },+ {+ "type": "UINode",+ "data": {+ "position": 1,+ "display": 0,+ "opacity": 1,+ "pointerEvents": 0,+ "width": {+ "value": 0,+ "unit": 2+ },+ "height": {+ "value": 0,+ "unit": 2+ },+ "minWidth": {+ "value": 0,+ "unit": 2+ },+ "minHeight": {+ "value": 0,+ "unit": 2+ },+ "maxWidth": {+ "value": 0,+ "unit": 2+ },+ "maxHeight": {+ "value": 0,+ "unit": 2+ },+ "flexGrow": 0,+ "flexShrink": 1,+ "flexBasis": {+ "value": 0,+ "unit": 2+ },+ "alignSelf": 0,+ "marginLeft": {+ "value": 0,+ "unit": 0+ },+ "marginTop": {+ "value": 0,+ "unit": 0+ },+ "marginRight": {+ "value": 0,+ "unit": 0+ },+ "marginBottom": {+ "value": 0,+ "unit": 0+ },+ "insetLeft": {+ "value": 0,+ "unit": 0+ },+ "insetTop": {+ "value": 0,+ "unit": 0+ },+ "insetRight": {+ "value": 0,+ "unit": 0+ },+ "insetBottom": {+ "value": 0,+ "unit": 0+ }+ }+ },+ {+ "type": "Text",+ "data": {+ "content": "Fire",+ "i18nKey": "",+ "font": 0,+ "fontFamily": "",+ "fontSize": 14,+ "color": {+ "r": 0.92,+ "g": 0.92,+ "b": 0.94,+ "a": 1+ },+ "align": 1,+ "verticalAlign": 1,+ "wordWrap": false,+ "overflow": 0,+ "lineHeight": 1.2,+ "bold": false,+ "italic": false,+ "strokeColor": {+ "r": 0,+ "g": 0,+ "b": 0,+ "a": 1+ },+ "strokeWidth": 0,+ "shadowColor": {+ "r": 0,+ "g": 0,+ "b": 0,+ "a": 1+ },+ "shadowBlur": 0,+ "shadowOffsetX": 0,+ "shadowOffsetY": 0,+ "richText": false,+ "renderMode": 0,+ "layer": 0,+ "enabled": true+ }+ },+ {+ "type": "ThemeStyle",+ "data": {+ "text": "text"+ }+ }+ ],+ "visible": true+ }+ ]+}diff --git a/sdk/src/ui/widgets/prefabs/VirtualJoystick.esprefab b/sdk/src/ui/widgets/prefabs/VirtualJoystick.esprefabnew file mode 100644index 000000000..561ea0717--- /dev/null+++ b/sdk/src/ui/widgets/prefabs/VirtualJoystick.esprefab@@ -0,0 +1,470 @@+{+ "version": "2",+ "name": "VirtualJoystick",+ "rootEntityId": "0",+ "entities": [+ {+ "prefabEntityId": "0",+ "name": "VirtualJoystick",+ "parent": null,+ "children": [+ "2",+ "1"+ ],+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 0,+ "y": 0,+ "z": 0+ },+ "rotation": {+ "w": 1,+ "x": 0,+ "y": 0,+ "z": 0+ },+ "scale": {+ "x": 1,+ "y": 1,+ "z": 1+ },+ "worldPosition": {+ "x": 0,+ "y": 0,+ "z": 0+ },+ "worldRotation": {+ "w": 1,+ "x": 0,+ "y": 0,+ "z": 0+ },+ "worldScale": {+ "x": 1,+ "y": 1,+ "z": 1+ }+ }+ },+ {+ "type": "UINode",+ "data": {+ "position": 0,+ "display": 0,+ "opacity": 1,+ "pointerEvents": 0,+ "width": {+ "value": 100,+ "unit": 0+ },+ "height": {+ "value": 100,+ "unit": 0+ },+ "minWidth": {+ "value": 0,+ "unit": 2+ },+ "minHeight": {+ "value": 0,+ "unit": 2+ },+ "maxWidth": {+ "value": 0,+ "unit": 2+ },+ "maxHeight": {+ "value": 0,+ "unit": 2+ },+ "flexGrow": 0,+ "flexShrink": 1,+ "flexBasis": {+ "value": 0,+ "unit": 2+ },+ "alignSelf": 0,+ "marginLeft": {+ "value": 0,+ "unit": 0+ },+ "marginTop": {+ "value": 0,+ "unit": 0+ },+ "marginRight": {+ "value": 0,+ "unit": 0+ },+ "marginBottom": {+ "value": 0,+ "unit": 0+ },+ "insetLeft": {+ "value": 0,+ "unit": 2+ },+ "insetTop": {+ "value": 0,+ "unit": 2+ },+ "insetRight": {+ "value": 0,+ "unit": 2+ },+ "insetBottom": {+ "value": 0,+ "unit": 2+ }+ }+ },+ {+ "type": "Interactable",+ "data": {+ "enabled": true,+ "blockRaycast": true,+ "raycastTarget": true+ }+ },+ {+ "type": "VirtualJoystick",+ "data": {+ "inputId": "move",+ "mode": 0,+ "radius": 50,+ "deadZone": 0.15,+ "returnSpeed": 18,+ "base": "2",+ "handle": "1"+ }+ }+ ],+ "visible": true+ },+ {+ "prefabEntityId": "2",+ "name": "Node",+ "parent": "0",+ "children": [],+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 0,+ "y": 0,+ "z": 0+ },+ "rotation": {+ "w": 1,+ "x": 0,+ "y": 0,+ "z": 0+ },+ "scale": {+ "x": 1,+ "y": 1,+ "z": 1+ },+ "worldPosition": {+ "x": 0,+ "y": 0,+ "z": 0+ },+ "worldRotation": {+ "w": 1,+ "x": 0,+ "y": 0,+ "z": 0+ },+ "worldScale": {+ "x": 1,+ "y": 1,+ "z": 1+ }+ }+ },+ {+ "type": "UINode",+ "data": {+ "position": 1,+ "display": 0,+ "opacity": 1,+ "pointerEvents": 0,+ "width": {+ "value": 100,+ "unit": 0+ },+ "height": {+ "value": 100,+ "unit": 0+ },+ "minWidth": {+ "value": 0,+ "unit": 2+ },+ "minHeight": {+ "value": 0,+ "unit": 2+ },+ "maxWidth": {+ "value": 0,+ "unit": 2+ },+ "maxHeight": {+ "value": 0,+ "unit": 2+ },+ "flexGrow": 0,+ "flexShrink": 1,+ "flexBasis": {+ "value": 0,+ "unit": 2+ },+ "alignSelf": 0,+ "marginLeft": {+ "value": -50,+ "unit": 0+ },+ "marginTop": {+ "value": -50,+ "unit": 0+ },+ "marginRight": {+ "value": 0,+ "unit": 0+ },+ "marginBottom": {+ "value": 0,+ "unit": 0+ },+ "insetLeft": {+ "value": 50,+ "unit": 1+ },+ "insetTop": {+ "value": 50,+ "unit": 1+ },+ "insetRight": {+ "value": 0,+ "unit": 2+ },+ "insetBottom": {+ "value": 0,+ "unit": 2+ }+ }+ },+ {+ "type": "UIVisual",+ "data": {+ "visualType": 1,+ "texture": 0,+ "color": {+ "r": 0.22,+ "g": 0.22,+ "b": 0.26,+ "a": 1+ },+ "fit": 0,+ "uvOffset": {+ "x": 0,+ "y": 0+ },+ "uvScale": {+ "x": 1,+ "y": 1+ },+ "sliceBorder": {+ "x": 0,+ "y": 0,+ "z": 0,+ "w": 0+ },+ "tileSize": {+ "x": 32,+ "y": 32+ },+ "fillMethod": 0,+ "fillOrigin": 0,+ "fillAmount": 1,+ "material": 0,+ "enabled": true+ }+ },+ {+ "type": "ThemeStyle",+ "data": {+ "visual": "control"+ }+ }+ ],+ "visible": true+ },+ {+ "prefabEntityId": "1",+ "name": "Node",+ "parent": "0",+ "children": [],+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 0,+ "y": 0,+ "z": 0+ },+ "rotation": {+ "w": 1,+ "x": 0,+ "y": 0,+ "z": 0+ },+ "scale": {+ "x": 1,+ "y": 1,+ "z": 1+ },+ "worldPosition": {+ "x": 0,+ "y": 0,+ "z": 0+ },+ "worldRotation": {+ "w": 1,+ "x": 0,+ "y": 0,+ "z": 0+ },+ "worldScale": {+ "x": 1,+ "y": 1,+ "z": 1+ }+ }+ },+ {+ "type": "UINode",+ "data": {+ "position": 1,+ "display": 0,+ "opacity": 1,+ "pointerEvents": 0,+ "width": {+ "value": 40,+ "unit": 0+ },+ "height": {+ "value": 40,+ "unit": 0+ },+ "minWidth": {+ "value": 0,+ "unit": 2+ },+ "minHeight": {+ "value": 0,+ "unit": 2+ },+ "maxWidth": {+ "value": 0,+ "unit": 2+ },+ "maxHeight": {+ "value": 0,+ "unit": 2+ },+ "flexGrow": 0,+ "flexShrink": 1,+ "flexBasis": {+ "value": 0,+ "unit": 2+ },+ "alignSelf": 0,+ "marginLeft": {+ "value": -20,+ "unit": 0+ },+ "marginTop": {+ "value": -20,+ "unit": 0+ },+ "marginRight": {+ "value": 0,+ "unit": 0+ },+ "marginBottom": {+ "value": 0,+ "unit": 0+ },+ "insetLeft": {+ "value": 50,+ "unit": 1+ },+ "insetTop": {+ "value": 50,+ "unit": 1+ },+ "insetRight": {+ "value": 0,+ "unit": 2+ },+ "insetBottom": {+ "value": 0,+ "unit": 2+ }+ }+ },+ {+ "type": "UIVisual",+ "data": {+ "visualType": 1,+ "texture": 0,+ "color": {+ "r": 0.25,+ "g": 0.56,+ "b": 0.96,+ "a": 1+ },+ "fit": 0,+ "uvOffset": {+ "x": 0,+ "y": 0+ },+ "uvScale": {+ "x": 1,+ "y": 1+ },+ "sliceBorder": {+ "x": 0,+ "y": 0,+ "z": 0,+ "w": 0+ },+ "tileSize": {+ "x": 32,+ "y": 32+ },+ "fillMethod": 0,+ "fillOrigin": 0,+ "fillAmount": 1,+ "material": 0,+ "enabled": true+ }+ },+ {+ "type": "ThemeStyle",+ "data": {+ "visual": "primary"+ }+ }+ ],+ "visible": true+ }+ ]+}diff --git a/sdk/src/ui/widgets/prefabs/generated.ts b/sdk/src/ui/widgets/prefabs/generated.tsindex 5fad6462f..805f237ee 100644--- a/sdk/src/ui/widgets/prefabs/generated.ts+++ b/sdk/src/ui/widgets/prefabs/generated.ts@@ -2,6 +2,896 @@import type { PrefabData } from '../../../prefab/types';export const BUILTIN_UI_PREFABS: Record<string, PrefabData> = {+ "VirtualJoystick": {+ "version": "2",+ "name": "VirtualJoystick",+ "rootEntityId": "0",+ "entities": [+ {+ "prefabEntityId": "0",+ "name": "VirtualJoystick",+ "parent": null,+ "children": [+ "2",+ "1"+ ],+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 0,+ "y": 0,+ "z": 0+ },+ "rotation": {+ "w": 1,+ "x": 0,+ "y": 0,+ "z": 0+ },+ "scale": {+ "x": 1,+ "y": 1,+ "z": 1+ },+ "worldPosition": {+ "x": 0,+ "y": 0,+ "z": 0+ },+ "worldRotation": {+ "w": 1,+ "x": 0,+ "y": 0,+ "z": 0+ },+ "worldScale": {+ "x": 1,+ "y": 1,+ "z": 1+ }+ }+ },+ {+ "type": "UINode",+ "data": {+ "position": 0,+ "display": 0,+ "opacity": 1,+ "pointerEvents": 0,+ "width": {+ "value": 100,+ "unit": 0+ },+ "height": {+ "value": 100,+ "unit": 0+ },+ "minWidth": {+ "value": 0,+ "unit": 2+ },+ "minHeight": {+ "value": 0,+ "unit": 2+ },+ "maxWidth": {+ "value": 0,+ "unit": 2+ },+ "maxHeight": {+ "value": 0,+ "unit": 2+ },+ "flexGrow": 0,+ "flexShrink": 1,+ "flexBasis": {+ "value": 0,+ "unit": 2+ },+ "alignSelf": 0,+ "marginLeft": {+ "value": 0,+ "unit": 0+ },+ "marginTop": {+ "value": 0,+ "unit": 0+ },+ "marginRight": {+ "value": 0,+ "unit": 0+ },+ "marginBottom": {+ "value": 0,+ "unit": 0+ },+ "insetLeft": {+ "value": 0,+ "unit": 2+ },+ "insetTop": {+ "value": 0,+ "unit": 2+ },+ "insetRight": {+ "value": 0,+ "unit": 2+ },+ "insetBottom": {+ "value": 0,+ "unit": 2+ }+ }+ },+ {+ "type": "Interactable",+ "data": {+ "enabled": true,+ "blockRaycast": true,+ "raycastTarget": true+ }+ },+ {+ "type": "VirtualJoystick",+ "data": {+ "inputId": "move",+ "mode": 0,+ "radius": 50,+ "deadZone": 0.15,+ "returnSpeed": 18,+ "base": "2",+ "handle": "1"+ }+ }+ ],+ "visible": true+ },+ {+ "prefabEntityId": "2",+ "name": "Node",+ "parent": "0",+ "children": [],+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 0,+ "y": 0,+ "z": 0+ },+ "rotation": {+ "w": 1,+ "x": 0,+ "y": 0,+ "z": 0+ },+ "scale": {+ "x": 1,+ "y": 1,+ "z": 1+ },+ "worldPosition": {+ "x": 0,+ "y": 0,+ "z": 0+ },+ "worldRotation": {+ "w": 1,+ "x": 0,+ "y": 0,+ "z": 0+ },+ "worldScale": {+ "x": 1,+ "y": 1,+ "z": 1+ }+ }+ },+ {+ "type": "UINode",+ "data": {+ "position": 1,+ "display": 0,+ "opacity": 1,+ "pointerEvents": 0,+ "width": {+ "value": 100,+ "unit": 0+ },+ "height": {+ "value": 100,+ "unit": 0+ },+ "minWidth": {+ "value": 0,+ "unit": 2+ },+ "minHeight": {+ "value": 0,+ "unit": 2+ },+ "maxWidth": {+ "value": 0,+ "unit": 2+ },+ "maxHeight": {+ "value": 0,+ "unit": 2+ },+ "flexGrow": 0,+ "flexShrink": 1,+ "flexBasis": {+ "value": 0,+ "unit": 2+ },+ "alignSelf": 0,+ "marginLeft": {+ "value": -50,+ "unit": 0+ },+ "marginTop": {+ "value": -50,+ "unit": 0+ },+ "marginRight": {+ "value": 0,+ "unit": 0+ },+ "marginBottom": {+ "value": 0,+ "unit": 0+ },+ "insetLeft": {+ "value": 50,+ "unit": 1+ },+ "insetTop": {+ "value": 50,+ "unit": 1+ },+ "insetRight": {+ "value": 0,+ "unit": 2+ },+ "insetBottom": {+ "value": 0,+ "unit": 2+ }+ }+ },+ {+ "type": "UIVisual",+ "data": {+ "visualType": 1,+ "texture": 0,+ "color": {+ "r": 0.22,+ "g": 0.22,+ "b": 0.26,+ "a": 1+ },+ "fit": 0,+ "uvOffset": {+ "x": 0,+ "y": 0+ },+ "uvScale": {+ "x": 1,+ "y": 1+ },+ "sliceBorder": {+ "x": 0,+ "y": 0,+ "z": 0,+ "w": 0+ },+ "tileSize": {+ "x": 32,+ "y": 32+ },+ "fillMethod": 0,+ "fillOrigin": 0,+ "fillAmount": 1,+ "material": 0,+ "enabled": true+ }+ },+ {+ "type": "ThemeStyle",+ "data": {+ "visual": "control"+ }+ }+ ],+ "visible": true+ },+ {+ "prefabEntityId": "1",+ "name": "Node",+ "parent": "0",+ "children": [],+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 0,+ "y": 0,+ "z": 0+ },+ "rotation": {+ "w": 1,+ "x": 0,+ "y": 0,+ "z": 0+ },+ "scale": {+ "x": 1,+ "y": 1,+ "z": 1+ },+ "worldPosition": {+ "x": 0,+ "y": 0,+ "z": 0+ },+ "worldRotation": {+ "w": 1,+ "x": 0,+ "y": 0,+ "z": 0+ },+ "worldScale": {+ "x": 1,+ "y": 1,+ "z": 1+ }+ }+ },+ {+ "type": "UINode",+ "data": {+ "position": 1,+ "display": 0,+ "opacity": 1,+ "pointerEvents": 0,+ "width": {+ "value": 40,+ "unit": 0+ },+ "height": {+ "value": 40,+ "unit": 0+ },+ "minWidth": {+ "value": 0,+ "unit": 2+ },+ "minHeight": {+ "value": 0,+ "unit": 2+ },+ "maxWidth": {+ "value": 0,+ "unit": 2+ },+ "maxHeight": {+ "value": 0,+ "unit": 2+ },+ "flexGrow": 0,+ "flexShrink": 1,+ "flexBasis": {+ "value": 0,+ "unit": 2+ },+ "alignSelf": 0,+ "marginLeft": {+ "value": -20,+ "unit": 0+ },+ "marginTop": {+ "value": -20,+ "unit": 0+ },+ "marginRight": {+ "value": 0,+ "unit": 0+ },+ "marginBottom": {+ "value": 0,+ "unit": 0+ },+ "insetLeft": {+ "value": 50,+ "unit": 1+ },+ "insetTop": {+ "value": 50,+ "unit": 1+ },+ "insetRight": {+ "value": 0,+ "unit": 2+ },+ "insetBottom": {+ "value": 0,+ "unit": 2+ }+ }+ },+ {+ "type": "UIVisual",+ "data": {+ "visualType": 1,+ "texture": 0,+ "color": {+ "r": 0.25,+ "g": 0.56,+ "b": 0.96,+ "a": 1+ },+ "fit": 0,+ "uvOffset": {+ "x": 0,+ "y": 0+ },+ "uvScale": {+ "x": 1,+ "y": 1+ },+ "sliceBorder": {+ "x": 0,+ "y": 0,+ "z": 0,+ "w": 0+ },+ "tileSize": {+ "x": 32,+ "y": 32+ },+ "fillMethod": 0,+ "fillOrigin": 0,+ "fillAmount": 1,+ "material": 0,+ "enabled": true+ }+ },+ {+ "type": "ThemeStyle",+ "data": {+ "visual": "primary"+ }+ }+ ],+ "visible": true+ }+ ]+ },+ "VirtualButton": {+ "version": "2",+ "name": "VirtualButton",+ "rootEntityId": "0",+ "entities": [+ {+ "prefabEntityId": "0",+ "name": "VirtualButton",+ "parent": null,+ "children": [+ "1"+ ],+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 0,+ "y": 0,+ "z": 0+ },+ "rotation": {+ "w": 1,+ "x": 0,+ "y": 0,+ "z": 0+ },+ "scale": {+ "x": 1,+ "y": 1,+ "z": 1+ },+ "worldPosition": {+ "x": 0,+ "y": 0,+ "z": 0+ },+ "worldRotation": {+ "w": 1,+ "x": 0,+ "y": 0,+ "z": 0+ },+ "worldScale": {+ "x": 1,+ "y": 1,+ "z": 1+ }+ }+ },+ {+ "type": "UINode",+ "data": {+ "position": 1,+ "display": 0,+ "opacity": 1,+ "pointerEvents": 0,+ "width": {+ "value": 0,+ "unit": 2+ },+ "height": {+ "value": 0,+ "unit": 2+ },+ "minWidth": {+ "value": 0,+ "unit": 2+ },+ "minHeight": {+ "value": 0,+ "unit": 2+ },+ "maxWidth": {+ "value": 0,+ "unit": 2+ },+ "maxHeight": {+ "value": 0,+ "unit": 2+ },+ "flexGrow": 0,+ "flexShrink": 1,+ "flexBasis": {+ "value": 0,+ "unit": 2+ },+ "alignSelf": 0,+ "marginLeft": {+ "value": 0,+ "unit": 0+ },+ "marginTop": {+ "value": 0,+ "unit": 0+ },+ "marginRight": {+ "value": 0,+ "unit": 0+ },+ "marginBottom": {+ "value": 0,+ "unit": 0+ },+ "insetLeft": {+ "value": 0,+ "unit": 0+ },+ "insetTop": {+ "value": 0,+ "unit": 0+ },+ "insetRight": {+ "value": 0,+ "unit": 0+ },+ "insetBottom": {+ "value": 0,+ "unit": 0+ }+ }+ },+ {+ "type": "UIVisual",+ "data": {+ "visualType": 1,+ "texture": 0,+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "fit": 0,+ "uvOffset": {+ "x": 0,+ "y": 0+ },+ "uvScale": {+ "x": 1,+ "y": 1+ },+ "sliceBorder": {+ "x": 0,+ "y": 0,+ "z": 0,+ "w": 0+ },+ "tileSize": {+ "x": 32,+ "y": 32+ },+ "fillMethod": 0,+ "fillOrigin": 0,+ "fillAmount": 1,+ "material": 0,+ "enabled": true+ }+ },+ {+ "type": "Interactable",+ "data": {+ "enabled": true,+ "blockRaycast": true,+ "raycastTarget": true+ }+ },+ {+ "type": "UIController",+ "data": {+ "controllers": [+ {+ "name": "$interaction",+ "pages": [+ "normal",+ "hover",+ "pressed",+ "disabled",+ "focused"+ ],+ "current": "normal"+ }+ ]+ }+ },+ {+ "type": "UIGear",+ "data": {+ "bindings": [+ {+ "controller": "$interaction",+ "component": "UIVisual",+ "property": "color",+ "pages": {+ "normal": {+ "r": 0.22,+ "g": 0.22,+ "b": 0.26,+ "a": 1+ },+ "hover": {+ "r": 0.28,+ "g": 0.28,+ "b": 0.32,+ "a": 1+ },+ "pressed": {+ "r": 0.18,+ "g": 0.18,+ "b": 0.22,+ "a": 1+ },+ "disabled": {+ "r": 0.22,+ "g": 0.22,+ "b": 0.26,+ "a": 0.5+ },+ "focused": {+ "r": 0.3,+ "g": 0.34,+ "b": 0.44,+ "a": 1+ }+ }+ }+ ]+ }+ },+ {+ "type": "ThemeStyle",+ "data": {+ "states": {+ "normal": "control",+ "hover": "controlHover",+ "pressed": "controlActive",+ "disabled": "control",+ "focused": "controlFocus"+ }+ }+ },+ {+ "type": "VirtualButton",+ "data": {+ "inputId": "fire",+ "value": 1+ }+ }+ ],+ "visible": true+ },+ {+ "prefabEntityId": "1",+ "name": "Label",+ "parent": "0",+ "children": [],+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 0,+ "y": 0,+ "z": 0+ },+ "rotation": {+ "w": 1,+ "x": 0,+ "y": 0,+ "z": 0+ },+ "scale": {+ "x": 1,+ "y": 1,+ "z": 1+ },+ "worldPosition": {+ "x": 0,+ "y": 0,+ "z": 0+ },+ "worldRotation": {+ "w": 1,+ "x": 0,+ "y": 0,+ "z": 0+ },+ "worldScale": {+ "x": 1,+ "y": 1,+ "z": 1+ }+ }+ },+ {+ "type": "UINode",+ "data": {+ "position": 1,+ "display": 0,+ "opacity": 1,+ "pointerEvents": 0,+ "width": {+ "value": 0,+ "unit": 2+ },+ "height": {+ "value": 0,+ "unit": 2+ },+ "minWidth": {+ "value": 0,+ "unit": 2+ },+ "minHeight": {+ "value": 0,+ "unit": 2+ },+ "maxWidth": {+ "value": 0,+ "unit": 2+ },+ "maxHeight": {+ "value": 0,+ "unit": 2+ },+ "flexGrow": 0,+ "flexShrink": 1,+ "flexBasis": {+ "value": 0,+ "unit": 2+ },+ "alignSelf": 0,+ "marginLeft": {+ "value": 0,+ "unit": 0+ },+ "marginTop": {+ "value": 0,+ "unit": 0+ },+ "marginRight": {+ "value": 0,+ "unit": 0+ },+ "marginBottom": {+ "value": 0,+ "unit": 0+ },+ "insetLeft": {+ "value": 0,+ "unit": 0+ },+ "insetTop": {+ "value": 0,+ "unit": 0+ },+ "insetRight": {+ "value": 0,+ "unit": 0+ },+ "insetBottom": {+ "value": 0,+ "unit": 0+ }+ }+ },+ {+ "type": "Text",+ "data": {+ "content": "Fire",+ "i18nKey": "",+ "font": 0,+ "fontFamily": "",+ "fontSize": 14,+ "color": {+ "r": 0.92,+ "g": 0.92,+ "b": 0.94,+ "a": 1+ },+ "align": 1,+ "verticalAlign": 1,+ "wordWrap": false,+ "overflow": 0,+ "lineHeight": 1.2,+ "bold": false,+ "italic": false,+ "strokeColor": {+ "r": 0,+ "g": 0,+ "b": 0,+ "a": 1+ },+ "strokeWidth": 0,+ "shadowColor": {+ "r": 0,+ "g": 0,+ "b": 0,+ "a": 1+ },+ "shadowBlur": 0,+ "shadowOffsetX": 0,+ "shadowOffsetY": 0,+ "richText": false,+ "renderMode": 0,+ "layer": 0,+ "enabled": true+ }+ },+ {+ "type": "ThemeStyle",+ "data": {+ "text": "text"+ }+ }+ ],+ "visible": true+ }+ ]+ },"Button": {"version": "2","name": "Button",@@ -1039,7 +1929,7 @@ export const BUILTIN_UI_PREFABS: Record<string, PrefabData> = {"visible": true},{- "prefabEntityId": "1",+ "prefabEntityId": "2","name": "Node","parent": "0","children": [],@@ -1089,8 +1979,8 @@ export const BUILTIN_UI_PREFABS: Record<string, PrefabData> = {"opacity": 1,"pointerEvents": 0,"width": {- "value": 14,- "unit": 0+ "value": 0,+ "unit": 2},"height": {"value": 0,@@ -1120,7 +2010,7 @@ export const BUILTIN_UI_PREFABS: Record<string, PrefabData> = {},"alignSelf": 0,"marginLeft": {- "value": -7,+ "value": 0,"unit": 0},"marginTop": {@@ -1136,8 +2026,8 @@ export const BUILTIN_UI_PREFABS: Record<string, PrefabData> = {"unit": 0},"insetLeft": {- "value": 50,- "unit": 1+ "value": 0,+ "unit": 0},"insetTop": {"value": 0,@@ -1145,7 +2035,7 @@ export const BUILTIN_UI_PREFABS: Record<string, PrefabData> = {},"insetRight": {"value": 0,- "unit": 2+ "unit": 0},"insetBottom": {"value": 0,@@ -1156,12 +2046,12 @@ export const BUILTIN_UI_PREFABS: Record<string, PrefabData> = {{"type": "UIVisual","data": {- "visualType": 1,+ "visualType": 5,"texture": 0,"color": {- "r": 1,- "g": 1,- "b": 1,+ "r": 0.25,+ "g": 0.56,+ "b": 0.96,"a": 1},"fit": 0,@@ -1185,7 +2075,7 @@ export const BUILTIN_UI_PREFABS: Record<string, PrefabData> = {},"fillMethod": 0,"fillOrigin": 0,- "fillAmount": 1,+ "fillAmount": 0.5,"material": 0,"enabled": true}@@ -1193,14 +2083,14 @@ export const BUILTIN_UI_PREFABS: Record<string, PrefabData> = {{"type": "ThemeStyle","data": {- "visual": "onPrimary"+ "visual": "primary"}}],"visible": true},{- "prefabEntityId": "2",+ "prefabEntityId": "1","name": "Node","parent": "0","children": [],@@ -1250,8 +2140,8 @@ export const BUILTIN_UI_PREFABS: Record<string, PrefabData> = {"opacity": 1,"pointerEvents": 0,"width": {- "value": 0,- "unit": 2+ "value": 14,+ "unit": 0},"height": {"value": 0,@@ -1281,7 +2171,7 @@ export const BUILTIN_UI_PREFABS: Record<string, PrefabData> = {},"alignSelf": 0,"marginLeft": {- "value": 0,+ "value": -7,"unit": 0},"marginTop": {@@ -1297,8 +2187,8 @@ export const BUILTIN_UI_PREFABS: Record<string, PrefabData> = {"unit": 0},"insetLeft": {- "value": 0,- "unit": 0+ "value": 50,+ "unit": 1},"insetTop": {"value": 0,@@ -1306,7 +2196,7 @@ export const BUILTIN_UI_PREFABS: Record<string, PrefabData> = {},"insetRight": {"value": 0,- "unit": 0+ "unit": 2},"insetBottom": {"value": 0,@@ -1317,12 +2207,12 @@ export const BUILTIN_UI_PREFABS: Record<string, PrefabData> = {{"type": "UIVisual","data": {- "visualType": 5,+ "visualType": 1,"texture": 0,"color": {- "r": 0.25,- "g": 0.56,- "b": 0.96,+ "r": 1,+ "g": 1,+ "b": 1,"a": 1},"fit": 0,@@ -1346,7 +2236,7 @@ export const BUILTIN_UI_PREFABS: Record<string, PrefabData> = {},"fillMethod": 0,"fillOrigin": 0,- "fillAmount": 0.5,+ "fillAmount": 1,"material": 0,"enabled": true}@@ -1354,7 +2244,7 @@ export const BUILTIN_UI_PREFABS: Record<string, PrefabData> = {{"type": "ThemeStyle","data": {- "visual": "primary"+ "visual": "onPrimary"}}],@@ -3320,4 +4210,4 @@ export const BUILTIN_UI_PREFABS: Record<string, PrefabData> = {}};-export const BUILTIN_UI_WIDGET_NAMES = ["Button","Toggle","Slider","Dialog","TextInput","Progress","Dropdown","ListView","ScrollView"] as const;+export const BUILTIN_UI_WIDGET_NAMES = ["VirtualJoystick","VirtualButton","Button","Toggle","Slider","Dialog","TextInput","Progress","Dropdown","ListView","ScrollView"] as const;diff --git a/sdk/src/ui/widgets/toPrefab.ts b/sdk/src/ui/widgets/toPrefab.tsindex ba289e75b..353d937d6 100644--- a/sdk/src/ui/widgets/toPrefab.ts+++ b/sdk/src/ui/widgets/toPrefab.ts@@ -114,5 +114,19 @@ export function widgetToPrefab(build: (world: World) => Entity, name: string): P// codegen output, so their identities must be byte-stable across runs (a// UUID default would drift the generated `.esprefab` files every build).let n = 0;- return extractPrefab(entities, root, name, () => String(n++));+ const prefab = extractPrefab(entities, root, name, () => String(n++));+ // Keep existing identities, but serialize in the same sibling order that+ // layout and paint use. Scene loading rebuilds Children from this order.+ const byId = new Map(prefab.entities.map(entity => [entity.prefabEntityId, entity]));+ const ordered: typeof prefab.entities = [];+ const visited = new Set<typeof prefab.rootEntityId>();+ const visit = (id: typeof prefab.rootEntityId) => {+ const entity = byId.get(id);+ if (!entity || visited.has(id)) return;+ visited.add(id);+ ordered.push(entity);+ for (const child of entity.children) visit(child);+ };+ visit(prefab.rootEntityId);+ return { ...prefab, entities: ordered };}diff --git a/sdk/src/ui/widgets/virtual-controls.ts b/sdk/src/ui/widgets/virtual-controls.tsnew file mode 100644index 000000000..aefae69c3--- /dev/null+++ b/sdk/src/ui/widgets/virtual-controls.ts@@ -0,0 +1,52 @@+// SPDX-License-Identifier: Apache-2.0+// SPDX-FileCopyrightText: Copyright (c) 2024-present ESEngine Team+import type { Entity } from '../../types';+import type { World } from '../../ecs/world';+import { spawnUIEntity, type UINodeInit, type UIVisualInit } from '../core/compose';+import { px, percent } from '../core/dimension';+import { Interactable, makeWidgetInteractable } from '../input/interactable';+import { VirtualJoystick, VirtualJoystickMode, VirtualButton } from '../behavior/virtual-controls';+import { themeColors } from '../theme/tokens';+import { markThemed } from '../theme/theme-style';+import { createButton, type ButtonOptions } from './button';+export interface VirtualJoystickOptions {+ world: World;+ parent?: Entity;+ node?: UINodeInit;+ inputId?: string;+ mode?: VirtualJoystickMode;+ radius?: number;+ deadZone?: number;+ returnSpeed?: number;+ disabled?: boolean;+ baseVisual?: UIVisualInit;+ handleVisual?: UIVisualInit;+}+export function createVirtualJoystick(options: VirtualJoystickOptions) {+ const { world } = options;+ const radius = Math.max(1, options.radius ?? 50);+ const diameter = radius * 2;+ const mode = options.mode ?? VirtualJoystickMode.Fixed;+ const entity = spawnUIEntity({ world, parent: options.parent,+ node: options.node ?? { width: px(mode === VirtualJoystickMode.Follow ? 240 : diameter), height: px(mode === VirtualJoystickMode.Follow ? 160 : diameter) } });+ makeWidgetInteractable(world, entity, { disabled: options.disabled, focusable: false });+ const colors = themeColors();+ const childNode = (size: number): UINodeInit => ({ position: 1, width: px(size), height: px(size),+ insetLeft: percent(50), insetTop: percent(50), marginLeft: px(-size / 2), marginTop: px(-size / 2) });+ const base = spawnUIEntity({ world, parent: entity, node: childNode(diameter), visual: options.baseVisual ?? { color: colors.control } });+ const handle = spawnUIEntity({ world, parent: entity, node: childNode(radius * 0.8), visual: options.handleVisual ?? { color: colors.primary } });+ if (!options.baseVisual) markThemed(world, base, { visual: 'control' });+ if (!options.handleVisual) markThemed(world, handle, { visual: 'primary' });+ world.insert(entity, VirtualJoystick, { inputId: options.inputId ?? 'move', mode, radius,+ deadZone: options.deadZone ?? 0.15, returnSpeed: options.returnSpeed ?? 18, base, handle });+ return { entity, baseEntity: base, handleEntity: handle,+ setDisabled: (disabled: boolean) => {+ if (world.valid(entity)) world.insert(entity, Interactable, { ...world.get(entity, Interactable), enabled: !disabled });+ }, dispose: () => { if (world.valid(entity)) world.despawn(entity); } };+}+export interface VirtualButtonOptions extends ButtonOptions { inputId?: string; value?: number }+export function createVirtualButton(options: VirtualButtonOptions) {+ const handle = createButton({ ...options, focusable: false });+ options.world.insert(handle.entity, VirtualButton, { inputId: options.inputId ?? 'fire', value: options.value ?? 1 });+ return handle;+}diff --git a/sdk/tests/device.test.ts b/sdk/tests/device.test.tsnew file mode 100644index 000000000..ab1e903e1--- /dev/null+++ b/sdk/tests/device.test.ts@@ -0,0 +1,168 @@+// SPDX-License-Identifier: Apache-2.0+// SPDX-FileCopyrightText: Copyright (c) 2024-present ESEngine Team+import { afterEach, describe, expect, it, vi } from 'vitest';+import { WebDevice } from '../src/device/web';+import { MiniGameDevice, type MiniGameDeviceHost } from '../src/device/minigame';+import { NativeDevice } from '../src/device/native';+import { DeviceEvents, emptyMotion, unavailableDevice } from '../src/device/core';+import type { MotionSample } from '../src/device/types';++afterEach(() => vi.useRealTimers());+function web(options: { permission?: string; wake?: unknown } = {}) {+ const win = new EventTarget() as EventTarget & Record<string, unknown>;+ const permission = vi.fn(() => Promise.resolve(options.permission ?? 'granted'));+ win.DeviceMotionEvent = { requestPermission: permission };+ win.DeviceOrientationEvent = { requestPermission: permission };+ const doc = new EventTarget() as EventTarget & Record<string, unknown>;+ doc.hidden = false; doc.fullscreenElement = null; doc.pointerLockElement = null;+ const element = {+ requestFullscreen: vi.fn(async () => { doc.fullscreenElement = element; doc.dispatchEvent(new Event('fullscreenchange')); }),+ requestPointerLock: vi.fn(() => { doc.pointerLockElement = element; doc.dispatchEvent(new Event('pointerlockchange')); }),+ };+ doc.documentElement = element;+ doc.exitFullscreen = vi.fn(async () => { doc.fullscreenElement = null; doc.dispatchEvent(new Event('fullscreenchange')); });+ doc.exitPointerLock = vi.fn(() => { doc.pointerLockElement = null; doc.dispatchEvent(new Event('pointerlockchange')); });+ const nav = { vibrate: vi.fn(() => true), wakeLock: options.wake };+ const device = new WebDevice(win as unknown as Window, doc as unknown as Document, nav as unknown as Navigator);+ const dispatchMotion = () => {+ const event = new Event('devicemotion');+ Object.assign(event, { acceleration: { x: 0, y: 0, z: 0 }, accelerationIncludingGravity: { x: 1, y: 2, z: 9 },+ rotationRate: { alpha: 180, beta: 90, gamma: 0 } }); win.dispatchEvent(event);+ };+ return { device, win, doc, nav, element, permission, dispatchMotion };+}+function mini() {+ const handlers = new Set<(v: { x: number; y: number; z: number }) => void>();+ const gyros = new Set<(v: { x: number; y: number; z: number }) => void>();+ let hide = () => {}, show = () => {};+ const succeed = vi.fn((options: { success?(): void }) => options.success?.());+ const host: MiniGameDeviceHost = {+ startAccelerometer: succeed, stopAccelerometer: succeed, startGyroscope: succeed, stopGyroscope: succeed,+ onAccelerometerChange: h => { handlers.add(h); }, offAccelerometerChange: h => { handlers.delete(h); },+ onGyroscopeChange: h => { gyros.add(h); }, offGyroscopeChange: h => { gyros.delete(h); },+ vibrateShort: succeed, vibrateLong: succeed, setKeepScreenOn: succeed,+ onHide: h => { hide = h; }, offHide: () => { hide = () => {}; },+ onShow: h => { show = h; }, offShow: () => { show = () => {}; },+ };+ const device = new MiniGameDevice(host, () => 1234);+ return { device, host, handlers, gyros, hide: () => hide(), show: () => show(), succeed };+}++describe('device capability results', () => {+ it('an unsupported platform returns unavailable without throwing', async () => {+ const device = unavailableDevice();+ expect(Object.values(device.capabilities()).every(v => !v)).toBe(true);+ for (const result of await Promise.all([device.startMotion(), device.vibrate(), device.keepScreenOn(true), device.fullscreen(true), device.pointerLock(true)])) {+ expect(result.status).toBe('unavailable');+ }+ });+ it('filters gravity and wrapped orientation without mixing angular units', () => {+ const events = new DeviceEvents(); const samples: MotionSample[] = [];+ events.onMotion(s => samples.push(s)); events.update({ motionActive: true });+ events.emit({ ...emptyMotion(), accelerationIncludingGravity: { x: 0, y: 0, z: 10 }, orientation: { x: 0, y: 0, z: 359 } });+ events.emit({ ...emptyMotion(), accelerationIncludingGravity: { x: 0, y: 0, z: 0 }, orientation: { x: 0, y: 0, z: 1 } });+ expect(samples[1].gravity!.z).toBeCloseTo(8.5); expect(samples[1].orientation!.z).toBeCloseTo(359.3);+ });+});+describe('Web device lifecycle and gesture requests', () => {+ it('requests iOS permissions from the original synchronous gesture and reports denial', async () => {+ const w = web({ permission: 'denied' });+ const pending = w.device.startMotion({ orientation: true });+ expect(w.permission).toHaveBeenCalledTimes(2);+ expect((await pending).status).toBe('denied'); expect(w.device.state().motionActive).toBe(false);+ w.device.dispose();+ });+ it('normalizes gyro degrees, stops on background, and resumes without a second permission prompt', async () => {+ const w = web(); const samples: MotionSample[] = []; w.device.onMotion(s => samples.push(s));+ expect((await w.device.startMotion()).status).toBe('ok'); w.dispatchMotion();+ expect(samples[0].gyroscope!.z).toBeCloseTo(Math.PI);+ w.doc.hidden = true; w.doc.dispatchEvent(new Event('visibilitychange')); w.dispatchMotion();+ expect(samples).toHaveLength(1); expect(w.device.state().motionActive).toBe(false);+ w.doc.hidden = false; w.doc.dispatchEvent(new Event('visibilitychange'));+ expect(w.device.state().motionActive).toBe(true); expect(w.permission).toHaveBeenCalledTimes(1);+ w.device.dispose(); w.dispatchMotion(); expect(samples).toHaveLength(1);+ });+ it('stopping during an outstanding permission request prevents late sensor activation', async () => {+ const w = web(); let grant!: (value: string) => void;+ w.win.DeviceMotionEvent = { requestPermission: () => new Promise<string>(resolve => { grant = resolve; }) };+ const pending = w.device.startMotion(); await w.device.stopMotion(); grant('granted');+ expect((await pending).status).toBe('failed'); expect(w.device.state().motionActive).toBe(false); w.device.dispose();+ });+ it('observes fullscreen and pointer lock exits and reports denied pointer requests', async () => {+ const w = web(); const changed = vi.fn(); w.device.onStateChange(changed);+ expect((await w.device.fullscreen(true)).status).toBe('ok'); expect(w.device.state().fullscreen).toBe(true);+ expect((await w.device.fullscreen(false)).status).toBe('ok');+ expect((await w.device.pointerLock(true)).status).toBe('ok'); expect(w.device.state().pointerLocked).toBe(true);+ w.doc.pointerLockElement = null; w.doc.dispatchEvent(new Event('pointerlockchange'));+ expect(w.device.state().pointerLocked).toBe(false);+ w.element.requestPointerLock.mockImplementation(() => { w.doc.dispatchEvent(new Event('pointerlockerror')); });+ expect((await w.device.pointerLock(true)).status).toBe('denied'); expect(changed).toHaveBeenCalled(); w.device.dispose();+ });+ it('releases a wake request which resolves after background or disable', async () => {+ let resolve!: (value: unknown) => void;+ const sentinel = { released: false, release: vi.fn(async () => {}), addEventListener: vi.fn() };+ const w = web({ wake: { request: () => new Promise(r => { resolve = r; }) } });+ const pending = w.device.keepScreenOn(true); await w.device.keepScreenOn(false); resolve(sentinel);+ expect((await pending).status).toBe('failed'); expect(sentinel.release).toHaveBeenCalledTimes(1);+ expect(w.device.state().screenOn).toBe(false); w.device.dispose();+ });+});+describe('mini-game device contract (WeChat and Douyin family)', () => {+ it('uses SI acceleration and host gyro radians, retains listeners until stop', async () => {+ const m = mini(); const samples: MotionSample[] = []; m.device.onMotion(s => samples.push(s));+ expect((await m.device.startMotion({ rate: 'ui' })).status).toBe('ok');+ for (const h of m.handlers) h({ x: 1, y: 0, z: 0 });+ for (const h of m.gyros) h({ x: 0, y: 2, z: 0 });+ expect(samples[0].accelerationIncludingGravity!.x).toBeCloseTo(9.80665); expect(samples[1].gyroscope!.y).toBe(2);+ await m.device.stopMotion(); expect(m.handlers.size + m.gyros.size).toBe(0); m.device.dispose();+ });+ it('cleans up partially started sensors when the second channel fails', async () => {+ const m = mini(); m.host.startGyroscope = options => options.fail?.({ errMsg: 'permission denied' });+ expect((await m.device.startMotion()).status).toBe('denied');+ expect(m.handlers.size + m.gyros.size).toBe(0); expect(m.device.state().motionActive).toBe(false); m.device.dispose();+ });+ it('never reactivates a sensor whose start callback arrives after backgrounding', async () => {+ const m = mini(); let success!: () => void;+ m.host.startAccelerometer = options => { success = options.success!; };+ const pending = m.device.startMotion({ gyroscope: false });+ await vi.waitFor(() => expect(success).toBeTypeOf('function')); m.hide(); success();+ expect((await pending).status).toBe('failed'); expect(m.device.state().motionActive).toBe(false);+ m.device.dispose();+ });+ it('reports a host unsupported response as unavailable', async () => {+ const m = mini(); m.host.vibrateShort = options => options.fail?.({ errMsg: 'vibrateShort:fail not supported on PC' });+ expect((await m.device.vibrate()).status).toBe('unavailable'); m.device.dispose();+ });+ it('a late wake callback cannot overwrite a newer disable request', async () => {+ const m = mini(); let finish!: () => void;+ m.host.setKeepScreenOn = options => { if (options.keepScreenOn) finish = options.success!; else options.success?.(); };+ const pending = m.device.keepScreenOn(true); await m.device.keepScreenOn(false); finish();+ expect((await pending).status).toBe('failed'); expect(m.device.state().screenOn).toBe(false); m.device.dispose();+ });+ it('selects short strength/long vibration and reports missing channels', async () => {+ const m = mini(); expect((await m.device.vibrate({ intensity: 'heavy' })).status).toBe('ok');+ expect(m.succeed).toHaveBeenCalledWith(expect.objectContaining({ type: 'heavy' }));+ expect((await m.device.vibrate({ duration: 'long' })).status).toBe('ok');+ m.host.startGyroscope = undefined; expect((await m.device.startMotion()).status).toBe('unavailable');+ expect((await m.device.fullscreen(true)).status).toBe('unavailable'); m.device.dispose();+ });+});+describe('native device bridge', () => {+ it('polls real host-shaped samples, cancels timers on hide, and restores requested state', async () => {+ vi.useFakeTimers(); let hide = () => {}, show = () => {};+ const poll = vi.fn(() => ({ timestamp: 16, accelerationIncludingGravity: { x: 0, y: 0, z: 9.8 }, gyroscope: null }));+ const stop = vi.fn(), wake = vi.fn(() => true);+ const device = new NativeDevice({ es_deviceCapabilities: () => 31, es_startMotion: () => true,+ es_stopMotion: stop, es_pollMotion: poll, es_vibrate: () => true, es_keepScreenOn: wake },+ { onHide: h => { hide = h; return () => {}; }, onShow: h => { show = h; return () => {}; } });+ expect((await device.startMotion()).status).toBe('ok'); await device.keepScreenOn(true); hide();+ const count = poll.mock.calls.length; await vi.advanceTimersByTimeAsync(200);+ expect(poll).toHaveBeenCalledTimes(count); expect(device.state().screenOn).toBe(false);+ show(); await Promise.resolve(); expect(device.state().motionActive).toBe(true); expect(device.state().screenOn).toBe(true);+ device.dispose(); expect(vi.getTimerCount()).toBe(0); expect(stop).toHaveBeenCalled();+ });+ it('an old host or a desktop without sensors remains explicitly unavailable', async () => {+ const device = new NativeDevice({ es_deviceCapabilities: () => 0 });+ expect((await device.startMotion()).status).toBe('unavailable'); expect((await device.vibrate()).status).toBe('unavailable'); device.dispose();+ });+});diff --git a/sdk/tests/ui-pointer-callback-wasm.test.ts b/sdk/tests/ui-pointer-callback-wasm.test.tsindex f53bb52f9..42b6dd8f4 100644--- a/sdk/tests/ui-pointer-callback-wasm.test.ts+++ b/sdk/tests/ui-pointer-callback-wasm.test.ts@@ -5,6 +5,12 @@ import { App, flushPendingRegistrations } from '../src/app/app';import { AppContext, setDefaultContext } from '../src/ecs/context';import { setEditorMode, setPlayMode } from '../src/ecs/env';import { Input, InputState, inputEventCallbacks } from '../src/input/input';+import { defineInputMap, Axis2D, Virtual } from '../src/input/inputMap';+import { Transform } from '../src/ecs/component';+import { createVirtualControlSystem, VirtualJoystick } from '../src/ui/behavior/virtual-controls';+import { Schedule } from '../src/ecs/system';+import { UINode } from '../src/ui/core/ui-node';+import { SystemLabel } from '../src/ecs/systemLabels';import { UICameraInfo } from '../src/ui/core/ui-camera-info';import { ScreenOverlay } from '../src/ui/core/screen-overlay';import { UILayoutGeneration } from '../src/ui/layout/ui-layout-generation';@@ -21,6 +27,7 @@ const hit = vi.hoisted(() => ({ entity: null as number | null }));vi.mock('../src/ui/util/ui-pick', () => ({screenToUiWorld: (_camera: unknown, x: number, y: number) => ({ x, y }),screenToUiLayout: (_overlay: unknown, x: number, y: number) => ({ x, y }),+ isScreenEntity: () => true,uiPointerRay: () => ({}), uiLayoutRay: () => ({}), uiHitTestWorld: () => hit.entity,}));@@ -44,6 +51,23 @@ describe.skipIf(!HAS_WASM)('pointer callback lifecycle on real WASM', () => {for (const entity of app.world.getAllEntities()) app.world.despawn(entity);app.world.disconnectCpp(); registry.delete();});+ it('evaluates a registered InputMap after virtual controls in the same frame', async () => {+ const map = defineInputMap({ Move: Axis2D(Virtual('move')) });+ flushPendingRegistrations(app);+ const virtual = createVirtualControlSystem(app.world, app.getResource(UIEvents));+ app.addSystemToSchedule(Schedule.PreUpdate, virtual.system, { runAfter: [SystemLabel.UIInteraction] });+ const entity = app.world.spawn(); hit.entity = entity;+ app.world.insert(entity, Transform); app.world.insert(entity, Interactable);+ app.world.insert(entity, UINode);+ app.world.insert(entity, VirtualJoystick);+ const state = app.getResource(Input), callbacks = inputEventCallbacks(state);+ callbacks.onTouchStart!(5, 50, 600); await app.tick(1 / 60);+ expect(state.getVirtual('move').x).toBeCloseTo(1);+ expect(map.axis2d('Move').x).toBeCloseTo(1);+ state.clearFrameState(); callbacks.onTouchCancel!(5); await app.tick(1 / 60);+ expect(map.axis2d('Move')).toEqual({ x: 0, y: 0 });+ virtual.dispose();+ });it('keeps the replacement touch held and projects its current position', async () => {const entity = app.world.spawn(); hit.entity = entity; app.world.insert(entity, Interactable);const input = app.getResource(Input), callbacks = inputEventCallbacks(input);diff --git a/sdk/tests/ui-widget-prefabs.gen.test.ts b/sdk/tests/ui-widget-prefabs.gen.test.tsindex 9ac2326f6..b87277174 100644--- a/sdk/tests/ui-widget-prefabs.gen.test.ts+++ b/sdk/tests/ui-widget-prefabs.gen.test.ts@@ -8,6 +8,8 @@ import type { World } from '../src/ecs/world';import type { PrefabData } from '../src/prefab/types';import { widgetToPrefab } from '../src/ui/widgets/toPrefab';import { createButton } from '../src/ui/widgets/button';+import { createVirtualJoystick, createVirtualButton } from '../src/ui/widgets/virtual-controls';+import { VirtualJoystick, VirtualButton } from '../src/ui/behavior/virtual-controls';import { createToggle } from '../src/ui/widgets/toggle';import { createSlider } from '../src/ui/widgets/slider';import { createProgress } from '../src/ui/widgets/progress';@@ -68,6 +70,23 @@ afterAll(() => {});describe('UI widget prefab codegen', () => {+ it('VirtualJoystick: captures base/handle entity references for scene authoring', () => {+ registerComponent('VirtualJoystick', VirtualJoystick);+ const p = generate('VirtualJoystick', world => createVirtualJoystick({ world }).entity as number);+ const root = entityById(p, p.rootEntityId);+ const control = root.components.find(c => c.type === 'VirtualJoystick')!;+ expect(root.children).toContain(control.data.base);+ expect(root.children).toContain(control.data.handle);+ expect(control.data.inputId).toBe('move');+ const baseIndex = p.entities.findIndex(e => e.prefabEntityId === control.data.base);+ const handleIndex = p.entities.findIndex(e => e.prefabEntityId === control.data.handle);+ expect(baseIndex).toBeLessThan(handleIndex);+ });+ it('VirtualButton: exports a held action with the normal button appearance', () => {+ registerComponent('VirtualButton', VirtualButton);+ const p = generate('VirtualButton', world => createVirtualButton({ world, events: noEvents, text: 'Fire' }).entity as number);+ expect(typesOf(p, p.rootEntityId)).toContain('VirtualButton');+ });it('Button: factory → prefab captures the full clickable tree + label', () => {const prefab = generate('Button', (world) =>// No explicit states/colors: the factory's theme defaults also tag thediff --git a/sdk/tests/virtual-controls.test.ts b/sdk/tests/virtual-controls.test.tsnew file mode 100644index 000000000..ee7bb6f3d--- /dev/null+++ b/sdk/tests/virtual-controls.test.ts@@ -0,0 +1,103 @@+// SPDX-License-Identifier: Apache-2.0+// SPDX-FileCopyrightText: Copyright (c) 2024-present ESEngine Team+import { describe, expect, it } from 'vitest';+import { InputState, inputEventCallbacks } from '../src/input/input';+import { InputMap, Axis2D, Button, Virtual } from '../src/input/inputMap';+import { Transform } from '../src/ecs/component';+import { UIEventQueue } from '../src/ui/core/events';+import { Interactable } from '../src/ui/input/interactable';+import { UINode, UIPointerEvents } from '../src/ui/core/ui-node';+import { createVirtualControlSystem, VirtualJoystick, VirtualButton, VirtualJoystickMode, joystickAxis } from '../src/ui/behavior/virtual-controls';+import type { World } from '../src/ecs/world';+import type { Entity } from '../src/types';+import type { ControlPointer } from '../src/ui/input/control-pointers';++function fixture() {+ const entities = new Map<number, Map<object, unknown>>();+ const removals = new Set<(entity: Entity) => void>();+ const world = {+ valid: (e: number) => entities.has(e), isEntityActive: (e: number) => entities.has(e), isDestructionPending: () => false,+ has: (e: number, c: object) => entities.get(e)?.has(c) ?? false,+ get: (e: number, c: object) => entities.get(e)?.get(c),+ insert: (e: number, c: object, v: unknown) => entities.get(e)?.set(c, v),+ getEntitiesWithComponents: (cs: object[]) => [...entities].filter(([, comps]) => cs.every(c => comps.has(c))).map(([e]) => e),+ getWasmModule: () => null, getCppRegistry: () => null,+ onDespawn: (h: (e: Entity) => void) => { removals.add(h); return () => { removals.delete(h); }; },+ } as unknown as World;+ const add = (id: number, component: typeof VirtualButton | typeof VirtualJoystick, patch: Record<string, unknown> = {}) => {+ entities.set(id, new Map());+ world.insert(id as Entity, Transform, { ...Transform._default });+ world.insert(id as Entity, Interactable, { ...Interactable._default });+ world.insert(id as Entity, UINode, { ...UINode._default });+ world.insert(id as Entity, component, { ...component._default, ...patch });+ };+ const input = new InputState(); const pointers = new Map<number, ControlPointer>();+ const control = createVirtualControlSystem(world, new UIEventQueue());+ const invoke = control.system._fn as unknown as (input: InputState, frame: { pointers: Map<number, ControlPointer> }, time: { delta: number }) => void;+ const tick = () => invoke(input, { pointers }, { delta: 1 / 60 });+ const point = (id: number, entity: number, x: number, y: number, pressed = false) => {+ pointers.set(id, { id, entity: entity as Entity, pressedEntity: pressed ? entity as Entity : null,+ down: true, pressed, layoutX: x, layoutY: y, worldX: x, worldY: y });+ };+ const remove = (id: number) => { for (const h of removals) h(id as Entity); entities.delete(id); };+ return { world, input, pointers, tick, point, add, remove, dispose: control.dispose };+}+describe('virtual control ownership and InputMap', () => {+ it('two fingers move and fire at once; cancelling only the button leaves movement held', () => {+ const f = fixture(); f.add(1, VirtualJoystick); f.add(2, VirtualButton);+ const map = new InputMap({ Move: Axis2D(Virtual('move')), Fire: Button(Virtual('fire')) });+ f.point(11, 1, 50, 0, true); f.point(22, 2, 0, 0, true); f.tick(); map.evaluate(f.input);+ expect(map.axis2d('Move').x).toBe(1); expect(map.down('Fire')).toBe(true);+ f.pointers.delete(22); f.point(11, 1, 50, 0); f.tick(); map.evaluate(f.input);+ expect(map.axis2d('Move').x).toBe(1); expect(map.down('Fire')).toBe(false);+ f.dispose();+ });+ it('removal immediately releases only its source, including two controls sharing one input', () => {+ const f = fixture(); f.add(1, VirtualButton); f.add(2, VirtualButton);+ f.point(1, 1, 0, 0, true); f.point(2, 2, 0, 0, true); f.tick();+ f.remove(1); expect(f.input.getVirtual('fire').x).toBe(1);+ f.remove(2); expect(f.input.getVirtual('fire').x).toBe(0); f.dispose();+ });+ it('disabling while dragged releases and cannot rearm an already-held finger', () => {+ const f = fixture(); f.add(1, VirtualJoystick); f.point(7, 1, 50, 0, true); f.tick();+ f.world.insert(1 as Entity, Interactable, { ...Interactable._default, enabled: false });+ f.point(7, 1, 50, 0); f.tick(); expect(f.input.getVirtual('move')).toEqual({ x: 0, y: 0 });+ f.world.insert(1 as Entity, Interactable, { ...Interactable._default }); f.tick();+ expect(f.input.getVirtual('move')).toEqual({ x: 0, y: 0 }); f.dispose();+ });+ it('a follow joystick starts under its own finger; fixed uses the control centre', () => {+ const f = fixture(); f.add(1, VirtualJoystick, { mode: VirtualJoystickMode.Follow });+ f.point(8, 1, 20, 10, true); f.tick(); expect(f.input.getVirtual('move').x).toBe(0);+ f.point(8, 1, 70, 10); f.tick(); expect(f.input.getVirtual('move').x).toBe(1);+ f.pointers.clear(); f.tick(); expect(f.input.getVirtual('move').x).toBe(0); f.dispose();+ });+ it('a tap completed between frames produces one action edge and then releases', () => {+ const f = fixture(); f.add(1, VirtualButton); f.point(8, 1, 0, 0, true);+ Object.assign(f.pointers.get(8)!, { entity: null, down: false });+ const map = new InputMap({ Fire: Button(Virtual('fire')) }); f.tick(); map.evaluate(f.input);+ expect(map.pressed('Fire')).toBe(true);+ f.pointers.clear(); f.tick(); map.evaluate(f.input); expect(map.released('Fire')).toBe(true); f.dispose();+ });+ it('pointer-events none releases output and changing a binding cannot leave the old axis stuck', () => {+ const f = fixture(); f.add(1, VirtualJoystick); f.point(8, 1, 50, 0, true); f.tick();+ f.world.insert(1 as Entity, VirtualJoystick, { ...VirtualJoystick._default, inputId: 'other' });+ f.point(8, 1, 50, 0); f.tick(); expect(f.input.getVirtual('move').x).toBe(0); expect(f.input.getVirtual('other').x).toBe(1);+ f.world.insert(1 as Entity, UINode, { ...UINode._default, pointerEvents: UIPointerEvents.None });+ f.tick(); expect(f.input.getVirtual('other').x).toBe(0); f.dispose();+ });+ it('source summation is independent of write order, and cleanup preserves manual input', () => {+ const input = new InputState(); const owners = [{}, {}, {}];+ input.setVirtualSource(owners[0], 'move', 1); input.setVirtualSource(owners[1], 'move', 1); input.setVirtualSource(owners[2], 'move', -1);+ expect(input.getVirtual('move').x).toBe(1);+ input.setVirtual('other', 0.5); input.removeVirtualSource(owners[0]); expect(input.getVirtual('other').x).toBe(0.5);+ });+ it('global host cancellation clears controls immediately instead of waiting for another frame', () => {+ const input = new InputState(); input.setVirtualSource({}, 'move', 1); input.setVirtual('other', 1);+ inputEventCallbacks(input).onInputCancel?.(); expect(input.getVirtual('move').x).toBe(0); expect(input.getVirtual('other').x).toBe(1);+ });+ it('radial dead zone preserves direction, clamps the rim, and rejects nonfinite input', () => {+ expect(joystickAxis(2, 2, 50, 0.15)).toEqual({ x: 0, y: 0 });+ const axis = joystickAxis(500, 500, 50, 0.15); expect(Math.hypot(axis.x, axis.y)).toBeCloseTo(1);+ expect(axis.x).toBeCloseTo(axis.y); expect(joystickAxis(NaN, 0, 50, 0.15)).toEqual({ x: 0, y: 0 });+ });+});diff --git a/tools/apiSubsystems.mjs b/tools/apiSubsystems.mjsindex 4c167a297..a0b13be78 100644--- a/tools/apiSubsystems.mjs+++ b/tools/apiSubsystems.mjs@@ -37,6 +37,16 @@ export const INFRASTRUCTURE = {};export const SUBSYSTEMS = [+ {+ id: 'mobile-controls',+ title: 'Mobile controls & device services',+ titleZh: '移动控件与设备能力',+ source: ['device', 'ui'],+ tier: 'experimental',+ why: 'software contracts and exports are verified; physical sensor, haptic and permission acceptance is pending across target devices',+ whyZh: '软件契约与导出已验证;目标真机的传感器、震动和授权验收仍待完成',+ entry: ['Device', 'VirtualJoystick', 'VirtualButton'],+ },{id: 'ecs',title: 'ECS',diff --git a/tools/check-corpus-authoring.mjs b/tools/check-corpus-authoring.mjsindex 5dc24449a..8e5796187 100644--- a/tools/check-corpus-authoring.mjs+++ b/tools/check-corpus-authoring.mjs@@ -85,6 +85,7 @@ const NOT_INSTANCE_FORMATS = {'.html': 'a page hosting the built game','.gitignore': 'version control, not content','.png': 'a texture',+ '.svg': 'editable vector artwork; component instances belong to its consuming scene','.ktx2': 'a compressed texture','.hdr': 'an environment map','.fnt': 'a bitmap font\'s metrics; the page beside it is a texture and what USES it is authored elsewhere',diff --git a/tools/check-gizmo-coverage.mjs b/tools/check-gizmo-coverage.mjsindex fb94ec5f5..902a14b08 100644--- a/tools/check-gizmo-coverage.mjs+++ b/tools/check-gizmo-coverage.mjs@@ -139,6 +139,7 @@ const DISPOSITION = {'BakedLighting.atlasSize': ['not-world', 'the side of a TEXTURE in texels; what it covers in the world is every lightmapped surface at once'],'Canvas.matchWidthOrHeight': ['not-world', 'a 0..1 blend between two fits, not a length'],'UIDropdown.optionHeight': ['not-world', 'a row height inside a laid-out box, resolved by layout rather than placed'],+ 'VirtualJoystick.radius': ['not-world', 'control travel in local UI layout pixels; the authored base and handle draw the control'],'SpriteMask.rangeEndOrder': ['not-world', 'the last draw ORDER a mask reaches, not a distance it reaches over'],'LODGroup.lod1Size': ['not-world', 'a fraction of SCREEN height — a property of the view, not of the entity'],'LODGroup.lod2Size': ['not-world', 'a fraction of SCREEN height — a property of the view, not of the entity'],diff --git a/tools/check-minigame-host.mjs b/tools/check-minigame-host.mjsindex 9ff38d804..04aa3eb84 100644--- a/tools/check-minigame-host.mjs+++ b/tools/check-minigame-host.mjs@@ -13,29 +13,28 @@* a harness gap wearing a product bug's clothes, which is the worst way to find* out. Optional members (`name?()`) may be skipped; required ones may not.*/-import { readFileSync } from 'node:fs';import path from 'node:path';import { fileURLToPath } from 'node:url';import { SHIM_MEMBERS } from './launchers/minigameHost.mjs';+import { ts, createSdkProgram } from './lib/sdkProgram.mjs';const ROOT = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..');const API = 'sdk/src/platform/minigame/api.ts';-const src = readFileSync(path.join(ROOT, API), 'utf8');-const block = /export interface MiniGameGlobal\s*\{([\s\S]*?)\n\}/.exec(src);-if (!block) {+const { program, checker } = createSdkProgram([API.slice('sdk/'.length)]);+const source = program.getSourceFile(path.join(ROOT, API));+const declaration = source?.statements.find(node => ts.isInterfaceDeclaration(node) && node.name.text === 'MiniGameGlobal');+if (!declaration) {console.error(`check-minigame-host: no MiniGameGlobal interface in ${API} — has it moved?`);process.exit(1);}-// One member per declaration line: `name(...)` or `name?(...)`. Comment lines and-// blanks carry no member, so they simply do not match.+// The checker includes inherited members, so moving a capability into a shared+// interface cannot hide a newly required host method from this contract gate.const required = [];const optional = [];-for (const line of block[1].split('\n')) {- const m = /^\s{4}([a-zA-Z_][a-zA-Z0-9_]*)(\?)?\s*[(:]/.exec(line);- if (!m) continue;- (m[2] ? optional : required).push(m[1]);+for (const member of checker.getPropertiesOfType(checker.getTypeAtLocation(declaration))) {+ (member.flags & ts.SymbolFlags.Optional ? optional : required).push(member.name);}if (required.length === 0) {diff --git a/tools/goldenProjects.mjs b/tools/goldenProjects.mjsindex a4e18971d..cb81575aa 100644--- a/tools/goldenProjects.mjs+++ b/tools/goldenProjects.mjs@@ -66,6 +66,7 @@ export const NOT_EVIDENCE_FORMATS = {'.mjs': 'the project\'s own tooling — engine-gaps ledgers and helpers','.gitignore': 'version control, not content','.png': 'a texture; what USES it is authored elsewhere',+ '.svg': 'editable vector artwork; what uses it is authored elsewhere','.ktx2': 'a compressed texture; same','.hdr': 'an environment map; the .esenv referencing it is the claim','.gltf': 'an imported model; the .esmesh and prefab it produced are the claim',@@ -593,7 +594,7 @@ export const EVIDENCE = {'sprite-mask': /\bSpriteMask\b/,// The composite controls, as opposed to the boxes they are laid out in: a// scene that carries one has taken the editor's Create → UI path.- 'ui-widgets': /\b(UIToggle|UISlider|UIDropdown|UIDialog|UIScroll)\b/,+ 'ui-widgets': /\b(UIToggle|UISlider|UIDropdown|UIDialog|UIScroll|VirtualJoystick|VirtualButton)\b/,// Motion with no physics body behind it. `\b` keeps `linearVelocity` out —// a body's own speed is physics, and this is the component that moves a// transform without one.@@ -714,6 +715,18 @@ export const KNOWN_GAPS = {};* it was aimed at: when one moves, the check fails loudly and names both frames.*/export const GOLDEN = [+ {+ id: 'mobile-controls',+ certifies: ['input', 'ui-layout', 'ui-widgets', 'text'],+ targets: ['web', 'wechat', 'douyin'],+ tier: 'pr',+ interact: { keys: ['KeyD'], frames: 50 },+ // Held off-centre from its initial press: a fixed stick drives the player.+ interactByTarget: {+ wechat: { touches: [{ from: 4, to: 45, x: 0.14, y: 0.84 }], frames: 50 },+ douyin: { touches: [{ from: 4, to: 45, x: 0.14, y: 0.84 }], frames: 50 },+ },+ },{id: 'platformer',certifies: ['physics', 'input'],diff --git a/tools/lib/apiEvidence.mjs b/tools/lib/apiEvidence.mjsindex 266f85920..e899325d1 100644--- a/tools/lib/apiEvidence.mjs+++ b/tools/lib/apiEvidence.mjs@@ -125,7 +125,6 @@ const AUTHORED_INSTEAD = (what) => `${what} — the corpus writes it in scenes,const RECEIVED = 'received from a declared parameter, never imported — golden projects run it, no import list names it';const HANDED_BACK = 'answered by a frozen factory, never imported — a game names the factory, not this';export const BLIND = {- InputMap: HANDED_BACK,// Same blindness, from the other direction: the map's rebind scan builds one// when a player binds a mouse button, so a certified game runs it without any// import list ever naming it.diff --git a/tools/releaseNotes.mjs b/tools/releaseNotes.mjsindex f55f629fc..e882673fc 100644--- a/tools/releaseNotes.mjs+++ b/tools/releaseNotes.mjs@@ -36,6 +36,10 @@ export const NOTED = {{ note: 'Runtime tree inspection indexes script component names once per snapshot.' },'perf(inspector): reuse hierarchy links for selected runtime details':{ note: 'Selected runtime details reuse maintained hierarchy links.' },+ 'feat(input): add mobile controls and device services':+ { note: 'Mobile controls share InputMap and device capability results.' },+ 'feat(editor): author and verify mobile controls in Play':+ { note: 'Mobile controls share InputMap and device capability results.' },'fix(inspector): clear destroyed runtime entity selections':{ note: 'Runtime inspectors clear destroyed entity selections.' },'perf(inspector): reuse membership and readers for snapshot visibility':