@woosh/meep-engine 2.34.13 → 2.34.17
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/core/bvh2/aabb3/aabb3_array_intersects_ray.js +20 -0
- package/core/bvh2/binary/IndexedBinaryBVH.js +17 -1
- package/engine/asset/loaders/material/computeHashColor.js +7 -0
- package/engine/asset/loaders/material/computeMaterialEquality.js +22 -22
- package/engine/asset/loaders/material/computeMaterialHash.js +15 -13
- package/engine/asset/loaders/material/computeTextureEqualityById.js +22 -0
- package/engine/asset/loaders/material/textureHashById.js +12 -0
- package/engine/graphics/geometry/buffered/query/GeometrySpatialQueryAccelerator.d.ts +7 -0
- package/engine/graphics/geometry/buffered/query/GeometrySpatialQueryAccelerator.js +9 -2
- package/engine/graphics/geometry/bvh/buffered/BinaryBVHFromBufferGeometry.js +34 -9
- package/engine/graphics/micron/format/MicronGeometry.js +21 -4
- package/engine/graphics/texture/sampler/Sampler2D.d.ts +21 -0
- package/engine/graphics/texture/sampler/Sampler2D.js +25 -1
- package/package.json +1 -1
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
//
|
|
2
|
+
|
|
3
|
+
import { intersectRay } from "./AABB3Math.js";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
*
|
|
7
|
+
* @param {ArrayLike<number>|number[]|Float32Array} aabb bounding box, order: x0,y0,z0,x1,y1,z1
|
|
8
|
+
* @param {number} origin_x
|
|
9
|
+
* @param {number} origin_y
|
|
10
|
+
* @param {number} origin_z
|
|
11
|
+
* @param {number} direction_x
|
|
12
|
+
* @param {number} direction_y
|
|
13
|
+
* @param {number} direction_z
|
|
14
|
+
*/
|
|
15
|
+
export function aabb3_array_intersects_ray(aabb, origin_x, origin_y, origin_z, direction_x, direction_y, direction_z) {
|
|
16
|
+
return intersectRay(aabb[0], aabb[1], aabb[2], aabb[3], aabb[4], aabb[5],
|
|
17
|
+
origin_x, origin_y, origin_z,
|
|
18
|
+
direction_x, direction_y, direction_z
|
|
19
|
+
);
|
|
20
|
+
}
|
|
@@ -140,7 +140,23 @@ export default class IndexedBinaryBVH {
|
|
|
140
140
|
}
|
|
141
141
|
|
|
142
142
|
/**
|
|
143
|
-
*
|
|
143
|
+
* Sets bounds of a given leaf
|
|
144
|
+
* NOTE: to build tree, must call {@link #unsortedBuiltIntermediate} after all leaves are set
|
|
145
|
+
* @param {number} leaf_index
|
|
146
|
+
* @param {number} x0
|
|
147
|
+
* @param {number} y0
|
|
148
|
+
* @param {number} z0
|
|
149
|
+
* @param {number} x1
|
|
150
|
+
* @param {number} y1
|
|
151
|
+
* @param {number} z1
|
|
152
|
+
*/
|
|
153
|
+
writeLeaf(leaf_index, x0, y0, z0, x1, y1, z1) {
|
|
154
|
+
const offset = this.binaryNodeCount * 6 + leaf_index * 6;
|
|
155
|
+
writeBox(this.data, offset, x0, y0, z0, x1, y1, z1);
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
/**
|
|
159
|
+
* @deprecated use {@link #writeLeaf} instead followed by {@link #unsortedBuiltIntermediate}
|
|
144
160
|
* @param {function(index:number,offset:number,data:*, writeBox:function):*} visitor
|
|
145
161
|
*/
|
|
146
162
|
setLeafs(visitor) {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { planesEqual } from "./planesEqual.js";
|
|
2
|
-
import { computeTextureEquality } from "./computeTextureEquality.js";
|
|
3
2
|
import { isArraysEqualWithComparator } from "../../../../core/collection/array/isArraysEqualWithComparator.js";
|
|
3
|
+
import { computeTextureEqualityById } from "./computeTextureEqualityById.js";
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
6
|
+
* NOTE: does not do deep comparison on textures, only checks the IDs
|
|
7
7
|
* @param {Material|MeshStandardMaterial|MeshDepthMaterial|MeshMatcapMaterial} a
|
|
8
8
|
* @param {Material|MeshStandardMaterial|MeshDepthMaterial|MeshMatcapMaterial} b
|
|
9
9
|
* @returns {boolean}
|
|
@@ -76,28 +76,28 @@ export function computeMaterialEquality(a, b) {
|
|
|
76
76
|
|| a.wireframeLinewidth !== b.wireframeLinewidth
|
|
77
77
|
|| a.morphTargets !== b.morphTargets
|
|
78
78
|
|| a.morphNormals !== b.morphNormals
|
|
79
|
-
|| !
|
|
80
|
-
|| !
|
|
81
|
-
|| !
|
|
82
|
-
|| !
|
|
83
|
-
|| !
|
|
84
|
-
|| !
|
|
85
|
-
|| !
|
|
86
|
-
|| !
|
|
87
|
-
|| !
|
|
88
|
-
|| !
|
|
89
|
-
|| !
|
|
79
|
+
|| !computeTextureEqualityById(a.roughnessMap, b.roughnessMap)
|
|
80
|
+
|| !computeTextureEqualityById(a.metalnessMap, b.metalnessMap)
|
|
81
|
+
|| !computeTextureEqualityById(a.alphaMap, b.alphaMap)
|
|
82
|
+
|| !computeTextureEqualityById(a.envMap, b.envMap)
|
|
83
|
+
|| !computeTextureEqualityById(a.displacementMap, b.displacementMap)
|
|
84
|
+
|| !computeTextureEqualityById(a.normalMap, b.normalMap)
|
|
85
|
+
|| !computeTextureEqualityById(a.emissiveMap, b.emissiveMap)
|
|
86
|
+
|| !computeTextureEqualityById(a.bumpMap, b.bumpMap)
|
|
87
|
+
|| !computeTextureEqualityById(a.aoMap, b.aoMap)
|
|
88
|
+
|| !computeTextureEqualityById(a.map, b.map)
|
|
89
|
+
|| !computeTextureEqualityById(a.lightMap, b.lightMap)
|
|
90
90
|
) {
|
|
91
91
|
return false;
|
|
92
92
|
}
|
|
93
93
|
} else if (a.isMeshDepthMaterial) {
|
|
94
94
|
if (
|
|
95
|
-
!
|
|
95
|
+
!computeTextureEqualityById(a.alphaMap, b.alphaMap)
|
|
96
96
|
|| a.depthPacking !== b.depthPacking
|
|
97
|
-
|| !
|
|
97
|
+
|| !computeTextureEqualityById(a.displacementMap, b.displacementMap)
|
|
98
98
|
|| a.displacementScale !== b.displacementScale
|
|
99
99
|
|| a.displacementBias !== b.displacementBias
|
|
100
|
-
|| !
|
|
100
|
+
|| !computeTextureEqualityById(a.map, b.map)
|
|
101
101
|
|| a.morphTargets !== b.morphTargets
|
|
102
102
|
|| a.wireframe !== b.wireframe
|
|
103
103
|
|| a.wireframeLinewidth !== b.wireframeLinewidth
|
|
@@ -107,15 +107,15 @@ export function computeMaterialEquality(a, b) {
|
|
|
107
107
|
} else if (a.isMeshMatcapMaterial) {
|
|
108
108
|
if (
|
|
109
109
|
!a.color.equals(b.color)
|
|
110
|
-
|| !
|
|
111
|
-
|| !
|
|
112
|
-
|| !
|
|
113
|
-
|| !
|
|
110
|
+
|| !computeTextureEqualityById(a.matcap, b.matcap)
|
|
111
|
+
|| !computeTextureEqualityById(a.map, b.map)
|
|
112
|
+
|| !computeTextureEqualityById(a.bumpMap, b.bumpMap)
|
|
113
|
+
|| !computeTextureEqualityById(a.normalMap, b.normalMap)
|
|
114
114
|
|| !a.normalScale.equals(b.normalScale)
|
|
115
|
-
|| !
|
|
115
|
+
|| !computeTextureEqualityById(a.displacementMap, b.displacementMap)
|
|
116
116
|
|| a.displacementScale !== b.displacementScale
|
|
117
117
|
|| a.displacementBias !== b.displacementBias
|
|
118
|
-
|| !
|
|
118
|
+
|| !computeTextureEqualityById(a.alphaMap, b.alphaMap)
|
|
119
119
|
|| a.morphTargets !== b.morphTargets
|
|
120
120
|
|| a.morphNormals !== b.morphNormals
|
|
121
121
|
|| a.flatShading !== b.flatShading
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { planeHash } from "./planeHash.js";
|
|
2
|
-
import { computeTextureHash } from "./computeTextureHash.js";
|
|
3
2
|
import { computeStringHash } from "../../../../core/primitives/strings/computeStringHash.js";
|
|
4
3
|
import { computeHashArray } from "../../../../core/collection/array/computeHashArray.js";
|
|
5
4
|
import { computeHashIntegerArray } from "../../../../core/collection/array/computeHashIntegerArray.js";
|
|
6
5
|
import { computeHashFloat } from "../../../../core/math/hash/computeHashFloat.js";
|
|
6
|
+
import { textureHashById } from "./textureHashById.js";
|
|
7
|
+
import { computeHashColor } from "./computeHashColor.js";
|
|
7
8
|
|
|
8
9
|
/**
|
|
9
10
|
*
|
|
@@ -46,21 +47,22 @@ export function computeMaterialHash(material) {
|
|
|
46
47
|
|
|
47
48
|
|
|
48
49
|
if (material.isMeshStandardMaterial) {
|
|
49
|
-
//TODO extend hash
|
|
50
50
|
hash = computeHashIntegerArray(
|
|
51
51
|
hash,
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
52
|
+
computeHashColor(material.color),
|
|
53
|
+
computeHashFloat(material.roughness),
|
|
54
|
+
computeHashFloat(material.metalness),
|
|
55
|
+
textureHashById(material.map),
|
|
56
|
+
textureHashById(material.lightMap),
|
|
57
|
+
computeHashFloat(material.lightMapIntensity),
|
|
58
|
+
textureHashById(material.aoMap),
|
|
59
|
+
computeHashFloat(material.aoMapIntensity),
|
|
60
|
+
computeHashColor(material.emissive),
|
|
61
|
+
computeHashFloat(material.emissiveIntensity),
|
|
62
|
+
textureHashById(material.emissiveMap),
|
|
62
63
|
computeHashFloat(material.envMapIntensity),
|
|
63
|
-
|
|
64
|
+
textureHashById(material.bumpMap),
|
|
65
|
+
textureHashById(material.normalMap),
|
|
64
66
|
);
|
|
65
67
|
} else if (material.isShaderMaterial) {
|
|
66
68
|
hash ^= material.lights ? 0 : 1;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* @param {Texture} a
|
|
4
|
+
* @param {Texture} b
|
|
5
|
+
* @returns {boolean}
|
|
6
|
+
*/
|
|
7
|
+
export function computeTextureEqualityById(a, b) {
|
|
8
|
+
if (a === b) {
|
|
9
|
+
return true;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
if (
|
|
13
|
+
a === null
|
|
14
|
+
|| b === null
|
|
15
|
+
|| a === undefined
|
|
16
|
+
|| b === undefined
|
|
17
|
+
) {
|
|
18
|
+
return false;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
return a.id === b.id;
|
|
22
|
+
}
|
|
@@ -8,4 +8,11 @@ export class GeometrySpatialQueryAccelerator {
|
|
|
8
8
|
queryContainmentViaClippingPlanes(geometry: BufferGeometry, planes: Plane[]): number
|
|
9
9
|
|
|
10
10
|
queryRaycastNearest(destination: SurfacePoint3, geometry: BufferGeometry, ray_origin: Vector3, ray_direction: Vector3): boolean
|
|
11
|
+
|
|
12
|
+
queryRaycastNearest_primitive(
|
|
13
|
+
destination: SurfacePoint3,
|
|
14
|
+
geometry: BufferGeometry,
|
|
15
|
+
origin_x: number, origin_y: number, origin_z: number,
|
|
16
|
+
direction_x: number, direction_y: number, direction_z: number
|
|
17
|
+
): boolean
|
|
11
18
|
}
|
|
@@ -3,6 +3,7 @@ import { buildUnsorted } from "../../bvh/buffered/BinaryBVHFromBufferGeometry.js
|
|
|
3
3
|
import { ClippingPlaneContainmentComputingVisitor } from "./ClippingPlaneContainmentComputingVisitor.js";
|
|
4
4
|
import { RaycastNearestHitComputingVisitor } from "./RaycastNearestHitComputingVisitor.js";
|
|
5
5
|
import { assert } from "../../../../../core/assert.js";
|
|
6
|
+
import { deinterleaveBufferAttribute } from "../deinterleaveBufferAttribute.js";
|
|
6
7
|
|
|
7
8
|
export class GeometrySpatialQueryAccelerator {
|
|
8
9
|
constructor(cache_size = 100 * 1024 * 1024) {
|
|
@@ -153,8 +154,14 @@ export class GeometrySpatialQueryAccelerator {
|
|
|
153
154
|
* @returns {IndexedBinaryBVH}
|
|
154
155
|
*/
|
|
155
156
|
__buildBVH(geometry) {
|
|
156
|
-
const
|
|
157
|
-
const
|
|
157
|
+
const position_attribute = geometry.getAttribute('position');
|
|
158
|
+
const index_attribute = geometry.getIndex();
|
|
159
|
+
|
|
160
|
+
const de_interleaved_position_attribute = deinterleaveBufferAttribute(position_attribute);
|
|
161
|
+
const de_interleaved_index_attribute = deinterleaveBufferAttribute(index_attribute);
|
|
162
|
+
|
|
163
|
+
const vertices = de_interleaved_position_attribute.array;
|
|
164
|
+
const indices = de_interleaved_index_attribute.array;
|
|
158
165
|
|
|
159
166
|
return buildUnsorted(vertices, indices);
|
|
160
167
|
}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Created by Alex on 29/05/2016.
|
|
3
3
|
*/
|
|
4
|
-
import IndexedTriangleBoundsComputer from './IndexedTraingleBoundsComputer.js';
|
|
5
4
|
import IndexedBinaryBVH from '../../../../../core/bvh2/binary/IndexedBinaryBVH.js';
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
import { min3 } from "../../../../../core/math/min3.js";
|
|
6
|
+
import { max3 } from "../../../../../core/math/max3.js";
|
|
8
7
|
|
|
9
8
|
/**
|
|
10
9
|
*
|
|
@@ -19,20 +18,46 @@ function buildUnsorted(vertices, indices) {
|
|
|
19
18
|
const tree = new IndexedBinaryBVH();
|
|
20
19
|
tree.initialize(numNodes);
|
|
21
20
|
|
|
22
|
-
|
|
21
|
+
for (let i = 0; i < numNodes; i++) {
|
|
23
22
|
|
|
24
23
|
const index3 = i * 3;
|
|
25
24
|
|
|
25
|
+
// read triangle vertex indices
|
|
26
26
|
const iA = indices[index3];
|
|
27
27
|
const iB = indices[index3 + 1];
|
|
28
28
|
const iC = indices[index3 + 2];
|
|
29
29
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
30
|
+
const a = iA * 3;
|
|
31
|
+
const b = iB * 3;
|
|
32
|
+
const c = iC * 3;
|
|
33
|
+
|
|
34
|
+
// read actual positions of each vertex
|
|
35
|
+
const aX = vertices[a];
|
|
36
|
+
const aY = vertices[a + 1];
|
|
37
|
+
const aZ = vertices[a + 2];
|
|
38
|
+
|
|
39
|
+
const bX = vertices[b];
|
|
40
|
+
const bY = vertices[b + 1];
|
|
41
|
+
const bZ = vertices[b + 2];
|
|
42
|
+
|
|
43
|
+
const cX = vertices[c];
|
|
44
|
+
const cY = vertices[c + 1];
|
|
45
|
+
const cZ = vertices[c + 2];
|
|
46
|
+
|
|
47
|
+
// compute bounds of the triangle
|
|
48
|
+
const x0 = min3(aX, bX, cX);
|
|
49
|
+
const y0 = min3(aY, bY, cY);
|
|
50
|
+
const z0 = min3(aZ, bZ, cZ);
|
|
51
|
+
|
|
52
|
+
const x1 = max3(aX, bX, cX);
|
|
53
|
+
const y1 = max3(aY, bY, cY);
|
|
54
|
+
const z1 = max3(aZ, bZ, cZ);
|
|
55
|
+
|
|
56
|
+
tree.writeLeaf(i, x0, y0, z0, x1, y1, z1);
|
|
57
|
+
}
|
|
33
58
|
|
|
34
|
-
|
|
35
|
-
|
|
59
|
+
// finalize build
|
|
60
|
+
tree.unsortedBuiltIntermediate();
|
|
36
61
|
|
|
37
62
|
return tree;
|
|
38
63
|
}
|
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
import { VertexDataSpec } from "../../geometry/VertexDataSpec.js";
|
|
2
2
|
import { assert } from "../../../../core/assert.js";
|
|
3
|
-
import { intersectRay } from "../../../../core/bvh2/aabb3/AABB3Math.js";
|
|
4
3
|
import { computeTriangleRayIntersection } from "../../../../core/geom/3d/triangle/computeTriangleRayIntersection.js";
|
|
5
4
|
import { SurfacePoint3 } from "../../../../core/geom/3d/SurfacePoint3.js";
|
|
5
|
+
import { aabb3_array_intersects_ray } from "../../../../core/bvh2/aabb3/aabb3_array_intersects_ray.js";
|
|
6
6
|
|
|
7
7
|
let id_counter = 0;
|
|
8
8
|
|
|
9
|
+
/**
|
|
10
|
+
* @readonly
|
|
11
|
+
* @type {MicronGeometryPatch[]}
|
|
12
|
+
*/
|
|
13
|
+
const scratch_traversal_stack = [];
|
|
14
|
+
|
|
9
15
|
export class MicronGeometry {
|
|
10
16
|
constructor() {
|
|
11
17
|
/**
|
|
@@ -79,8 +85,10 @@ export class MicronGeometry {
|
|
|
79
85
|
*/
|
|
80
86
|
const hits = [];
|
|
81
87
|
|
|
88
|
+
// initialize stack
|
|
82
89
|
let stack_cursor = 1;
|
|
83
|
-
const stack =
|
|
90
|
+
const stack = scratch_traversal_stack;
|
|
91
|
+
stack[0] = this.root;
|
|
84
92
|
|
|
85
93
|
const spec = this.vertex_spec;
|
|
86
94
|
|
|
@@ -99,8 +107,8 @@ export class MicronGeometry {
|
|
|
99
107
|
// using group bounding box because it's conservative, as we want to be able to hit LOD_0
|
|
100
108
|
const bb = patch.group_bounding_box;
|
|
101
109
|
|
|
102
|
-
const bb_intersection_exists =
|
|
103
|
-
bb
|
|
110
|
+
const bb_intersection_exists = aabb3_array_intersects_ray(
|
|
111
|
+
bb,
|
|
104
112
|
origin_x, origin_y, origin_z,
|
|
105
113
|
direction_x, direction_y, direction_z
|
|
106
114
|
);
|
|
@@ -113,6 +121,15 @@ export class MicronGeometry {
|
|
|
113
121
|
if (patch.lod === 0) {
|
|
114
122
|
// LOD 0 - source geometry
|
|
115
123
|
|
|
124
|
+
// cast against bounds
|
|
125
|
+
if (!aabb3_array_intersects_ray(
|
|
126
|
+
patch.bounding_box,
|
|
127
|
+
origin_x, origin_y, origin_z,
|
|
128
|
+
direction_x, direction_y, direction_z
|
|
129
|
+
)) {
|
|
130
|
+
continue;
|
|
131
|
+
}
|
|
132
|
+
|
|
116
133
|
// raycast against geometry
|
|
117
134
|
const indices = patch.face_indices;
|
|
118
135
|
const index_count = indices.length;
|
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
export class Sampler2D {
|
|
2
|
+
readonly height: number
|
|
3
|
+
readonly width: number
|
|
4
|
+
|
|
5
|
+
readonly itemSize: number
|
|
6
|
+
|
|
2
7
|
readChannel(x: number, y: number, channel: number): number
|
|
3
8
|
|
|
4
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
|
|
5
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.17",
|
|
9
9
|
"dependencies": {
|
|
10
10
|
"gl-matrix": "3.4.3",
|
|
11
11
|
"fast-levenshtein": "2.0.6",
|