@n3rdw1z4rd/core 0.23.0 → 0.23.1

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 (141) hide show
  1. package/dist/astar.d.ts +1 -3
  2. package/dist/astar.js +1 -2
  3. package/dist/canvas-renderer.d.ts +1 -3
  4. package/dist/canvas-renderer.js +1 -2
  5. package/dist/clock.d.ts +1 -3
  6. package/dist/clock.js +1 -2
  7. package/dist/color-palette.d.ts +1 -3
  8. package/dist/color-palette.js +1 -2
  9. package/dist/color.d.ts +1 -3
  10. package/dist/color.js +1 -2
  11. package/dist/disposable.d.ts +1 -3
  12. package/dist/disposable.js +1 -2
  13. package/dist/dungeon-generator.d.ts +2 -4
  14. package/dist/dungeon-generator.js +3 -4
  15. package/dist/ecs.d.ts +1 -3
  16. package/dist/ecs.js +1 -2
  17. package/dist/emitter.d.ts +1 -3
  18. package/dist/emitter.js +1 -2
  19. package/dist/event-queue.d.ts +1 -3
  20. package/dist/event-queue.js +1 -2
  21. package/dist/graph/doc.d.ts +2 -4
  22. package/dist/graph/doc.js +1 -2
  23. package/dist/graph/evaluate.d.ts +1 -3
  24. package/dist/graph/evaluate.js +1 -2
  25. package/dist/graph/index.d.ts +2 -2
  26. package/dist/graph/index.js +2 -2
  27. package/dist/graph/node.d.ts +1 -3
  28. package/dist/graph/node.js +1 -2
  29. package/dist/graph/nodes.d.ts +1 -3
  30. package/dist/graph/nodes.js +1 -2
  31. package/dist/graph/script.d.ts +1 -3
  32. package/dist/graph/script.js +1 -2
  33. package/dist/graph/sources.d.ts +1 -3
  34. package/dist/graph/sources.js +1 -2
  35. package/dist/graph/subgraph.d.ts +2 -4
  36. package/dist/graph/subgraph.js +1 -2
  37. package/dist/graph/types.d.ts +1 -3
  38. package/dist/graph/types.js +1 -2
  39. package/dist/graph.cjs +9 -17
  40. package/dist/graph.d.cts +1 -17
  41. package/dist/index.cjs +27 -52
  42. package/dist/index.d.cts +1 -63
  43. package/dist/index.d.ts +10 -10
  44. package/dist/index.js +14 -14
  45. package/dist/input/_input.d.ts +1 -3
  46. package/dist/input/_input.js +1 -2
  47. package/dist/input/action-map.d.ts +1 -3
  48. package/dist/input/action-map.js +1 -2
  49. package/dist/input/bindings.d.ts +1 -3
  50. package/dist/input/bindings.js +1 -2
  51. package/dist/input/gestures.d.ts +1 -3
  52. package/dist/input/gestures.js +1 -2
  53. package/dist/input/index.d.ts +1 -1
  54. package/dist/input/index.js +1 -1
  55. package/dist/input/input-action-map.d.ts +3 -5
  56. package/dist/input/input-action-map.js +3 -4
  57. package/dist/input/input.d.ts +2 -4
  58. package/dist/input/input.js +2 -3
  59. package/dist/log.d.ts +1 -3
  60. package/dist/log.js +1 -2
  61. package/dist/map2d.d.ts +1 -3
  62. package/dist/map2d.js +1 -2
  63. package/dist/{map3d-CHDJiq5T.d.cts → map3d-DRHhbrFn.d.cts} +0 -8
  64. package/dist/map3d.d.ts +1 -3
  65. package/dist/map3d.js +1 -2
  66. package/dist/math.d.ts +1 -3
  67. package/dist/math.js +1 -2
  68. package/dist/misc.d.ts +1 -3
  69. package/dist/misc.js +1 -2
  70. package/dist/observable.d.ts +1 -3
  71. package/dist/observable.js +1 -2
  72. package/dist/particle-renderer.d.ts +1 -3
  73. package/dist/particle-renderer.js +1 -2
  74. package/dist/particle-system-2d.d.ts +1 -3
  75. package/dist/particle-system-2d.js +3 -4
  76. package/dist/random.d.ts +1 -3
  77. package/dist/random.js +1 -2
  78. package/dist/rectangle.d.ts +1 -3
  79. package/dist/rectangle.js +1 -2
  80. package/dist/{rng-Dhqq7owV.cjs → rng-edL6atS3.cjs} +3 -6
  81. package/dist/rng.d.ts +1 -3
  82. package/dist/rng.js +2 -3
  83. package/dist/signal.d.ts +1 -3
  84. package/dist/signal.js +1 -2
  85. package/dist/spatial-partition-2d.d.ts +1 -3
  86. package/dist/spatial-partition-2d.js +1 -2
  87. package/dist/{spatial-partition-3d-CmSCL87Z.cjs → spatial-partition-3d-D1uyJVhM.cjs} +7 -13
  88. package/dist/spatial-partition-3d.d.ts +1 -3
  89. package/dist/spatial-partition-3d.js +1 -2
  90. package/dist/three/adaptive-grid.d.ts +1 -3
  91. package/dist/three/adaptive-grid.js +1 -2
  92. package/dist/three/asteroid-mesh.d.ts +1 -3
  93. package/dist/three/asteroid-mesh.js +1 -2
  94. package/dist/three/camera-rig.d.ts +1 -3
  95. package/dist/three/camera-rig.js +1 -2
  96. package/dist/three/cube-sphere-geometry.d.ts +1 -3
  97. package/dist/three/cube-sphere-geometry.js +1 -2
  98. package/dist/three/ecs.d.ts +1 -3
  99. package/dist/three/ecs.js +1 -2
  100. package/dist/three/editor-camera.d.ts +1 -3
  101. package/dist/three/editor-camera.js +1 -2
  102. package/dist/three/index.d.ts +4 -4
  103. package/dist/three/index.js +1 -1
  104. package/dist/three/particle-system-3d.d.ts +1 -3
  105. package/dist/three/particle-system-3d.js +3 -4
  106. package/dist/three/picking.d.ts +2 -4
  107. package/dist/three/picking.js +1 -2
  108. package/dist/three/renderer.d.ts +1 -3
  109. package/dist/three/renderer.js +1 -2
  110. package/dist/three/schema.d.ts +0 -2
  111. package/dist/three/schema.js +1 -2
  112. package/dist/three/starfield.d.ts +1 -3
  113. package/dist/three/starfield.js +1 -2
  114. package/dist/three/texture-atlas.d.ts +1 -3
  115. package/dist/three/texture-atlas.js +1 -2
  116. package/dist/three/texture-utils.d.ts +1 -3
  117. package/dist/three/texture-utils.js +1 -2
  118. package/dist/three/voxel-geometry.d.ts +2 -4
  119. package/dist/three/voxel-geometry.js +2 -3
  120. package/dist/three/voxel-mesh.d.ts +1 -3
  121. package/dist/three/voxel-mesh.js +1 -2
  122. package/dist/three/world.d.ts +0 -2
  123. package/dist/three/world.js +1 -2
  124. package/dist/three.cjs +18 -34
  125. package/dist/three.d.cts +1 -33
  126. package/dist/tilemap.d.ts +1 -3
  127. package/dist/tilemap.js +1 -2
  128. package/dist/types.d.ts +1 -3
  129. package/dist/vector.d.ts +1 -3
  130. package/dist/vector.js +1 -2
  131. package/dist/vite.cjs +1 -2
  132. package/dist/vite.d.cts +1 -3
  133. package/dist/vite.d.ts +1 -3
  134. package/dist/vite.js +1 -2
  135. package/dist/webgl-renderer.d.ts +1 -3
  136. package/dist/webgl-renderer.js +1 -2
  137. package/dist/webgl.d.ts +1 -3
  138. package/dist/webgl.js +1 -2
  139. package/dist/worker-interface.d.ts +1 -3
  140. package/dist/worker-interface.js +1 -2
  141. package/package.json +6 -6
