@pixi-ui-editor/runtime-pixi 0.5.0 → 0.6.0

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 (76) hide show
  1. package/dist/SceneViewport.js.map +1 -1
  2. package/dist/assets/bitmapFonts.js.map +1 -1
  3. package/dist/assets/cache.js.map +1 -1
  4. package/dist/assets/fonts.js.map +1 -1
  5. package/dist/assets/loadTexture.js.map +1 -1
  6. package/dist/assets/sounds.js.map +1 -1
  7. package/dist/assets/spine.js.map +1 -1
  8. package/dist/assets/textures.js.map +1 -1
  9. package/dist/controls.d.ts +19 -0
  10. package/dist/controls.d.ts.map +1 -1
  11. package/dist/controls.js +40 -0
  12. package/dist/controls.js.map +1 -1
  13. package/dist/document.js.map +1 -1
  14. package/dist/index.d.ts +3 -0
  15. package/dist/index.d.ts.map +1 -1
  16. package/dist/index.js +3 -0
  17. package/dist/index.js.map +1 -1
  18. package/dist/layout.js.map +1 -1
  19. package/dist/layoutGroups.js.map +1 -1
  20. package/dist/localization.js.map +1 -1
  21. package/dist/pageGroup.d.ts +17 -0
  22. package/dist/pageGroup.d.ts.map +1 -0
  23. package/dist/pageGroup.js +20 -0
  24. package/dist/pageGroup.js.map +1 -0
  25. package/dist/particles.js.map +1 -1
  26. package/dist/scene.d.ts.map +1 -1
  27. package/dist/scene.js +23 -0
  28. package/dist/scene.js.map +1 -1
  29. package/dist/scrollView.js.map +1 -1
  30. package/dist/views/ButtonNodeView.js.map +1 -1
  31. package/dist/views/CheckboxNodeView.js.map +1 -1
  32. package/dist/views/InputNodeView.js.map +1 -1
  33. package/dist/views/NodeView.js.map +1 -1
  34. package/dist/views/PageGroupNodeView.d.ts +42 -0
  35. package/dist/views/PageGroupNodeView.d.ts.map +1 -0
  36. package/dist/views/PageGroupNodeView.js +72 -0
  37. package/dist/views/PageGroupNodeView.js.map +1 -0
  38. package/dist/views/PaginationNodeView.d.ts +59 -0
  39. package/dist/views/PaginationNodeView.d.ts.map +1 -0
  40. package/dist/views/PaginationNodeView.js +238 -0
  41. package/dist/views/PaginationNodeView.js.map +1 -0
  42. package/dist/views/ParticleEmitterNodeView.js.map +1 -1
  43. package/dist/views/ScrollViewNodeView.js.map +1 -1
  44. package/dist/views/SpineNodeView.d.ts +23 -2
  45. package/dist/views/SpineNodeView.d.ts.map +1 -1
  46. package/dist/views/SpineNodeView.js +131 -2
  47. package/dist/views/SpineNodeView.js.map +1 -1
  48. package/dist/views/StagedButtonNodeView.js.map +1 -1
  49. package/dist/views/ValueControlNodeViews.js.map +1 -1
  50. package/dist/views/basic.d.ts.map +1 -1
  51. package/dist/views/basic.js +3 -1
  52. package/dist/views/basic.js.map +1 -1
  53. package/dist/views/createNodeView.d.ts.map +1 -1
  54. package/dist/views/createNodeView.js +9 -0
  55. package/dist/views/createNodeView.js.map +1 -1
  56. package/package.json +5 -3
  57. package/dist/assets/spine.test.d.ts +0 -2
  58. package/dist/assets/spine.test.d.ts.map +0 -1
  59. package/dist/assets/spine.test.js +0 -42
  60. package/dist/assets/spine.test.js.map +0 -1
  61. package/dist/index.test.d.ts +0 -2
  62. package/dist/index.test.d.ts.map +0 -1
  63. package/dist/index.test.js +0 -485
  64. package/dist/index.test.js.map +0 -1
  65. package/dist/particles.test.d.ts +0 -2
  66. package/dist/particles.test.d.ts.map +0 -1
  67. package/dist/particles.test.js +0 -210
  68. package/dist/particles.test.js.map +0 -1
  69. package/dist/test.setup.d.ts +0 -2
  70. package/dist/test.setup.d.ts.map +0 -1
  71. package/dist/test.setup.js +0 -6
  72. package/dist/test.setup.js.map +0 -1
  73. package/dist/views/ParticleEmitterNodeView.test.d.ts +0 -2
  74. package/dist/views/ParticleEmitterNodeView.test.d.ts.map +0 -1
  75. package/dist/views/ParticleEmitterNodeView.test.js +0 -148
  76. package/dist/views/ParticleEmitterNodeView.test.js.map +0 -1
