@codexo/exojs-tilemap 0.19.0 → 0.20.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 (157) hide show
  1. package/README.md +7 -163
  2. package/index.d.ts +1 -0
  3. package/index.js +1 -0
  4. package/package.json +12 -20
  5. package/dist/esm/ChunkSource.d.ts +0 -33
  6. package/dist/esm/ChunkSource.d.ts.map +0 -1
  7. package/dist/esm/ChunkStreamer.d.ts +0 -104
  8. package/dist/esm/ChunkStreamer.d.ts.map +0 -1
  9. package/dist/esm/ChunkStreamer.js +0 -229
  10. package/dist/esm/ChunkStreamer.js.map +0 -1
  11. package/dist/esm/ImageLayer.d.ts +0 -89
  12. package/dist/esm/ImageLayer.d.ts.map +0 -1
  13. package/dist/esm/ImageLayer.js +0 -74
  14. package/dist/esm/ImageLayer.js.map +0 -1
  15. package/dist/esm/ImageLayerNode.d.ts +0 -91
  16. package/dist/esm/ImageLayerNode.d.ts.map +0 -1
  17. package/dist/esm/ImageLayerNode.js +0 -210
  18. package/dist/esm/ImageLayerNode.js.map +0 -1
  19. package/dist/esm/MapObject.d.ts +0 -70
  20. package/dist/esm/MapObject.d.ts.map +0 -1
  21. package/dist/esm/MapObject.js +0 -34
  22. package/dist/esm/MapObject.js.map +0 -1
  23. package/dist/esm/MapObjectSpawner.d.ts +0 -133
  24. package/dist/esm/MapObjectSpawner.d.ts.map +0 -1
  25. package/dist/esm/MapObjectSpawner.js +0 -147
  26. package/dist/esm/MapObjectSpawner.js.map +0 -1
  27. package/dist/esm/MapSpawnSession.d.ts +0 -46
  28. package/dist/esm/MapSpawnSession.d.ts.map +0 -1
  29. package/dist/esm/MapSpawnSession.js +0 -88
  30. package/dist/esm/MapSpawnSession.js.map +0 -1
  31. package/dist/esm/MapWorld.d.ts +0 -134
  32. package/dist/esm/MapWorld.d.ts.map +0 -1
  33. package/dist/esm/MapWorld.js +0 -150
  34. package/dist/esm/MapWorld.js.map +0 -1
  35. package/dist/esm/MapWorldRuntime.d.ts +0 -180
  36. package/dist/esm/MapWorldRuntime.d.ts.map +0 -1
  37. package/dist/esm/MapWorldRuntime.js +0 -261
  38. package/dist/esm/MapWorldRuntime.js.map +0 -1
  39. package/dist/esm/ObjectLayer.d.ts +0 -379
  40. package/dist/esm/ObjectLayer.d.ts.map +0 -1
  41. package/dist/esm/ObjectLayer.js +0 -221
  42. package/dist/esm/ObjectLayer.js.map +0 -1
  43. package/dist/esm/SampledChunkSource.d.ts +0 -43
  44. package/dist/esm/SampledChunkSource.d.ts.map +0 -1
  45. package/dist/esm/SampledChunkSource.js +0 -48
  46. package/dist/esm/SampledChunkSource.js.map +0 -1
  47. package/dist/esm/TileAnimator.d.ts +0 -72
  48. package/dist/esm/TileAnimator.d.ts.map +0 -1
  49. package/dist/esm/TileAnimator.js +0 -158
  50. package/dist/esm/TileAnimator.js.map +0 -1
  51. package/dist/esm/TileChunk.d.ts +0 -103
  52. package/dist/esm/TileChunk.d.ts.map +0 -1
  53. package/dist/esm/TileChunk.js +0 -194
  54. package/dist/esm/TileChunk.js.map +0 -1
  55. package/dist/esm/TileChunkNode.d.ts +0 -2
  56. package/dist/esm/TileChunkNode.d.ts.map +0 -1
  57. package/dist/esm/TileChunkNode.js +0 -145
  58. package/dist/esm/TileChunkNode.js.map +0 -1
  59. package/dist/esm/TileLayer.d.ts +0 -286
  60. package/dist/esm/TileLayer.d.ts.map +0 -1
  61. package/dist/esm/TileLayer.js +0 -526
  62. package/dist/esm/TileLayer.js.map +0 -1
  63. package/dist/esm/TileLayerNode.d.ts +0 -129
  64. package/dist/esm/TileLayerNode.d.ts.map +0 -1
  65. package/dist/esm/TileLayerNode.js +0 -245
  66. package/dist/esm/TileLayerNode.js.map +0 -1
  67. package/dist/esm/TileMap.d.ts +0 -317
  68. package/dist/esm/TileMap.d.ts.map +0 -1
  69. package/dist/esm/TileMap.js +0 -406
  70. package/dist/esm/TileMap.js.map +0 -1
  71. package/dist/esm/TileMapBand.d.ts +0 -80
  72. package/dist/esm/TileMapBand.d.ts.map +0 -1
  73. package/dist/esm/TileMapBand.js +0 -155
  74. package/dist/esm/TileMapBand.js.map +0 -1
  75. package/dist/esm/TileMapNode.d.ts +0 -92
  76. package/dist/esm/TileMapNode.d.ts.map +0 -1
  77. package/dist/esm/TileMapNode.js +0 -134
  78. package/dist/esm/TileMapNode.js.map +0 -1
  79. package/dist/esm/TileMapView.d.ts +0 -248
  80. package/dist/esm/TileMapView.d.ts.map +0 -1
  81. package/dist/esm/TileMapView.js +0 -394
  82. package/dist/esm/TileMapView.js.map +0 -1
  83. package/dist/esm/TileProjection.d.ts +0 -59
  84. package/dist/esm/TileProjection.d.ts.map +0 -1
  85. package/dist/esm/TileProjection.js +0 -106
  86. package/dist/esm/TileProjection.js.map +0 -1
  87. package/dist/esm/TileSet.d.ts +0 -116
  88. package/dist/esm/TileSet.d.ts.map +0 -1
  89. package/dist/esm/TileSet.js +0 -168
  90. package/dist/esm/TileSet.js.map +0 -1
  91. package/dist/esm/WangSet.d.ts +0 -80
  92. package/dist/esm/WangSet.d.ts.map +0 -1
  93. package/dist/esm/WangSet.js +0 -73
  94. package/dist/esm/WangSet.js.map +0 -1
  95. package/dist/esm/WorkerSampledChunkSource.d.ts +0 -94
  96. package/dist/esm/WorkerSampledChunkSource.d.ts.map +0 -1
  97. package/dist/esm/WorkerSampledChunkSource.js +0 -113
  98. package/dist/esm/WorkerSampledChunkSource.js.map +0 -1
  99. package/dist/esm/autoTile.d.ts +0 -88
  100. package/dist/esm/autoTile.d.ts.map +0 -1
  101. package/dist/esm/autoTile.js +0 -173
  102. package/dist/esm/autoTile.js.map +0 -1
  103. package/dist/esm/chunkGeometry.d.ts +0 -2
  104. package/dist/esm/chunkGeometry.d.ts.map +0 -1
  105. package/dist/esm/chunkGeometry.js +0 -116
  106. package/dist/esm/chunkGeometry.js.map +0 -1
  107. package/dist/esm/index.d.ts +0 -2
  108. package/dist/esm/index.d.ts.map +0 -1
  109. package/dist/esm/index.js +0 -27
  110. package/dist/esm/nodeBounds.d.ts +0 -2
  111. package/dist/esm/nodeBounds.d.ts.map +0 -1
  112. package/dist/esm/nodeBounds.js +0 -40
  113. package/dist/esm/nodeBounds.js.map +0 -1
  114. package/dist/esm/pixelSnap.d.ts +0 -2
  115. package/dist/esm/pixelSnap.d.ts.map +0 -1
  116. package/dist/esm/pixelSnap.js +0 -21
  117. package/dist/esm/pixelSnap.js.map +0 -1
  118. package/dist/esm/projectObject.d.ts +0 -4
  119. package/dist/esm/projectObject.d.ts.map +0 -1
  120. package/dist/esm/projectObject.js +0 -87
  121. package/dist/esm/projectObject.js.map +0 -1
  122. package/dist/esm/public.d.ts +0 -48
  123. package/dist/esm/public.d.ts.map +0 -1
  124. package/dist/esm/tileCollision.d.ts +0 -190
  125. package/dist/esm/tileCollision.d.ts.map +0 -1
  126. package/dist/esm/tileCollision.js +0 -399
  127. package/dist/esm/tileCollision.js.map +0 -1
  128. package/dist/esm/tileWord.d.ts +0 -2
  129. package/dist/esm/tileWord.d.ts.map +0 -1
  130. package/dist/esm/tileWord.js +0 -16
  131. package/dist/esm/tileWord.js.map +0 -1
  132. package/dist/esm/tilemapExtension.d.ts +0 -20
  133. package/dist/esm/tilemapExtension.d.ts.map +0 -1
  134. package/dist/esm/tilemapExtension.js +0 -53
  135. package/dist/esm/tilemapExtension.js.map +0 -1
  136. package/dist/esm/tilemapSerializers.d.ts +0 -2
  137. package/dist/esm/tilemapSerializers.d.ts.map +0 -1
  138. package/dist/esm/tilemapSerializers.js +0 -54
  139. package/dist/esm/tilemapSerializers.js.map +0 -1
  140. package/dist/esm/types.d.ts +0 -231
  141. package/dist/esm/types.d.ts.map +0 -1
  142. package/dist/esm/types.js +0 -129
  143. package/dist/esm/types.js.map +0 -1
  144. package/dist/esm/webgl2/WebGl2TileChunkRenderer.d.ts +0 -2
  145. package/dist/esm/webgl2/WebGl2TileChunkRenderer.d.ts.map +0 -1
  146. package/dist/esm/webgl2/WebGl2TileChunkRenderer.js +0 -376
  147. package/dist/esm/webgl2/WebGl2TileChunkRenderer.js.map +0 -1
  148. package/dist/esm/webgl2/shaders/tile-chunk.frag.js +0 -6
  149. package/dist/esm/webgl2/shaders/tile-chunk.frag.js.map +0 -1
  150. package/dist/esm/webgl2/shaders/tile-chunk.vert.js +0 -6
  151. package/dist/esm/webgl2/shaders/tile-chunk.vert.js.map +0 -1
  152. package/dist/esm/webgpu/WebGpuTileChunkRenderer.d.ts +0 -2
  153. package/dist/esm/webgpu/WebGpuTileChunkRenderer.d.ts.map +0 -1
  154. package/dist/esm/webgpu/WebGpuTileChunkRenderer.js +0 -539
  155. package/dist/esm/webgpu/WebGpuTileChunkRenderer.js.map +0 -1
  156. package/dist/esm/webgpu/shaders/tile-chunk.wgsl.js +0 -6
  157. package/dist/esm/webgpu/shaders/tile-chunk.wgsl.js.map +0 -1
