@n3rdw1z4rd/core 0.18.5 → 0.19.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 (109) hide show
  1. package/README.md +72 -10
  2. package/dist/astar.d.ts +44 -0
  3. package/dist/astar.js +118 -0
  4. package/dist/canvas-renderer.d.ts +157 -0
  5. package/dist/canvas-renderer.js +207 -0
  6. package/dist/clock.d.ts +69 -0
  7. package/dist/clock.js +108 -0
  8. package/dist/color-palette.d.ts +25 -0
  9. package/dist/color-palette.js +112 -0
  10. package/dist/color.d.ts +90 -0
  11. package/dist/color.js +224 -0
  12. package/dist/css/main.css +1 -3
  13. package/dist/disposable.d.ts +27 -0
  14. package/dist/disposable.js +32 -0
  15. package/dist/dungeon-generator.d.ts +142 -0
  16. package/dist/dungeon-generator.js +288 -0
  17. package/dist/ecs.d.ts +87 -0
  18. package/dist/ecs.js +101 -0
  19. package/dist/emitter.d.ts +40 -0
  20. package/dist/emitter.js +54 -0
  21. package/dist/event-queue.d.ts +29 -0
  22. package/dist/event-queue.js +40 -0
  23. package/dist/index.cjs +3820 -0
  24. package/dist/index.d.cts +2657 -0
  25. package/dist/index.d.ts +35 -873
  26. package/dist/index.js +34 -3981
  27. package/dist/input/action-map.d.ts +79 -0
  28. package/dist/input/action-map.js +131 -0
  29. package/dist/input/bindings.d.ts +273 -0
  30. package/dist/input/bindings.js +250 -0
  31. package/dist/input/gestures.d.ts +108 -0
  32. package/dist/input/gestures.js +159 -0
  33. package/dist/input/index.d.ts +5 -0
  34. package/dist/input/index.js +5 -0
  35. package/dist/input/input.d.ts +297 -0
  36. package/dist/input/input.js +695 -0
  37. package/dist/log.d.ts +8 -0
  38. package/dist/log.js +9 -0
  39. package/dist/map2d.d.ts +83 -0
  40. package/dist/map2d.js +120 -0
  41. package/dist/map3d-CHDJiq5T.d.cts +236 -0
  42. package/dist/map3d.d.ts +94 -0
  43. package/dist/map3d.js +148 -0
  44. package/dist/math.d.ts +176 -0
  45. package/dist/math.js +206 -0
  46. package/dist/misc.d.ts +46 -0
  47. package/dist/misc.js +71 -0
  48. package/dist/observable.d.ts +43 -0
  49. package/dist/observable.js +53 -0
  50. package/dist/particle-renderer.d.ts +47 -0
  51. package/dist/particle-renderer.js +82 -0
  52. package/dist/particle-system-2d.d.ts +60 -0
  53. package/dist/particle-system-2d.js +147 -0
  54. package/dist/random.d.ts +46 -0
  55. package/dist/random.js +74 -0
  56. package/dist/rectangle.d.ts +44 -0
  57. package/dist/rectangle.js +69 -0
  58. package/dist/rng.d.ts +72 -0
  59. package/dist/rng.js +152 -0
  60. package/dist/signal.d.ts +34 -0
  61. package/dist/signal.js +41 -0
  62. package/dist/spatial-partition-2d.d.ts +42 -0
  63. package/dist/spatial-partition-2d.js +52 -0
  64. package/dist/spatial-partition-3d-Ba-VBveM.cjs +1324 -0
  65. package/dist/spatial-partition-3d.d.ts +44 -0
  66. package/dist/spatial-partition-3d.js +57 -0
  67. package/dist/three/asteroid-mesh.d.ts +41 -0
  68. package/dist/three/asteroid-mesh.js +44 -0
  69. package/dist/three/camera-rig.d.ts +140 -0
  70. package/dist/three/camera-rig.js +197 -0
  71. package/dist/three/cube-sphere-geometry.d.ts +55 -0
  72. package/dist/three/cube-sphere-geometry.js +239 -0
  73. package/dist/three/ecs.d.ts +75 -0
  74. package/dist/three/ecs.js +64 -0
  75. package/dist/three/index.d.ts +12 -0
  76. package/dist/three/index.js +12 -0
  77. package/dist/three/particle-system-3d.d.ts +53 -0
  78. package/dist/three/particle-system-3d.js +224 -0
  79. package/dist/three/renderer.d.ts +38 -0
  80. package/dist/three/renderer.js +57 -0
  81. package/dist/three/starfield.d.ts +23 -0
  82. package/dist/three/starfield.js +64 -0
  83. package/dist/three/texture-atlas.d.ts +76 -0
  84. package/dist/three/texture-atlas.js +84 -0
  85. package/dist/three/texture-utils.d.ts +31 -0
  86. package/dist/three/texture-utils.js +44 -0
  87. package/dist/three/voxel-geometry.d.ts +72 -0
  88. package/dist/three/voxel-geometry.js +231 -0
  89. package/dist/three/voxel-mesh.d.ts +67 -0
  90. package/dist/three/voxel-mesh.js +71 -0
  91. package/dist/three.cjs +1307 -0
  92. package/dist/three.d.cts +655 -0
  93. package/dist/tilemap.d.ts +17 -0
  94. package/dist/tilemap.js +26 -0
  95. package/dist/types.d.ts +34 -0
  96. package/dist/types.js +0 -0
  97. package/dist/vector.d.ts +78 -0
  98. package/dist/vector.js +169 -0
  99. package/dist/webgl-renderer.d.ts +89 -0
  100. package/dist/webgl-renderer.js +140 -0
  101. package/dist/webgl.d.ts +357 -0
  102. package/dist/webgl.js +628 -0
  103. package/dist/worker-interface.d.ts +30 -0
  104. package/dist/worker-interface.js +39 -0
  105. package/package.json +55 -13
  106. package/dist/css/index.ts +0 -1
  107. package/dist/index.css +0 -104
  108. package/dist/index.d.mts +0 -873
  109. package/dist/index.mjs +0 -3977