@@ -0,0 +1,72 @@
1
+ import { NodeView } from "./NodeView.js";
2
+ /**
3
+ * Shows exactly one direct child ("page") at a time and hides the rest; each page fills the group's
4
+ * full resolved rectangle (`PageItemContainer`/`scene.ts`, the same "children don't own their own
5
+ * position" contract a layout group or scroll-view has). Page order is simply hierarchy child order,
6
+ * followed by any pages appended at runtime through `addPage`.
7
+ *
8
+ * This view never decides on its own when to switch pages — it is driven one-way by `setPageGroupPage`
9
+ * from game code, or from the standalone `pagination` widget's `onPageChange` — the same relationship
10
+ * `PaginationNodeView` has with the value it displays. No built-in swipe gesture or transition.
11
+ *
12
+ * Pages are ordinarily authored (one per document child), but the count is not required to be known at
13
+ * authoring time: a growing dataset (e.g. a spin history list appended to during play) can start with
14
+ * zero or a few authored pages and grow through `addPage` — the same "the document is a starting point,
15
+ * not a ceiling" contract `ScrollViewNodeView.addScrollItem` already gives scroll-view content.
16
+ */
17
+ export class PageGroupNodeView extends NodeView {
18
+ items = [];
19
+ currentPage;
20
+ constructor(node, textures) {
21
+ super(textures);
22
+ this.currentPage = Math.max(0, Math.round(node.defaultPage));
23
+ }
24
+ /** Registers a direct child's wrapper in hierarchy order — called once per child while the scene tree is built. */
25
+ addPageItem(item) {
26
+ this.addChild(item);
27
+ const index = this.items.length;
28
+ this.items.push(item);
29
+ item.visible = index === this.currentPage;
30
+ }
31
+ /**
32
+ * Appends a page built at runtime (e.g. via `buildPrefabView`/`loadPrefabView`, or any hand-built
33
+ * `Container`) after the last one and fits it to the group's current resolved rectangle — a
34
+ * `SceneViewport` root is resized through its own `resize(...)` (the same fit contract Preview and
35
+ * export already rely on); anything else falls back to `Container.width`/`height`. Hidden until
36
+ * switched to via `page`/`setPageGroupViewPage`. Returns the new page's index.
37
+ */
38
+ addPage(view) {
39
+ const { width, height } = this.layoutRectangle;
40
+ const resizable = view;
41
+ if (typeof resizable.resize === "function")
42
+ resizable.resize({ width, height });
43
+ else {
44
+ view.width = width;
45
+ view.height = height;
46
+ }
47
+ const index = this.items.length;
48
+ this.items.push(view);
49
+ view.visible = index === this.currentPage;
50
+ this.addChild(view);
51
+ return index;
52
+ }
53
+ syncContent() {
54
+ this.applyVisibility();
55
+ }
56
+ applyVisibility() {
57
+ this.items.forEach((item, index) => { item.visible = index === this.currentPage; });
58
+ }
59
+ get pageCount() { return this.items.length; }
60
+ get page() { return this.currentPage; }
61
+ /** External sync from game code (or the pagination widget's `onPageChange`): switches the visible page. */
62
+ set page(value) {
63
+ if (this.items.length === 0)
64
+ return;
65
+ const next = Math.min(Math.max(0, Math.round(value)), this.items.length - 1);
66
+ if (next === this.currentPage)
67
+ return;
68
+ this.currentPage = next;
69
+ this.applyVisibility();
70
+ }
71
+ }
72
+ //# sourceMappingURL=PageGroupNodeView.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PageGroupNodeView.js","sourceRoot":"","sources":["../../src/views/PageGroupNodeView.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAIzC;;;;;;;;;;;;;;GAcG;AACH,MAAM,OAAO,iBAAkB,SAAQ,QAAQ;IAC5B,KAAK,GAAgB,EAAE,CAAC;IACjC,WAAW,CAAS;IAE5B,YAAY,IAAmB,EAAE,QAAkD;QACjF,KAAK,CAAC,QAAQ,CAAC,CAAC;QAChB,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC;IAC/D,CAAC;IAED,mHAAmH;IACnH,WAAW,CAAC,IAAuB;QACjC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;QACpB,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC;QAChC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACtB,IAAI,CAAC,OAAO,GAAG,KAAK,KAAK,IAAI,CAAC,WAAW,CAAC;IAC5C,CAAC;IAED;;;;;;OAMG;IACH,OAAO,CAAC,IAAe;QACrB,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE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AC,MAAM,GAAG,CAAC,CAAC,CAAC;QAC7E,IAAI,IAAI,KAAK,IAAI,CAAC,WAAW;YAAE,OAAO;QACtC,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC;QACxB,IAAI,CAAC,eAAe,EAAE,CAAC;IACzB,CAAC;CACF","sourcesContent":["import { type PageGroupNode, type UINode } from \"@pixi-ui-editor/schema\";\r\nimport { Container, Texture } from \"pixi.js\";\r\nimport { PageItemContainer } from \"../pageGroup.js\";\r\nimport { NodeView } from \"./NodeView.js\";\r\n\r\nexport type { PageGroupNode };\r\n\r\n/**\r\n * Shows exactly one direct child (\"page\") at a time and hides the rest; each page fills the group's\r\n * full resolved rectangle (`PageItemContainer`/`scene.ts`, the same \"children don't own their own\r\n * position\" contract a layout group or scroll-view has). Page order is simply hierarchy child order,\r\n * followed by any pages appended at runtime through `addPage`.\r\n *\r\n * This view never decides on its own when to switch pages — it is driven one-way by `setPageGroupPage`\r\n * from game code, or from the standalone `pagination` widget's `onPageChange` — the same relationship\r\n * `PaginationNodeView` has with the value it displays. No built-in swipe gesture or transition.\r\n *\r\n * Pages are ordinarily authored (one per document child), but the count is not required to be known at\r\n * authoring time: a growing dataset (e.g. a spin history list appended to during play) can start with\r\n * zero or a few authored pages and grow through `addPage` — the same \"the document is a starting point,\r\n * not a ceiling\" contract `ScrollViewNodeView.addScrollItem` already gives scroll-view content.\r\n */\r\nexport class PageGroupNodeView extends NodeView {\r\n private readonly items: Container[] = [];\r\n private currentPage: number;\r\n\r\n constructor(node: PageGroupNode, textures: ReadonlyMap<string, Texture> | undefined) {\r\n super(textures);\r\n this.currentPage = Math.max(0, Math.round(node.defaultPage));\r\n }\r\n\r\n /** Registers a direct child's wrapper in hierarchy order — called once per child while the scene tree is built. */\r\n addPageItem(item: PageItemContainer): void {\r\n this.addChild(item);\r\n const index = this.items.length;\r\n this.items.push(item);\r\n item.visible = index === this.currentPage;\r\n }\r\n\r\n /**\r\n * Appends a page built at runtime (e.g. via `buildPrefabView`/`loadPrefabView`, or any hand-built\r\n * `Container`) after the last one and fits it to the group's current resolved rectangle — a\r\n * `SceneViewport` root is resized through its own `resize(...)` (the same fit contract Preview and\r\n * export already rely on); anything else falls back to `Container.width`/`height`. Hidden until\r\n * switched to via `page`/`setPageGroupViewPage`. Returns the new page's index.\r\n */\r\n addPage(view: Container): number {\r\n const { width, height } = this.layoutRectangle;\r\n const resizable = view as Partial<{ resize: (size: { width: number; height: number }) => void }>;\r\n if (typeof resizable.resize === \"function\") resizable.resize({ width, height });\r\n else { view.width = width; view.height = height; }\r\n const index = this.items.length;\r\n this.items.push(view);\r\n view.visible = index === this.currentPage;\r\n this.addChild(view);\r\n return index;\r\n }\r\n\r\n protected syncContent(): void {\r\n this.applyVisibility();\r\n }\r\n\r\n private applyVisibility(): void {\r\n this.items.forEach((item, index) => { item.visible = index === this.currentPage; });\r\n }\r\n\r\n get pageCount(): number { return this.items.length; }\r\n\r\n get page(): number { return this.currentPage; }\r\n\r\n /** External sync from game code (or the pagination widget's `onPageChange`): switches the visible page. */\r\n set page(value: number) {\r\n if (this.items.length === 0) return;\r\n const next = Math.min(Math.max(0, Math.round(value)), this.items.length - 1);\r\n if (next === this.currentPage) return;\r\n this.currentPage = next;\r\n this.applyVisibility();\r\n }\r\n}\r\n"]}
@@ -0,0 +1,59 @@
1
+ import { type PaginationNode, type UINode } from "@pixi-ui-editor/schema";
2
+ import { Texture } from "pixi.js";
3
+ import { Signal } from "typed-signals";
4
+ import { NodeView, type SceneInteractionMode } from "./NodeView.js";
5
+ export type { PaginationNode };
6
+ /**
7
+ * Standalone page indicator: N procedurally generated items arranged by `@pixi/ui`'s `List` (the same
8
+ * approach `ScrollViewNodeView`/`scrollView.ts` use for arranging children) — this view never
9
+ * reimplements arrangement. Deliberately not wired to any scroll-view: game code owns the actual page
10
+ * transition and drives the widget one-way through `setPaginationViewPage`/`setPaginationViewPageCount`,
11
+ * the same relationship a slider or progress bar has to whatever value it displays.
12
+ *
13
+ * `style` picks between two mutually exclusive, differently-rendered item kinds — image dots
14
+ * (`Sprite`, two states) or rendered page-number text (`NumberItem`: a label, base style + an optional
15
+ * highlight color, plus an optional pill background behind only the current page) — never both.
16
+ * Switching `style` rebuilds every item, the same "view's required *type* changed" rule
17
+ * `StagedButtonNodeView` follows for its state views; `pageCount`/`dotSize` changes do too, since the
18
+ * item count/footprint is a runtime fact about this control, not scene topology — it only rebuilds this
19
+ * view's own item children, never the owning `NodeView` or the wider scene tree. The active pill itself
20
+ * is not structural: switching pages only recreates the (one) background view that needs to move.
21
+ */
22
+ export declare class PaginationNodeView extends NodeView {
23
+ private readonly list;
24
+ private readonly interaction;
25
+ private readonly fonts;
26
+ private items;
27
+ private styleMode;
28
+ private activeTexture;
29
+ private inactiveTexture;
30
+ private numberStyle;
31
+ private numberActiveColor;
32
+ private numberActiveBackgroundTexture;
33
+ private numberActiveNineSlice;
34
+ private pageCountState;
35
+ private currentPage;
36
+ private dotWidth;
37
+ private dotHeight;
38
+ private clickableState;
39
+ /** Fires only from a click on an item (when `clickable`); setting `page` programmatically never emits. */
40
+ readonly onPageChange: Signal<(page: number) => void>;
41
+ constructor(node: PaginationNode, textures: ReadonlyMap<string, Texture> | undefined, interaction: SceneInteractionMode, fonts: ReadonlyMap<string, string> | undefined);
42
+ private createBackgroundView;
43
+ private createItem;
44
+ /** Recreates every item for the current `styleMode`/`pageCountState`/`dotWidth`/`dotHeight`. */
45
+ private buildItems;
46
+ /** Authoring canvas stays inert like every other control; a clickable item is only live at runtime. */
47
+ private wireItem;
48
+ private applyCurrentPage;
49
+ protected syncContent(node: UINode): void;
50
+ get pageCount(): number;
51
+ /** Structural: rebuilds every item. Used both by document edits and `setPaginationViewPageCount`. */
52
+ set pageCount(value: number);
53
+ get page(): number;
54
+ /** External sync from game code (or editor preview): highlights an item without emitting `onPageChange`. */
55
+ set page(value: number);
56
+ /** An item click: highlights immediately, then notifies game code — the same order a checkbox/slider follows. */
57
+ private setPage;
58
+ }
59
+ //# sourceMappingURL=Pa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WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS;IAqBvK,OAAO,CAAC,oBAAoB;IAM5B,OAAO,CAAC,UAAU;IAelB,gGAAgG;IAChG,OAAO,CAAC,UAAU;IAWlB,uGAAuG;IACvG,OAAO,CAAC,QAAQ;IAOhB,OAAO,CAAC,gBAAgB;IAexB,SAAS,CAAC,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IA2BzC,IAAI,SAAS,IAAI,MAAM,CAAgC;IAEvD,qGAAqG;IACrG,IAAI,SAAS,CAAC,KAAK,EAAE,MAAM,EAM1B;IAED,IAAI,IAAI,IAAI,MAAM,CAA6B;IAE/C,4GAA4G;IAC5G,IAAI,IAAI,CAAC,KAAK,EAAE,MAAM,EAKrB;IAED,iHAAiH;IACjH,OAAO,CAAC,OAAO;CAKhB"}
@@ -0,0 +1,238 @@
1
+ import { List } from "@pixi/ui";
2
+ import { Container, NineSliceSprite, Sprite, Text, Texture } from "pixi.js";
3
+ import { Signal } from "typed-signals";
4
+ import { NodeView } from "./NodeView.js";
5
+ const DEFAULT_NUMBER_STYLE = { fontFamily: "Arial", fontSize: 18, fontWeight: "normal", fontStyle: "normal", fill: "#FFFFFF", align: "center", verticalAlign: "middle", wordWrap: false, breakWords: false, letterSpacing: 0 };
6
+ /** Same shape `ValueControlNodeViews.ts`'s own `textStyle` resolves — kept as its own small copy rather
7
+ * than shared, the same call ADR 0029 makes for two similar-but-separately-evolving style resolvers. */
8
+ function numberTextStyle(style, fill, fonts) {
9
+ const resolved = style ?? DEFAULT_NUMBER_STYLE;
10
+ return {
11
+ fontFamily: resolved.fontAssetId === undefined ? resolved.fontFamily : fonts?.get(resolved.fontAssetId) ?? resolved.fontFamily,
12
+ fontSize: resolved.fontSize,
13
+ fontWeight: resolved.fontWeight,
14
+ fontStyle: resolved.fontStyle,
15
+ fill,
16
+ align: resolved.align,
17
+ wordWrap: resolved.wordWrap,
18
+ breakWords: resolved.breakWords,
19
+ lineHeight: resolved.lineHeight,
20
+ letterSpacing: resolved.letterSpacing,
21
+ stroke: resolved.stroke === undefined ? undefined : { color: resolved.stroke.color, width: resolved.stroke.width },
22
+ };
23
+ }
24
+ /** Clamps a page index into the valid `[0, pageCount)` range; an empty widget still shows dot 0. */
25
+ function clampPage(page, pageCount) {
26
+ return Math.min(Math.max(0, Math.round(page)), Math.max(0, pageCount - 1));
27
+ }
28
+ /**
29
+ * One `numbers`-style item: a centered page-number label, plus an optional "pill" background shown
30
+ * only while it is the current page. `width`/`height` are overridden to the authored `dotSize` — the
31
+ * same fixed-footprint trick `ScrollItemContainer` uses — so the `List` spaces every item evenly
32
+ * whether or not its (rarely-present) background happens to be attached right now.
33
+ */
34
+ class NumberItem extends Container {
35
+ numberText;
36
+ itemWidth = 0;
37
+ itemHeight = 0;
38
+ background;
39
+ // Named `numberText`, not `label`: `Container.label` is pixi.js's own display-object name string.
40
+ constructor(numberText) {
41
+ super();
42
+ this.numberText = numberText;
43
+ numberText.anchor.set(0.5);
44
+ super.addChild(numberText);
45
+ }
46
+ get width() { return this.itemWidth; }
47
+ set width(value) { this.itemWidth = value; }
48
+ get height() { return this.itemHeight; }
49
+ set height(value) { this.itemHeight = value; }
50
+ resize(width, height) {
51
+ this.itemWidth = width;
52
+ this.itemHeight = height;
53
+ this.numberText.position.set(width / 2, height / 2);
54
+ this.background?.setSize(width, height);
55
+ }
56
+ /** Replaces the pill behind the label (destroying the previous one); `undefined` removes it. */
57
+ setBackground(view) {
58
+ if (this.background !== undefined) {
59
+ super.removeChild(this.background);
60
+ this.background.destroy();
61
+ }
62
+ this.background = view;
63
+ if (view === undefined)
64
+ return;
65
+ view.setSize(this.itemWidth, this.itemHeight);
66
+ super.addChildAt(view, 0);
67
+ }
68
+ }
69
+ /**
70
+ * Standalone page indicator: N procedurally generated items arranged by `@pixi/ui`'s `List` (the same
71
+ * approach `ScrollViewNodeView`/`scrollView.ts` use for arranging children) — this view never
72
+ * reimplements arrangement. Deliberately not wired to any scroll-view: game code owns the actual page
73
+ * transition and drives the widget one-way through `setPaginationViewPage`/`setPaginationViewPageCount`,
74
+ * the same relationship a slider or progress bar has to whatever value it displays.
75
+ *
76
+ * `style` picks between two mutually exclusive, differently-rendered item kinds — image dots
77
+ * (`Sprite`, two states) or rendered page-number text (`NumberItem`: a label, base style + an optional
78
+ * highlight color, plus an optional pill background behind only the current page) — never both.
79
+ * Switching `style` rebuilds every item, the same "view's required *type* changed" rule
80
+ * `StagedButtonNodeView` follows for its state views; `pageCount`/`dotSize` changes do too, since the
81
+ * item count/footprint is a runtime fact about this control, not scene topology — it only rebuilds this
82
+ * view's own item children, never the owning `NodeView` or the wider scene tree. The active pill itself
83
+ * is not structural: switching pages only recreates the (one) background view that needs to move.
84
+ */
85
+ export class PaginationNodeView extends NodeView {
86
+ list;
87
+ interaction;
88
+ fonts;
89
+ items = [];
90
+ styleMode;
91
+ activeTexture;
92
+ inactiveTexture;
93
+ numberStyle;
94
+ numberActiveColor;
95
+ numberActiveBackgroundTexture;
96
+ numberActiveNineSlice;
97
+ pageCountState;
98
+ currentPage;
99
+ dotWidth;
100
+ dotHeight;
101
+ clickableState;
102
+ /** Fires only from a click on an item (when `clickable`); setting `page` programmatically never emits. */
103
+ onPageChange = new Signal();
104
+ constructor(node, textures, interaction, fonts) {
105
+ super(textures);
106
+ this.interaction = interaction;
107
+ this.fonts = fonts;
108
+ this.styleMode = node.style;
109
+ this.activeTexture = node.activeAssetId === undefined ? Texture.WHITE : this.textureFor(node.activeAssetId) ?? Texture.WHITE;
110
+ this.inactiveTexture = node.inactiveAssetId === undefined ? Texture.WHITE : this.textureFor(node.inactiveAssetId) ?? Texture.WHITE;
111
+ this.numberStyle = node.numberStyle;
112
+ this.numberActiveColor = node.numberActiveColor;
113
+ this.numberActiveBackgroundTexture = node.numberActiveBackgroundAssetId === undefined ? undefined : this.textureFor(node.numberActiveBackgroundAssetId);
114
+ this.numberActiveNineSlice = node.numberActiveNineSlice;
115
+ this.pageCountState = Math.max(1, Math.round(node.pageCount));
116
+ this.currentPage = clampPage(node.defaultPage, this.pageCountState);
117
+ this.dotWidth = node.dotSize.width;
118
+ this.dotHeight = node.dotSize.height;
119
+ this.clickableState = node.clickable;
120
+ this.list = new List({ type: node.direction, elementsMargin: node.spacing });
121
+ this.buildItems();
122
+ this.setContent(this.list);
123
+ }
124
+ createBackgroundView(texture) {
125
+ return this.numberActiveNineSlice === undefined
126
+ ? new Sprite(texture)
127
+ : new NineSliceSprite({ texture, leftWidth: this.numberActiveNineSlice.left, topHeight: this.numberActiveNineSlice.top, rightWidth: this.numberActiveNineSlice.right, bottomHeight: this.numberActiveNineSlice.bottom });
128
+ }
129
+ createItem(index) {
130
+ if (this.styleMode === "dots") {
131
+ const dot = new Sprite(index === this.currentPage ? this.activeTexture : this.inactiveTexture);
132
+ dot.setSize(this.dotWidth, this.dotHeight);
133
+ return dot;
134
+ }
135
+ const isActive = index === this.currentPage;
136
+ const baseFill = this.numberStyle?.fill ?? DEFAULT_NUMBER_STYLE.fill;
137
+ const fill = isActive ? this.numberActiveColor ?? baseFill : baseFill;
138
+ const item = new NumberItem(new Text({ text: String(index + 1), style: numberTextStyle(this.numberStyle, fill, this.fonts) }));
139
+ item.resize(this.dotWidth, this.dotHeight);
140
+ if (isActive && this.numberActiveBackgroundTexture !== undefined)
141
+ item.setBackground(this.createBackgroundView(this.numberActiveBackgroundTexture));
142
+ return item;
143
+ }
144
+ /** Recreates every item for the current `styleMode`/`pageCountState`/`dotWidth`/`dotHeight`. */
145
+ buildItems() {
146
+ this.list.removeChildren();
147
+ this.items = [];
148
+ for (let index = 0; index < this.pageCountState; index++) {
149
+ const item = this.createItem(index);
150
+ this.wireItem(item, index);
151
+ this.items.push(item);
152
+ this.list.addChild(item);
153
+ }
154
+ }
155
+ /** Authoring canvas stays inert like every other control; a clickable item is only live at runtime. */
156
+ wireItem(item, index) {
157
+ if (this.interaction === "authoring" || !this.clickableState) {
158
+ item.eventMode = "none";
159
+ return;
160
+ }
161
+ item.eventMode = "static";
162
+ item.cursor = "pointer";
163
+ item.on("pointertap", () => this.setPage(index));
164
+ }
165
+ applyCurrentPage() {
166
+ if (this.styleMode === "dots") {
167
+ this.items.forEach((item, index) => { if (item instanceof Sprite)
168
+ item.texture = index === this.currentPage ? this.activeTexture : this.inactiveTexture; });
169
+ return;
170
+ }
171
+ const baseFill = this.numberStyle?.fill ?? DEFAULT_NUMBER_STYLE.fill;
172
+ this.items.forEach((item, index) => {
173
+ if (!(item instanceof NumberItem))
174
+ return;
175
+ const isActive = index === this.currentPage;
176
+ const fill = isActive ? this.numberActiveColor ?? baseFill : baseFill;
177
+ item.numberText.style = numberTextStyle(this.numberStyle, fill, this.fonts);
178
+ item.setBackground(isActive && this.numberActiveBackgroundTexture !== undefined ? this.createBackgroundView(this.numberActiveBackgroundTexture) : undefined);
179
+ });
180
+ }
181
+ syncContent(node) {
182
+ if (node.type !== "pagination")
183
+ return;
184
+ const active = node.activeAssetId === undefined ? Texture.WHITE : this.textureFor(node.activeAssetId) ?? Texture.WHITE;
185
+ const inactive = node.inactiveAssetId === undefined ? Texture.WHITE : this.textureFor(node.inactiveAssetId) ?? Texture.WHITE;
186
+ const pageCount = Math.max(1, Math.round(node.pageCount));
187
+ this.clickableState = node.clickable;
188
+ const structureChanged = node.style !== this.styleMode || pageCount !== this.pageCountState || node.dotSize.width !== this.dotWidth || node.dotSize.height !== this.dotHeight;
189
+ this.styleMode = node.style;
190
+ this.activeTexture = active;
191
+ this.inactiveTexture = inactive;
192
+ this.numberStyle = node.numberStyle;
193
+ this.numberActiveColor = node.numberActiveColor;
194
+ this.numberActiveBackgroundTexture = node.numberActiveBackgroundAssetId === undefined ? undefined : this.textureFor(node.numberActiveBackgroundAssetId);
195
+ this.numberActiveNineSlice = node.numberActiveNineSlice;
196
+ this.pageCountState = pageCount;
197
+ this.dotWidth = node.dotSize.width;
198
+ this.dotHeight = node.dotSize.height;
199
+ this.currentPage = clampPage(this.currentPage, pageCount);
200
+ if (this.list.type !== node.direction)
201
+ this.list.type = node.direction;
202
+ if (this.list.elementsMargin !== node.spacing)
203
+ this.list.elementsMargin = node.spacing;
204
+ if (structureChanged)
205
+ this.buildItems();
206
+ else
207
+ this.applyCurrentPage();
208
+ }
209
+ get pageCount() { return this.pageCountState; }
210
+ /** Structural: rebuilds every item. Used both by document edits and `setPaginationViewPageCount`. */
211
+ set pageCount(value) {
212
+ const next = Math.max(1, Math.round(value));
213
+ if (next === this.pageCountState)
214
+ return;
215
+ this.pageCountState = next;
216
+ this.currentPage = clampPage(this.currentPage, next);
217
+ this.buildItems();
218
+ }
219
+ get page() { return this.currentPage; }
220
+ /** External sync from game code (or editor preview): highlights an item without emitting `onPageChange`. */
221
+ set page(value) {
222
+ const next = clampPage(value, this.pageCountState);
223
+ if (next === this.currentPage)
224
+ return;
225
+ this.currentPage = next;
226
+ this.applyCurrentPage();
227
+ }
228
+ /** An item click: highlights immediately, then notifies game code — the same order a checkbox/slider follows. */
229
+ setPage(index) {
230
+ const next = clampPage(index, this.pageCountState);
231
+ if (next !== this.currentPage) {
232
+ this.currentPage = next;
233
+ this.applyCurrentPage();
234
+ }
235
+ this.onPageChange.emit(next);
236
+ }
237
+ }
238
+ //# sourceMappingURL=PaginationNodeView.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PaginationNodeView.js","sourceRoot":"","sources":["../../src/views/PaginationNodeView.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAChC,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAyB,MAAM,SAAS,CAAC;AACnG,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACvC,OAAO,EAAE,QAAQ,EAA6B,MAAM,eAAe,CAAC;AAIpE,MAAM,oBAAoB,GAAwB,EAAE,UAAU,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,UAAU,EAAE,QAAQ,EAAE,SAAS,EAAE,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;IAED,iHAAiH;IACzG,OAAO,CAAC,KAAa;QAC3B,MAAM,IAAI,GAAG,SAAS,CAAC,KAAK,EAAE,IAAI,CAAC,cAAc,CAAC,CAAC;QACnD,IAAI,IAAI,KAAK,IAAI,CAAC,WAAW,EAAE,CAAC;YAAC,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC;YAAC,IAAI,CAAC,gBAAgB,EAAE,CAAC;QAAC,CAAC;QACpF,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC/B,CAAC;CACF","sourcesContent":["import { type LayoutPadding, type PaginationNode, type TextStyleDefinition, type UINode } from \"@pixi-ui-editor/schema\";\r\nimport { List } from \"@pixi/ui\";\r\nimport { Container, NineSliceSprite, Sprite, Text, Texture, type TextStyleOptions } from \"pixi.js\";\r\nimport { Signal } from \"typed-signals\";\r\nimport { NodeView, type SceneInteractionMode } from \"./NodeView.js\";\r\n\r\nexport type { PaginationNode };\r\n\r\nconst DEFAULT_NUMBER_STYLE: TextStyleDefinition = { fontFamily: \"Arial\", fontSize: 18, fontWeight: \"normal\", fontStyle: \"normal\", fill: \"#FFFFFF\", align: \"center\", verticalAlign: \"middle\", wordWrap: false, breakWords: false, letterSpacing: 0 };\r\n\r\n/** Same shape `ValueControlNodeViews.ts`'s own `textStyle` resolves — kept as its own small copy rather\r\n * than shared, the same call ADR 0029 makes for two similar-but-separately-evolving style resolvers. */\r\nfunction numberTextStyle(style: TextStyleDefinition | undefined, fill: string, fonts: ReadonlyMap<string, string> | undefined): Partial<TextStyleOptions> {\r\n const resolved = style ?? DEFAULT_NUMBER_STYLE;\r\n return {\r\n fontFamily: resolved.fontAssetId === undefined ? resolved.fontFamily : fonts?.get(resolved.fontAssetId) ?? resolved.fontFamily,\r\n fontSize: resolved.fontSize,\r\n fontWeight: resolved.fontWeight,\r\n fontStyle: resolved.fontStyle,\r\n fill,\r\n align: resolved.align,\r\n wordWrap: resolved.wordWrap,\r\n breakWords: resolved.breakWords,\r\n lineHeight: resolved.lineHeight,\r\n letterSpacing: resolved.letterSpacing,\r\n stroke: resolved.stroke === undefined ? undefined : { color: resolved.stroke.color, width: resolved.stroke.width },\r\n };\r\n}\r\n\r\n/** Clamps a page index into the valid `[0, pageCount)` range; an empty widget still shows dot 0. */\r\nfunction clampPage(page: number, pageCount: number): number {\r\n return Math.min(Math.max(0, Math.round(page)), Math.max(0, pageCount - 1));\r\n}\r\n\r\n/**\r\n * One `numbers`-style item: a centered page-number label, plus an optional \"pill\" background shown\r\n * only while it is the current page. `width`/`height` are overridden to the authored `dotSize` — the\r\n * same fixed-footprint trick `ScrollItemContainer` uses — so the `List` spaces every item evenly\r\n * whether or not its (rarely-present) background happens to be attached right now.\r\n */\r\nclass NumberItem extends Container {\r\n private itemWidth = 0;\r\n private itemHeight = 0;\r\n private background?: Sprite | NineSliceSprite;\r\n\r\n // Named `numberText`, not `label`: `Container.label` is pixi.js's own display-object name string.\r\n constructor(readonly numberText: Text) {\r\n super();\r\n numberText.anchor.set(0.5);\r\n super.addChild(numberText);\r\n }\r\n\r\n override get width(): number { return this.itemWidth; }\r\n override set width(value: number) { this.itemWidth = value; }\r\n override get height(): number { return this.itemHeight; }\r\n override set height(value: number) { this.itemHeight = value; }\r\n\r\n resize(width: number, height: number): void {\r\n this.itemWidth = width;\r\n this.itemHeight = height;\r\n this.numberText.position.set(width / 2, height / 2);\r\n this.background?.setSize(width, height);\r\n }\r\n\r\n /** Replaces the pill behind the label (destroying the previous one); `undefined` removes it. */\r\n setBackground(view: Sprite | NineSliceSprite | undefined): void {\r\n if (this.background !== undefined) { super.removeChild(this.background); this.background.destroy(); }\r\n this.background = view;\r\n if (view === undefined) return;\r\n view.setSize(this.itemWidth, this.itemHeight);\r\n super.addChildAt(view, 0);\r\n }\r\n}\r\n\r\n/**\r\n * Standalone page indicator: N procedurally generated items arranged by `@pixi/ui`'s `List` (the same\r\n * approach `ScrollViewNodeView`/`scrollView.ts` use for arranging children) — this view never\r\n * reimplements arrangement. Deliberately not wired to any scroll-view: game code owns the actual page\r\n * transition and drives the widget one-way through `setPaginationViewPage`/`setPaginationViewPageCount`,\r\n * the same relationship a slider or progress bar has to whatever value it displays.\r\n *\r\n * `style` picks between two mutually exclusive, differently-rendered item kinds — image dots\r\n * (`Sprite`, two states) or rendered page-number text (`NumberItem`: a label, base style + an optional\r\n * highlight color, plus an optional pill background behind only the current page) — never both.\r\n * Switching `style` rebuilds every item, the same \"view's required *type* changed\" rule\r\n * `StagedButtonNodeView` follows for its state views; `pageCount`/`dotSize` changes do too, since the\r\n * item count/footprint is a runtime fact about this control, not scene topology — it only rebuilds this\r\n * view's own item children, never the owning `NodeView` or the wider scene tree. The active pill itself\r\n * is not structural: switching pages only recreates the (one) background view that needs to move.\r\n */\r\nexport class PaginationNodeView extends NodeView {\r\n private readonly list: List;\r\n private readonly interaction: SceneInteractionMode;\r\n private readonly fonts: ReadonlyMap<string, string> | undefined;\r\n private items: (Sprite | NumberItem)[] = [];\r\n private styleMode: PaginationNode[\"style\"];\r\n private activeTexture: Texture;\r\n private inactiveTexture: Texture;\r\n private numberStyle: TextStyleDefinition | undefined;\r\n private numberActiveColor: string | undefined;\r\n private numberActiveBackgroundTexture: Texture | undefined;\r\n private numberActiveNineSlice: LayoutPadding | undefined;\r\n private pageCountState: number;\r\n private currentPage: number;\r\n private dotWidth: number;\r\n private dotHeight: number;\r\n private clickableState: boolean;\r\n\r\n /** Fires only from a click on an item (when `clickable`); setting `page` programmatically never emits. */\r\n readonly onPageChange = new Signal<(page: number) => void>();\r\n\r\n constructor(node: PaginationNode, textures: ReadonlyMap<string, Texture> | undefined, interaction: SceneInteractionMode, fonts: ReadonlyMap<string, string> | undefined) {\r\n super(textures);\r\n this.interaction = interaction;\r\n this.fonts = fonts;\r\n this.styleMode = node.style;\r\n this.activeTexture = node.activeAssetId === undefined ? Texture.WHITE : this.textureFor(node.activeAssetId) ?? Texture.WHITE;\r\n this.inactiveTexture = node.inactiveAssetId === undefined ? Texture.WHITE : this.textureFor(node.inactiveAssetId) ?? Texture.WHITE;\r\n this.numberStyle = node.numberStyle;\r\n this.numberActiveColor = node.numberActiveColor;\r\n this.numberActiveBackgroundTexture = node.numberActiveBackgroundAssetId === undefined ? undefined : this.textureFor(node.numberActiveBackgroundAssetId);\r\n this.numberActiveNineSlice = node.numberActiveNineSlice;\r\n this.pageCountState = Math.max(1, Math.round(node.pageCount));\r\n this.currentPage = clampPage(node.defaultPage, this.pageCountState);\r\n this.dotWidth = node.dotSize.width;\r\n this.dotHeight = node.dotSize.height;\r\n this.clickableState = node.clickable;\r\n this.list = new List({ type: node.direction, elementsMargin: node.spacing });\r\n this.buildItems();\r\n this.setContent(this.list);\r\n }\r\n\r\n private createBackgroundView(texture: Texture): Sprite | NineSliceSprite {\r\n return this.numberActiveNineSlice === undefined\r\n ? new Sprite(texture)\r\n : new NineSliceSprite({ texture, leftWidth: this.numberActiveNineSlice.left, topHeight: this.numberActiveNineSlice.top, rightWidth: this.numberActiveNineSlice.right, bottomHeight: this.numberActiveNineSlice.bottom });\r\n }\r\n\r\n private createItem(index: number): Sprite | NumberItem {\r\n if (this.styleMode === \"dots\") {\r\n const dot = new Sprite(index === this.currentPage ? this.activeTexture : this.inactiveTexture);\r\n dot.setSize(this.dotWidth, this.dotHeight);\r\n return dot;\r\n }\r\n const isActive = index === this.currentPage;\r\n const baseFill = this.numberStyle?.fill ?? DEFAULT_NUMBER_STYLE.fill;\r\n const fill = isActive ? this.numberActiveColor ?? baseFill : baseFill;\r\n const item = new NumberItem(new Text({ text: String(index + 1), style: numberTextStyle(this.numberStyle, fill, this.fonts) }));\r\n item.resize(this.dotWidth, this.dotHeight);\r\n if (isActive && this.numberActiveBackgroundTexture !== undefined) item.setBackground(this.createBackgroundView(this.numberActiveBackgroundTexture));\r\n return item;\r\n }\r\n\r\n /** Recreates every item for the current `styleMode`/`pageCountState`/`dotWidth`/`dotHeight`. */\r\n private buildItems(): void {\r\n this.list.removeChildren();\r\n this.items = [];\r\n for (let index = 0; index < this.pageCountState; index++) {\r\n const item = this.createItem(index);\r\n this.wireItem(item, index);\r\n this.items.push(item);\r\n this.list.addChild(item);\r\n }\r\n }\r\n\r\n /** Authoring canvas stays inert like every other control; a clickable item is only live at runtime. */\r\n private wireItem(item: Sprite | NumberItem, index: number): void {\r\n if (this.interaction === \"authoring\" || !this.clickableState) { item.eventMode = \"none\"; return; }\r\n item.eventMode = \"static\";\r\n item.cursor = \"pointer\";\r\n item.on(\"pointertap\", () => this.setPage(index));\r\n }\r\n\r\n private applyCurrentPage(): void {\r\n if (this.styleMode === \"dots\") {\r\n this.items.forEach((item, index) => { if (item instanceof Sprite) item.texture = index === this.currentPage ? this.activeTexture : this.inactiveTexture; });\r\n return;\r\n }\r\n const baseFill = this.numberStyle?.fill ?? DEFAULT_NUMBER_STYLE.fill;\r\n this.items.forEach((item, index) => {\r\n if (!(item instanceof NumberItem)) return;\r\n const isActive = index === this.currentPage;\r\n const fill = isActive ? this.numberActiveColor ?? baseFill : baseFill;\r\n item.numberText.style = numberTextStyle(this.numberStyle, fill, this.fonts);\r\n item.setBackground(isActive && this.numberActiveBackgroundTexture !== undefined ? this.createBackgroundView(this.numberActiveBackgroundTexture) : undefined);\r\n });\r\n }\r\n\r\n protected syncContent(node: UINode): void {\r\n if (node.type !== \"pagination\") return;\r\n const active = node.activeAssetId === undefined ? Texture.WHITE : this.textureFor(node.activeAssetId) ?? Texture.WHITE;\r\n const inactive = node.inactiveAssetId === undefined ? Texture.WHITE : this.textureFor(node.inactiveAssetId) ?? Texture.WHITE;\r\n const pageCount = Math.max(1, Math.round(node.pageCount));\r\n this.clickableState = node.clickable;\r\n\r\n const structureChanged = node.style !== this.styleMode || pageCount !== this.pageCountState || node.dotSize.width !== this.dotWidth || node.dotSize.height !== this.dotHeight;\r\n this.styleMode = node.style;\r\n this.activeTexture = active;\r\n this.inactiveTexture = inactive;\r\n this.numberStyle = node.numberStyle;\r\n this.numberActiveColor = node.numberActiveColor;\r\n this.numberActiveBackgroundTexture = node.numberActiveBackgroundAssetId === undefined ? undefined : this.textureFor(node.numberActiveBackgroundAssetId);\r\n this.numberActiveNineSlice = node.numberActiveNineSlice;\r\n this.pageCountState = pageCount;\r\n this.dotWidth = node.dotSize.width;\r\n this.dotHeight = node.dotSize.height;\r\n this.currentPage = clampPage(this.currentPage, pageCount);\r\n\r\n if (this.list.type !== node.direction) this.list.type = node.direction;\r\n if (this.list.elementsMargin !== node.spacing) this.list.elementsMargin = node.spacing;\r\n\r\n if (structureChanged) this.buildItems();\r\n else this.applyCurrentPage();\r\n }\r\n\r\n get pageCount(): number { return this.pageCountState; }\r\n\r\n /** Structural: rebuilds every item. Used both by document edits and `setPaginationViewPageCount`. */\r\n set pageCount(value: number) {\r\n const next = Math.max(1, Math.round(value));\r\n if (next === this.pageCountState) return;\r\n this.pageCountState = next;\r\n this.currentPage = clampPage(this.currentPage, next);\r\n this.buildItems();\r\n }\r\n\r\n get page(): number { return this.currentPage; }\r\n\r\n /** External sync from game code (or editor preview): highlights an item without emitting `onPageChange`. */\r\n set page(value: number) {\r\n const next = clampPage(value, this.pageCountState);\r\n if (next === this.currentPage) return;\r\n this.currentPage = next;\r\n this.applyCurrentPage();\r\n }\r\n\r\n /** An item click: highlights immediately, then notifies game code — the same order a checkbox/slider follows. */\r\n private setPage(index: number): void {\r\n const next = clampPage(index, this.pageCountState);\r\n if (next !== this.currentPage) { this.currentPage = next; this.applyCurrentPage(); }\r\n this.onPageChange.emit(next);\r\n }\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"ParticleEmitterNodeView.js","sourceRoot":"","sources":["../../src/views/ParticleEmitterNodeView.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,EAAuB,MAAM,SAAS,CAAC;AAC1E,OAAO,EAAE,IAAI,EAAE,YAAY,EAAE,iBAAiB,EAAqB,MAAM,iBAAiB,CAAC;AAC3F,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,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CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC;YACxC,CAAC;iBAAM,CAAC;gBACN,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC;YACtC,CAAC;YACD,MAAM,CAAC,OAAO,GAAG,IAAI,CAAC;QACxB,CAAC;IACH,CAAC;CACF;AAGD,SAAS,aAAa,CAAC,MAAsB,EAAE,IAA0B;IACvE,MAAM,MAAM,GAAG,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC;IACtC,MAAM,GAAG,GAAG,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC;IACnE,OAAO,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,GAAG,MAAM,CAAC,GAAG,MAAM,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,CAAC,CAAC,CAAC;AACtF,CAAC","sourcesContent":["import type { ParticleEffectDefinition, UINode } from \"@pixi-ui-editor/schema\";\r\nimport { Container, Sprite, Texture, type DestroyOptions } from \"pixi.js\";\r\nimport { lerp, lerpColorHex, ParticleSimulator, type ParticleSlot } from \"../particles.js\";\r\nimport { NodeView } from \"./NodeView.js\";\r\n\r\nconst DEG_TO_RAD = Math.PI / 180;\r\n\r\n/** Thin Pixi adapter: NodeView continues to own transforms, layout and hit testing. */\r\nexport class ParticleEmitterNodeView extends NodeView {\r\n private readonly contentRoot = new Container();\r\n private readonly simulator: ParticleSimulator<Sprite>;\r\n private simulationSpace: \"local\" | \"world\" = \"local\";\r\n private autoplayHandled = false;\r\n\r\n constructor(effect: ParticleEffectDefinition, textures?: ReadonlyMap<string, Texture>) {\r\n super(textures);\r\n this.setContent(this.contentRoot);\r\n this.simulator = new ParticleSimulator<Sprite>(effect, {\r\n createRender: () => {\r\n const sprite = new Sprite(Texture.EMPTY);\r\n sprite.anchor.set(0.5);\r\n sprite.visible = false;\r\n this.contentRoot.addChild(sprite);\r\n return sprite;\r\n },\r\n hideRender: (sprite) => { sprite.visible = false; },\r\n destroyRender: (sprite) => { this.contentRoot.removeChild(sprite); sprite.destroy(); },\r\n getWorldTransform: () => this.worldTransform,\r\n });\r\n }\r\n\r\n updateParticles(deltaSeconds: number): void {\r\n const rect = this.layoutRectangle;\r\n this.simulator.update(deltaSeconds, { width: rect.width, height: rect.height, space: this.simulationSpace });\r\n this.syncRender();\r\n }\r\n\r\n play(): void { this.simulator.play(); }\r\n pause(): void { this.simulator.pause(); }\r\n restart(): void { this.simulator.restart(); }\r\n stop(): void { this.simulator.stop(); }\r\n /** Advances exactly one fixed step even while paused, preserving the current playing/paused state. */\r\n step(): void {\r\n const rect = this.layoutRectangle;\r\n this.simulator.step({ width: rect.width, height: rect.height, space: this.simulationSpace });\r\n this.syncRender();\r\n }\r\n dispose(): void { this.simulator.dispose(); }\r\n setEmissionMultiplier(value: number): void { this.simulator.setEmissionMultiplier(value); }\r\n getDiagnostics() { return this.simulator.getDiagnostics(); }\r\n\r\n syncEffect(effect: ParticleEffectDefinition): void { this.simulator.syncEffect(effect); }\r\n\r\n override destroy(options?: DestroyOptions): void {\r\n this.dispose();\r\n super.destroy(options);\r\n }\r\n\r\n protected syncContent(node: UINode): void {\r\n if (node.type !== \"particle-emitter\") return;\r\n this.simulationSpace = node.simulationSpace;\r\n // Autoplay only fires once, right after construction: syncContent also runs on every unrelated\r\n // document edit (via the shared node-sync pass), and re-arming play() there would silently\r\n // override an explicit pause()/stop() the moment the author touches anything else in the project.\r\n if (!this.autoplayHandled) {\r\n this.autoplayHandled = true;\r\n if (node.autoplay) this.simulator.play();\r\n }\r\n }\r\n\r\n private syncRender(): void {\r\n const p = this.simulator.definition.particle;\r\n const source = p.visual.source;\r\n const space = this.simulationSpace;\r\n const inverse = space === \"world\" ? this.worldTransform : undefined;\r\n for (const slot of this.simulator.activeSlots) {\r\n const sprite = slot.render;\r\n const t = slot.lifetime > 0 ? Math.min(1, slot.age / slot.lifetime) : 1;\r\n sprite.alpha = lerp(p.visual.alpha.start, p.visual.alpha.end, t);\r\n sprite.tint = lerpColorHex(p.visual.tint.start, p.visual.tint.end, t);\r\n sprite.scale.set(lerp(slot.scaleStart, slot.scaleEnd, t));\r\n sprite.rotation = slot.rotationDegrees * DEG_TO_RAD;\r\n sprite.blendMode = p.visual.blendMode;\r\n const assetId = source.type === \"single\" ? source.assetId\r\n : source.type === \"random\" ? source.assetIds[slot.sourceIndex]!\r\n : source.assetIds[sequenceFrame(source, slot)]!;\r\n const texture = this.textureFor(assetId);\r\n if (texture) sprite.texture = texture;\r\n if (space === \"world\" && inverse !== undefined) {\r\n const dx = slot.x - slot.spawnX, dy = slot.y - slot.spawnY;\r\n const worldX = slot.worldSpawnX + slot.spawnMatrixA * dx + slot.spawnMatrixC * dy;\r\n const worldY = slot.worldSpawnY + slot.spawnMatrixB * dx + slot.spawnMatrixD * dy;\r\n const local = inverse.applyInverse({ x: worldX, y: worldY });\r\n sprite.position.set(local.x, local.y);\r\n } else {\r\n sprite.position.set(slot.x, slot.y);\r\n }\r\n sprite.visible = true;\r\n }\r\n }\r\n}\r\n\r\ntype SequenceSource = Extract<ParticleEffectDefinition[\"particle\"][\"visual\"][\"source\"], { type: \"sequence\" }>;\r\nfunction sequenceFrame(source: SequenceSource, slot: ParticleSlot<Sprite>): number {\r\n const length = source.assetIds.length;\r\n const raw = slot.sequenceStart + Math.floor(slot.age * source.fps);\r\n return source.loop ? ((raw % length) + length) % length : Math.min(raw, length - 1);\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"ScrollViewNodeView.js","sourceRoot":"","sources":["../../src/views/ScrollViewNodeView.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAErC,OAAO,EAAE,6BAA6B,EAAE,MAAM,kB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AC;QACD,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IAC9B,CAAC;IAED,IAAI,OAAO,KAAa,OAAO,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC;IACxD,IAAI,OAAO,CAAC,KAAa,IAAI,IAAI,CAAC,SAAS,CAAC,OAAO,GAAG,KAAK,CAAC,CAAC,CAAC;IAC9D,IAAI,OAAO,KAAa,OAAO,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC;IACxD,IAAI,OAAO,CAAC,KAAa,IAAI,IAAI,CAAC,SAAS,CAAC,OAAO,GAAG,KAAK,CAAC,CAAC,CAAC;IAC9D,QAAQ,CAAC,SAAiB,IAAU,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;IACzE,SAAS,KAAW,IAAI,CAAC,SAAS,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC;IACjD,YAAY,KAAW,IAAI,CAAC,SAAS,CAAC,YAAY,EAAE,CAAC,CAAC,CAAC;IACvD,IAAI,QAAQ,KAA4B,OAAO,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC,CAAC;CAC1E","sourcesContent":["import { type ScrollViewNode, type UINode } from \"@pixi-ui-editor/schema\";\r\nimport { ScrollBox } from \"@pixi/ui\";\r\nimport { Container, Texture } from \"pixi.js\";\r\nimport { SCROLL_DIRECTION_TO_LIST_TYPE } from \"../scrollView.js\";\r\nimport { NodeView, type SceneInteractionMode } from \"./NodeView.js\";\r\n\r\n/**\r\n * Adapts a scroll-view node to `@pixi/ui`'s `ScrollBox`, which already implements the\r\n * viewport/content/mask contract on its own: `scrollBox.list` is the content container that moves,\r\n * and its own mask clips overflow — this class never reimplements clipping or drag/wheel scrolling.\r\n * `direction`, `cornerRadius`, `easingEnabled` and `shiftWheelHorizontal` have no safe public API for\r\n * live updates in `@pixi/ui` 2.3.2 (they live on a protected `options` field, and `easingEnabled` is\r\n * captured once into an internal `Trackpad`), so changing them rebuilds the scene like Spine's\r\n * `animation`/`loop` do; padding, item spacing, background color and the view's own size stay\r\n * incremental through `syncContent`.\r\n */\r\nexport class ScrollViewNodeView extends NodeView {\r\n private readonly scrollBox: ScrollBox;\r\n\r\n constructor(node: ScrollViewNode, textures: ReadonlyMap<string, Texture> | undefined, interaction: SceneInteractionMode) {\r\n super(textures);\r\n const settings = node.scrollView;\r\n this.scrollBox = new ScrollBox({\r\n width: node.transform.width,\r\n height: node.transform.height,\r\n type: SCROLL_DIRECTION_TO_LIST_TYPE[settings.direction],\r\n background: settings.backgroundColor,\r\n radius: settings.cornerRadius,\r\n disableEasing: !settings.easingEnabled,\r\n // Зафиксировано решением: скролл никогда не перехватывает wheel вне компонента.\r\n globalScroll: false,\r\n shiftScroll: settings.shiftWheelHorizontal ?? false,\r\n leftPadding: settings.padding.left,\r\n rightPadding: settings.padding.right,\r\n topPadding: settings.padding.top,\r\n bottomPadding: settings.padding.bottom,\r\n elementsMargin: settings.itemSpacing,\r\n });\r\n // Authoring-канвас инертен: selection и drag идут через grab-прямоугольник базового NodeView.\r\n if (interaction === \"authoring\") this.scrollBox.eventMode = \"none\";\r\n this.setContent(this.scrollBox);\r\n }\r\n\r\n addScrollItem<T extends Container[]>(...children: T): T[0] {\r\n return this.scrollBox.addItem(...children);\r\n }\r\n\r\n protected syncContent(node: UINode, transform: UINode[\"transform\"]): void {\r\n if (node.type !== \"scroll-view\") return;\r\n this.scrollBox.setSize(transform.width, transform.height);\r\n this.scrollBox.setBackground(node.scrollView.backgroundColor);\r\n const list = this.scrollBox.list;\r\n if (list !== undefined) {\r\n list.leftPadding = node.scrollView.padding.left;\r\n list.rightPadding = node.scrollView.padding.right;\r\n list.topPadding = node.scrollView.padding.top;\r\n list.bottomPadding = node.scrollView.padding.bottom;\r\n list.elementsMargin = node.scrollView.itemSpacing;\r\n }\r\n this.scrollBox.resize(true);\r\n }\r\n\r\n get scrollX(): number { return this.scrollBox.scrollX; }\r\n set scrollX(value: number) { this.scrollBox.scrollX = value; }\r\n get scrollY(): number { return this.scrollBox.scrollY; }\r\n set scrollY(value: number) { this.scrollBox.scrollY = value; }\r\n scrollTo(elementId: number): void { this.scrollBox.scrollTo(elementId); }\r\n scrollTop(): void { this.scrollBox.scrollTop(); }\r\n scrollBottom(): void { this.scrollBox.scrollBottom(); }\r\n get onScroll(): ScrollBox[\"onScroll\"] { return this.scrollBox.onScroll; }\r\n}\r\n"]}
@@ -1,12 +1,33 @@
1
1
  import { type SkeletonData } from "@esotericsoftware/spine-pixi-v8";