package/dist/three.cjs CHANGED
@@ -1,8 +1,8 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_rng = require("./rng-Dhqq7owV.cjs");
3
- const require_spatial_partition_3d = require("./spatial-partition-3d-CmSCL87Z.cjs");
2
+ const require_rng = require("./rng-edL6atS3.cjs");
3
+ const require_spatial_partition_3d = require("./spatial-partition-3d-D1uyJVhM.cjs");
4
4
  let three = require("three");
5
- //#region src/three/adaptive-grid.ts
5
+ // src/three/adaptive-grid.ts
6
6
  /**
7
7
  * An infinite-looking grid on the XY plane for editor views: each {@link AdaptiveGrid.update}
8
8
  * rebuilds just the lines in view, doubling the spacing when zoomed out so lines never get
@@ -126,8 +126,7 @@ var AdaptiveGrid = class extends three.LineSegments {
126
126
  this.material.dispose();
127
127
  }
128
128
  };
129
- //#endregion
130
- //#region src/three/asteroid-mesh.ts
129
+ // src/three/asteroid-mesh.ts
131
130
  /**
132
131
  * Lumpy rock: an icosphere whose vertices are pushed in and out by 3D noise, with a
133
132
  * `MeshStandardMaterial`. The geometry is non-indexed, so normals are per face (a faceted look).
@@ -168,8 +167,7 @@ var AsteroidMesh = class extends three.Mesh {
168
167
  this.geometry.computeVertexNormals();
169
168
  }
170
169
  };
171
- //#endregion
172
- //#region src/three/camera-rig.ts
170
+ // src/three/camera-rig.ts
173
171
  const DEFAULT_DISTANCE = 5;
174
172
  const damp = (current, target, damping, deltaTime) => damping > 0 ? require_rng.lerp(current, target, 1 - Math.exp(-damping * deltaTime)) : target;
175
173
  /**
@@ -362,8 +360,7 @@ var CameraRig = class extends three.Group {
362
360
  this.onModeChange?.(firstPerson);
363
361
  }
364
362
  };
365
- //#endregion
366
- //#region src/three/cube-sphere-geometry.ts
363
+ // src/three/cube-sphere-geometry.ts
367
364
  const FACES = [
368
365
  {
369
366
  n: [
@@ -599,8 +596,7 @@ var CubeSphereGeometry = class CubeSphereGeometry extends three.BufferGeometry {
599
596
  ];
600
597
  }
601
598
  };
602
- //#endregion
603
- //#region src/three/ecs.ts
599
+ // src/three/ecs.ts
604
600
  let entityCounter = 0;
605
601
  /**
606
602
  * Returns a new id `"entity_<n>"` from a module-level counter (unique per page load, not random).
@@ -663,8 +659,7 @@ function RemoveThreeComponent(entity, name) {
663
659
  function IsThreeEntity(obj) {
664
660
  return obj.userData.entityId !== void 0;
665
661
  }
666
- //#endregion
667
- //#region src/three/editor-camera.ts
662
+ // src/three/editor-camera.ts
668
663
  /**
669
664
  * An editor viewport camera: orthographic or perspective, with pan, zoom-at-cursor, orbit
670
665
  * and fit-to-bounds, and conversions between screen (CSS px, relative to the canvas) and
@@ -835,8 +830,7 @@ var EditorCamera = class {
835
830
  this.pan((insets.l - insets.r) / 2, (insets.t - insets.b) / 2);
836
831
  }
837
832
  };
838
- //#endregion
839
- //#region src/three/particle-system-3d.ts
833
+ // src/three/particle-system-3d.ts
840
834
  const vertexShader = `
841
835
  uniform float pointSize;
842
836
 
@@ -1052,8 +1046,7 @@ var ParticleSystem3d = class extends three.Group {
1052
1046
  this._updateGeometry();
1053
1047
  }
1054
1048
  };
1055
- //#endregion
1056
- //#region src/three/picking.ts
1049
+ // src/three/picking.ts
1057
1050
  /**
1058
1051
  * The entity under a screen point (CSS px): raycasts the world's scene and walks up from
1059
1052
  * whatever was hit to the closest entity of `world`. Invisible objects are skipped.
@@ -1110,8 +1103,7 @@ function visible(object) {
1110
1103
  }
1111
1104
  return true;
1112
1105
  }
1113
- //#endregion
1114
- //#region src/three/renderer.ts
1106
+ // src/three/renderer.ts
1115
1107
  /**
1116
1108
  * `WebGLRenderer` that uses the device pixel ratio and can size itself to its parent element.
1117
1109
  *
@@ -1165,8 +1157,7 @@ var Renderer = class extends three.WebGLRenderer {
1165
1157
  return resized;
1166
1158
  }
1167
1159
  };
1168
- //#endregion
1169
- //#region src/three/schema.ts
1160
+ // src/three/schema.ts
1170
1161
  const isObj = (v) => typeof v === "object" && v !== null;
1171
1162
  /** Works out a field's type from a value, e.g. a class field's initial value. */
