ecspresso 0.14.5 → 0.14.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (72) hide show
  1. package/dist/index.js +2 -2
  2. package/dist/index.js.map +3 -3
  3. package/dist/plugins/ai/behavior-tree.js +2 -2
  4. package/dist/plugins/ai/behavior-tree.js.map +2 -2
  5. package/dist/plugins/ai/detection.js +2 -2
  6. package/dist/plugins/ai/detection.js.map +2 -2
  7. package/dist/plugins/ai/flocking.js +2 -2
  8. package/dist/plugins/ai/flocking.js.map +2 -2
  9. package/dist/plugins/ai/pathfinding.js +2 -2
  10. package/dist/plugins/ai/pathfinding.js.map +2 -2
  11. package/dist/plugins/audio/audio.js +2 -2
  12. package/dist/plugins/audio/audio.js.map +2 -2
  13. package/dist/plugins/combat/health.js +2 -2
  14. package/dist/plugins/combat/health.js.map +2 -2
  15. package/dist/plugins/combat/projectile.js +2 -2
  16. package/dist/plugins/combat/projectile.js.map +2 -2
  17. package/dist/plugins/debug/diagnostics.js +3 -3
  18. package/dist/plugins/debug/diagnostics.js.map +2 -2
  19. package/dist/plugins/input/input.js +2 -2
  20. package/dist/plugins/input/input.js.map +2 -2
  21. package/dist/plugins/input/selection.js +2 -2
  22. package/dist/plugins/input/selection.js.map +3 -3
  23. package/dist/plugins/isometric/depth-sort.js +2 -2
  24. package/dist/plugins/isometric/depth-sort.js.map +2 -2
  25. package/dist/plugins/isometric/projection.js +2 -2
  26. package/dist/plugins/isometric/projection.js.map +2 -2
  27. package/dist/plugins/physics/collision.js +2 -2
  28. package/dist/plugins/physics/collision.js.map +2 -2
  29. package/dist/plugins/physics/collision3D.js +2 -2
  30. package/dist/plugins/physics/collision3D.js.map +2 -2
  31. package/dist/plugins/physics/physics2D.js +2 -2
  32. package/dist/plugins/physics/physics2D.js.map +2 -2
  33. package/dist/plugins/physics/physics3D.js +2 -2
  34. package/dist/plugins/physics/physics3D.js.map +2 -2
  35. package/dist/plugins/physics/steering.js +2 -2
  36. package/dist/plugins/physics/steering.js.map +2 -2
  37. package/dist/plugins/rendering/particles.js +2 -2
  38. package/dist/plugins/rendering/particles.js.map +2 -2
  39. package/dist/plugins/rendering/renderer2D.js +2 -2
  40. package/dist/plugins/rendering/renderer2D.js.map +2 -2
  41. package/dist/plugins/rendering/renderer3D.js +2 -4105
  42. package/dist/plugins/rendering/renderer3D.js.map +3 -5
  43. package/dist/plugins/rendering/sprite-animation.js +2 -2
  44. package/dist/plugins/rendering/sprite-animation.js.map +2 -2
  45. package/dist/plugins/rendering/tilemap.js +2 -2
  46. package/dist/plugins/rendering/tilemap.js.map +2 -2
  47. package/dist/plugins/scripting/coroutine.js +2 -2
  48. package/dist/plugins/scripting/coroutine.js.map +2 -2
  49. package/dist/plugins/scripting/state-machine.js +2 -2
  50. package/dist/plugins/scripting/state-machine.js.map +2 -2
  51. package/dist/plugins/scripting/timers.js +2 -2
  52. package/dist/plugins/scripting/timers.js.map +2 -2
  53. package/dist/plugins/scripting/tween.js +2 -2
  54. package/dist/plugins/scripting/tween.js.map +2 -2
  55. package/dist/plugins/spatial/bounds.js +2 -2
  56. package/dist/plugins/spatial/bounds.js.map +2 -2
  57. package/dist/plugins/spatial/camera.js +2 -2
  58. package/dist/plugins/spatial/camera.js.map +3 -3
  59. package/dist/plugins/spatial/camera3D.js +2 -2
  60. package/dist/plugins/spatial/camera3D.js.map +3 -3
  61. package/dist/plugins/spatial/spatial-index.js +2 -2
  62. package/dist/plugins/spatial/spatial-index.js.map +2 -2
  63. package/dist/plugins/spatial/spatial-index3D.js +2 -2
  64. package/dist/plugins/spatial/spatial-index3D.js.map +2 -2
  65. package/dist/plugins/spatial/transform.js +2 -2
  66. package/dist/plugins/spatial/transform.js.map +2 -2
  67. package/dist/plugins/spatial/transform3D.js +2 -2
  68. package/dist/plugins/spatial/transform3D.js.map +2 -2
  69. package/dist/plugins/ui/ui.d.ts +40 -8
  70. package/dist/plugins/ui/ui.js +2 -2
  71. package/dist/plugins/ui/ui.js.map +3 -3
  72. package/package.json +1 -1
@@ -3,9 +3,9 @@
3
3
  "sources": ["../src/plugins/spatial/transform.ts", "../src/plugins/ui/ui.ts"],