2
- import { type LayoutProfileId, type SpineReferenceFrame, type UINode } from "@pixi-ui-editor/schema";
3
- import { type Ticker } from "pixi.js";
2
+ import { type LayoutProfileId, type SpineConnector, type SpineReferenceFrame, type UINode } from "@pixi-ui-editor/schema";
3
+ import { Container, type Ticker } from "pixi.js";
4
4
  import { NodeView } from "./NodeView.js";
5
+ type ConnectorBinding = SpineConnector & {
6
+ target: Container;
7
+ };
8
+ type RuntimeConnectorBinding = ConnectorBinding | ({
9
+ boneName: string;
10
+ targetNodeId: string;
11
+ target: Container;
12
+ } & Partial<ConnectorBinding>);
5
13
  export declare class SpineNodeView extends NodeView {
6
14
  private referenceFrame;
7
15
  private readonly initializeForAuthoring;
16
+ private connectorBindings;
17
+ private activeConnectors;
18
+ private connectorBonesActive;
8
19
  constructor(skeletonData: SkeletonData | undefined, animation: string | undefined, autoplay: boolean, loop: boolean, animationSpeed: number, initializeForAuthoring: boolean, referenceFrame?: SpineReferenceFrame, ticker?: Ticker);
20
+ /** Runtime switch used by game code; authored connector definitions are inactive by default. */
21
+ get activeConnectorBones(): boolean;
22
+ set activeConnectorBones(active: boolean);
23
+ /** Replaces the scene-resolved connector targets, preserving the current active state. */
24
+ setConnectorBones(bindings: readonly RuntimeConnectorBinding[]): void;
25
+ setConnectorBonesActive(active: boolean): void;
26
+ /** Reapplies bone matrices and the target's required zero local transform. */
27
+ refreshConnectorBones(): void;
28
+ private restoreConnectorTargets;
9
29
  setReferenceFrame(referenceFrame: SpineReferenceFrame | undefined): void;
10
30
  protected syncContent(node: UINode, transform: UINode["transform"], profile: LayoutProfileId): void;
11
31
  }