1172
1163
  function inferFieldType(value) {
@@ -1378,8 +1369,7 @@ var ComponentRegistry = class {
1378
1369
  * @category ECS
1379
1370
  */
1380
1371
  const components = new ComponentRegistry();
1381
- //#endregion
1382
- //#region src/three/starfield.ts
1372
+ // src/three/starfield.ts
1383
1373
  /**
1384
1374
  * Points spread uniformly over a sphere's surface, for a distant star backdrop (point size 5 with
1385
1375
  * size attenuation, 0.9 opacity). The same `seed` always gives the same stars; without one,
@@ -1439,8 +1429,7 @@ function CreateSystemStar(position) {
1439
1429
  star.add(starLight);
1440
1430
  return star;
1441
1431
  }
1442
- //#endregion
1443
- //#region src/three/texture-utils.ts
1432
+ // src/three/texture-utils.ts
1444
1433
  /**
1445
1434
  * Loads an image into a `Texture` with three's `TextureLoader`.
1446
1435
  *
@@ -1481,8 +1470,7 @@ function CreateSubTexture(texture, x, y, w, h) {
1481
1470
  subTexture.needsUpdate = true;
1482
1471
  return subTexture;
1483
1472
  }
1484
- //#endregion
1485
- //#region src/three/texture-atlas.ts
1473
+ // src/three/texture-atlas.ts
1486
1474
  /**
1487
1475
  * Tile layout and UV lookup for a texture atlas (tile sheet). Tiles are numbered left to
1488
1476
  * right, top to bottom, starting at 0.
@@ -1562,8 +1550,7 @@ var TextureAtlas = class TextureAtlas {
1562
1550
  });
1563
1551
  }
1564
1552
  };
1565
- //#endregion
1566
- //#region src/three/voxel-geometry.ts
1553
+ // src/three/voxel-geometry.ts
1567
1554
  const cellKey = (u, v) => (u + 33554432) * 67108864 + (v + 33554432);
1568
1555
  const planeKey = (d, side, slice) => (slice + 33554432) * 8 + d * 2 + (side > 0 ? 1 : 0);
1569
1556
  /**
@@ -1789,8 +1776,7 @@ var VoxelGeometry = class extends three.BufferGeometry {
1789
1776
  return this;
1790
1777
  }
1791
1778
  };
1792
- //#endregion
1793
- //#region src/three/voxel-mesh.ts
1779
+ // src/three/voxel-mesh.ts
1794
1780
  /**
1795
1781
  * Editable voxel model: `set()` voxels, then `update()` rebuilds the geometry if anything changed.
1796
1782
  * Voxel values are palette indices; `Map3D`'s default value (-1) means empty.
@@ -1856,8 +1842,7 @@ var VoxelMesh = class extends three.Mesh {
1856
1842
  return true;
1857
1843
  }
1858
1844
  };
1859
- //#endregion
1860
- //#region src/three/world.ts
1845
+ // src/three/world.ts
1861
1846
  /**
1862
1847
  * A scene of entities: three.js objects with components (see {@link CreateThreeEntity}),
1863
1848
  * tracked by their `Object3D.uuid`.
@@ -2215,7 +2200,6 @@ var World = class {
2215
2200
  };
2216
2201
  const SCENE_FORMAT = "n3rdw1z4rd.scene";
2217
2202
  const SCENE_VERSION = 1;
2218
- //#endregion
2219
2203
  exports.AdaptiveGrid = AdaptiveGrid;
2220
2204
  exports.AddThreeComponent = AddThreeComponent;
2221
2205
  exports.AsteroidMesh = AsteroidMesh;
package/dist/three.d.cts CHANGED
@@ -1,6 +1,5 @@
1
- import { d as ColorPalette, h as NoiseFunction3D, i as Map3D } from "./map3d-CHDJiq5T.cjs";
1
+ import { d as ColorPalette, h as NoiseFunction3D, i as Map3D } from "./map3d-DRHhbrFn.cjs";
2
2
  import { BufferGeometry, ColorRepresentation, Group, LineBasicMaterial, LineSegments, Material, Mesh, MeshLambertMaterial, MeshLambertMaterialParameters, Object3D, OrthographicCamera, PerspectiveCamera, Points, Raycaster, Texture, Vector3, WebGLRenderer, WebGLRendererParameters } from "three";
3
- //#region src/three/editor-camera.d.ts
4
3
  /** Screen edges covered by UI, CSS px. */
5
4
  export interface ViewInsets {
6
5
  l: number;
@@ -91,8 +90,6 @@ export declare class EditorCamera {
91
90
  */
92
91
  fit(minX: number, minY: number, maxX: number, maxY: number, insets?: ViewInsets, margin?: number, maxZoom?: number): void;
93
92
  }
94
- //#endregion
95
- //#region src/three/adaptive-grid.d.ts
96
93
  /**
97
94
  * An infinite-looking grid on the XY plane for editor views: each {@link AdaptiveGrid.update}
98
95
  * rebuilds just the lines in view, doubling the spacing when zoomed out so lines never get
@@ -132,8 +129,6 @@ export declare class AdaptiveGrid extends LineSegments<BufferGeometry, LineBasic
132
129
  private ensure;
133
130
  dispose(): void;
134
131
  }
135
- //#endregion
136
- //#region src/three/asteroid-mesh.d.ts
137
132
  /**
138
133
  * Options for the {@link AsteroidMesh} constructor.
139
134
  *
@@ -171,8 +166,6 @@ export interface AsteroidOptions {
171
166
  export declare class AsteroidMesh extends Mesh {
172
167
  constructor(options: AsteroidOptions);
173
168
  }
174
- //#endregion
175
- //#region src/three/camera-rig.d.ts
176
169
  /**
177
170
  * Options for the {@link CameraRig} constructor.
178
171
  *
@@ -310,8 +303,6 @@ export declare class CameraRig extends Group {
310
303
  private _clampPitch;
311
304
  private _setFirstPerson;
312
305
  }
313
- //#endregion
314
- //#region src/three/cube-sphere-geometry.d.ts
315
306
  /**
316
307
  * A sphere built from a subdivided cube, for planets and other displaced spheres.
317
308
  *
@@ -363,8 +354,6 @@ export declare class CubeSphereGeometry extends BufferGeometry {
363
354
  */
364
355
  static spherify(x: number, y: number, z: number): [number, number, number];
365
356
  }
366
- //#endregion
367
- //#region src/three/ecs.d.ts
368
357
  /**
369
358
  * A component: any plain object of data, stored by name on a {@link ThreeEntity}.
370
359
  *
@@ -439,8 +428,6 @@ export declare function IsThreeEntity(obj: Object3D): boolean;
439
428
  * @category ECS
440
429
  */
441
430
  export type ThreeSystem = (entities: Map<string, ThreeEntity>, delta: number, ...args: any) => void;
442
- //#endregion
443
- //#region src/three/particle-system-3d.d.ts
444
431
  /**
445
432
  * "Particle life" simulation in 3D: 1000 colored points in five species that attract or repel each
446
433
  * other according to a random species-by-species matrix, forming moving clusters. Particles live in
@@ -491,8 +478,6 @@ export declare class ParticleSystem3d extends Group {
491
478
  */
492
479
  update(camera: PerspectiveCamera, dt: number): void;
493
480
  }
494
- //#endregion
495
- //#region src/three/schema.d.ts
496
481
  /**
497
482
  * Component schemas: what fields a component type has, their types, defaults and ranges.
498
483
  *
@@ -629,8 +614,6 @@ export declare class ComponentRegistry {
629
614
  * @category ECS
630
615
  */
631
616
  export declare const components: ComponentRegistry;
632
- //#endregion
633
- //#region src/three/world.d.ts
634
617
  /**
635
618
  * A scene of entities: three.js objects with components (see {@link CreateThreeEntity}),
636
619
  * tracked by their `Object3D.uuid`.
@@ -817,8 +800,6 @@ export interface EntityDoc {
817
800
  /** component JSON by type name */
818
801
  components: Record<string, Record<string, unknown>>;
819
802
  }
