@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.
- package/engine/graphics/texture/sampler/Sampler2D.d.ts +26 -0
- package/engine/graphics/texture/sampler/Sampler2D.js +25 -1
- package/generation/grid/GridData.d.ts +3 -0
- package/generation/grid/GridTaskGenerator.js +1 -1
- package/generation/grid/generation/NoopGridTaskGenerator.js +8 -0
- package/package.json +1 -1
|
@@ -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 {
|
|
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
|
*
|
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.
|
|
8
|
+
"version": "2.34.14",
|
|
9
9
|
"dependencies": {
|
|
10
10
|
"gl-matrix": "3.4.3",
|
|
11
11
|
"fast-levenshtein": "2.0.6",
|