package/package.json CHANGED
@@ -1,17 +1,50 @@
1
1
  {
2
2
  "name": "@n3rdw1z4rd/core",
3
- "version": "0.18.5",
3
+ "version": "0.19.1",
4
4
  "description": "core library",
5
- "main": "dist/index.js",
6
- "module": "dist/index.mjs",
5
+ "main": "dist/index.cjs",
6
+ "module": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "import": {
11
+ "types": "./dist/index.d.ts",
12
+ "default": "./dist/index.js"
13
+ },
14
+ "require": {
15
+ "types": "./dist/index.d.cts",
16
+ "default": "./dist/index.cjs"
17
+ }
18
+ },
19
+ "./three": {
20
+ "import": {
21
+ "types": "./dist/three/index.d.ts",
22
+ "default": "./dist/three/index.js"
23
+ },
24
+ "require": {
25
+ "types": "./dist/three.d.cts",
26
+ "default": "./dist/three.cjs"
27
+ }
28
+ },
29
+ "./css/*": "./dist/css/*",
30
+ "./dist/*": "./dist/*",
31
+ "./package.json": "./package.json"
32
+ },
33
+ "sideEffects": [
34
+ "*.css"
35
+ ],
8
36
  "files": [
9
37
  "dist"
10
38
  ],
11
39
  "scripts": {
12
- "build": "tsup && cp -r ./src/css ./dist/",
13
- "dev": "tsup --watch",
14
- "test": "npx ts-node src/test"
40
+ "build": "node -e \"require('fs').rmSync('dist',{recursive:true,force:true})\" && tsdown",
41
+ "dev": "tsdown --watch",
42
+ "test": "tsx src/test",
43
+ "prepublishOnly": "npm test && npm run build",
44
+ "test:browser": "node scripts/test-browser.mjs",
45
+ "test:browser:headless": "node scripts/test-browser-headless.mjs",
46
+ "docs": "typedoc",
47
+ "docs:watch": "typedoc --watch"
15
48
  },
16
49
  "repository": {
17
50
  "type": "git",
@@ -32,12 +65,11 @@
32
65
  "procedural-generation",
33
66
  "pathfinding",
34
67
  "voxel",
35
- "particle-system",
36
- "simplex-noise"
68
+ "particle-system"
37
69
  ],