820
- //#endregion
821
- //#region src/three/picking.d.ts
822
803
  /** @category Three.js */
823
804
  export interface EntityHit {
824
805
  entity: ThreeEntity;
@@ -847,8 +828,6 @@ export interface PickOptions {
847
828
  export declare function pickEntity(world: World, view: EditorCamera, sx: number, sy: number, options?: PickOptions): EntityHit | null;
848
829
  /** The closest entity of `world` at or above `object`, or null. */
849
830
  export declare function entityOf(world: World, object: Object3D): ThreeEntity | null;
850
- //#endregion
851
- //#region src/three/renderer.d.ts
852
831
  /**
853
832
  * `WebGLRenderer` that uses the device pixel ratio and can size itself to its parent element.
854
833
  *
@@ -884,8 +863,6 @@ export declare class Renderer extends WebGLRenderer {
884
863
  */
885
864
  resize(width?: number, height?: number): boolean;
886
865
  }
887
- //#endregion
888
- //#region src/three/starfield.d.ts
889
866
  /**
890
867
  * Points spread uniformly over a sphere's surface, for a distant star backdrop (point size 5 with
891
868
  * size attenuation, 0.9 opacity). The same `seed` always gives the same stars; without one,
@@ -906,8 +883,6 @@ export declare function CreateStarfield(radius?: number, count?: number, color?:
906
883
  * @category Geometry & Meshes
907
884
  */
908
885
  export declare function CreateSystemStar(position?: Vector3): Group;
909
- //#endregion
910
- //#region src/three/texture-utils.d.ts
911
886
  /**
912
887
  * A loaded texture with its image size, as returned by {@link LoadTexture}.
913
888
  *
@@ -936,8 +911,6 @@ export declare function LoadTexture(url: string): Promise<TextureData>;
936
911
  * @category Textures
937
912
  */
938
913
  export declare function CreateSubTexture(texture: Texture, x: number, y: number, w: number, h: number): Texture;
939
- //#endregion
940
- //#region src/three/texture-atlas.d.ts
941
914
  /**
942
915
  * Texture coordinate `[u, v]`, each 0..1, with v = 1 at the image's top (three.js convention).
943
916
  *
@@ -1010,8 +983,6 @@ export declare class TextureAtlas {
1010
983
  /** a Lambert material using this atlas, set up for pixel-art tiles with transparency */
1011
984
  createMaterial(params?: MeshLambertMaterialParameters): MeshLambertMaterial;
1012
985
  }
