@woosh/meep-engine 2.34.10 → 2.34.14

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.
@@ -0,0 +1,26 @@
1
+ export class Sampler2D {
2
+ readonly height: number
3
+ readonly width: number
4
+
5
+ readonly itemSize: number
6
+
7
+ readChannel(x: number, y: number, channel: number): number
8
+
9
+ writeChannel(x: number, y: number, channel: number, value: number): void
10
+
11
+ static uint8clamped(itemSize: number, width: number, height: number): Sampler2D
12
+
13
+ static uint8(itemSize: number, width: number, height: number): Sampler2D
14
+
15
+ static uint16(itemSize: number, width: number, height: number): Sampler2D
16
+
17
+ static uint32(itemSize: number, width: number, height: number): Sampler2D
18
+
19
+ static int8(itemSize: number, width: number, height: number): Sampler2D
20
+
21
+ static int16(itemSize: number, width: number, height: number): Sampler2D
22
+
23
+ static int32(itemSize: number, width: number, height: number): Sampler2D
24
+
25
+ static float32(itemSize: number, width: number, height: number): Sampler2D
26
+ }
@@ -133,7 +133,7 @@ function sampleTriangleBottomRight(p1, p2, p3, dx, dy) {
133
133
 
134
134
  /**
135
135
  *
136
- * @param {Array.<Number>|Uint8ClampedArray|Uint8Array|Uint16Array|Int8Array|Float32Array} data
136
+ * @param {ArrayLike<number>|number[]|Uint8ClampedArray|Uint8Array|Uint16Array|Int8Array|Int16Array|Int32Array|Float32Array|Float64Array} data
137
137
  * @param {int} itemSize
138
138
  * @param {int} width
139
139
  * @param {int} height
@@ -255,6 +255,18 @@ Sampler2D.int16 = function (itemSize, width, height) {
255
255
  const sampler = new Sampler2D(data, itemSize, width, height);
256
256
  return sampler;
257
257
  };
258
+ /**
259
+ *
260
+ * @param {int} itemSize
261
+ * @param {int} width
262
+ * @param {int} height
263
+ * @return {Sampler2D}
264
+ */
265
+ Sampler2D.int32 = function (itemSize, width, height) {
266
+ const data = new Int32Array(width * height * itemSize);
267
+ const sampler = new Sampler2D(data, itemSize, width, height);
268
+ return sampler;
269
+ };
258
270
 
259
271
  /**
260
272
  *
@@ -268,6 +280,18 @@ Sampler2D.float32 = function (itemSize, width, height) {
268
280
  const sampler = new Sampler2D(data, itemSize, width, height);
269
281
  return sampler;
270
282
  };
283
+ /**
284
+ *
285
+ * @param {int} itemSize
286
+ * @param {int} width
287
+ * @param {int} height
288
+ * @return {Sampler2D}
289
+ */
290
+ Sampler2D.float64 = function (itemSize, width, height) {
291
+ const data = new Float64Array(width * height * itemSize);
292
+ const sampler = new Sampler2D(data, itemSize, width, height);
293
+ return sampler;
294
+ };
271
295
 
272
296
  /**
273
297
  *
@@ -0,0 +1,3 @@
1
+ export class GridData{
2
+
3
+ }
@@ -54,7 +54,7 @@ export class GridTaskGenerator {
54
54
  * @returns {Task|TaskGroup}
55
55
  */
56
56
  build(grid, ecd, seed) {
57
-
57
+ throw new Error('Not Implemented');
58
58
  }
59
59
  }
60
60
 
@@ -0,0 +1,8 @@
1
+ import { GridTaskGenerator } from "../GridTaskGenerator.js";
2
+ import { emptyTask } from "../../../core/process/task/TaskUtils.js";
3
+
4
+ export class NoopGridTaskGenerator extends GridTaskGenerator {
5
+ build(grid, ecd, seed) {
6
+ return emptyTask('empty');
7
+ }
8
+ }
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "productName": "Meep",
6
6
  "description": "production-ready JavaScript game engine based on Entity Component System Architecture",
7
7
  "author": "Alexander Goldring",
8
- "version": "2.34.10",
8
+ "version": "2.34.14",
9
9
  "dependencies": {
10
10
  "gl-matrix": "3.4.3",
11
11
  "fast-levenshtein": "2.0.6",