38
70
  "author": "",
39
71
  "license": "MIT",
40
- "type": "commonjs",
72
+ "type": "module",
41
73
  "bugs": {
42
74
  "url": "https://github.com/n3rdw1z4rd/core/issues"
43
75
  },
@@ -46,16 +78,26 @@
46
78
  "heap-js": "^2.7.1"
47
79
  },
48
80
  "peerDependencies": {
49
- "simplex-noise": "^4.0.3",
50
81
  "three": "^0.186.1"
51
82
  },
83
+ "peerDependenciesMeta": {
84
+ "three": {
85
+ "optional": true
86
+ }
87
+ },
52
88
  "devDependencies": {
53
89
  "@types/three": "^0.186.0",
54
- "tsup": "^8.5.1",
90
+ "esbuild": "^0.27.2",
91
+ "playwright-core": "^1.56.1",
92
+ "three": "^0.186.1",
93
+ "tsdown": "^0.23.0",
94
+ "tsx": "^4.23.15",
95
+ "typedoc": "^0.28.20",
55
96
  "typescript": "^6.0.3"
56
97
  },
57
98
  "allowScripts": {
58
- "fsevents@2.3.3": true,
59
- "esbuild@0.27.2": true
99
+ "esbuild@0.27.2": true,
100
+ "esbuild@0.28.2": true,
101
+ "fsevents@2.3.3": true
60
102
  }
61
103
  }
package/dist/css/index.ts DELETED
@@ -1 +0,0 @@
1
- import './main.css';
package/dist/index.css DELETED
@@ -1,104 +0,0 @@
1
- /* src/css/reset.css */
2
- *,
3
- *::before,
4
- *::after {
5
- box-sizing: border-box;
6
- }
7
- html {
8
- -moz-text-size-adjust: none;
9
- -webkit-text-size-adjust: none;
10
- text-size-adjust: none;
11
- }
12
- body,
13
- h1,
14
- h2,
15
- h3,
16
- h4,
17
- p,
18
- figure,
19
- blockquote,
20
- dl,
21
- dd {
22
- margin-block-end: 0;
23
- }
24
- ul[role=list],
25
- ol[role=list] {
26
- list-style: none;
27
- }
28
- body {
29
- min-height: 100vh;
30
- line-height: 1.5;
31
- }
32
- h1,
33
- h2,
34
- h3,
35
- h4,
36
- button,
37
- input,
38
- label {
39
- line-height: 1.1;
40
- }
41
- h1,
42
- h2,
43
- h3,
44
- h4 {
45
- text-wrap: balance;
46
- }
47
- a:not([class]) {
48
- text-decoration-skip-ink: auto;
49
- color: currentColor;
50
- }
51
- img,
52
- picture {
53
- max-width: 100%;
54
- display: block;
55
- }
56
- input,
57
- button,
58
- textarea,
59
- select {
60
- font-family: inherit;
61
- font-size: inherit;
62
- }
63
- textarea:not([rows]) {
64
- min-height: 10em;
65
- }
66
- :target {
67
- scroll-margin-block: 5ex;
68
- }
69
-
70
- /* src/css/main.css */
71
- :root {
72
- --color-foreground: lightgray;
73
- --color-background: #111;
74
- --color-border: #444;
75
- --border-width: 1px;
76
- --border-radius: 4px;
77
- --padding-small: 4px;
78
- --padding-medium: 8px;
79
- --padding-large: 16px;
80
- --margin-small: 4px;
81
- --margin-medium: 8px;
82
- --margin-large: 16px;
83
- --border-style: var(--border-width) dashed var(--color-border);
84
- --background-opacity-light: rgba(0, 0, 0, 0.1);
85
- --background-opacity-medium: rgba(0, 0, 0, 0.5);
86
- --background-opacity-dark: rgba(0, 0, 0, 0.8);
87
- }
88
- * {
89
- font: 14px monospace;
90
- }
91
- html {
92
- color: var(--color-foreground);
93
- background-color: var(--color-background);
94
- width: 100%;
95
- height: 100%;
96
- overflow: hidden;
97
- }
98
- body,
99
- #root {
100
- width: 100%;
101
- height: 100%;
102
- margin: 0;
103
- padding: 0;
104
- }