1013
- //#endregion
1014
- //#region src/three/voxel-geometry.d.ts
1015
986
  /**
1016
987
  * Options for {@link buildVoxelGeometry} and {@link VoxelGeometry}.
1017
988
  *
@@ -1079,8 +1050,6 @@ export declare class VoxelGeometry extends BufferGeometry {
1079
1050
  /** Rebuilds the geometry from `voxels` and `options`. */
1080
1051
  update(): this;
1081
1052
  }
1082
- //#endregion
1083
- //#region src/three/voxel-mesh.d.ts
1084
1053
  /**
1085
1054
  * Box of voxel cells a {@link VoxelMesh} accepts, from the origin.
1086
1055
  *
@@ -1143,5 +1112,4 @@ export declare class VoxelMesh extends Mesh<VoxelGeometry, Material | Material[]
1143
1112
  /** Rebuilds the geometry if the voxels changed; returns whether it did. */
1144
1113
  update(): boolean;
1145
1114
  }
1146
- //#endregion
1147
1115
  export {};
package/dist/tilemap.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- //#region src/tilemap.d.ts
2
1
  /**
3
2
  * Sparse 2D grid of arbitrary values, keyed by floored integer coordinates. Simpler than
4
3
  * {@link Map2D} (string keys, any value type, no default value or range limit).
@@ -13,5 +12,4 @@ export declare class Tilemap<T = number> {
13
12
  get(x: number, y: number): T | undefined;
14
13
  /** Sets the tile containing (x, y). */