@@ -1,89 +0,0 @@
1
- import type { Texture } from '@codexo/exojs';
2
- import type { TileProperties } from './types';
3
- /** Construction options for an {@link ImageLayer}. */
4
- export interface ImageLayerOptions {
5
- /** Layer id (unique within the map). */
6
- readonly id: number;
7
- /** Layer name. */
8
- readonly name?: string;
9
- /** Layer class string. */
10
- readonly class?: string;
11
- /** Resolved image URL. */
12
- readonly image: string;
13
- /** Loaded texture for the image, or `null` if unavailable. */
14
- readonly texture?: Texture | null;
15
- /** Whether the layer is visible. Default `true`. */
16
- readonly visible?: boolean;
17
- /** Layer opacity in `[0, 1]`. Default `1`. */
18
- readonly opacity?: number;
19
- /** Layer pixel offset X. Default `0`. */
20
- readonly offsetX?: number;
21
- /** Layer pixel offset Y. Default `0`. */
22
- readonly offsetY?: number;
23
- /** Horizontal parallax factor. Default `1`. */
24
- readonly parallaxX?: number;
25
- /** Vertical parallax factor. Default `1`. */
26
- readonly parallaxY?: number;
27
- /** Uniform parallax scale around the layer origin. Default `1`. */
28
- readonly parallaxScale?: number;
29
- /** Tint colour as `0xRRGGBB`, or `null`. Default `null`. */
30
- readonly tintColor?: number | null;
31
- /** Whether the image repeats horizontally. Default `false`. */
32
- readonly repeatX?: boolean;
33
- /** Whether the image repeats vertically. Default `false`. */
34
- readonly repeatY?: boolean;
35
- /** Layer properties (copied and frozen). */
36
- readonly properties?: TileProperties;
37
- }
38
- /**
39
- * A data-only image layer: a single image (texture + resolved URL) placed as a
40
- * background or foreground layer. The layer itself holds no scene-graph state -
41
- * it is rendered by an {@link import('./ImageLayerNode').ImageLayerNode}, which
42
- * {@link import('./TileMapNode').TileMapNode} and
43
- * {@link import('./TileMapView').TileMapView} generate and interleave with tile
44
- * layers by the map's combined document order
45
- * ({@link import('./TileMap').TileMap.renderableLayers}).
46
- *
47
- * Parallax, opacity, tint, offset, and repeat flags are carried from the
48
- * source Tiled map.
49
- *
50
- * @advanced
51
- */
52
- export declare class ImageLayer {
53
- /** Layer-kind discriminant. */
54
- readonly kind: 'image';
55
- /** Layer id (unique within the map). */
56
- readonly id: number;
57
- /** Layer name. */
58
- readonly name: string;
59
- /** Layer class string. */
60
- readonly class: string;
61
- /** Resolved URL of the layer image. */
62
- readonly image: string;
63
- /** Loaded texture for the image, or `null` if unavailable. */
64
- readonly texture: Texture | null;
65
- /** Whether the layer is visible. */
66
- readonly visible: boolean;
67
- /** Layer opacity in `[0, 1]`. */
68
- readonly opacity: number;
69
- /** Layer pixel offset X. */
70
- readonly offsetX: number;
71
- /** Layer pixel offset Y. */
72
- readonly offsetY: number;
73
- /** Horizontal parallax factor. */
74
- readonly parallaxX: number;
75
- /** Vertical parallax factor. */
76
- readonly parallaxY: number;
77
- /** Uniform scale applied around the layer origin during parallax rendering. */
78
- readonly parallaxScale: number;
79
- /** Tint colour as `0xRRGGBB`, or `null`. */
80
- readonly tintColor: number | null;
81
- /** Whether the image repeats horizontally. */
82
- readonly repeatX: boolean;
83
- /** Whether the image repeats vertically. */
84
- readonly repeatY: boolean;
85
- /** Immutable layer properties. */
86
- readonly properties: TileProperties;
87
- constructor(options: ImageLayerOptions);
88
- }
89
- //# sourceMappingURL=ImageLayer.d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O,CAAC;IAC3B,4CAA4C;IAC5C,QAAQ,CAAC,UAAU,CAAC,EAAE,cAAc,CAAC;CACtC;AAED;;;;;;;;;;;;;GAaG;AACH,qBAAa,UAAU;IACrB,+BAA+B;IAC/B,SAAgB,IAAI,EAAG,OAAO,CAAU;IAExC,wCAAwC;IACxC,SAAgB,EAAE,EAAE,MAAM,CAAC;IAC3B,kBAAkB;IAClB,SAAgB,IAAI,EAAE,MAAM,CAAC;IAC7B,0BAA0B;IAC1B,SAAgB,KAAK,EAAE,MAAM,CAAC;IAC9B,uCAAuC;IACvC,SAAgB,KAAK,EAAE,MAAM,CAAC;IAC9B,8DAA8D;IAC9D,SAAgB,OAAO,EAAE,OAAO,GAAG,IAAI,CAAC;IACxC,oCAAoC;IACpC,SAAgB,OAAO,EAAE,OAAO,CAAC;IACjC,iCAAiC;IACjC,SAAgB,OAAO,EAAE,MAAM,CAAC;IAChC,4BAA4B;IAC5B,SAAgB,OAAO,EAAE,MAAM,CAAC;IAChC,4BAA4B;IAC5B,SAAgB,OAAO,EAAE,MAAM,CAAC;IAChC,kCAAkC;IAClC,SAAgB,SAAS,EAAE,MAAM,CAAC;IAClC,gCAAgC;IAChC,SAAgB,SAAS,EAAE,MAAM,CAAC;IAClC,+EAA+E;IAC/E,SAAgB,aAAa,EAAE,MAAM,CAAC;IACtC,4CAA4C;IAC5C,SAAgB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzC,8CAA8C;IAC9C,SAAgB,OAAO,EAAE,OAAO,CAAC;IACjC,4CAA4C;IAC5C,SAAgB,OAAO,EAAE,OAAO,CAAC;IACjC,kCAAkC;IAClC,SAAgB,UAAU,EAAE,cAAc,CAAC;IAE3C,YAAmB,OAAO,EAAE,iBAAiB,EAoB5C;CACF"}
@@ -1,74 +0,0 @@
1
- //#region src/ImageLayer.ts
2
- /**
3
- * A data-only image layer: a single image (texture + resolved URL) placed as a
4
- * background or foreground layer. The layer itself holds no scene-graph state -
5
- * it is rendered by an {@link import('./ImageLayerNode').ImageLayerNode}, which
6
- * {@link import('./TileMapNode').TileMapNode} and
7
- * {@link import('./TileMapView').TileMapView} generate and interleave with tile
8
- * layers by the map's combined document order
9
- * ({@link import('./TileMap').TileMap.renderableLayers}).
10
- *
11
- * Parallax, opacity, tint, offset, and repeat flags are carried from the
12
- * source Tiled map.
13
- *
14
- * @advanced
15
- */
16
- var ImageLayer = class {
17
- /** Layer-kind discriminant. */
18
- kind = "image";
19
- /** Layer id (unique within the map). */
20
- id;
21
- /** Layer name. */
22
- name;
23
- /** Layer class string. */
24
- class;
25
- /** Resolved URL of the layer image. */
26
- image;
27
- /** Loaded texture for the image, or `null` if unavailable. */
28
- texture;
29
- /** Whether the layer is visible. */
30
- visible;
31
- /** Layer opacity in `[0, 1]`. */
32
- opacity;
33
- /** Layer pixel offset X. */
34
- offsetX;
35
- /** Layer pixel offset Y. */
36
- offsetY;
37
- /** Horizontal parallax factor. */
38
- parallaxX;
39
- /** Vertical parallax factor. */
40
- parallaxY;
41
- /** Uniform scale applied around the layer origin during parallax rendering. */
42
- parallaxScale;
43
- /** Tint colour as `0xRRGGBB`, or `null`. */
44
- tintColor;
45
- /** Whether the image repeats horizontally. */
46
- repeatX;
47
- /** Whether the image repeats vertically. */
48
- repeatY;
49
- /** Immutable layer properties. */
50
- properties;
51
- constructor(options) {
52
- this.id = options.id;
53
- this.name = options.name ?? "";
54
- this.class = options.class ?? "";
55
- this.image = options.image;
56
- this.texture = options.texture ?? null;
57
- this.visible = options.visible ?? true;
58
- this.opacity = options.opacity ?? 1;
59
- this.offsetX = options.offsetX ?? 0;
60
- this.offsetY = options.offsetY ?? 0;
61
- this.parallaxX = options.parallaxX ?? 1;
62
- this.parallaxY = options.parallaxY ?? 1;
63
- this.parallaxScale = options.parallaxScale ?? 1;
64
- if (!Number.isFinite(this.parallaxScale) || this.parallaxScale <= 0) throw new Error("ImageLayer parallaxScale must be a positive finite number.");
65
- this.tintColor = options.tintColor ?? null;
66
- this.repeatX = options.repeatX ?? false;
67
- this.repeatY = options.repeatY ?? false;
68
- this.properties = options.properties ? Object.freeze({ ...options.properties }) : Object.freeze({});
69
- }
70
- };
71
-
72
- //#endregion
73
- export { ImageLayer };
74
- //# sourceMappingURL=ImageLayer.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ImageLayer.js","names":[],"sources":["../../src/ImageLayer.ts"],"sourcesContent":["import type { Texture } from '@codexo/exojs';\n\nimport type { TileProperties } from './types';\n\n/** Construction options for an {@link ImageLayer}. */\nexport interface ImageLayerOptions {\n /** Layer id (unique within the map). */\n readonly id: number;\n /** Layer name. */\n readonly name?: string;\n /** Layer class string. */\n readonly class?: string;\n /** Resolved image URL. */\n readonly image: string;\n /** Loaded texture for the image, or `null` if unavailable. */\n readonly texture?: Texture | null;\n /** Whether the layer is visible. Default `true`. */\n readonly visible?: boolean;\n /** Layer opacity in `[0, 1]`. Default `1`. */\n readonly opacity?: number;\n /** Layer pixel offset X. Default `0`. */\n readonly offsetX?: number;\n /** Layer pixel offset Y. Default `0`. */\n readonly offsetY?: number;\n /** Horizontal parallax factor. Default `1`. */\n readonly parallaxX?: number;\n /** Vertical parallax factor. Default `1`. */\n readonly parallaxY?: number;\n /** Uniform parallax scale around the layer origin. Default `1`. */\n readonly parallaxScale?: number;\n /** Tint colour as `0xRRGGBB`, or `null`. Default `null`. */\n readonly tintColor?: number | null;\n /** Whether the image repeats horizontally. Default `false`. */\n readonly repeatX?: boolean;\n /** Whether the image repeats vertically. Default `false`. */\n readonly repeatY?: boolean;\n /** Layer properties (copied and frozen). */\n readonly properties?: TileProperties;\n}\n\n/**\n * A data-only image layer: a single image (texture + resolved URL) placed as a\n * background or foreground layer. The layer itself holds no scene-graph state -\n * it is rendered by an {@link import('./ImageLayerNode').ImageLayerNode}, which\n * {@link import('./TileMapNode').TileMapNode} and\n * {@link import('./TileMapView').TileMapView} generate and interleave with tile\n * layers by the map's combined document order\n * ({@link import('./TileMap').TileMap.renderableLayers}).\n *\n * Parallax, opacity, tint, offset, and repeat flags are carried from the\n * source Tiled map.\n *\n * @advanced\n */\nexport class ImageLayer {\n /** Layer-kind discriminant. */\n public readonly kind = 'image' as const;\n\n /** Layer id (unique within the map). */\n public readonly id: number;\n /** Layer name. */\n public readonly name: string;\n /** Layer class string. */\n public readonly class: string;\n /** Resolved URL of the layer image. */\n public readonly image: string;\n /** Loaded texture for the image, or `null` if unavailable. */\n public readonly texture: Texture | null;\n /** Whether the layer is visible. */\n public readonly visible: boolean;\n /** Layer opacity in `[0, 1]`. */\n public readonly opacity: number;\n /** Layer pixel offset X. */\n public readonly offsetX: number;\n /** Layer pixel offset Y. */\n public readonly offsetY: number;\n /** Horizontal parallax factor. */\n public readonly parallaxX: number;\n /** Vertical parallax factor. */\n public readonly parallaxY: number;\n /** Uniform scale applied around the layer origin during parallax rendering. */\n public readonly parallaxScale: number;\n /** Tint colour as `0xRRGGBB`, or `null`. */\n public readonly tintColor: number | null;\n /** Whether the image repeats horizontally. */\n public readonly repeatX: boolean;\n /** Whether the image repeats vertically. */\n public readonly repeatY: boolean;\n /** Immutable layer properties. */\n public readonly properties: TileProperties;\n\n public constructor(options: ImageLayerOptions) {\n this.id = options.id;\n this.name = options.name ?? '';\n this.class = options.class ?? '';\n this.image = options.image;\n this.texture = options.texture ?? null;\n this.visible = options.visible ?? true;\n this.opacity = options.opacity ?? 1;\n this.offsetX = options.offsetX ?? 0;\n this.offsetY = options.offsetY ?? 0;\n this.parallaxX = options.parallaxX ?? 1;\n this.parallaxY = options.parallaxY ?? 1;\n this.parallaxScale = options.parallaxScale ?? 1;\n if (!Number.isFinite(this.parallaxScale) || this.parallaxScale <= 0) {\n throw new Error('ImageLayer parallaxScale must be a positive finite number.');\n }\n this.tintColor = options.tintColor ?? null;\n this.repeatX = options.repeatX ?? false;\n this.repeatY = options.repeatY ?? false;\n this.properties = options.properties ? Object.freeze({ ...options.properties }) : Object.freeze({});\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;AAsDA,IAAa,aAAb,MAAwB;;CAEtB,AAAgB,OAAO;;CAGvB,AAAgB;;CAEhB,AAAgB;;CAEhB,AAAgB;;CAEhB,AAAgB;;CAEhB,AAAgB;;CAEhB,AAAgB;;CAEhB,AAAgB;;CAEhB,AAAgB;;CAEhB,AAAgB;;CAEhB,AAAgB;;CAEhB,AAAgB;;CAEhB,AAAgB;;CAEhB,AAAgB;;CAEhB,AAAgB;;CAEhB,AAAgB;;CAEhB,AAAgB;CAEhB,AAAO,YAAY,SAA4B;EAC7C,KAAK,KAAK,QAAQ;EAClB,KAAK,OAAO,QAAQ,QAAQ;EAC5B,KAAK,QAAQ,QAAQ,SAAS;EAC9B,KAAK,QAAQ,QAAQ;EACrB,KAAK,UAAU,QAAQ,WAAW;EAClC,KAAK,UAAU,QAAQ,WAAW;EAClC,KAAK,UAAU,QAAQ,WAAW;EAClC,KAAK,UAAU,QAAQ,WAAW;EAClC,KAAK,UAAU,QAAQ,WAAW;EAClC,KAAK,YAAY,QAAQ,aAAa;EACtC,KAAK,YAAY,QAAQ,aAAa;EACtC,KAAK,gBAAgB,QAAQ,iBAAiB;EAC9C,IAAI,CAAC,OAAO,SAAS,KAAK,aAAa,KAAK,KAAK,iBAAiB,GAChE,MAAM,IAAI,MAAM,4DAA4D;EAE9E,KAAK,YAAY,QAAQ,aAAa;EACtC,KAAK,UAAU,QAAQ,WAAW;EAClC,KAAK,UAAU,QAAQ,WAAW;EAClC,KAAK,aAAa,QAAQ,aAAa,OAAO,OAAO,EAAE,GAAG,QAAQ,WAAW,CAAC,IAAI,OAAO,OAAO,CAAC,CAAC;CACpG;AACF"}
@@ -1,91 +0,0 @@
1
- import { Container } from '@codexo/exojs';
2
- import { PixelSnapMode } from '@codexo/exojs/renderer-sdk';
3
- import type { ImageLayer } from './ImageLayer';
4
- /**
5
- * A scene node that renders one Tiled {@link ImageLayer} as a single
6
- * {@link RepeatingSprite} wrapped in a {@link Container}.
7
- *
8
- * The layer's pixel `offset` becomes this node's position; `parallax` is
9
- * resolved per frame in {@link _collectContent} by patching the node position
10
- * against the camera centre (exactly like {@link import('./TileLayerNode').TileLayerNode}),
11
- * then restoring it. When `repeatX`/`repeatY` is set the wrapped sprite is
12
- * grown each frame to cover the visible view with a period-aligned origin, so
13
- * the pattern tiles seamlessly and scrolls with parallax. A repeat axis or a
14
- * `parallax` factor other than `1` both make this node's rendered position
15
- * and/or size camera-dependent at collect time, so its static bounds cannot be
16
- * culled against - such a node opts out of view culling (`cullable = false`).
17
- *
18
- * `visible`, `opacity`, and `tintColor` are applied **once at construction**:
19
- * {@link ImageLayer} is immutable, so there is nothing to re-sync per frame.
20
- * A layer whose `texture` is `null` (image failed to load / not yet available)
21
- * produces an empty node with no children - it occupies its offset in the
22
- * scene graph but draws nothing.
23
- *
24
- * The node references - but never owns - the {@link ImageLayer} and its
25
- * Loader-owned texture: {@link destroy} frees the wrapped sprite but leaves the
26
- * layer and texture intact. Image-layer nodes are band-selectable exactly like
27
- * tile-layer nodes: list the image layer in a
28
- * {@link import('./TileMapView').TileMapViewOptions.bands} definition and the
29
- * band stacks it by the map's combined document order, or parent an unbanded
30
- * node into the scene directly wherever the image belongs in draw order.
31
- *
32
- * For a `repeatX`/`repeatY` node, bounds and hit-test queries reflect the
33
- * coverage geometry computed by the last {@link _collectContent} call (since
34
- * that geometry is recomputed per collect, not maintained incrementally),
35
- * which is also why such a node force-disables `cullable`. A repeating or
36
- * parallax node also re-sizes its wrapped sprite as the camera crosses period
37
- * boundaries, which content-dirties an enclosing retained group the same way
38
- * a streamed layer does - give it the same treatment (its own
39
- * `RetainedContainer`, or none).
40
- *
41
- * @advanced
42
- */
43
- export declare class ImageLayerNode extends Container {
44
- private readonly _layer;
45
- private readonly _sprite;
46
- private readonly _baseOffsetX;
47
- private readonly _baseOffsetY;
48
- private readonly _imageWidth;
49
- private readonly _imageHeight;
50
- private _pixelSnapMode;
51
- private _covViewX;
52
- private _covViewY;
53
- private _covViewWidth;
54
- private _covViewHeight;
55
- private _covOriginX;
56
- private _covOriginY;
57
- constructor(layer: ImageLayer);
58
- /** The runtime layer this node renders. */
59
- get layer(): ImageLayer;
60
- /**
61
- * Render-only pixel-snap mode forwarded to the wrapped {@link RepeatingSprite}
62
- * (which snaps its rendered origin, and - in `PixelSnapMode.Geometry` mode for
63
- * axis-aligned transforms - its repeat-segment boundaries, to the render
64
- * target's device-pixel grid). Purely visual: the layer offset, parallax, and
65
- * repeat coverage are never changed.
66
- *
67
- * For a `null`-texture layer there is no drawable to forward to, so the mode
68
- * is simply stored. Setting the current value is a no-op; an invalid value
69
- * throws and leaves the prior mode unchanged.
70
- *
71
- * Defaults to `Geometry`, matching the tile layers it is composed with, so a
72
- * repeated backdrop does not sample between two device pixels and shimmer as
73
- * the view moves. Set `None` to opt out.
74
- *
75
- * @default PixelSnapMode.Geometry
76
- * @stable
77
- */
78
- get pixelSnapMode(): PixelSnapMode;
79
- set pixelSnapMode(mode: PixelSnapMode);
80
- destroy(): void;
81
- /**
82
- * Grow the wrapped sprite along each repeating axis so it covers the visible
83
- * view, with a period-aligned local origin so the pattern offset stays zero
84
- * (seamless tiling). Non-repeating axes keep the natural image size at local
85
- * `0`. Reads `this.x`/`this.y` after the parallax patch, so the pattern anchor
86
- * follows the parallax-shifted origin. Skips the rebuild when neither the view
87
- * span nor the patched origin changed since the last frame.
88
- */
89
- private _updateRepeatCoverage;
90
- }
91
- //# sourceMappingURL=ImageLayerNode.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ImageLayerNode.d.ts","sourceRoot":"","sources":["../../src/ImageLayerNode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAmB,MAAM,eAAe,CAAC;AAC3D,OAAO,EAAE,aAAa,EAA0B,MAAM,4BAA4B,CAAC;AAEnF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAG/C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,qBAAa,cAAe,SAAQ,SAAS;IAC3C,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAa;IACpC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAyB;IACjD,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAS;IACtC,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAS;IACtC,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAS;IACrC,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAS;IACtC,OAAO,CAAC,cAAc,CAAyC;IAI/D,OAAO,CAAC,SAAS,CAAc;IAC/B,OAAO,CAAC,SAAS,CAAc;IAC/B,OAAO,CAAC,aAAa,CAAc;IACnC,OAAO,CAAC,cAAc,CAAc;IACpC,OAAO,CAAC,WAAW,CAAc;IACjC,OAAO,CAAC,WAAW,CAAc;IAEjC,YAAmB,KAAK,EAAE,UAAU,EAiDnC;IAED,2CAA2C;IAC3C,IAAW,KAAK,IAAI,UAAU,CAE7B;IAED;;;;;;;;;;;;;;;;;OAiBG;IACH,IAAW,aAAa,IAAI,aAAa,CAExC;IAED,IAAW,aAAa,CAAC,IAAI,EAAE,aAAa,EAW3C;IAiDe,OAAO,IAAI,IAAI,CAM9B;IAED;;;;;;;OAOG;IACH,OAAO,CAAC,qBAAqB;CA4D9B"}
@@ -1,210 +0,0 @@
1
- import { assertPixelSnapMode } from "./pixelSnap.js";
2
- import { PixelSnapMode } from "@codexo/exojs/renderer-sdk";
3
- import { Container, RepeatingSprite } from "@codexo/exojs";
4
-
5
- //#region src/ImageLayerNode.ts
6
- /**
7
- * A scene node that renders one Tiled {@link ImageLayer} as a single
8
- * {@link RepeatingSprite} wrapped in a {@link Container}.
9
- *
10
- * The layer's pixel `offset` becomes this node's position; `parallax` is
11
- * resolved per frame in {@link _collectContent} by patching the node position
12
- * against the camera centre (exactly like {@link import('./TileLayerNode').TileLayerNode}),
13
- * then restoring it. When `repeatX`/`repeatY` is set the wrapped sprite is
14
- * grown each frame to cover the visible view with a period-aligned origin, so
15
- * the pattern tiles seamlessly and scrolls with parallax. A repeat axis or a
16
- * `parallax` factor other than `1` both make this node's rendered position
17
- * and/or size camera-dependent at collect time, so its static bounds cannot be
18
- * culled against - such a node opts out of view culling (`cullable = false`).
19
- *
20
- * `visible`, `opacity`, and `tintColor` are applied **once at construction**:
21
- * {@link ImageLayer} is immutable, so there is nothing to re-sync per frame.
22
- * A layer whose `texture` is `null` (image failed to load / not yet available)
23
- * produces an empty node with no children - it occupies its offset in the
24
- * scene graph but draws nothing.
25
- *
26
- * The node references - but never owns - the {@link ImageLayer} and its
27
- * Loader-owned texture: {@link destroy} frees the wrapped sprite but leaves the
28
- * layer and texture intact. Image-layer nodes are band-selectable exactly like
29
- * tile-layer nodes: list the image layer in a
30
- * {@link import('./TileMapView').TileMapViewOptions.bands} definition and the
31
- * band stacks it by the map's combined document order, or parent an unbanded
32
- * node into the scene directly wherever the image belongs in draw order.
33
- *
34
- * For a `repeatX`/`repeatY` node, bounds and hit-test queries reflect the
35
- * coverage geometry computed by the last {@link _collectContent} call (since
36
- * that geometry is recomputed per collect, not maintained incrementally),
37
- * which is also why such a node force-disables `cullable`. A repeating or
38
- * parallax node also re-sizes its wrapped sprite as the camera crosses period
39
- * boundaries, which content-dirties an enclosing retained group the same way
40
- * a streamed layer does - give it the same treatment (its own
41
- * `RetainedContainer`, or none).
42
- *
43
- * @advanced
44
- */
45
- var ImageLayerNode = class extends Container {
46
- _layer;
47
- _sprite;
48
- _baseOffsetX;
49
- _baseOffsetY;
50
- _imageWidth;
51
- _imageHeight;
52
- _pixelSnapMode = PixelSnapMode.Geometry;
53
- _covViewX = NaN;
54
- _covViewY = NaN;
55
- _covViewWidth = NaN;
56
- _covViewHeight = NaN;
57
- _covOriginX = NaN;
58
- _covOriginY = NaN;
59
- constructor(layer) {
60
- super();
61
- this._layer = layer;
62
- this._baseOffsetX = layer.offsetX;
63
- this._baseOffsetY = layer.offsetY;
64
- this.setPosition(layer.offsetX, layer.offsetY);
65
- this.visible = layer.visible;
66
- const texture = layer.texture;
67
- if (texture === null) {
68
- this._sprite = null;
69
- this._imageWidth = 0;
70
- this._imageHeight = 0;
71
- return;
72
- }
73
- this._imageWidth = texture.width;
74
- this._imageHeight = texture.height;
75
- const sprite = new RepeatingSprite(texture, {
76
- modeX: layer.repeatX ? "repeat" : "stretch",
77
- modeY: layer.repeatY ? "repeat" : "stretch",
78
- width: texture.width,
79
- height: texture.height
80
- });
81
- const tintColor = layer.tintColor;
82
- const r = tintColor === null ? 255 : tintColor >> 16 & 255;
83
- const g = tintColor === null ? 255 : tintColor >> 8 & 255;
84
- const b = tintColor === null ? 255 : tintColor & 255;
85
- sprite.tint.set(r, g, b, layer.opacity);
86
- this._sprite = sprite;
87
- sprite.pixelSnapMode = this._pixelSnapMode;
88
- this.addChild(sprite);
89
- if (layer.repeatX || layer.repeatY || layer.parallaxX !== 1 || layer.parallaxY !== 1 || layer.parallaxScale !== 1) this.cullable = false;
90
- }
91
- /** The runtime layer this node renders. */
92
- get layer() {
93
- return this._layer;
94
- }
95
- /**
96
- * Render-only pixel-snap mode forwarded to the wrapped {@link RepeatingSprite}
97
- * (which snaps its rendered origin, and - in `PixelSnapMode.Geometry` mode for
98
- * axis-aligned transforms - its repeat-segment boundaries, to the render
99
- * target's device-pixel grid). Purely visual: the layer offset, parallax, and
100
- * repeat coverage are never changed.
101
- *
102
- * For a `null`-texture layer there is no drawable to forward to, so the mode
103
- * is simply stored. Setting the current value is a no-op; an invalid value
104
- * throws and leaves the prior mode unchanged.
105
- *
106
- * Defaults to `Geometry`, matching the tile layers it is composed with, so a
107
- * repeated backdrop does not sample between two device pixels and shimmer as
108
- * the view moves. Set `None` to opt out.
109
- *
110
- * @default PixelSnapMode.Geometry
111
- * @stable
112
- */
113
- get pixelSnapMode() {
114
- return this._pixelSnapMode;
115
- }
116
- set pixelSnapMode(mode) {
117
- if (mode === this._pixelSnapMode) return;
118
- assertPixelSnapMode(mode);
119
- this._pixelSnapMode = mode;
120
- if (this._sprite !== null) this._sprite.pixelSnapMode = mode;
121
- }
122
- /** @internal */
123
- _collectContent(builder) {
124
- if (this._sprite === null) {
125
- super._collectContent(builder);
126
- return;
127
- }
128
- const layer = this._layer;
129
- const patchesPosition = layer.parallaxX !== 1 || layer.parallaxY !== 1;
130
- const patchesScale = layer.parallaxScale !== 1;
131
- if (patchesPosition || patchesScale) {
132
- const camCenter = builder.view.center;
133
- const prevX = this.x;
134
- const prevY = this.y;
135
- const prevScaleX = this.scale.x;
136
- const prevScaleY = this.scale.y;
137
- if (patchesPosition) {
138
- this.x = this._baseOffsetX + camCenter.x * (1 - layer.parallaxX);
139
- this.y = this._baseOffsetY + camCenter.y * (1 - layer.parallaxY);
140
- }
141
- if (patchesScale) this.setScale(prevScaleX * layer.parallaxScale, prevScaleY * layer.parallaxScale);
142
- try {
143
- this._updateRepeatCoverage(builder, layer.parallaxScale);
144
- super._collectContent(builder);
145
- } finally {
146
- if (patchesPosition) this.setPosition(prevX, prevY);
147
- if (patchesScale) this.setScale(prevScaleX, prevScaleY);
148
- }
149
- } else {
150
- this._updateRepeatCoverage(builder);
151
- super._collectContent(builder);
152
- }
153
- }
154
- destroy() {
155
- const sprite = this._sprite;
156
- super.destroy();
157
- sprite?.destroy();
158
- }
159
- /**
160
- * Grow the wrapped sprite along each repeating axis so it covers the visible
161
- * view, with a period-aligned local origin so the pattern offset stays zero
162
- * (seamless tiling). Non-repeating axes keep the natural image size at local
163
- * `0`. Reads `this.x`/`this.y` after the parallax patch, so the pattern anchor
164
- * follows the parallax-shifted origin. Skips the rebuild when neither the view
165
- * span nor the patched origin changed since the last frame.
166
- */
167
- _updateRepeatCoverage(builder, parallaxScale = 1) {
168
- const layer = this._layer;
169
- const sprite = this._sprite;
170
- if (sprite === null || !layer.repeatX && !layer.repeatY) return;
171
- const bounds = builder.view.getBounds();
172
- const originX = this.x;
173
- const originY = this.y;
174
- if (bounds.x === this._covViewX && bounds.y === this._covViewY && bounds.width === this._covViewWidth && bounds.height === this._covViewHeight && originX === this._covOriginX && originY === this._covOriginY) return;
175
- this._covViewX = bounds.x;
176
- this._covViewY = bounds.y;
177
- this._covViewWidth = bounds.width;
178
- this._covViewHeight = bounds.height;
179
- this._covOriginX = originX;
180
- this._covOriginY = originY;
181
- let childX = 0;
182
- let childY = 0;
183
- let childWidth = this._imageWidth;
184
- let childHeight = this._imageHeight;
185
- if (layer.repeatX) {
186
- const imgW = this._imageWidth;
187
- const localViewMin = (bounds.x - originX) / parallaxScale;
188
- const localViewWidth = bounds.width / parallaxScale;
189
- const startLocal = Math.floor(localViewMin / imgW) * imgW;
190
- const periods = Math.ceil((localViewMin + localViewWidth - startLocal) / imgW);
191
- childX = startLocal;
192
- childWidth = periods * imgW;
193
- }
194
- if (layer.repeatY) {
195
- const imgH = this._imageHeight;
196
- const localViewMin = (bounds.y - originY) / parallaxScale;
197
- const localViewHeight = bounds.height / parallaxScale;
198
- const startLocal = Math.floor(localViewMin / imgH) * imgH;
199
- const periods = Math.ceil((localViewMin + localViewHeight - startLocal) / imgH);
200
- childY = startLocal;
201
- childHeight = periods * imgH;
202
- }
203
- sprite.setPosition(childX, childY);
204
- sprite.setSize(childWidth, childHeight);
205
- }
206
- };
207
-
208
- //#endregion
209
- export { ImageLayerNode };
210
- //# sourceMappingURL=ImageLayerNode.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ImageLayerNode.js","names":[],"sources":["../../src/ImageLayerNode.ts"],"sourcesContent":["import { Container, RepeatingSprite } from '@codexo/exojs';\nimport { PixelSnapMode, type RenderPlanBuilder } from '@codexo/exojs/renderer-sdk';\n\nimport type { ImageLayer } from './ImageLayer';\nimport { assertPixelSnapMode } from './pixelSnap';\n\n/**\n * A scene node that renders one Tiled {@link ImageLayer} as a single\n * {@link RepeatingSprite} wrapped in a {@link Container}.\n *\n * The layer's pixel `offset` becomes this node's position; `parallax` is\n * resolved per frame in {@link _collectContent} by patching the node position\n * against the camera centre (exactly like {@link import('./TileLayerNode').TileLayerNode}),\n * then restoring it. When `repeatX`/`repeatY` is set the wrapped sprite is\n * grown each frame to cover the visible view with a period-aligned origin, so\n * the pattern tiles seamlessly and scrolls with parallax. A repeat axis or a\n * `parallax` factor other than `1` both make this node's rendered position\n * and/or size camera-dependent at collect time, so its static bounds cannot be\n * culled against - such a node opts out of view culling (`cullable = false`).\n *\n * `visible`, `opacity`, and `tintColor` are applied **once at construction**:\n * {@link ImageLayer} is immutable, so there is nothing to re-sync per frame.\n * A layer whose `texture` is `null` (image failed to load / not yet available)\n * produces an empty node with no children - it occupies its offset in the\n * scene graph but draws nothing.\n *\n * The node references - but never owns - the {@link ImageLayer} and its\n * Loader-owned texture: {@link destroy} frees the wrapped sprite but leaves the\n * layer and texture intact. Image-layer nodes are band-selectable exactly like\n * tile-layer nodes: list the image layer in a\n * {@link import('./TileMapView').TileMapViewOptions.bands} definition and the\n * band stacks it by the map's combined document order, or parent an unbanded\n * node into the scene directly wherever the image belongs in draw order.\n *\n * For a `repeatX`/`repeatY` node, bounds and hit-test queries reflect the\n * coverage geometry computed by the last {@link _collectContent} call (since\n * that geometry is recomputed per collect, not maintained incrementally),\n * which is also why such a node force-disables `cullable`. A repeating or\n * parallax node also re-sizes its wrapped sprite as the camera crosses period\n * boundaries, which content-dirties an enclosing retained group the same way\n * a streamed layer does - give it the same treatment (its own\n * `RetainedContainer`, or none).\n *\n * @advanced\n */\nexport class ImageLayerNode extends Container {\n private readonly _layer: ImageLayer;\n private readonly _sprite: RepeatingSprite | null;\n private readonly _baseOffsetX: number;\n private readonly _baseOffsetY: number;\n private readonly _imageWidth: number;\n private readonly _imageHeight: number;\n private _pixelSnapMode: PixelSnapMode = PixelSnapMode.Geometry;\n\n // Repeat-coverage cache: the view span and patched origin that last drove a\n // resize. A static camera pays one comparison per frame and skips the rebuild.\n private _covViewX = Number.NaN;\n private _covViewY = Number.NaN;\n private _covViewWidth = Number.NaN;\n private _covViewHeight = Number.NaN;\n private _covOriginX = Number.NaN;\n private _covOriginY = Number.NaN;\n\n public constructor(layer: ImageLayer) {\n super();\n\n this._layer = layer;\n this._baseOffsetX = layer.offsetX;\n this._baseOffsetY = layer.offsetY;\n\n this.setPosition(layer.offsetX, layer.offsetY);\n this.visible = layer.visible;\n\n const texture = layer.texture;\n\n if (texture === null) {\n this._sprite = null;\n this._imageWidth = 0;\n this._imageHeight = 0;\n\n return;\n }\n\n this._imageWidth = texture.width;\n this._imageHeight = texture.height;\n\n // Non-repeating axes use `'stretch'` so the axis shows exactly one un-tiled\n // copy at its natural size; repeating axes use `'repeat'` and are grown to\n // cover the view in `_collectContent`.\n const sprite = new RepeatingSprite(texture, {\n modeX: layer.repeatX ? 'repeat' : 'stretch',\n modeY: layer.repeatY ? 'repeat' : 'stretch',\n width: texture.width,\n height: texture.height,\n });\n\n const tintColor = layer.tintColor;\n const r = tintColor === null ? 255 : (tintColor >> 16) & 0xff;\n const g = tintColor === null ? 255 : (tintColor >> 8) & 0xff;\n const b = tintColor === null ? 255 : tintColor & 0xff;\n\n sprite.tint.set(r, g, b, layer.opacity);\n\n this._sprite = sprite;\n // The sprite's own default is `None`; without this it would render\n // unsnapped while this node reports the mode it was constructed with.\n sprite.pixelSnapMode = this._pixelSnapMode;\n this.addChild(sprite);\n\n if (layer.repeatX || layer.repeatY || layer.parallaxX !== 1 || layer.parallaxY !== 1 || layer.parallaxScale !== 1) {\n this.cullable = false;\n }\n }\n\n /** The runtime layer this node renders. */\n public get layer(): ImageLayer {\n return this._layer;\n }\n\n /**\n * Render-only pixel-snap mode forwarded to the wrapped {@link RepeatingSprite}\n * (which snaps its rendered origin, and - in `PixelSnapMode.Geometry` mode for\n * axis-aligned transforms - its repeat-segment boundaries, to the render\n * target's device-pixel grid). Purely visual: the layer offset, parallax, and\n * repeat coverage are never changed.\n *\n * For a `null`-texture layer there is no drawable to forward to, so the mode\n * is simply stored. Setting the current value is a no-op; an invalid value\n * throws and leaves the prior mode unchanged.\n *\n * Defaults to `Geometry`, matching the tile layers it is composed with, so a\n * repeated backdrop does not sample between two device pixels and shimmer as\n * the view moves. Set `None` to opt out.\n *\n * @default PixelSnapMode.Geometry\n * @stable\n */\n public get pixelSnapMode(): PixelSnapMode {\n return this._pixelSnapMode;\n }\n\n public set pixelSnapMode(mode: PixelSnapMode) {\n if (mode === this._pixelSnapMode) {\n return;\n }\n\n assertPixelSnapMode(mode);\n this._pixelSnapMode = mode;\n\n if (this._sprite !== null) {\n this._sprite.pixelSnapMode = mode;\n }\n }\n\n /** @internal */\n protected override _collectContent(builder: RenderPlanBuilder): void {\n if (this._sprite === null) {\n super._collectContent(builder);\n\n return;\n }\n\n const layer = this._layer;\n\n const patchesPosition = layer.parallaxX !== 1 || layer.parallaxY !== 1;\n const patchesScale = layer.parallaxScale !== 1;\n\n if (patchesPosition || patchesScale) {\n const camCenter = builder.view.center;\n const prevX = this.x;\n const prevY = this.y;\n const prevScaleX = this.scale.x;\n const prevScaleY = this.scale.y;\n\n if (patchesPosition) {\n this.x = this._baseOffsetX + camCenter.x * (1 - layer.parallaxX);\n this.y = this._baseOffsetY + camCenter.y * (1 - layer.parallaxY);\n }\n\n if (patchesScale) {\n this.setScale(prevScaleX * layer.parallaxScale, prevScaleY * layer.parallaxScale);\n }\n\n try {\n this._updateRepeatCoverage(builder, layer.parallaxScale);\n super._collectContent(builder);\n } finally {\n if (patchesPosition) {\n this.setPosition(prevX, prevY);\n }\n\n if (patchesScale) {\n this.setScale(prevScaleX, prevScaleY);\n }\n }\n } else {\n this._updateRepeatCoverage(builder);\n super._collectContent(builder);\n }\n }\n\n public override destroy(): void {\n const sprite = this._sprite;\n\n super.destroy();\n\n sprite?.destroy();\n }\n\n /**\n * Grow the wrapped sprite along each repeating axis so it covers the visible\n * view, with a period-aligned local origin so the pattern offset stays zero\n * (seamless tiling). Non-repeating axes keep the natural image size at local\n * `0`. Reads `this.x`/`this.y` after the parallax patch, so the pattern anchor\n * follows the parallax-shifted origin. Skips the rebuild when neither the view\n * span nor the patched origin changed since the last frame.\n */\n private _updateRepeatCoverage(builder: RenderPlanBuilder, parallaxScale = 1): void {\n const layer = this._layer;\n const sprite = this._sprite;\n\n if (sprite === null || (!layer.repeatX && !layer.repeatY)) {\n return;\n }\n\n const bounds = builder.view.getBounds();\n const originX = this.x;\n const originY = this.y;\n\n if (\n bounds.x === this._covViewX &&\n bounds.y === this._covViewY &&\n bounds.width === this._covViewWidth &&\n bounds.height === this._covViewHeight &&\n originX === this._covOriginX &&\n originY === this._covOriginY\n ) {\n return;\n }\n\n this._covViewX = bounds.x;\n this._covViewY = bounds.y;\n this._covViewWidth = bounds.width;\n this._covViewHeight = bounds.height;\n this._covOriginX = originX;\n this._covOriginY = originY;\n\n let childX = 0;\n let childY = 0;\n let childWidth = this._imageWidth;\n let childHeight = this._imageHeight;\n\n if (layer.repeatX) {\n const imgW = this._imageWidth;\n const localViewMin = (bounds.x - originX) / parallaxScale;\n const localViewWidth = bounds.width / parallaxScale;\n const startLocal = Math.floor(localViewMin / imgW) * imgW;\n const periods = Math.ceil((localViewMin + localViewWidth - startLocal) / imgW);\n\n childX = startLocal;\n childWidth = periods * imgW;\n }\n\n if (layer.repeatY) {\n const imgH = this._imageHeight;\n const localViewMin = (bounds.y - originY) / parallaxScale;\n const localViewHeight = bounds.height / parallaxScale;\n const startLocal = Math.floor(localViewMin / imgH) * imgH;\n const periods = Math.ceil((localViewMin + localViewHeight - startLocal) / imgH);\n\n childY = startLocal;\n childHeight = periods * imgH;\n }\n\n sprite.setPosition(childX, childY);\n sprite.setSize(childWidth, childHeight);\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6CA,IAAa,iBAAb,cAAoC,UAAU;CAC5C,AAAiB;CACjB,AAAiB;CACjB,AAAiB;CACjB,AAAiB;CACjB,AAAiB;CACjB,AAAiB;CACjB,AAAQ,iBAAgC,cAAc;CAItD,AAAQ,YAAY;CACpB,AAAQ,YAAY;CACpB,AAAQ,gBAAgB;CACxB,AAAQ,iBAAiB;CACzB,AAAQ,cAAc;CACtB,AAAQ,cAAc;CAEtB,A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,KAAK,aAEjB;EAGF,KAAK,YAAY,OAAO;EACxB,KAAK,YAAY,OAAO;EACxB,KAAK,gBAAgB,OAAO;EAC5B,KAAK,iBAAiB,OAAO;EAC7B,KAAK,cAAc;EACnB,KAAK,cAAc;EAEnB,IAAI,SAAS;EACb,IAAI,SAAS;EACb,IAAI,aAAa,KAAK;EACtB,IAAI,cAAc,KAAK;EAEvB,IAAI,MAAM,SAAS;GACjB,MAAM,OAAO,KAAK;GAClB,MAAM,gBAAgB,OAAO,IAAI,WAAW;GAC5C,MAAM,iBAAiB,OAAO,QAAQ;GACtC,MAAM,aAAa,KAAK,MAAM,eAAe,IAAI,IAAI;GACrD,MAAM,UAAU,KAAK,MAAM,eAAe,iBAAiB,cAAc,IAAI;GAE7E,SAAS;GACT,aAAa,UAAU;EACzB;EAEA,IAAI,MAAM,SAAS;GACjB,MAAM,OAAO,KAAK;GAClB,MAAM,gBAAgB,OAAO,IAAI,WAAW;GAC5C,MAAM,kBAAkB,OAAO,SAAS;GACxC,MAAM,aAAa,KAAK,MAAM,eAAe,IAAI,IAAI;GACrD,MAAM,UAAU,KAAK,MAAM,eAAe,kBAAkB,cAAc,IAAI;GAE9E,SAAS;GACT,cAAc,UAAU;EAC1B;EAEA,OAAO,YAAY,QAAQ,MAAM;EACjC,OAAO,QAAQ,YAAY,WAAW;CACxC;AACF"}
@@ -1,70 +0,0 @@
1
- import type { ObjectLayer, TileMapObject } from './ObjectLayer';
2
- import type { TileMap } from './TileMap';
3
- import type { TileProperties } from './types';
4
- /**
5
- * A format-neutral view of one map object, as handed to a
6
- * {@link import('./MapObjectSpawner').MapObjectFactory}.
7
- *
8
- * The descriptor is what game code writes against: it resolves the two things
9
- * that differ between authoring formats - stable identity and the dispatch
10
- * key - and pairs the object with the layer it came from. The parsed object
11
- * itself stays reachable through {@link object}, and the untouched source
12
- * record through {@link TileMapObject.source}.
13
- */
14
- export interface MapObjectDescriptor {
15
- /**
16
- * Stable identity for this object.
17
- *
18
- * Uniqueness domain is **one {@link TileMap}**: Tiled object ids are unique
19
- * within a map, and LDtk entity iids are unique globally, so an LDtk-sourced
20
- * id keeps that stronger guarantee. Combine with the owning level's id if a
21
- * world-wide key is needed.
22
- *
23
- * Derived from {@link TileMapObject.sourceId} when the format supplies one,
24
- * otherwise from the numeric {@link TileMapObject.id}.
25
- */
26
- readonly id: string;
27
- /**
28
- * Canonical dispatch key - the object's class/type string, or `null` when the
29
- * source declares none.
30
- *
31
- * LDtk fills it with the entity definition identifier, Tiled with the
32
- * object's class. A {@link import('./MapObjectSpawner').MapObjectSpawner}
33
- * uses it to pick a factory unless an `identify` strategy overrides that.
34
- */
35
- readonly kind: string | null;
36
- /** Object name; may be empty and is not unique. */
37
- readonly name: string;
38
- /** X of the object origin in layer coordinates; use layer.getDisplayObject for projected placement. */
39
- readonly x: number;
40
- /** Y of the object origin in layer coordinates; use layer.getDisplayObject for projected placement. */
41
- readonly y: number;
42
- /** Bounding width in px (0 for points). */
43
- readonly width: number;
44
- /** Bounding height in px (0 for points). */
45
- readonly height: number;
46
- /** Rotation in degrees, clockwise. See {@link TileMapObject} for the pivot. */
47
- readonly rotation: number;
48
- /** The object's immutable custom properties. */
49
- readonly properties: TileProperties;
50
- /** The object layer this object was authored on, with its placement metadata. */
51
- readonly layer: ObjectLayer;
52
- /** The parsed object itself - narrow on `object.kind` to read geometry. */
53
- readonly object: TileMapObject;
54
- }
55
- /**
56
- * Build the {@link MapObjectDescriptor} for one object of `layer`.
57
- *
58
- * Exposed for code that spawns from a hand-picked object rather than from a
59
- * whole map; {@link mapObjectDescriptors} covers the common case.
60
- */
61
- export declare const mapObjectDescriptor: (object: TileMapObject, layer: ObjectLayer) => MapObjectDescriptor;
62
- /**
63
- * Every object of `map`, in a defined order: object-layer order first, then
64
- * object order within each layer.
65
- *
66
- * This is the order a {@link import('./MapObjectSpawner').MapObjectSpawner}
67
- * spawns in, so the same map always produces the same sequence.
68
- */
69
- export declare const mapObjectDescriptors: (map: TileMap) => Generator<MapOb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
- //#region src/MapObject.ts
2
- /**
3
- * Build the {@link MapObjectDescriptor} for one object of `layer`.
4
- *
5
- * Exposed for code that spawns from a hand-picked object rather than from a
6
- * whole map; {@link mapObjectDescriptors} covers the common case.
7
- */
8
- const mapObjectDescriptor = (object, layer) => ({
9
- id: object.sourceId ?? String(object.id),
10
- kind: object.type === "" ? null : object.type,
11
- name: object.name,
12
- x: object.x,
13
- y: object.y,
14
- width: object.width,
15
- height: object.height,
16
- rotation: object.rotation,
17
- properties: object.properties,
18
- layer,
19
- object
20
- });
21
- /**
22
- * Every object of `map`, in a defined order: object-layer order first, then
23
- * object order within each layer.
24
- *
25
- * This is the order a {@link import('./MapObjectSpawner').MapObjectSpawner}
26
- * spawns in, so the same map always produces the same sequence.
27
- */
28
- const mapObjectDescriptors = function* (map) {
29
- for (const layer of map.objectLayers) for (const object of layer.objects) yield mapObjectDescriptor(object, layer);
30
- };
31
-
32
- //#endregion
33
- export { mapObjectDescriptor, mapObjectDescriptors };
34
- //# sourceMappingURL=MapObject.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"MapObject.js","names":[],"sources":["../../src/MapObject.ts"],"sourcesContent":["import type { ObjectLayer, TileMapObject } from './ObjectLayer';\nimport type { TileMap } from './TileMap';\nimport type { TileProperties } from './types';\n\n/**\n * A format-neutral view of one map object, as handed to a\n * {@link import('./MapObjectSpawner').MapObjectFactory}.\n *\n * The descriptor is what game code writes against: it resolves the two things\n * that differ between authoring formats - stable identity and the dispatch\n * key - and pairs the object with the layer it came from. The parsed object\n * itself stays reachable through {@link object}, and the untouched source\n * record through {@link TileMapObject.source}.\n */\nexport interface MapObjectDescriptor {\n /**\n * Stable identity for this object.\n *\n * Uniqueness domain is **one {@link TileMap}**: Tiled object ids are unique\n * within a map, and LDtk entity iids are unique globally, so an LDtk-sourced\n * id keeps that stronger guarantee. Combine with the owning level's id if a\n * world-wide key is needed.\n *\n * Derived from {@link TileMapObject.sourceId} when the format supplies one,\n * otherwise from the numeric {@link TileMapObject.id}.\n */\n readonly id: string;\n /**\n * Canonical dispatch key - the object's class/type string, or `null` when the\n * source declares none.\n *\n * LDtk fills it with the entity definition identifier, Tiled with the\n * object's class. A {@link import('./MapObjectSpawner').MapObjectSpawner}\n * uses it to pick a factory unless an `identify` strategy overrides that.\n */\n readonly kind: string | null;\n /** Object name; may be empty and is not unique. */\n readonly name: string;\n /** X of the object origin in layer coordinates; use layer.getDisplayObject for projected placement. */\n readonly x: number;\n /** Y of the object origin in layer coordinates; use layer.getDisplayObject for projected placement. */\n readonly y: number;\n /** Bounding width in px (0 for points). */\n readonly width: number;\n /** Bounding height in px (0 for points). */\n readonly height: number;\n /** Rotation in degrees, clockwise. See {@link TileMapObject} for the pivot. */\n readonly rotation: number;\n /** The object's immutable custom properties. */\n readonly properties: TileProperties;\n /** The object layer this object was authored on, with its placement metadata. */\n readonly layer: ObjectLayer;\n /** The parsed object itself - narrow on `object.kind` to read geometry. */\n readonly object: TileMapObject;\n}\n\n/**\n * Build the {@link MapObjectDescriptor} for one object of `layer`.\n *\n * Exposed for code that spawns from a hand-picked object rather than from a\n * whole map; {@link mapObjectDescriptors} covers the common case.\n */\nexport const mapObjectDescriptor = (object: TileMapObject, layer: ObjectLayer): MapObjectDescriptor => ({\n id: object.sourceId ?? String(object.id),\n kind: object.type === '' ? null : object.type,\n name: object.name,\n x: object.x,\n y: object.y,\n width: object.width,\n height: object.height,\n rotation: object.rotation,\n properties: object.properties,\n layer,\n object,\n});\n\n/**\n * Every object of `map`, in a defined order: object-layer order first, then\n * object order within each layer.\n *\n * This is the order a {@link import('./MapObjectSpawner').MapObjectSpawner}\n * spawns in, so the same map always produces the same sequence.\n */\nexport const mapObjectDescriptors = function* (map: TileMap): Generator<MapObjectDescriptor> {\n for (const layer of map.objectLayers) {\n for (const object of layer.objects) {\n yield mapObjectDescriptor(object, layer);\n }\n }\n};\n"],"mappings":";;;;;;;AA8DA,MAAa,uBAAuB,QAAuB,WAA6C;CACtG,IAAI,OAAO,YAAY,OAAO,OAAO,EAAE;CACvC,MAAM,OAAO,SAAS,KAAK,OAAO,OAAO;CACzC,MAAM,OAAO;CACb,GAAG,OAAO;CACV,GAAG,OAAO;CACV,OAAO,OAAO;CACd,QAAQ,OAAO;CACf,UAAU,OAAO;CACjB,YAAY,OAAO;CACnB;CACA;AACF;;;;;;;;AASA,MAAa,uBAAuB,WAAW,KAA8C;CAC3F,KAAK,MAAM,SAAS,IAAI,cACtB,KAAK,MAAM,UAAU,MAAM,SACzB,MAAM,oBAAoB,QAAQ,KAAK;AAG7C"}