32
+ export {};
12
33
  //# sourceMappingURL=SpineNodeView.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"SpineNodeView.d.ts","sourceRoot":"","sources":["../../src/views/SpineNodeView.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,KAAK,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAC3E,OAAO,EAAE,KAAK,eAAe,EAAE,KAAK,mBAAmB,EAAE,KAAK,MAAM,EAAE,MAAM,wBAAwB,CAAC;AACrG,OAAO,EAAY,KAAK,MAAM,EAAE,MAAM,SAAS,CAAC;AAEhD,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAEzC,qBAAa,aAAc,SAAQ,QAAQ;IACzC,OAAO,CAAC,cAAc,CAAkC;IACxD,OAAO,CAAC,QAAQ,CAAC,sBAAsB,CAAU;gBAErC,YAAY,EAAE,YAAY,GAAG,SAAS,EAAE,SAAS,EAAE,MAAM,GAAG,SAAS,EAAE,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,EAAE,sBAAsB,EAAE,OAAO,EAAE,cAAc,CAAC,EAAE,mBAAmB,EAAE,MAAM,CAAC,EAAE,MAAM;IAuBnO,iBAAiB,CAAC,cAAc,EAAE,mBAAmB,GAAG,SAAS,GAAG,IAAI;IAIxE,SAAS,CAAC,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,CAAC,WAAW,CAAC,EAAE,OAAO,EAAE,eAAe,GAAG,IAAI;CA2BpG"}
1
+ {"version":3,"file":"SpineNodeView.d.ts","sourceRoot":"","sources":["../../src/views/SpineNodeView.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqD,KAAK,YAAY,EAAE,MAAM,iCAAiC,CAAC;AACvH,OAAO,EAAE,K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