15
14
  set(x: number, y: number, v: T): void;
16
- }
17
- //#endregion
15
+ }
package/dist/tilemap.js CHANGED
@@ -1,4 +1,4 @@
1
- //#region src/tilemap.ts
1
+ // src/tilemap.ts
2
2
  /**
3
3
  * Sparse 2D grid of arbitrary values, keyed by floored integer coordinates. Simpler than
4
4
  * {@link Map2D} (string keys, any value type, no default value or range limit).
@@ -22,5 +22,4 @@ var Tilemap = class {
22
22
  this.map.set(this._key(x, y), v);
23
23
  }
24
24
  };
25
- //#endregion
26
25
  export { Tilemap };
package/dist/types.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- //#region src/types.d.ts
2
1
  /**
3
2
  * Any object with numeric `x` and `y`, such as a {@link Vector}.
4
3
  * @property x horizontal coordinate
@@ -30,5 +29,4 @@ export type KeyValue = Record<string, any>;
30
29
  * matches simplex-noise's NoiseFunction3D, e.g. createNoise3D(() => rng.nextFloat())
31
30
  * @category Math & Random
32
31
  */
33
- export type NoiseFunction3D = (x: number, y: number, z: number) => number;
34
- //#endregion
32
+ export type NoiseFunction3D = (x: number, y: number, z: number) => number;
package/dist/vector.d.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  import { XY } from "./types.js";
2
- //#region src/vector.d.ts
3
2
  /**
4
3
  * Mutable 2D vector. Most methods modify the vector in place and return `this` for chaining;
5
4
  * {@link Vector.clone} and {@link Vector.floored} return new vectors.
@@ -74,5 +73,4 @@ export declare class Vector {
74
73
  static get EAST(): Vector;
75
74
  /** new (-1, 0) */