4
4
  "sourcesContent": [
5
5
  "/**\n * Transform Plugin for ECSpresso\n *\n * Provides hierarchical transform propagation following Bevy's Transform/GlobalTransform pattern.\n * LocalTransform is modified by user code; WorldTransform is computed automatically.\n *\n * @see https://docs.rs/bevy/latest/bevy/transform/components/struct.GlobalTransform.html\n */\n\nimport { definePlugin, type BasePluginOptions } from 'ecspresso';\nimport type ECSpresso from 'ecspresso';\nimport type { WorldConfigFrom } from '../../type-utils';\n\n// ==================== Component Types ====================\n\n/**\n * Local transform relative to parent (or world if no parent).\n * This is the transform you modify directly.\n */\nexport interface LocalTransform {\n\tx: number;\n\ty: number;\n\trotation: number;\n\tscaleX: number;\n\tscaleY: number;\n}\n\n/**\n * Computed world transform (accumulated from parent chain).\n * Read-only - managed by the transform propagation system.\n */\nexport interface WorldTransform {\n\tx: number;\n\ty: number;\n\trotation: number;\n\tscaleX: number;\n\tscaleY: number;\n}\n\n/**\n * Component types provided by the transform plugin.\n * Included automatically via `.withPlugin(createTransformPlugin())`.\n *\n * @example\n * ```typescript\n * const ecs = ECSpresso.create()\n * .withPlugin(createTransformPlugin())\n * .withComponentTypes<{ sprite: Sprite; velocity: { x: number; y: number } }>()\n * .build();\n * ```\n */\nexport interface TransformComponentTypes {\n\tlocalTransform: LocalTransform;\n\tworldTransform: WorldTransform;\n}\n\n/**\n * WorldConfig representing the transform plugin's provided components.\n * Used as the `Requires` type parameter by plugins that depend on transform.\n */\nexport type TransformWorldConfig = WorldConfigFrom<TransformComponentTypes>;\n\n// ==================== Plugin Options ====================\n\n/**\n * Configuration options for the transform plugin.\n */\nexport interface TransformPluginOptions<G extends string = 'transform'> extends BasePluginOptions<G> {}\n\n// ==================== Default Values ====================\n\n/**\n * Default local transform values.\n */\nexport const DEFAULT_LOCAL_TRANSFORM: Readonly<LocalTransform> = {\n\tx: 0,\n\ty: 0,\n\trotation: 0,\n\tscaleX: 1,\n\tscaleY: 1,\n};\n\n/**\n * Default world transform values.\n */\nexport const DEFAULT_WORLD_TRANSFORM: Readonly<WorldTransform> = {\n\tx: 0,\n\ty: 0,\n\trotation: 0,\n\tscaleX: 1,\n\tscaleY: 1,\n};\n\n// ==================== Helper Functions ====================\n\n/**\n * Create a local transform component with position only.\n * Uses default rotation (0) and scale (1, 1).\n *\n * @param x The x coordinate\n * @param y The y coordinate\n * @returns Component object suitable for spreading into spawn()\n *\n * @example\n * ```typescript\n * ecs.spawn({\n * ...createLocalTransform(100, 200),\n * sprite,\n * });\n * ```\n */\nexport function createLocalTransform(x: number, y: number): Pick<TransformComponentTypes, 'localTransform'> {\n\treturn {\n\t\tlocalTransform: {\n\t\t\tx,\n\t\t\ty,\n\t\t\trotation: 0,\n\t\t\tscaleX: 1,\n\t\t\tscaleY: 1,\n\t\t},\n\t};\n}\n\n/**\n * Create a world transform component with position only.\n * Typically used alongside createLocalTransform for initial state.\n *\n * @param x The x coordinate\n * @param y The y coordinate\n * @returns Component object suitable for spreading into spawn()\n */\nexport function createWorldTransform(x: number, y: number): Pick<TransformComponentTypes, 'worldTransform'> {\n\treturn {\n\t\tworldTransform: {\n\t\t\tx,\n\t\t\ty,\n\t\t\trotation: 0,\n\t\t\tscaleX: 1,\n\t\t\tscaleY: 1,\n\t\t},\n\t};\n}\n\n/**\n * Options for creating a full transform.\n */\nexport interface TransformOptions {\n\trotation?: number;\n\tscaleX?: number;\n\tscaleY?: number;\n\t/** Uniform scale (overrides scaleX/scaleY if provided) */\n\tscale?: number;\n}\n\n/**\n * Create both local and world transform components.\n * World transform is initialized to match local transform.\n *\n * @param x The x coordinate\n * @param y The y coordinate\n * @param options Optional rotation and scale\n * @returns Component object suitable for spreading into spawn()\n *\n * @example\n * ```typescript\n * ecs.spawn({\n * ...createTransform(100, 200),\n * sprite,\n * });\n *\n * // With rotation and scale\n * ecs.spawn({\n * ...createTransform(100, 200, { rotation: Math.PI / 4, scale: 2 }),\n * sprite,\n * });\n * ```\n */\nexport function createTransform(\n\tx: number,\n\ty: number,\n\toptions?: TransformOptions\n): TransformComponentTypes {\n\tconst scaleX = options?.scale ?? options?.scaleX ?? 1;\n\tconst scaleY = options?.scale ?? options?.scaleY ?? 1;\n\tconst rotation = options?.rotation ?? 0;\n\n\tconst transform = {\n\t\tx,\n\t\ty,\n\t\trotation,\n\t\tscaleX,\n\t\tscaleY,\n\t};\n\n\treturn {\n\t\tlocalTransform: { ...transform },\n\t\tworldTransform: { ...transform },\n\t};\n}\n\n// ==================== Plugin Factory ====================\n\n/**\n * Create a transform plugin for ECSpresso.\n *\n * This plugin provides:\n * - Transform propagation system that computes world transforms from local transforms\n * - Parent-first traversal ensures parents are processed before children\n * - Supports full transform hierarchy (position, rotation, scale)\n *\n * @example\n * ```typescript\n * const ecs = ECSpresso\n * .create<Components, Events, Resources>()\n * .withPlugin(createTransformPlugin())\n * .withPlugin(createPhysics2DPlugin())\n * .build();\n *\n * // Spawn entity with transform\n * ecs.spawn({\n * ...createTransform(100, 200),\n * velocity: { x: 50, y: 0 },\n * });\n * ```\n */\nexport function createTransformPlugin<G extends string = 'transform'>(\n\toptions?: TransformPluginOptions<G>\n) {\n\tconst {\n\t\tsystemGroup = 'transform',\n\t\tpriority = 500,\n\t\tphase = 'postUpdate',\n\t} = options ?? {};\n\n\treturn definePlugin('transform')\n\t\t.withComponentTypes<TransformComponentTypes>()\n\t\t.withLabels<'transform-propagation'>()\n\t\t.withGroups<G>()\n\t\t.install((world) => {\n\t\t\t// localTransform requires worldTransform — initialize from localTransform values\n\t\t\tworld.registerRequired('localTransform', 'worldTransform', (lt) => ({\n\t\t\t\tx: lt.x, y: lt.y, rotation: lt.rotation, scaleX: lt.scaleX, scaleY: lt.scaleY,\n\t\t\t}));\n\n\t\t\tconst orphanBuffer: Array<import('../../types').FilteredEntity<TransformComponentTypes, 'localTransform' | 'worldTransform'>> = [];\n\t\t\tconst hierarchyVisited = new Set<number>();\n\n\t\t\tworld\n\t\t\t\t.addSystem('transform-propagation')\n\t\t\t\t.setPriority(priority)\n\t\t\t\t.inPhase(phase)\n\t\t\t\t.inGroup(systemGroup)\n\t\t\t\t.setProcess(({ ecs }) => {\n\t\t\t\t\tpropagateTransforms(ecs, orphanBuffer, hierarchyVisited);\n\t\t\t\t});\n\t\t});\n}\n\n/**\n * Propagate transforms through the hierarchy.\n * Parent-first traversal ensures parents are computed before children.\n *\n * Runs unconditionally for all entities with transforms — user code can\n * freely mutate localTransform without needing to call markChanged.\n * Only marks worldTransform as changed when values actually differ,\n * so downstream systems (e.g. renderer sync) can skip static entities.\n */\nfunction propagateTransforms(\n\tecs: ECSpresso<WorldConfigFrom<TransformComponentTypes>>,\n\torphanBuffer: Array<import('../../types').FilteredEntity<TransformComponentTypes, 'localTransform' | 'worldTransform'>>,\n\thierarchyVisited: Set<number>,\n): void {\n\tconst em = ecs.entityManager;\n\n\t// Fast path: no hierarchy relationships exist — all entities are flat\n\tif (!em.hasHierarchy) {\n\t\tem.getEntitiesWithQueryInto(orphanBuffer, ['localTransform', 'worldTransform']);\n\t\tfor (const entity of orphanBuffer) {\n\t\t\tconst { localTransform, worldTransform } = entity.components;\n\t\t\tif (copyTransform(localTransform, worldTransform)) {\n\t\t\t\tecs.markChanged(entity.id, 'worldTransform');\n\t\t\t}\n\t\t}\n\t\treturn;\n\t}\n\n\t// Hierarchy exists — use parent-first traversal then process remaining orphans\n\thierarchyVisited.clear();\n\n\tecs.forEachInHierarchy((entityId, parentId) => {\n\t\thierarchyVisited.add(entityId);\n\t\tconst localTransform = em.getComponent(entityId, 'localTransform');\n\t\tconst worldTransform = em.getComponent(entityId, 'worldTransform');\n\n\t\tif (!localTransform || !worldTransform) return;\n\n\t\tconst parentWorld = parentId !== null\n\t\t\t? em.getComponent(parentId, 'worldTransform')\n\t\t\t: null;\n\n\t\tconst changed = parentWorld\n\t\t\t? combineTransforms(parentWorld, localTransform, worldTransform)\n\t\t\t: copyTransform(localTransform, worldTransform);\n\n\t\tif (changed) ecs.markChanged(entityId, 'worldTransform');\n\t});\n\n\tem.getEntitiesWithQueryInto(orphanBuffer, ['localTransform', 'worldTransform']);\n\tfor (const entity of orphanBuffer) {\n\t\tif (hierarchyVisited.has(entity.id)) continue;\n\t\tconst { localTransform, worldTransform } = entity.components;\n\t\tif (copyTransform(localTransform, worldTransform)) {\n\t\t\tecs.markChanged(entity.id, 'worldTransform');\n\t\t}\n\t}\n}\n\n/**\n * Copy transform values from source to destination.\n * Returns true if the destination was actually modified.\n */\nfunction copyTransform(src: LocalTransform, dest: WorldTransform): boolean {\n\tif (dest.x === src.x && dest.y === src.y &&\n\t\tdest.rotation === src.rotation &&\n\t\tdest.scaleX === src.scaleX && dest.scaleY === src.scaleY) {\n\t\treturn false;\n\t}\n\tdest.x = src.x;\n\tdest.y = src.y;\n\tdest.rotation = src.rotation;\n\tdest.scaleX = src.scaleX;\n\tdest.scaleY = src.scaleY;\n\treturn true;\n}\n\n/**\n * Combine parent world transform with child local transform into child world transform.\n * Returns true if the destination was actually modified.\n */\nfunction combineTransforms(\n\tparent: WorldTransform,\n\tlocal: LocalTransform,\n\tworld: WorldTransform\n): boolean {\n\t// Apply parent's scale to local position\n\tconst scaledLocalX = local.x * parent.scaleX;\n\tconst scaledLocalY = local.y * parent.scaleY;\n\n\t// Rotate local position by parent's rotation\n\tconst cos = Math.cos(parent.rotation);\n\tconst sin = Math.sin(parent.rotation);\n\tconst rotatedX = scaledLocalX * cos - scaledLocalY * sin;\n\tconst rotatedY = scaledLocalX * sin + scaledLocalY * cos;\n\n\t// Add to parent's position\n\tconst newX = parent.x + rotatedX;\n\tconst newY = parent.y + rotatedY;\n\tconst newRotation = parent.rotation + local.rotation;\n\tconst newScaleX = parent.scaleX * local.scaleX;\n\tconst newScaleY = parent.scaleY * local.scaleY;\n\n\tif (world.x === newX && world.y === newY &&\n\t\tworld.rotation === newRotation &&\n\t\tworld.scaleX === newScaleX && world.scaleY === newScaleY) {\n\t\treturn false;\n\t}\n\n\tworld.x = newX;\n\tworld.y = newY;\n\tworld.rotation = newRotation;\n\tworld.scaleX = newScaleX;\n\tworld.scaleY = newScaleY;\n\treturn true;\n}\n",
6
- "/**\n * UI / HUD Plugin for ECSpresso — Phase 1.\n *\n * Provides non-interactive screen-space primitives:\n * - `uiElement` — anchor/pivot/offset positioning resolved against the `bounds` resource\n * - `uiLabel` — PixiJS Text\n * - `uiPanel` — PixiJS Graphics rectangle with optional border\n * - `uiProgressBar` — PixiJS Graphics value indicator with four fill directions\n *\n * Depends on `renderer2D` (for the `bounds` resource + scene graph + screen-space layer)\n * and the transform plugin (bundled by renderer2D).\n *\n * Future phases will add button interaction (Phase 2) and message log (Phase 3).\n */\n\nimport type { Container, Graphics, Text } from 'pixi.js';\nimport { definePlugin, type BasePluginOptions } from 'ecspresso';\nimport type { WorldConfigFrom } from '../../type-utils';\nimport type { Vector2D } from '../../utils/math';\nimport {\n\tDEFAULT_LOCAL_TRANSFORM,\n\ttype LocalTransform,\n\ttype TransformComponentTypes,\n\ttype WorldTransform,\n} from '../spatial/transform';\nimport type { BoundsResourceTypes } from '../spatial/bounds';\n\n// ==================== Anchor Presets ====================\n\nexport type AnchorPreset =\n\t| 'top-left' | 'top-center' | 'top-right'\n\t| 'center-left' | 'center' | 'center-right'\n\t| 'bottom-left' | 'bottom-center' | 'bottom-right';\n\nexport const ANCHOR_PRESETS: Readonly<Record<AnchorPreset, Readonly<Vector2D>>> = Object.freeze({\n\t'top-left': Object.freeze({ x: 0, y: 0 }),\n\t'top-center': Object.freeze({ x: 0.5, y: 0 }),\n\t'top-right': Object.freeze({ x: 1, y: 0 }),\n\t'center-left': Object.freeze({ x: 0, y: 0.5 }),\n\t'center': Object.freeze({ x: 0.5, y: 0.5 }),\n\t'center-right': Object.freeze({ x: 1, y: 0.5 }),\n\t'bottom-left': Object.freeze({ x: 0, y: 1 }),\n\t'bottom-center': Object.freeze({ x: 0.5, y: 1 }),\n\t'bottom-right': Object.freeze({ x: 1, y: 1 }),\n});\n\nexport type AnchorInput = AnchorPreset | Vector2D;\n\n/** Resolve a preset string or vec2 into a mutable Vector2D copy. */\nexport function resolveAnchorPreset(input: AnchorInput): Vector2D {\n\tif (typeof input === 'string') {\n\t\tconst preset = ANCHOR_PRESETS[input];\n\t\treturn { x: preset.x, y: preset.y };\n\t}\n\treturn { x: input.x, y: input.y };\n}\n\n/**\n * Write the top-left screen position of a widget into `out`.\n *\n * Formula: position = anchor * bounds + offset - pivot * size.\n * `anchor` specifies where on the canvas the widget attaches (0..1 normalized).\n * `pivot` specifies where on the widget that attachment point lands (0..1 normalized).\n * Writes in place to avoid per-frame allocation.\n */\nexport function resolveAnchorPosition(\n\tanchor: Readonly<Vector2D>,\n\tpivot: Readonly<Vector2D>,\n\toffset: Readonly<Vector2D>,\n\tbounds: Readonly<{ width: number; height: number }>,\n\tsize: Readonly<{ width: number; height: number }>,\n\tout: Vector2D,\n): void {\n\tout.x = anchor.x * bounds.width + offset.x - pivot.x * size.width;\n\tout.y = anchor.y * bounds.height + offset.y - pivot.y * size.height;\n}\n\n// ==================== Progress Bar Math ====================\n\nexport type ProgressDirection = 'ltr' | 'rtl' | 'ttb' | 'btt';\n\nexport interface FillRect {\n\tx: number;\n\ty: number;\n\twidth: number;\n\theight: number;\n}\n\nexport function clampProgressValue(value: number, max: number): number {\n\tif (max <= 0) return 0;\n\tif (value <= 0) return 0;\n\tif (value >= max) return max;\n\treturn value;\n}\n\ntype FillComputer = (w: number, h: number, ratio: number, out: FillRect) => void;\n\nconst FILL_COMPUTERS: Readonly<Record<ProgressDirection, FillComputer>> = {\n\tltr: (w, h, r, o) => { o.x = 0; o.y = 0; o.width = w * r; o.height = h; },\n\trtl: (w, h, r, o) => { o.x = w * (1 - r); o.y = 0; o.width = w * r; o.height = h; },\n\tttb: (w, h, r, o) => { o.x = 0; o.y = 0; o.width = w; o.height = h * r; },\n\tbtt: (w, h, r, o) => { o.x = 0; o.y = h * (1 - r); o.width = w; o.height = h * r; },\n};\n\nexport function computeProgressFillRect(\n\twidth: number,\n\theight: number,\n\tratio: number,\n\tdirection: ProgressDirection,\n\tout: FillRect,\n): void {\n\tFILL_COMPUTERS[direction](width, height, ratio, out);\n}\n\n// ==================== Component Types ====================\n\nexport interface UIElement {\n\tanchor: Vector2D;\n\tpivot: Vector2D;\n\toffset: Vector2D;\n\twidth: number;\n\theight: number;\n}\n\nexport interface UITextStyle {\n\tfontFamily: string;\n\tfontSize: number;\n\tfill: number;\n\talign: 'left' | 'center' | 'right';\n}\n\nexport interface UILabel {\n\ttext: string;\n\tstyle: UITextStyle;\n}\n\nexport interface UIPanel {\n\tfillColor: number;\n\tborderColor?: number;\n\tborderWidth: number;\n}\n\nexport interface UIProgressBar {\n\tvalue: number;\n\tmax: number;\n\tfillColor: number;\n\tbgColor: number;\n\tdirection: ProgressDirection;\n}\n\nexport interface UIComponentTypes {\n\tuiElement: UIElement;\n\tuiLabel: UILabel;\n\tuiPanel: UIPanel;\n\tuiProgressBar: UIProgressBar;\n}\n\n// ==================== Component Factories ====================\n\nconst DEFAULT_TEXT_STYLE: Readonly<UITextStyle> = Object.freeze({\n\tfontFamily: 'sans-serif',\n\tfontSize: 16,\n\tfill: 0xffffff,\n\talign: 'left',\n});\n\nexport interface CreateUIElementInput {\n\tanchor: AnchorInput;\n\tpivot?: AnchorInput;\n\toffset?: Vector2D;\n\twidth: number;\n\theight: number;\n}\n\nexport function createUIElement(input: CreateUIElementInput): Pick<UIComponentTypes, 'uiElement'> {\n\tconst anchor = resolveAnchorPreset(input.anchor);\n\tconst pivot = input.pivot === undefined ? { x: anchor.x, y: anchor.y } : resolveAnchorPreset(input.pivot);\n\tconst offset = input.offset === undefined ? { x: 0, y: 0 } : { x: input.offset.x, y: input.offset.y };\n\treturn {\n\t\tuiElement: {\n\t\t\tanchor,\n\t\t\tpivot,\n\t\t\toffset,\n\t\t\twidth: input.width,\n\t\t\theight: input.height,\n\t\t},\n\t};\n}\n\nexport function createUILabel(\n\ttext: string,\n\tstyle?: Partial<UITextStyle>,\n): Pick<UIComponentTypes, 'uiLabel'> {\n\treturn {\n\t\tuiLabel: {\n\t\t\ttext,\n\t\t\tstyle: { ...DEFAULT_TEXT_STYLE, ...style },\n\t\t},\n\t};\n}\n\nexport interface CreateUIPanelInput {\n\tfillColor: number;\n\tborderColor?: number;\n\tborderWidth?: number;\n}\n\nexport function createUIPanel(input: CreateUIPanelInput): Pick<UIComponentTypes, 'uiPanel'> {\n\treturn {\n\t\tuiPanel: {\n\t\t\tfillColor: input.fillColor,\n\t\t\tborderColor: input.borderColor,\n\t\t\tborderWidth: input.borderWidth ?? 0,\n\t\t},\n\t};\n}\n\nexport interface CreateUIProgressBarInput {\n\tvalue: number;\n\tmax: number;\n\tfillColor: number;\n\tbgColor: number;\n\tdirection?: ProgressDirection;\n}\n\nexport function createUIProgressBar(input: CreateUIProgressBarInput): Pick<UIComponentTypes, 'uiProgressBar'> {\n\treturn {\n\t\tuiProgressBar: {\n\t\t\tvalue: input.value,\n\t\t\tmax: input.max,\n\t\t\tfillColor: input.fillColor,\n\t\t\tbgColor: input.bgColor,\n\t\t\tdirection: input.direction ?? 'ltr',\n\t\t},\n\t};\n}\n\n// ==================== Runtime Data (Side Storage) ====================\n\ninterface UILabelRuntime {\n\tpixiText: Text;\n\tlastText: string;\n\tlastFontSize: number;\n\tlastFill: number;\n\tlastAlign: string;\n\tlastFontFamily: string;\n}\n\ninterface UIPanelRuntime {\n\tpixiGraphics: Graphics;\n\tlastFillColor: number;\n\tlastBorderColor: number | undefined;\n\tlastBorderWidth: number;\n\tlastWidth: number;\n\tlastHeight: number;\n}\n\ninterface UIProgressRuntime {\n\tpixiGraphics: Graphics;\n\tlastValue: number;\n\tlastMax: number;\n\tlastFillColor: number;\n\tlastBgColor: number;\n\tlastDirection: ProgressDirection;\n\tlastWidth: number;\n\tlastHeight: number;\n}\n\n// ==================== Plugin Factory ====================\n\ntype UIRequires = WorldConfigFrom<TransformComponentTypes, {}, BoundsResourceTypes>;\n\ntype UILabels =\n\t| 'ui-anchor-resolve'\n\t| 'ui-label-sync'\n\t| 'ui-panel-sync'\n\t| 'ui-progress-sync';\n\nexport interface UIPluginOptions<G extends string = 'ui'> extends BasePluginOptions<G> {\n\t/** Priority for the anchor-resolve system in preUpdate (default: 0). */\n\tanchorPriority?: number;\n\t/** Priority for render-sync systems (default: 480, just before renderer2D's 500). */\n\trenderSyncPriority?: number;\n}\n\nexport function createUIPlugin<G extends string = 'ui'>(\n\toptions?: UIPluginOptions<G>,\n) {\n\tconst {\n\t\tsystemGroup = 'ui' as G,\n\t\tanchorPriority = 0,\n\t\trenderSyncPriority = 480,\n\t} = options ?? {};\n\n\tconst labelPool = new Map<number, UILabelRuntime>();\n\tconst panelPool = new Map<number, UIPanelRuntime>();\n\tconst progressPool = new Map<number, UIProgressRuntime>();\n\tconst scratchPos: Vector2D = { x: 0, y: 0 };\n\tconst scratchFill: FillRect = { x: 0, y: 0, width: 0, height: 0 };\n\n\treturn definePlugin('ui')\n\t\t.withComponentTypes<UIComponentTypes>()\n\t\t.withLabels<UILabels>()\n\t\t.withGroups<G>()\n\t\t.withReactiveQueryNames<'ui-labels' | 'ui-panels' | 'ui-progress-bars'>()\n\t\t.requires<UIRequires>()\n\t\t.install((world) => {\n\t\t\tworld.registerRequired('uiElement', 'localTransform', (): LocalTransform => ({\n\t\t\t\tx: DEFAULT_LOCAL_TRANSFORM.x,\n\t\t\t\ty: DEFAULT_LOCAL_TRANSFORM.y,\n\t\t\t\trotation: DEFAULT_LOCAL_TRANSFORM.rotation,\n\t\t\t\tscaleX: DEFAULT_LOCAL_TRANSFORM.scaleX,\n\t\t\t\tscaleY: DEFAULT_LOCAL_TRANSFORM.scaleY,\n\t\t\t}));\n\n\t\t\t// Anchor resolve: writes localTransform.{x,y} from uiElement + bounds.\n\t\t\tworld\n\t\t\t\t.addSystem('ui-anchor-resolve')\n\t\t\t\t.setPriority(anchorPriority)\n\t\t\t\t.inPhase('preUpdate')\n\t\t\t\t.inGroup(systemGroup)\n\t\t\t\t.addQuery('uiElements', {\n\t\t\t\t\twith: ['uiElement', 'localTransform'],\n\t\t\t\t})\n\t\t\t\t.setProcess(({ queries, ecs }) => {\n\t\t\t\t\tconst bounds = ecs.getResource('bounds');\n\t\t\t\t\tfor (const entity of queries.uiElements) {\n\t\t\t\t\t\tconst { uiElement, localTransform } = entity.components;\n\t\t\t\t\t\tresolveAnchorPosition(\n\t\t\t\t\t\t\tuiElement.anchor,\n\t\t\t\t\t\t\tuiElement.pivot,\n\t\t\t\t\t\t\tuiElement.offset,\n\t\t\t\t\t\t\tbounds,\n\t\t\t\t\t\t\tuiElement,\n\t\t\t\t\t\t\tscratchPos,\n\t\t\t\t\t\t);\n\t\t\t\t\t\tif (localTransform.x !== scratchPos.x || localTransform.y !== scratchPos.y) {\n\t\t\t\t\t\t\tlocalTransform.x = scratchPos.x;\n\t\t\t\t\t\t\tlocalTransform.y = scratchPos.y;\n\t\t\t\t\t\t\tecs.markChanged(entity.id, 'localTransform');\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t// Label sync: lazy-initialize PixiJS Text on entity enter, then sync style/text.\n\t\t\tworld\n\t\t\t\t.addSystem('ui-label-sync')\n\t\t\t\t.setPriority(renderSyncPriority)\n\t\t\t\t.inPhase('render')\n\t\t\t\t.inGroup(systemGroup)\n\t\t\t\t.setOnInitialize(async (ecs) => {\n\t\t\t\t\tconst pixi = await import('pixi.js');\n\t\t\t\t\tconst rootContainer = ecs.tryGetResource<Container>('rootContainer');\n\t\t\t\t\tecs.addReactiveQuery('ui-labels', {\n\t\t\t\t\t\twith: ['uiLabel'],\n\t\t\t\t\t\tonEnter: (entity) => {\n\t\t\t\t\t\t\tconst label = entity.components.uiLabel;\n\t\t\t\t\t\t\tconst text = new pixi.Text({\n\t\t\t\t\t\t\t\ttext: label.text,\n\t\t\t\t\t\t\t\tstyle: {\n\t\t\t\t\t\t\t\t\tfontFamily: label.style.fontFamily,\n\t\t\t\t\t\t\t\t\tfontSize: label.style.fontSize,\n\t\t\t\t\t\t\t\t\tfill: label.style.fill,\n\t\t\t\t\t\t\t\t\talign: label.style.align,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\tlabelPool.set(entity.id, {\n\t\t\t\t\t\t\t\tpixiText: text,\n\t\t\t\t\t\t\t\tlastText: label.text,\n\t\t\t\t\t\t\t\tlastFontSize: label.style.fontSize,\n\t\t\t\t\t\t\t\tlastFill: label.style.fill,\n\t\t\t\t\t\t\t\tlastAlign: label.style.align,\n\t\t\t\t\t\t\t\tlastFontFamily: label.style.fontFamily,\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\tif (rootContainer) rootContainer.addChild(text);\n\t\t\t\t\t\t},\n\t\t\t\t\t\tonExit: (entityId) => {\n\t\t\t\t\t\t\tconst runtime = labelPool.get(entityId);\n\t\t\t\t\t\t\tif (runtime) {\n\t\t\t\t\t\t\t\truntime.pixiText.removeFromParent();\n\t\t\t\t\t\t\t\truntime.pixiText.destroy();\n\t\t\t\t\t\t\t\tlabelPool.delete(entityId);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\t\t\t\t});\n\t\t\t\t})\n\t\t\t\t.setProcess(({ ecs }) => {\n\t\t\t\t\tfor (const [entityId, runtime] of labelPool) {\n\t\t\t\t\t\tconst label = ecs.getComponent(entityId, 'uiLabel');\n\t\t\t\t\t\tif (!label) continue;\n\t\t\t\t\t\tsyncLabelRuntime(runtime, label);\n\t\t\t\t\t\tapplyTransform(runtime.pixiText, ecs.getComponent(entityId, 'worldTransform'));\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t// Panel sync: lazy-initialize PixiJS Graphics, redraw when panel or size changes.\n\t\t\tworld\n\t\t\t\t.addSystem('ui-panel-sync')\n\t\t\t\t.setPriority(renderSyncPriority)\n\t\t\t\t.inPhase('render')\n\t\t\t\t.inGroup(systemGroup)\n\t\t\t\t.setOnInitialize(async (ecs) => {\n\t\t\t\t\tconst pixi = await import('pixi.js');\n\t\t\t\t\tconst rootContainer = ecs.tryGetResource<Container>('rootContainer');\n\t\t\t\t\tecs.addReactiveQuery('ui-panels', {\n\t\t\t\t\t\twith: ['uiPanel', 'uiElement'],\n\t\t\t\t\t\tonEnter: (entity) => {\n\t\t\t\t\t\t\tconst g = new pixi.Graphics();\n\t\t\t\t\t\t\tpanelPool.set(entity.id, {\n\t\t\t\t\t\t\t\tpixiGraphics: g,\n\t\t\t\t\t\t\t\tlastFillColor: Number.NaN,\n\t\t\t\t\t\t\t\tlastBorderColor: undefined,\n\t\t\t\t\t\t\t\tlastBorderWidth: Number.NaN,\n\t\t\t\t\t\t\t\tlastWidth: Number.NaN,\n\t\t\t\t\t\t\t\tlastHeight: Number.NaN,\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\tif (rootContainer) rootContainer.addChild(g);\n\t\t\t\t\t\t},\n\t\t\t\t\t\tonExit: (entityId) => {\n\t\t\t\t\t\t\tconst runtime = panelPool.get(entityId);\n\t\t\t\t\t\t\tif (runtime) {\n\t\t\t\t\t\t\t\truntime.pixiGraphics.removeFromParent();\n\t\t\t\t\t\t\t\truntime.pixiGraphics.destroy();\n\t\t\t\t\t\t\t\tpanelPool.delete(entityId);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\t\t\t\t});\n\t\t\t\t})\n\t\t\t\t.setProcess(({ ecs }) => {\n\t\t\t\t\tfor (const [entityId, runtime] of panelPool) {\n\t\t\t\t\t\tconst panel = ecs.getComponent(entityId, 'uiPanel');\n\t\t\t\t\t\tconst element = ecs.getComponent(entityId, 'uiElement');\n\t\t\t\t\t\tif (!panel || !element) continue;\n\t\t\t\t\t\tsyncPanelRuntime(runtime, panel, element);\n\t\t\t\t\t\tapplyTransform(runtime.pixiGraphics, ecs.getComponent(entityId, 'worldTransform'));\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t// Progress bar sync.\n\t\t\tworld\n\t\t\t\t.addSystem('ui-progress-sync')\n\t\t\t\t.setPriority(renderSyncPriority)\n\t\t\t\t.inPhase('render')\n\t\t\t\t.inGroup(systemGroup)\n\t\t\t\t.setOnInitialize(async (ecs) => {\n\t\t\t\t\tconst pixi = await import('pixi.js');\n\t\t\t\t\tconst rootContainer = ecs.tryGetResource<Container>('rootContainer');\n\t\t\t\t\tecs.addReactiveQuery('ui-progress-bars', {\n\t\t\t\t\t\twith: ['uiProgressBar', 'uiElement'],\n\t\t\t\t\t\tonEnter: (entity) => {\n\t\t\t\t\t\t\tconst g = new pixi.Graphics();\n\t\t\t\t\t\t\tprogressPool.set(entity.id, {\n\t\t\t\t\t\t\t\tpixiGraphics: g,\n\t\t\t\t\t\t\t\tlastValue: Number.NaN,\n\t\t\t\t\t\t\t\tlastMax: Number.NaN,\n\t\t\t\t\t\t\t\tlastFillColor: Number.NaN,\n\t\t\t\t\t\t\t\tlastBgColor: Number.NaN,\n\t\t\t\t\t\t\t\tlastDirection: 'ltr',\n\t\t\t\t\t\t\t\tlastWidth: Number.NaN,\n\t\t\t\t\t\t\t\tlastHeight: Number.NaN,\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\tif (rootContainer) rootContainer.addChild(g);\n\t\t\t\t\t\t},\n\t\t\t\t\t\tonExit: (entityId) => {\n\t\t\t\t\t\t\tconst runtime = progressPool.get(entityId);\n\t\t\t\t\t\t\tif (runtime) {\n\t\t\t\t\t\t\t\truntime.pixiGraphics.removeFromParent();\n\t\t\t\t\t\t\t\truntime.pixiGraphics.destroy();\n\t\t\t\t\t\t\t\tprogressPool.delete(entityId);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\t\t\t\t});\n\t\t\t\t})\n\t\t\t\t.setProcess(({ ecs }) => {\n\t\t\t\t\tfor (const [entityId, runtime] of progressPool) {\n\t\t\t\t\t\tconst bar = ecs.getComponent(entityId, 'uiProgressBar');\n\t\t\t\t\t\tconst element = ecs.getComponent(entityId, 'uiElement');\n\t\t\t\t\t\tif (!bar || !element) continue;\n\t\t\t\t\t\tsyncProgressRuntime(runtime, bar, element, scratchFill);\n\t\t\t\t\t\tapplyTransform(runtime.pixiGraphics, ecs.getComponent(entityId, 'worldTransform'));\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t});\n}\n\n// ==================== Sync Helpers ====================\n\nfunction applyTransform(\n\tobj: { position: { x: number; y: number } },\n\twt: WorldTransform | undefined,\n): void {\n\tif (!wt) return;\n\tif (obj.position.x !== wt.x) obj.position.x = wt.x;\n\tif (obj.position.y !== wt.y) obj.position.y = wt.y;\n}\n\nfunction syncLabelRuntime(runtime: UILabelRuntime, label: UILabel): void {\n\tif (runtime.lastText !== label.text) {\n\t\truntime.pixiText.text = label.text;\n\t\truntime.lastText = label.text;\n\t}\n\tconst style = runtime.pixiText.style;\n\tif (runtime.lastFontSize !== label.style.fontSize) {\n\t\tstyle.fontSize = label.style.fontSize;\n\t\truntime.lastFontSize = label.style.fontSize;\n\t}\n\tif (runtime.lastFill !== label.style.fill) {\n\t\tstyle.fill = label.style.fill;\n\t\truntime.lastFill = label.style.fill;\n\t}\n\tif (runtime.lastAlign !== label.style.align) {\n\t\tstyle.align = label.style.align;\n\t\truntime.lastAlign = label.style.align;\n\t}\n\tif (runtime.lastFontFamily !== label.style.fontFamily) {\n\t\tstyle.fontFamily = label.style.fontFamily;\n\t\truntime.lastFontFamily = label.style.fontFamily;\n\t}\n}\n\nfunction syncPanelRuntime(runtime: UIPanelRuntime, panel: UIPanel, element: UIElement): void {\n\tconst changed =\n\t\truntime.lastFillColor !== panel.fillColor ||\n\t\truntime.lastBorderColor !== panel.borderColor ||\n\t\truntime.lastBorderWidth !== panel.borderWidth ||\n\t\truntime.lastWidth !== element.width ||\n\t\truntime.lastHeight !== element.height;\n\tif (!changed) return;\n\n\tconst g = runtime.pixiGraphics;\n\tg.clear();\n\tg.rect(0, 0, element.width, element.height);\n\tg.fill({ color: panel.fillColor });\n\tif (panel.borderColor !== undefined && panel.borderWidth > 0) {\n\t\tg.stroke({ color: panel.borderColor, width: panel.borderWidth });\n\t}\n\truntime.lastFillColor = panel.fillColor;\n\truntime.lastBorderColor = panel.borderColor;\n\truntime.lastBorderWidth = panel.borderWidth;\n\truntime.lastWidth = element.width;\n\truntime.lastHeight = element.height;\n}\n\nfunction syncProgressRuntime(\n\truntime: UIProgressRuntime,\n\tbar: UIProgressBar,\n\telement: UIElement,\n\tscratchFill: FillRect,\n): void {\n\tconst changed =\n\t\truntime.lastValue !== bar.value ||\n\t\truntime.lastMax !== bar.max ||\n\t\truntime.lastFillColor !== bar.fillColor ||\n\t\truntime.lastBgColor !== bar.bgColor ||\n\t\truntime.lastDirection !== bar.direction ||\n\t\truntime.lastWidth !== element.width ||\n\t\truntime.lastHeight !== element.height;\n\tif (!changed) return;\n\n\tconst clamped = clampProgressValue(bar.value, bar.max);\n\tconst ratio = bar.max > 0 ? clamped / bar.max : 0;\n\tcomputeProgressFillRect(element.width, element.height, ratio, bar.direction, scratchFill);\n\n\tconst g = runtime.pixiGraphics;\n\tg.clear();\n\tg.rect(0, 0, element.width, element.height);\n\tg.fill({ color: bar.bgColor });\n\tif (scratchFill.width > 0 && scratchFill.height > 0) {\n\t\tg.rect(scratchFill.x, scratchFill.y, scratchFill.width, scratchFill.height);\n\t\tg.fill({ color: bar.fillColor });\n\t}\n\n\truntime.lastValue = bar.value;\n\truntime.lastMax = bar.max;\n\truntime.lastFillColor = bar.fillColor;\n\truntime.lastBgColor = bar.bgColor;\n\truntime.lastDirection = bar.direction;\n\truntime.lastWidth = element.width;\n\truntime.lastHeight = element.height;\n}\n"
6
+ "/**\n * UI / HUD Plugin for ECSpresso.\n *\n * Screen-space primitives:\n * - `uiElement` — anchor/pivot/offset positioning resolved against the `bounds` resource\n * - `uiLabel` — PixiJS Text\n * - `uiPanel` — PixiJS Graphics rectangle with optional border\n * - `uiProgressBar` — PixiJS Graphics value indicator with four fill directions\n *\n * Pointer interaction (buttons):\n * - `uiInteractive` (marker) opts an entity into hit-testing\n * - `uiInteraction.state` — `'none' | 'hover' | 'pressed'` (Bevy-style single enum)\n * - `uiButton` marker composes `uiInteractive` + `uiInteraction`\n * - `uiDisabled` skips hit-testing entirely\n * - Emits `uiButtonPressed` (confirmed down→up on same widget) and `uiButtonHovered`\n *\n * Depends on `renderer2D` (for the `bounds` resource + scene graph + screen-space layer),\n * the transform plugin (bundled by renderer2D), and the input plugin.\n *\n * Future phases will add the message log (Phase 3).\n */\n\nimport type { Container, Graphics, Text } from 'pixi.js';\nimport { definePlugin, type BasePluginOptions } from 'ecspresso';\nimport type { WorldConfigFrom } from '../../type-utils';\nimport type { Vector2D } from '../../utils/math';\nimport {\n\tDEFAULT_LOCAL_TRANSFORM,\n\ttype LocalTransform,\n\ttype TransformComponentTypes,\n\ttype WorldTransform,\n} from '../spatial/transform';\nimport type { BoundsResourceTypes } from '../spatial/bounds';\nimport type { InputResourceTypes } from '../input/input';\n\n// ==================== Anchor Presets ====================\n\nexport type AnchorPreset =\n\t| 'top-left' | 'top-center' | 'top-right'\n\t| 'center-left' | 'center' | 'center-right'\n\t| 'bottom-left' | 'bottom-center' | 'bottom-right';\n\nexport const ANCHOR_PRESETS: Readonly<Record<AnchorPreset, Readonly<Vector2D>>> = Object.freeze({\n\t'top-left': Object.freeze({ x: 0, y: 0 }),\n\t'top-center': Object.freeze({ x: 0.5, y: 0 }),\n\t'top-right': Object.freeze({ x: 1, y: 0 }),\n\t'center-left': Object.freeze({ x: 0, y: 0.5 }),\n\t'center': Object.freeze({ x: 0.5, y: 0.5 }),\n\t'center-right': Object.freeze({ x: 1, y: 0.5 }),\n\t'bottom-left': Object.freeze({ x: 0, y: 1 }),\n\t'bottom-center': Object.freeze({ x: 0.5, y: 1 }),\n\t'bottom-right': Object.freeze({ x: 1, y: 1 }),\n});\n\nexport type AnchorInput = AnchorPreset | Vector2D;\n\n/** Resolve a preset string or vec2 into a mutable Vector2D copy. */\nexport function resolveAnchorPreset(input: AnchorInput): Vector2D {\n\tif (typeof input === 'string') {\n\t\tconst preset = ANCHOR_PRESETS[input];\n\t\treturn { x: preset.x, y: preset.y };\n\t}\n\treturn { x: input.x, y: input.y };\n}\n\n/**\n * Write the top-left screen position of a widget into `out`.\n *\n * Formula: position = anchor * bounds + offset - pivot * size.\n * `anchor` specifies where on the canvas the widget attaches (0..1 normalized).\n * `pivot` specifies where on the widget that attachment point lands (0..1 normalized).\n * Writes in place to avoid per-frame allocation.\n */\nexport function resolveAnchorPosition(\n\tanchor: Readonly<Vector2D>,\n\tpivot: Readonly<Vector2D>,\n\toffset: Readonly<Vector2D>,\n\tbounds: Readonly<{ width: number; height: number }>,\n\tsize: Readonly<{ width: number; height: number }>,\n\tout: Vector2D,\n): void {\n\tout.x = anchor.x * bounds.width + offset.x - pivot.x * size.width;\n\tout.y = anchor.y * bounds.height + offset.y - pivot.y * size.height;\n}\n\n// ==================== Progress Bar Math ====================\n\nexport type ProgressDirection = 'ltr' | 'rtl' | 'ttb' | 'btt';\n\nexport interface FillRect {\n\tx: number;\n\ty: number;\n\twidth: number;\n\theight: number;\n}\n\nexport function clampProgressValue(value: number, max: number): number {\n\tif (max <= 0) return 0;\n\tif (value <= 0) return 0;\n\tif (value >= max) return max;\n\treturn value;\n}\n\ntype FillComputer = (w: number, h: number, ratio: number, out: FillRect) => void;\n\nconst FILL_COMPUTERS: Readonly<Record<ProgressDirection, FillComputer>> = {\n\tltr: (w, h, r, o) => { o.x = 0; o.y = 0; o.width = w * r; o.height = h; },\n\trtl: (w, h, r, o) => { o.x = w * (1 - r); o.y = 0; o.width = w * r; o.height = h; },\n\tttb: (w, h, r, o) => { o.x = 0; o.y = 0; o.width = w; o.height = h * r; },\n\tbtt: (w, h, r, o) => { o.x = 0; o.y = h * (1 - r); o.width = w; o.height = h * r; },\n};\n\nexport function computeProgressFillRect(\n\twidth: number,\n\theight: number,\n\tratio: number,\n\tdirection: ProgressDirection,\n\tout: FillRect,\n): void {\n\tFILL_COMPUTERS[direction](width, height, ratio, out);\n}\n\n// ==================== Component Types ====================\n\nexport interface UIElement {\n\tanchor: Vector2D;\n\tpivot: Vector2D;\n\toffset: Vector2D;\n\twidth: number;\n\theight: number;\n}\n\nexport interface UITextStyle {\n\tfontFamily: string;\n\tfontSize: number;\n\tfill: number;\n\talign: 'left' | 'center' | 'right';\n}\n\nexport interface UILabel {\n\ttext: string;\n\tstyle: UITextStyle;\n}\n\nexport interface UIPanel {\n\tfillColor: number;\n\tborderColor?: number;\n\tborderWidth: number;\n}\n\nexport interface UIProgressBar {\n\tvalue: number;\n\tmax: number;\n\tfillColor: number;\n\tbgColor: number;\n\tdirection: ProgressDirection;\n}\n\nexport type UIInteractionState = 'none' | 'hover' | 'pressed';\n\nexport interface UIInteraction {\n\tstate: UIInteractionState;\n}\n\nexport interface UIComponentTypes {\n\tuiElement: UIElement;\n\tuiLabel: UILabel;\n\tuiPanel: UIPanel;\n\tuiProgressBar: UIProgressBar;\n\tuiButton: {};\n\tuiInteractive: {};\n\tuiInteraction: UIInteraction;\n\tuiDisabled: {};\n}\n\n// ==================== Event Types ====================\n\nexport interface UIButtonPressedEvent {\n\tentityId: number;\n}\n\nexport interface UIButtonHoveredEvent {\n\tentityId: number;\n\tentered: boolean;\n}\n\nexport interface UIEventTypes {\n\tuiButtonPressed: UIButtonPressedEvent;\n\tuiButtonHovered: UIButtonHoveredEvent;\n}\n\n// ==================== Component Factories ====================\n\nconst DEFAULT_TEXT_STYLE: Readonly<UITextStyle> = Object.freeze({\n\tfontFamily: 'sans-serif',\n\tfontSize: 16,\n\tfill: 0xffffff,\n\talign: 'left',\n});\n\nexport interface CreateUIElementInput {\n\tanchor: AnchorInput;\n\tpivot?: AnchorInput;\n\toffset?: Vector2D;\n\twidth: number;\n\theight: number;\n}\n\nexport function createUIElement(input: CreateUIElementInput): Pick<UIComponentTypes, 'uiElement'> {\n\tconst anchor = resolveAnchorPreset(input.anchor);\n\tconst pivot = input.pivot === undefined ? { x: anchor.x, y: anchor.y } : resolveAnchorPreset(input.pivot);\n\tconst offset = input.offset === undefined ? { x: 0, y: 0 } : { x: input.offset.x, y: input.offset.y };\n\treturn {\n\t\tuiElement: {\n\t\t\tanchor,\n\t\t\tpivot,\n\t\t\toffset,\n\t\t\twidth: input.width,\n\t\t\theight: input.height,\n\t\t},\n\t};\n}\n\nexport function createUILabel(\n\ttext: string,\n\tstyle?: Partial<UITextStyle>,\n): Pick<UIComponentTypes, 'uiLabel'> {\n\treturn {\n\t\tuiLabel: {\n\t\t\ttext,\n\t\t\tstyle: { ...DEFAULT_TEXT_STYLE, ...style },\n\t\t},\n\t};\n}\n\nexport interface CreateUIPanelInput {\n\tfillColor: number;\n\tborderColor?: number;\n\tborderWidth?: number;\n}\n\nexport function createUIPanel(input: CreateUIPanelInput): Pick<UIComponentTypes, 'uiPanel'> {\n\treturn {\n\t\tuiPanel: {\n\t\t\tfillColor: input.fillColor,\n\t\t\tborderColor: input.borderColor,\n\t\t\tborderWidth: input.borderWidth ?? 0,\n\t\t},\n\t};\n}\n\nexport interface CreateUIProgressBarInput {\n\tvalue: number;\n\tmax: number;\n\tfillColor: number;\n\tbgColor: number;\n\tdirection?: ProgressDirection;\n}\n\nexport function createUIProgressBar(input: CreateUIProgressBarInput): Pick<UIComponentTypes, 'uiProgressBar'> {\n\treturn {\n\t\tuiProgressBar: {\n\t\t\tvalue: input.value,\n\t\t\tmax: input.max,\n\t\t\tfillColor: input.fillColor,\n\t\t\tbgColor: input.bgColor,\n\t\t\tdirection: input.direction ?? 'ltr',\n\t\t},\n\t};\n}\n\nexport function createUIInteractive(): Pick<UIComponentTypes, 'uiInteractive'> {\n\treturn { uiInteractive: {} };\n}\n\nexport function createUIButton(): Pick<UIComponentTypes, 'uiButton'> {\n\treturn { uiButton: {} };\n}\n\nexport function createUIDisabled(): Pick<UIComponentTypes, 'uiDisabled'> {\n\treturn { uiDisabled: {} };\n}\n\n// ==================== Runtime Data (Side Storage) ====================\n\ninterface UILabelRuntime {\n\tpixiText: Text;\n\tlastText: string;\n\tlastFontSize: number;\n\tlastFill: number;\n\tlastAlign: string;\n\tlastFontFamily: string;\n}\n\ninterface UIPanelRuntime {\n\tpixiGraphics: Graphics;\n\tlastFillColor: number;\n\tlastBorderColor: number | undefined;\n\tlastBorderWidth: number;\n\tlastWidth: number;\n\tlastHeight: number;\n}\n\ninterface UIProgressRuntime {\n\tpixiGraphics: Graphics;\n\tlastValue: number;\n\tlastMax: number;\n\tlastFillColor: number;\n\tlastBgColor: number;\n\tlastDirection: ProgressDirection;\n\tlastWidth: number;\n\tlastHeight: number;\n}\n\n// ==================== Plugin Factory ====================\n\ntype UIRequires = WorldConfigFrom<\n\tTransformComponentTypes,\n\t{},\n\tBoundsResourceTypes & InputResourceTypes\n>;\n\ntype UILabels =\n\t| 'ui-anchor-resolve'\n\t| 'ui-interaction'\n\t| 'ui-label-sync'\n\t| 'ui-panel-sync'\n\t| 'ui-progress-sync';\n\nexport interface UIPluginOptions<G extends string = 'ui'> extends BasePluginOptions<G> {\n\t/** Priority for the anchor-resolve system in preUpdate (default: 0). */\n\tanchorPriority?: number;\n\t/** Priority for the pointer hit-test system in preUpdate (default: 200, after input's 100). */\n\tinteractionPriority?: number;\n\t/** Priority for render-sync systems (default: 480, just before renderer2D's 500). */\n\trenderSyncPriority?: number;\n}\n\nexport function createUIPlugin<G extends string = 'ui'>(\n\toptions?: UIPluginOptions<G>,\n) {\n\tconst {\n\t\tsystemGroup = 'ui' as G,\n\t\tanchorPriority = 0,\n\t\tinteractionPriority = 200,\n\t\trenderSyncPriority = 480,\n\t} = options ?? {};\n\n\tconst labelPool = new Map<number, UILabelRuntime>();\n\tconst panelPool = new Map<number, UIPanelRuntime>();\n\tconst progressPool = new Map<number, UIProgressRuntime>();\n\tconst scratchPos: Vector2D = { x: 0, y: 0 };\n\tconst scratchFill: FillRect = { x: 0, y: 0, width: 0, height: 0 };\n\n\treturn definePlugin('ui')\n\t\t.withComponentTypes<UIComponentTypes>()\n\t\t.withEventTypes<UIEventTypes>()\n\t\t.withLabels<UILabels>()\n\t\t.withGroups<G>()\n\t\t.withReactiveQueryNames<'ui-labels' | 'ui-panels' | 'ui-progress-bars'>()\n\t\t.requires<UIRequires>()\n\t\t.install((world) => {\n\t\t\tworld.registerRequired('uiElement', 'localTransform', (): LocalTransform => ({\n\t\t\t\tx: DEFAULT_LOCAL_TRANSFORM.x,\n\t\t\t\ty: DEFAULT_LOCAL_TRANSFORM.y,\n\t\t\t\trotation: DEFAULT_LOCAL_TRANSFORM.rotation,\n\t\t\t\tscaleX: DEFAULT_LOCAL_TRANSFORM.scaleX,\n\t\t\t\tscaleY: DEFAULT_LOCAL_TRANSFORM.scaleY,\n\t\t\t}));\n\t\t\tworld.registerRequired('uiButton', 'uiInteractive', () => ({}));\n\t\t\tworld.registerRequired('uiInteractive', 'uiInteraction', (): UIInteraction => ({ state: 'none' }));\n\n\t\t\t// Anchor resolve: writes localTransform.{x,y} from uiElement + bounds.\n\t\t\tworld\n\t\t\t\t.addSystem('ui-anchor-resolve')\n\t\t\t\t.setPriority(anchorPriority)\n\t\t\t\t.inPhase('preUpdate')\n\t\t\t\t.inGroup(systemGroup)\n\t\t\t\t.addQuery('uiElements', {\n\t\t\t\t\twith: ['uiElement', 'localTransform'],\n\t\t\t\t})\n\t\t\t\t.setProcess(({ queries, ecs }) => {\n\t\t\t\t\tconst bounds = ecs.getResource('bounds');\n\t\t\t\t\tfor (const entity of queries.uiElements) {\n\t\t\t\t\t\tconst { uiElement, localTransform } = entity.components;\n\t\t\t\t\t\tresolveAnchorPosition(\n\t\t\t\t\t\t\tuiElement.anchor,\n\t\t\t\t\t\t\tuiElement.pivot,\n\t\t\t\t\t\t\tuiElement.offset,\n\t\t\t\t\t\t\tbounds,\n\t\t\t\t\t\t\tuiElement,\n\t\t\t\t\t\t\tscratchPos,\n\t\t\t\t\t\t);\n\t\t\t\t\t\tif (localTransform.x !== scratchPos.x || localTransform.y !== scratchPos.y) {\n\t\t\t\t\t\t\tlocalTransform.x = scratchPos.x;\n\t\t\t\t\t\t\tlocalTransform.y = scratchPos.y;\n\t\t\t\t\t\t\tecs.markChanged(entity.id, 'localTransform');\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t// Pointer hit-test: reads inputState.pointer, updates uiInteraction.state, emits events.\n\t\t\tworld\n\t\t\t\t.addSystem('ui-interaction')\n\t\t\t\t.setPriority(interactionPriority)\n\t\t\t\t.inPhase('preUpdate')\n\t\t\t\t.inGroup(systemGroup)\n\t\t\t\t.addQuery('interactables', {\n\t\t\t\t\twith: ['uiInteractive', 'uiInteraction', 'uiElement', 'worldTransform'],\n\t\t\t\t\twithout: ['uiDisabled'],\n\t\t\t\t})\n\t\t\t\t.setProcess(({ queries, ecs }) => {\n\t\t\t\t\tconst pointer = ecs.getResource('inputState').pointer;\n\t\t\t\t\tconst px = pointer.position.x;\n\t\t\t\t\tconst py = pointer.position.y;\n\t\t\t\t\tconst down = pointer.isDown(0);\n\t\t\t\t\tconst justReleased = pointer.justReleased(0);\n\t\t\t\t\tfor (const entity of queries.interactables) {\n\t\t\t\t\t\tconst { uiElement, worldTransform, uiInteraction } = entity.components;\n\t\t\t\t\t\tconst hit =\n\t\t\t\t\t\t\tpx >= worldTransform.x &&\n\t\t\t\t\t\t\tpx < worldTransform.x + uiElement.width &&\n\t\t\t\t\t\t\tpy >= worldTransform.y &&\n\t\t\t\t\t\t\tpy < worldTransform.y + uiElement.height;\n\t\t\t\t\t\tconst prev = uiInteraction.state;\n\t\t\t\t\t\tconst next: UIInteractionState =\n\t\t\t\t\t\t\t!hit ? 'none'\n\t\t\t\t\t\t\t: down ? (prev === 'none' ? 'hover' : 'pressed')\n\t\t\t\t\t\t\t: 'hover';\n\n\t\t\t\t\t\tif (prev === 'pressed' && next === 'hover' && justReleased && hit) {\n\t\t\t\t\t\t\tecs.eventBus.publish('uiButtonPressed', { entityId: entity.id });\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (prev === 'none' && next !== 'none') {\n\t\t\t\t\t\t\tecs.eventBus.publish('uiButtonHovered', { entityId: entity.id, entered: true });\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (prev !== 'none' && next === 'none') {\n\t\t\t\t\t\t\tecs.eventBus.publish('uiButtonHovered', { entityId: entity.id, entered: false });\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (prev !== next) {\n\t\t\t\t\t\t\tuiInteraction.state = next;\n\t\t\t\t\t\t\tecs.markChanged(entity.id, 'uiInteraction');\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t// Panel sync: lazy-initialize PixiJS Graphics, redraw when panel or size changes.\n\t\t\t// Registered before labels/progress so panel Graphics sits BEHIND text/fill when an\n\t\t\t// entity carries multiple visual components (e.g. a button with uiPanel + uiLabel).\n\t\t\tworld\n\t\t\t\t.addSystem('ui-panel-sync')\n\t\t\t\t.setPriority(renderSyncPriority)\n\t\t\t\t.inPhase('render')\n\t\t\t\t.inGroup(systemGroup)\n\t\t\t\t.setOnInitialize(async (ecs) => {\n\t\t\t\t\tconst pixi = await import('pixi.js');\n\t\t\t\t\tconst rootContainer = ecs.tryGetResource<Container>('rootContainer');\n\t\t\t\t\tecs.addReactiveQuery('ui-panels', {\n\t\t\t\t\t\twith: ['uiPanel', 'uiElement'],\n\t\t\t\t\t\tonEnter: (entity) => {\n\t\t\t\t\t\t\tconst g = new pixi.Graphics();\n\t\t\t\t\t\t\tpanelPool.set(entity.id, {\n\t\t\t\t\t\t\t\tpixiGraphics: g,\n\t\t\t\t\t\t\t\tlastFillColor: Number.NaN,\n\t\t\t\t\t\t\t\tlastBorderColor: undefined,\n\t\t\t\t\t\t\t\tlastBorderWidth: Number.NaN,\n\t\t\t\t\t\t\t\tlastWidth: Number.NaN,\n\t\t\t\t\t\t\t\tlastHeight: Number.NaN,\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\tif (rootContainer) rootContainer.addChild(g);\n\t\t\t\t\t\t},\n\t\t\t\t\t\tonExit: (entityId) => {\n\t\t\t\t\t\t\tconst runtime = panelPool.get(entityId);\n\t\t\t\t\t\t\tif (runtime) {\n\t\t\t\t\t\t\t\truntime.pixiGraphics.removeFromParent();\n\t\t\t\t\t\t\t\truntime.pixiGraphics.destroy();\n\t\t\t\t\t\t\t\tpanelPool.delete(entityId);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\t\t\t\t});\n\t\t\t\t})\n\t\t\t\t.setProcess(({ ecs }) => {\n\t\t\t\t\tfor (const [entityId, runtime] of panelPool) {\n\t\t\t\t\t\tconst panel = ecs.getComponent(entityId, 'uiPanel');\n\t\t\t\t\t\tconst element = ecs.getComponent(entityId, 'uiElement');\n\t\t\t\t\t\tif (!panel || !element) continue;\n\t\t\t\t\t\tsyncPanelRuntime(runtime, panel, element);\n\t\t\t\t\t\tapplyTransform(runtime.pixiGraphics, ecs.getComponent(entityId, 'worldTransform'));\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t// Progress bar sync.\n\t\t\tworld\n\t\t\t\t.addSystem('ui-progress-sync')\n\t\t\t\t.setPriority(renderSyncPriority)\n\t\t\t\t.inPhase('render')\n\t\t\t\t.inGroup(systemGroup)\n\t\t\t\t.setOnInitialize(async (ecs) => {\n\t\t\t\t\tconst pixi = await import('pixi.js');\n\t\t\t\t\tconst rootContainer = ecs.tryGetResource<Container>('rootContainer');\n\t\t\t\t\tecs.addReactiveQuery('ui-progress-bars', {\n\t\t\t\t\t\twith: ['uiProgressBar', 'uiElement'],\n\t\t\t\t\t\tonEnter: (entity) => {\n\t\t\t\t\t\t\tconst g = new pixi.Graphics();\n\t\t\t\t\t\t\tprogressPool.set(entity.id, {\n\t\t\t\t\t\t\t\tpixiGraphics: g,\n\t\t\t\t\t\t\t\tlastValue: Number.NaN,\n\t\t\t\t\t\t\t\tlastMax: Number.NaN,\n\t\t\t\t\t\t\t\tlastFillColor: Number.NaN,\n\t\t\t\t\t\t\t\tlastBgColor: Number.NaN,\n\t\t\t\t\t\t\t\tlastDirection: 'ltr',\n\t\t\t\t\t\t\t\tlastWidth: Number.NaN,\n\t\t\t\t\t\t\t\tlastHeight: Number.NaN,\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\tif (rootContainer) rootContainer.addChild(g);\n\t\t\t\t\t\t},\n\t\t\t\t\t\tonExit: (entityId) => {\n\t\t\t\t\t\t\tconst runtime = progressPool.get(entityId);\n\t\t\t\t\t\t\tif (runtime) {\n\t\t\t\t\t\t\t\truntime.pixiGraphics.removeFromParent();\n\t\t\t\t\t\t\t\truntime.pixiGraphics.destroy();\n\t\t\t\t\t\t\t\tprogressPool.delete(entityId);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\t\t\t\t});\n\t\t\t\t})\n\t\t\t\t.setProcess(({ ecs }) => {\n\t\t\t\t\tfor (const [entityId, runtime] of progressPool) {\n\t\t\t\t\t\tconst bar = ecs.getComponent(entityId, 'uiProgressBar');\n\t\t\t\t\t\tconst element = ecs.getComponent(entityId, 'uiElement');\n\t\t\t\t\t\tif (!bar || !element) continue;\n\t\t\t\t\t\tsyncProgressRuntime(runtime, bar, element, scratchFill);\n\t\t\t\t\t\tapplyTransform(runtime.pixiGraphics, ecs.getComponent(entityId, 'worldTransform'));\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t// Label sync: registered last so Text sits ON TOP of panels and progress bars when an\n\t\t\t// entity carries multiple visual components.\n\t\t\tworld\n\t\t\t\t.addSystem('ui-label-sync')\n\t\t\t\t.setPriority(renderSyncPriority)\n\t\t\t\t.inPhase('render')\n\t\t\t\t.inGroup(systemGroup)\n\t\t\t\t.setOnInitialize(async (ecs) => {\n\t\t\t\t\tconst pixi = await import('pixi.js');\n\t\t\t\t\tconst rootContainer = ecs.tryGetResource<Container>('rootContainer');\n\t\t\t\t\tecs.addReactiveQuery('ui-labels', {\n\t\t\t\t\t\twith: ['uiLabel'],\n\t\t\t\t\t\tonEnter: (entity) => {\n\t\t\t\t\t\t\tconst label = entity.components.uiLabel;\n\t\t\t\t\t\t\tconst text = new pixi.Text({\n\t\t\t\t\t\t\t\ttext: label.text,\n\t\t\t\t\t\t\t\tstyle: {\n\t\t\t\t\t\t\t\t\tfontFamily: label.style.fontFamily,\n\t\t\t\t\t\t\t\t\tfontSize: label.style.fontSize,\n\t\t\t\t\t\t\t\t\tfill: label.style.fill,\n\t\t\t\t\t\t\t\t\talign: label.style.align,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\tlabelPool.set(entity.id, {\n\t\t\t\t\t\t\t\tpixiText: text,\n\t\t\t\t\t\t\t\tlastText: label.text,\n\t\t\t\t\t\t\t\tlastFontSize: label.style.fontSize,\n\t\t\t\t\t\t\t\tlastFill: label.style.fill,\n\t\t\t\t\t\t\t\tlastAlign: label.style.align,\n\t\t\t\t\t\t\t\tlastFontFamily: label.style.fontFamily,\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\tif (rootContainer) rootContainer.addChild(text);\n\t\t\t\t\t\t},\n\t\t\t\t\t\tonExit: (entityId) => {\n\t\t\t\t\t\t\tconst runtime = labelPool.get(entityId);\n\t\t\t\t\t\t\tif (runtime) {\n\t\t\t\t\t\t\t\truntime.pixiText.removeFromParent();\n\t\t\t\t\t\t\t\truntime.pixiText.destroy();\n\t\t\t\t\t\t\t\tlabelPool.delete(entityId);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\t\t\t\t});\n\t\t\t\t})\n\t\t\t\t.setProcess(({ ecs }) => {\n\t\t\t\t\tfor (const [entityId, runtime] of labelPool) {\n\t\t\t\t\t\tconst label = ecs.getComponent(entityId, 'uiLabel');\n\t\t\t\t\t\tif (!label) continue;\n\t\t\t\t\t\tsyncLabelRuntime(runtime, label);\n\t\t\t\t\t\tapplyTransform(runtime.pixiText, ecs.getComponent(entityId, 'worldTransform'));\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t});\n}\n\n// ==================== Sync Helpers ====================\n\nfunction applyTransform(\n\tobj: { position: { x: number; y: number } },\n\twt: WorldTransform | undefined,\n): void {\n\tif (!wt) return;\n\tif (obj.position.x !== wt.x) obj.position.x = wt.x;\n\tif (obj.position.y !== wt.y) obj.position.y = wt.y;\n}\n\nfunction syncLabelRuntime(runtime: UILabelRuntime, label: UILabel): void {\n\tif (runtime.lastText !== label.text) {\n\t\truntime.pixiText.text = label.text;\n\t\truntime.lastText = label.text;\n\t}\n\tconst style = runtime.pixiText.style;\n\tif (runtime.lastFontSize !== label.style.fontSize) {\n\t\tstyle.fontSize = label.style.fontSize;\n\t\truntime.lastFontSize = label.style.fontSize;\n\t}\n\tif (runtime.lastFill !== label.style.fill) {\n\t\tstyle.fill = label.style.fill;\n\t\truntime.lastFill = label.style.fill;\n\t}\n\tif (runtime.lastAlign !== label.style.align) {\n\t\tstyle.align = label.style.align;\n\t\truntime.lastAlign = label.style.align;\n\t}\n\tif (runtime.lastFontFamily !== label.style.fontFamily) {\n\t\tstyle.fontFamily = label.style.fontFamily;\n\t\truntime.lastFontFamily = label.style.fontFamily;\n\t}\n}\n\nfunction syncPanelRuntime(runtime: UIPanelRuntime, panel: UIPanel, element: UIElement): void {\n\tconst changed =\n\t\truntime.lastFillColor !== panel.fillColor ||\n\t\truntime.lastBorderColor !== panel.borderColor ||\n\t\truntime.lastBorderWidth !== panel.borderWidth ||\n\t\truntime.lastWidth !== element.width ||\n\t\truntime.lastHeight !== element.height;\n\tif (!changed) return;\n\n\tconst g = runtime.pixiGraphics;\n\tg.clear();\n\tg.rect(0, 0, element.width, element.height);\n\tg.fill({ color: panel.fillColor });\n\tif (panel.borderColor !== undefined && panel.borderWidth > 0) {\n\t\tg.stroke({ color: panel.borderColor, width: panel.borderWidth });\n\t}\n\truntime.lastFillColor = panel.fillColor;\n\truntime.lastBorderColor = panel.borderColor;\n\truntime.lastBorderWidth = panel.borderWidth;\n\truntime.lastWidth = element.width;\n\truntime.lastHeight = element.height;\n}\n\nfunction syncProgressRuntime(\n\truntime: UIProgressRuntime,\n\tbar: UIProgressBar,\n\telement: UIElement,\n\tscratchFill: FillRect,\n): void {\n\tconst changed =\n\t\truntime.lastValue !== bar.value ||\n\t\truntime.lastMax !== bar.max ||\n\t\truntime.lastFillColor !== bar.fillColor ||\n\t\truntime.lastBgColor !== bar.bgColor ||\n\t\truntime.lastDirection !== bar.direction ||\n\t\truntime.lastWidth !== element.width ||\n\t\truntime.lastHeight !== element.height;\n\tif (!changed) return;\n\n\tconst clamped = clampProgressValue(bar.value, bar.max);\n\tconst ratio = bar.max > 0 ? clamped / bar.max : 0;\n\tcomputeProgressFillRect(element.width, element.height, ratio, bar.direction, scratchFill);\n\n\tconst g = runtime.pixiGraphics;\n\tg.clear();\n\tg.rect(0, 0, element.width, element.height);\n\tg.fill({ color: bar.bgColor });\n\tif (scratchFill.width > 0 && scratchFill.height > 0) {\n\t\tg.rect(scratchFill.x, scratchFill.y, scratchFill.width, scratchFill.height);\n\t\tg.fill({ color: bar.fillColor });\n\t}\n\n\truntime.lastValue = bar.value;\n\truntime.lastMax = bar.max;\n\truntime.lastFillColor = bar.fillColor;\n\truntime.lastBgColor = bar.bgColor;\n\truntime.lastDirection = bar.direction;\n\truntime.lastWidth = element.width;\n\truntime.lastHeight = element.height;\n}\n"
7
7
  ],
8
- "mappings": "4cASA,uBAAS,kBAiEF,IAAM,EAAoD,CAChE,EAAG,EACH,EAAG,EACH,SAAU,EACV,OAAQ,EACR,OAAQ,CACT,EAKa,EAAoD,CAChE,EAAG,EACH,EAAG,EACH,SAAU,EACV,OAAQ,EACR,OAAQ,CACT,EAoBO,SAAS,CAAoB,CAAC,EAAW,EAA4D,CAC3G,MAAO,CACN,eAAgB,CACf,IACA,IACA,SAAU,EACV,OAAQ,EACR,OAAQ,CACT,CACD,EAWM,SAAS,CAAoB,CAAC,EAAW,EAA4D,CAC3G,MAAO,CACN,eAAgB,CACf,IACA,IACA,SAAU,EACV,OAAQ,EACR,OAAQ,CACT,CACD,EAqCM,SAAS,CAAe,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,EAAQ",
9
+ "debugId": "C99ACED21032E0BC64756E2164756E21",
10
10
  "names": []
11
11
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ecspresso",
3
- "version": "0.14.5",
3
+ "version": "0.14.7",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index.js",
6
6
  "types": "dist/index.d.ts",