76
75
  static get WEST(): Vector;
77
- }
78
- //#endregion
76
+ }
package/dist/vector.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { distance2d } from "./math.js";
2
- //#region src/vector.ts
2
+ // src/vector.ts
3
3
  /**
4
4
  * Mutable 2D vector. Most methods modify the vector in place and return `this` for chaining;
5
5
  * {@link Vector.clone} and {@link Vector.floored} return new vectors.
@@ -165,5 +165,4 @@ var Vector = class Vector {
165
165
  return new Vector(-1, 0);
166
166
  }
167
167
  };
168
- //#endregion
169
168
  export { Vector };
package/dist/vite.cjs CHANGED
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- //#region src/vite.ts
2
+ // src/vite.ts
3
3
  /** @category Build */
4
4
  function decorators() {
5
5
  const file = /\.[cm]?[jt]sx?$/;
@@ -36,5 +36,4 @@ function decorators() {
36
36
  }
37
37
  };
38
38
  }
39
- //#endregion
40
39
  exports.decorators = decorators;
package/dist/vite.d.cts CHANGED
@@ -1,4 +1,3 @@
1
- //#region src/vite.d.ts
2
1
  /**
3
2
  * Vite plugin: lowers standard (TC39) decorators such as `@field` / `@component` with esbuild.
4
3
  *
@@ -31,5 +30,4 @@ export interface DecoratorsPlugin {
31
30
  } | null>;
32
31
  }
33
32
  /** @category Build */
34
- export declare function decorators(): DecoratorsPlugin;
35
- //#endregion
33
+ export declare function decorators(): DecoratorsPlugin;
package/dist/vite.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- //#region src/vite.d.ts
2
1
  /**
3
2
  * Vite plugin: lowers standard (TC39) decorators such as `@field` / `@component` with esbuild.
4
3
  *
@@ -31,5 +30,4 @@ export interface DecoratorsPlugin {
31
30
  } | null>;
32
31
  }
33
32
  /** @category Build */
34
- export declare function decorators(): DecoratorsPlugin;
35
- //#endregion
33
+ export declare function decorators(): DecoratorsPlugin;
package/dist/vite.js CHANGED
@@ -1,4 +1,4 @@
1
- //#region src/vite.ts
1
+ // src/vite.ts
2
2
  /** @category Build */
3
3
  function decorators() {
4
4
  const file = /\.[cm]?[jt]sx?$/;
@@ -35,5 +35,4 @@ function decorators() {
35
35
  }
36
36
  };
37
37
  }
38
- //#endregion
39
38
  export { decorators };
@@ -1,6 +1,5 @@
1
1
  import { Observable } from "./observable.js";
2
2
  import { DrawOptions, ProgramInfo, RenderTarget, VertexArrayInfo } from "./webgl.js";
3
- //#region src/webgl-renderer.d.ts
4
3
  /**
5
4
  * Options for the {@link WebGlRenderer} constructor.
6
5
  *
@@ -85,5 +84,4 @@ export declare class WebGlRenderer {
85
84
  /** Removes the renderer's event listeners. GPU resources you created are yours to delete. */
86
85
  dispose(): void;
87
86
  private _listen;
88
- }
89
- //#endregion
87
+ }
@@ -1,6 +1,6 @@
1
1
  import { Observable } from "./observable.js";
2
2
  import { BindRenderTarget, CreateProgramInfo, CreateWebGlContext, Draw, ResizeWebGlContext } from "./webgl.js";
3
- //#region src/webgl-renderer.ts
3
+ // src/webgl-renderer.ts
4
4
  /**
5
5
  * A thin owner of a WebGL2 context: sizing (CSS pixels x pixel ratio), clearing, render targets,
6
6
  * drawing, and context-loss notifications. Everything else is the webgl.ts wrappers on `gl`.
@@ -136,5 +136,4 @@ var WebGlRenderer = class {
136
136
  this._listeners.push([type, listener]);
137
137
  }
138
138
  };
139
- //#endregion
140
139
  export { WebGlRenderer };
package/dist/webgl.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- //#region src/webgl.d.ts
2
1
  /**
3
2
  * Literal GLenum values, so importing this module doesn't require `WebGL2RenderingContext` to exist.
4
3
  *
@@ -353,5 +352,4 @@ export interface DrawOptions {
353
352
  *
354
353
  * @category WebGL
355
354
  */
356
- export declare function Draw(gl: WebGL2RenderingContext, info: ProgramInfo, vertexArray: VertexArrayInfo, options?: DrawOptions): void;
357
- //#endregion
355
+ export declare function Draw(gl: WebGL2RenderingContext, info: ProgramInfo, vertexArray: VertexArrayInfo, options?: DrawOptions): void;
package/dist/webgl.js CHANGED
@@ -1,4 +1,4 @@
1
- //#region src/webgl.ts
1
+ // src/webgl.ts
2
2
  /**
3
3
  * Literal GLenum values, so importing this module doesn't require `WebGL2RenderingContext` to exist.
4
4
  *
@@ -624,5 +624,4 @@ function Draw(gl, info, vertexArray, options = {}) {
624
624
  else gl.drawArrays(mode, offset, count);
625
625
  gl.bindVertexArray(null);
626
626
  }
627
- //#endregion
628
627
  export { BindRenderTarget, CompileShader, CreateBuffer, CreateProgram, CreateProgramInfo, CreateRenderTarget, CreateTexture, CreateVertexArray, CreateWebGlContext, DeleteProgramInfo, DeleteRenderTarget, DeleteTexture, DeleteVertexArray, Draw, GetProgramLocations, LoadWebGlTexture, ResizeRenderTarget, ResizeWebGlContext, SetUniforms, ShaderType, UpdateBuffer, UpdateTexture };
@@ -1,5 +1,4 @@
1
1
  import { Observable } from "./observable.js";
2
- //#region src/worker-interface.d.ts
3
2
  /**
4
3
  * Thin wrapper around a module `Worker` that exposes its errors and messages as
5
4
  * {@link Observable}s.
@@ -26,5 +25,4 @@ export declare class WorkerInterface<TReceive = any, TSend = any> {
26
25
  postMessage(message: TSend, options?: StructuredSerializeOptions | undefined): void;
27
26
  /** Stops the worker immediately. */
28
27
  terminate(): void;
29
- }
30
- //#endregion
28
+ }
@@ -1,5 +1,5 @@
1
1
  import { Observable } from "./observable.js";
2
- //#region src/worker-interface.ts
2
+ // src/worker-interface.ts
3
3
  /**
4
4
  * Thin wrapper around a module `Worker` that exposes its errors and messages as
5
5
  * {@link Observable}s.
@@ -35,5 +35,4 @@ var WorkerInterface = class {
35
35
  this._worker.terminate();
36
36
  }
37
37
  };
38
- //#endregion
39
38
  export { WorkerInterface };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@n3rdw1z4rd/core",
3
- "version": "0.23.0",
3
+ "version": "0.23.1",
4
4
  "description": "core library",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.js",
@@ -98,7 +98,7 @@
98
98
  "heap-js": "^2.7.1"
99
99
  },
100
100
  "peerDependencies": {
101
- "three": "^0.186.1"
101
+ "three": "^0.187.0"
102
102
  },
103
103
  "peerDependenciesMeta": {
104
104
  "three": {
@@ -106,11 +106,11 @@
106
106
  }
107
107
  },
108
108
  "devDependencies": {
109
- "@types/three": "^0.186.0",
110
- "esbuild": "^0.27.2",
109
+ "@types/three": "^0.187.0",
110
+ "esbuild": "^0.28.2",
111
111
  "playwright-core": "^1.56.1",
112
- "three": "^0.186.1",
113
- "tsdown": "^0.23.0",
112
+ "three": "^0.187.0",
113
+ "tsdown": "^0.23.4",
114
114
  "tsx": "^4.23.15",
115
115
  "typedoc": "^0.28.20",
116
116
  "typescript": "^6.0.3"