@woosh/meep-engine 2.111.7 → 2.111.9
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/build/bundle-worker-terrain.js +1 -1
- package/build/meep.cjs +45 -43
- package/build/meep.min.js +1 -1
- package/build/meep.module.js +45 -43
- package/package.json +1 -1
- package/src/core/collection/array/typed/compute_binary_data_type_from_typed_array.d.ts +8 -0
- package/src/core/collection/array/typed/compute_binary_data_type_from_typed_array.d.ts.map +1 -0
- package/src/core/collection/array/typed/compute_binary_data_type_from_typed_array.js +39 -0
- package/src/core/collection/array/typed/isTypedArray.d.ts +4 -3
- package/src/core/collection/array/typed/isTypedArray.d.ts.map +1 -1
- package/src/core/collection/array/typed/isTypedArray.js +4 -5
- package/src/core/collection/array/typed/typedArrayToDataType.d.ts +3 -5
- package/src/core/collection/array/typed/typedArrayToDataType.d.ts.map +1 -1
- package/src/core/collection/array/typed/typedArrayToDataType.js +3 -31
- package/src/core/collection/array/typed/uint_array_for_count.d.ts +3 -3
- package/src/core/collection/array/typed/uint_array_for_count.d.ts.map +1 -1
- package/src/core/collection/array/typed/uint_array_for_count.js +7 -7
- package/src/core/collection/table/RowFirstTable.d.ts +6 -0
- package/src/core/collection/table/RowFirstTable.d.ts.map +1 -1
- package/src/core/collection/table/RowFirstTable.js +32 -3
- package/src/engine/graphics/geometry/AttributeSpec.d.ts.map +1 -1
- package/src/engine/graphics/geometry/AttributeSpec.js +48 -29
- package/src/engine/graphics/geometry/VertexDataSpec.d.ts.map +1 -1
- package/src/engine/graphics/geometry/VertexDataSpec.js +13 -6
- package/src/engine/graphics/material/optimization/MaterialOptimizationContext.d.ts.map +1 -1
- package/src/engine/graphics/material/optimization/MaterialOptimizationContext.js +4 -2
- package/src/engine/graphics/texture/sampler/Sampler2D.d.ts.map +1 -1
- package/src/engine/graphics/texture/sampler/Sampler2D.js +4 -2
- package/src/engine/graphics/texture/sampler/sampler2d_compute_texel_value_conversion_scale_to_uint8.d.ts.map +1 -1
- package/src/engine/graphics/texture/sampler/sampler2d_compute_texel_value_conversion_scale_to_uint8.js +6 -4
package/build/meep.module.js
CHANGED
|
@@ -25,8 +25,9 @@ function isArrayEqualStrict(a, b) {
|
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
/**
|
|
28
|
-
*
|
|
29
|
-
* @
|
|
28
|
+
* Checks whether supplied argument is a TypedArray instance, such as Flaot32Array
|
|
29
|
+
* @template T
|
|
30
|
+
* @param {T} o
|
|
30
31
|
* @returns {boolean}
|
|
31
32
|
*/
|
|
32
33
|
function isTypedArray(o) {
|
|
@@ -48926,6 +48927,40 @@ function compute_typed_array_constructor_from_data_type(dt) {
|
|
|
48926
48927
|
return r;
|
|
48927
48928
|
}
|
|
48928
48929
|
|
|
48930
|
+
/**
|
|
48931
|
+
*
|
|
48932
|
+
* @param {*} array
|
|
48933
|
+
* @returns {BinaryDataType}
|
|
48934
|
+
*/
|
|
48935
|
+
function compute_binary_data_type_from_typed_array(array) {
|
|
48936
|
+
|
|
48937
|
+
const ctor = Object.getPrototypeOf(array).constructor;
|
|
48938
|
+
|
|
48939
|
+
switch (ctor) {
|
|
48940
|
+
case Uint8Array:
|
|
48941
|
+
case Uint8ClampedArray:
|
|
48942
|
+
return BinaryDataType.Uint8;
|
|
48943
|
+
case Uint16Array:
|
|
48944
|
+
return BinaryDataType.Uint16;
|
|
48945
|
+
case Uint32Array:
|
|
48946
|
+
return BinaryDataType.Uint32;
|
|
48947
|
+
|
|
48948
|
+
case Int8Array:
|
|
48949
|
+
return BinaryDataType.Int8;
|
|
48950
|
+
case Int16Array:
|
|
48951
|
+
return BinaryDataType.Int16;
|
|
48952
|
+
case Int32Array:
|
|
48953
|
+
return BinaryDataType.Int32;
|
|
48954
|
+
|
|
48955
|
+
case Float32Array:
|
|
48956
|
+
return BinaryDataType.Float32;
|
|
48957
|
+
case Float64Array:
|
|
48958
|
+
return BinaryDataType.Float64;
|
|
48959
|
+
default:
|
|
48960
|
+
throw new Error(`unsupported constructor type ${ctor.name}`);
|
|
48961
|
+
}
|
|
48962
|
+
}
|
|
48963
|
+
|
|
48929
48964
|
//
|
|
48930
48965
|
|
|
48931
48966
|
/**
|
|
@@ -49000,39 +49035,6 @@ function is_typed_array_equals(a, b) {
|
|
|
49000
49035
|
return isArrayEqualStrict(a_proxy, b_proxy);
|
|
49001
49036
|
}
|
|
49002
49037
|
|
|
49003
|
-
/**
|
|
49004
|
-
*
|
|
49005
|
-
* @param {*} v
|
|
49006
|
-
* @returns {BinaryDataType}
|
|
49007
|
-
*/
|
|
49008
|
-
function typedArrayToDataType(v) {
|
|
49009
|
-
const ctor = Object.getPrototypeOf(v).constructor;
|
|
49010
|
-
|
|
49011
|
-
switch (ctor) {
|
|
49012
|
-
case Uint8Array:
|
|
49013
|
-
case Uint8ClampedArray:
|
|
49014
|
-
return BinaryDataType.Uint8;
|
|
49015
|
-
case Uint16Array:
|
|
49016
|
-
return BinaryDataType.Uint16;
|
|
49017
|
-
case Uint32Array:
|
|
49018
|
-
return BinaryDataType.Uint32;
|
|
49019
|
-
|
|
49020
|
-
case Int8Array:
|
|
49021
|
-
return BinaryDataType.Int8;
|
|
49022
|
-
case Int16Array:
|
|
49023
|
-
return BinaryDataType.Int16;
|
|
49024
|
-
case Int32Array:
|
|
49025
|
-
return BinaryDataType.Int32;
|
|
49026
|
-
|
|
49027
|
-
case Float32Array:
|
|
49028
|
-
return BinaryDataType.Float32;
|
|
49029
|
-
case Float64Array:
|
|
49030
|
-
return BinaryDataType.Float64;
|
|
49031
|
-
default:
|
|
49032
|
-
throw new Error('unsupported constructor type');
|
|
49033
|
-
}
|
|
49034
|
-
}
|
|
49035
|
-
|
|
49036
49038
|
/**
|
|
49037
49039
|
* Based on code from reddit https://www.reddit.com/r/javascript/comments/jxa8x/bicubic_interpolation/
|
|
49038
49040
|
* @param {number} t ratio
|
|
@@ -49999,7 +50001,7 @@ class Sampler2D {
|
|
|
49999
50001
|
height: this.height,
|
|
50000
50002
|
width: this.width,
|
|
50001
50003
|
itemSize: this.itemSize,
|
|
50002
|
-
type:
|
|
50004
|
+
type: compute_binary_data_type_from_typed_array(this.data),
|
|
50003
50005
|
data: encoded
|
|
50004
50006
|
}
|
|
50005
50007
|
}
|
|
@@ -59791,19 +59793,19 @@ function array_swap_one(array, index0, index1) {
|
|
|
59791
59793
|
|
|
59792
59794
|
/**
|
|
59793
59795
|
*
|
|
59794
|
-
* @param {number}
|
|
59795
|
-
* @returns {function}
|
|
59796
|
+
* @param {number} max_value maximum value to be contained in the array
|
|
59797
|
+
* @returns {function} constructor
|
|
59796
59798
|
*/
|
|
59797
|
-
function UintArrayForCount(
|
|
59799
|
+
function UintArrayForCount(max_value) {
|
|
59798
59800
|
|
|
59799
|
-
if (
|
|
59801
|
+
if (max_value <= 256) {
|
|
59800
59802
|
return Uint8Array;
|
|
59801
|
-
} else if (
|
|
59803
|
+
} else if (max_value <= 65536) {
|
|
59802
59804
|
return Uint16Array;
|
|
59803
|
-
} else if (
|
|
59805
|
+
} else if (max_value <= 4294967295) {
|
|
59804
59806
|
return Uint32Array;
|
|
59805
59807
|
} else {
|
|
59806
|
-
throw new Error(`Unsupported size ${
|
|
59808
|
+
throw new Error(`Unsupported size ${max_value}`)
|
|
59807
59809
|
}
|
|
59808
59810
|
}
|
|
59809
59811
|
|
package/package.json
CHANGED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* @param {*} array
|
|
4
|
+
* @returns {BinaryDataType}
|
|
5
|
+
*/
|
|
6
|
+
export function compute_binary_data_type_from_typed_array(array: any): BinaryDataType;
|
|
7
|
+
import { BinaryDataType } from "../../../binary/type/BinaryDataType.js";
|
|
8
|
+
//# sourceMappingURL=compute_binary_data_type_from_typed_array.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compute_binary_data_type_from_typed_array.d.ts","sourceRoot":"","sources":["../../../../../../src/core/collection/array/typed/compute_binary_data_type_from_typed_array.js"],"names":[],"mappings":"AAGA;;;;GAIG;AACH,uEAFa,cAAc,CAgC1B;+BArC8B,wCAAwC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { assert } from "../../../assert.js";
|
|
2
|
+
import { BinaryDataType } from "../../../binary/type/BinaryDataType.js";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
*
|
|
6
|
+
* @param {*} array
|
|
7
|
+
* @returns {BinaryDataType}
|
|
8
|
+
*/
|
|
9
|
+
export function compute_binary_data_type_from_typed_array(array) {
|
|
10
|
+
assert.notNull(array, 'array');
|
|
11
|
+
assert.isObject(array, 'array');
|
|
12
|
+
assert.isArrayLike(array, 'array');
|
|
13
|
+
|
|
14
|
+
const ctor = Object.getPrototypeOf(array).constructor;
|
|
15
|
+
|
|
16
|
+
switch (ctor) {
|
|
17
|
+
case Uint8Array:
|
|
18
|
+
case Uint8ClampedArray:
|
|
19
|
+
return BinaryDataType.Uint8;
|
|
20
|
+
case Uint16Array:
|
|
21
|
+
return BinaryDataType.Uint16;
|
|
22
|
+
case Uint32Array:
|
|
23
|
+
return BinaryDataType.Uint32;
|
|
24
|
+
|
|
25
|
+
case Int8Array:
|
|
26
|
+
return BinaryDataType.Int8;
|
|
27
|
+
case Int16Array:
|
|
28
|
+
return BinaryDataType.Int16;
|
|
29
|
+
case Int32Array:
|
|
30
|
+
return BinaryDataType.Int32;
|
|
31
|
+
|
|
32
|
+
case Float32Array:
|
|
33
|
+
return BinaryDataType.Float32;
|
|
34
|
+
case Float64Array:
|
|
35
|
+
return BinaryDataType.Float64;
|
|
36
|
+
default:
|
|
37
|
+
throw new Error(`unsupported constructor type ${ctor.name}`);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
* @
|
|
2
|
+
* Checks whether supplied argument is a TypedArray instance, such as Flaot32Array
|
|
3
|
+
* @template T
|
|
4
|
+
* @param {T} o
|
|
4
5
|
* @returns {boolean}
|
|
5
6
|
*/
|
|
6
|
-
export function isTypedArray(o:
|
|
7
|
+
export function isTypedArray<T>(o: T): boolean;
|
|
7
8
|
//# sourceMappingURL=isTypedArray.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isTypedArray.d.ts","sourceRoot":"","sources":["../../../../../../src/core/collection/array/typed/isTypedArray.js"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"isTypedArray.d.ts","sourceRoot":"","sources":["../../../../../../src/core/collection/array/typed/isTypedArray.js"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,uCAFa,OAAO,CAcnB"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
* @
|
|
2
|
+
* Checks whether supplied argument is a TypedArray instance, such as Flaot32Array
|
|
3
|
+
* @template T
|
|
4
|
+
* @param {T} o
|
|
4
5
|
* @returns {boolean}
|
|
5
6
|
*/
|
|
6
|
-
function isTypedArray(o) {
|
|
7
|
+
export function isTypedArray(o) {
|
|
7
8
|
return (
|
|
8
9
|
o instanceof Int8Array ||
|
|
9
10
|
o instanceof Uint8Array ||
|
|
@@ -16,5 +17,3 @@ function isTypedArray(o) {
|
|
|
16
17
|
o instanceof Float64Array
|
|
17
18
|
);
|
|
18
19
|
}
|
|
19
|
-
|
|
20
|
-
export { isTypedArray };
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
* @param {*} v
|
|
4
|
-
* @returns {BinaryDataType}
|
|
2
|
+
* @deprecated renamed to {@link compute_binary_data_type_from_typed_array}
|
|
5
3
|
*/
|
|
6
|
-
export
|
|
7
|
-
import {
|
|
4
|
+
export const typedArrayToDataType: typeof compute_binary_data_type_from_typed_array;
|
|
5
|
+
import { compute_binary_data_type_from_typed_array } from "./compute_binary_data_type_from_typed_array.js";
|
|
8
6
|
//# sourceMappingURL=typedArrayToDataType.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typedArrayToDataType.d.ts","sourceRoot":"","sources":["../../../../../../src/core/collection/array/typed/typedArrayToDataType.js"],"names":[],"mappings":"AAEA
|
|
1
|
+
{"version":3,"file":"typedArrayToDataType.d.ts","sourceRoot":"","sources":["../../../../../../src/core/collection/array/typed/typedArrayToDataType.js"],"names":[],"mappings":"AAEA;;GAEG;AACH,oFAA6E;0DALnB,gDAAgD"}
|
|
@@ -1,34 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { compute_binary_data_type_from_typed_array } from "./compute_binary_data_type_from_typed_array.js";
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
5
|
-
* @param {*} v
|
|
6
|
-
* @returns {BinaryDataType}
|
|
4
|
+
* @deprecated renamed to {@link compute_binary_data_type_from_typed_array}
|
|
7
5
|
*/
|
|
8
|
-
export
|
|
9
|
-
const ctor = Object.getPrototypeOf(v).constructor;
|
|
10
|
-
|
|
11
|
-
switch (ctor) {
|
|
12
|
-
case Uint8Array:
|
|
13
|
-
case Uint8ClampedArray:
|
|
14
|
-
return BinaryDataType.Uint8;
|
|
15
|
-
case Uint16Array:
|
|
16
|
-
return BinaryDataType.Uint16;
|
|
17
|
-
case Uint32Array:
|
|
18
|
-
return BinaryDataType.Uint32;
|
|
19
|
-
|
|
20
|
-
case Int8Array:
|
|
21
|
-
return BinaryDataType.Int8;
|
|
22
|
-
case Int16Array:
|
|
23
|
-
return BinaryDataType.Int16;
|
|
24
|
-
case Int32Array:
|
|
25
|
-
return BinaryDataType.Int32;
|
|
26
|
-
|
|
27
|
-
case Float32Array:
|
|
28
|
-
return BinaryDataType.Float32;
|
|
29
|
-
case Float64Array:
|
|
30
|
-
return BinaryDataType.Float64;
|
|
31
|
-
default:
|
|
32
|
-
throw new Error('unsupported constructor type');
|
|
33
|
-
}
|
|
34
|
-
}
|
|
6
|
+
export const typedArrayToDataType = compute_binary_data_type_from_typed_array
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
*
|
|
3
|
-
* @param {number}
|
|
4
|
-
* @returns {function}
|
|
3
|
+
* @param {number} max_value maximum value to be contained in the array
|
|
4
|
+
* @returns {function} constructor
|
|
5
5
|
*/
|
|
6
|
-
export function UintArrayForCount(
|
|
6
|
+
export function UintArrayForCount(max_value: number): Function;
|
|
7
7
|
//# sourceMappingURL=uint_array_for_count.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"uint_array_for_count.d.ts","sourceRoot":"","sources":["../../../../../../src/core/collection/array/typed/uint_array_for_count.js"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,
|
|
1
|
+
{"version":3,"file":"uint_array_for_count.d.ts","sourceRoot":"","sources":["../../../../../../src/core/collection/array/typed/uint_array_for_count.js"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,6CAHW,MAAM,YAchB"}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
/**
|
|
2
2
|
*
|
|
3
|
-
* @param {number}
|
|
4
|
-
* @returns {function}
|
|
3
|
+
* @param {number} max_value maximum value to be contained in the array
|
|
4
|
+
* @returns {function} constructor
|
|
5
5
|
*/
|
|
6
|
-
export function UintArrayForCount(
|
|
6
|
+
export function UintArrayForCount(max_value) {
|
|
7
7
|
|
|
8
|
-
if (
|
|
8
|
+
if (max_value <= 256) {
|
|
9
9
|
return Uint8Array;
|
|
10
|
-
} else if (
|
|
10
|
+
} else if (max_value <= 65536) {
|
|
11
11
|
return Uint16Array;
|
|
12
|
-
} else if (
|
|
12
|
+
} else if (max_value <= 4294967295) {
|
|
13
13
|
return Uint32Array;
|
|
14
14
|
} else {
|
|
15
|
-
throw new Error(`Unsupported size ${
|
|
15
|
+
throw new Error(`Unsupported size ${max_value}`)
|
|
16
16
|
}
|
|
17
17
|
}
|
|
@@ -124,6 +124,12 @@ export class RowFirstTable {
|
|
|
124
124
|
* @param {function(row_index:number, row:Array.<number>):*} valueSupplier supplier of row values, called with row index and an empty row to be filled
|
|
125
125
|
*/
|
|
126
126
|
addRows(count: number, valueSupplier: any): void;
|
|
127
|
+
/**
|
|
128
|
+
* Copy a single row, value in the source row is unaffected
|
|
129
|
+
* @param {number} source
|
|
130
|
+
* @param {number} target
|
|
131
|
+
*/
|
|
132
|
+
copyRow(source: number, target: number): void;
|
|
127
133
|
/**
|
|
128
134
|
* Copy data from another table. Specs must match.
|
|
129
135
|
* NOTE: does not send onAdded signal
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RowFirstTable.d.ts","sourceRoot":"","sources":["../../../../../src/core/collection/table/RowFirstTable.js"],"names":[],"mappings":"AAMA;;GAEG;AACH;IACI;;;;;OAKG;IACH,oDAHW,OAAO,EAuDjB;IA/CG;;;OAGG;IACH,wBAAgB;IAEhB;;;OAGG;IACH,gBAFU,qBAAsB,CAET;IAEvB;;;OAGG;IACH,MAFU,WAAW,CAEuB;IAE5C;;;OAGG;IACH,gBAFU,MAAM,CAEyB;IAEzC;;;OAGG;IACH,QAFU,MAAM,CAED;IAEf;;;OAGG;IACH,UAFU,MAAM,CAEC;IAEjB;;;OAGG;IACH,UAFU,QAAQ,CAEE;IAEpB;;MAEC;IAKL;;OAEG;IACH,mBAiBC;IAXG;;;OAGG;IACH,sBAFmB,QAAQ,QAAE,MAAM,QAAE,MAAM,EAAE,KAAG,IAAI,CAEb;IAEvC;;;OAGG;IACH,uBAFmB,QAAQ,QAAE,MAAM,QAAE,MAAM,EAAE,KAAG,IAAI,CAEX;IAG7C;;;;OAIG;IACH,uDAMC;IAED;;;OAGG;IACH,QAFa,MAAM,CA4BlB;IAED;;;OAGG;IACH,sBAFW,MAAM,QA+ChB;IAED;;OAEG;IACH,aAEC;IAED;;;OAGG;IACH,iBAFW,MAAM,QAchB;IAED;;;;;OAKG;IACH,yBAJW,MAAM,eACN,MAAM,SACN,MAAM,QAchB;IAED;;;;;OAKG;IACH,wBAJW,MAAM,eACN,MAAM,GACJ,MAAM,CAclB;IAED;;;;OAIG;IACH,kBAHW,MAAM,YACN,MAAM,QAyBhB;IAED;;;;;OAKG;IACH,kBAHW,MAAM,YACN,MAAM,QAqBhB;IAED;;;OAGG;IACH,eAFW,MAAO,MAAM,CAAC,QAexB;IAED;;;;OAIG;IACH,eAHW,MAAM,4BAoChB;IAED;;;;OAIG;IACH,YAFW,aAAa,QAsBvB;IAED;;;OAGG;IACH,cAHW,aAAa,GACX,OAAO,CAyBnB;IAED;;;;OAIG;IACH,wCAIC;IAED;;;;OAIG;IACH,cAHW,MAAM,UACN,MAAM,EAAE,QAMlB;IAED;;OAEG;IACH,qBA4BC;IAED;;OAEG;IACH,cAIC;IAED;;;OAGG;IACH,wBAEC;IAED;;;OAGG;IACH,cAFa,MAAM,EAAE,EAAE,CAgBtB;IAED;;OAEG;IACH,uBAIC;CACJ;
|
|
1
|
+
{"version":3,"file":"RowFirstTable.d.ts","sourceRoot":"","sources":["../../../../../src/core/collection/table/RowFirstTable.js"],"names":[],"mappings":"AAMA;;GAEG;AACH;IACI;;;;;OAKG;IACH,oDAHW,OAAO,EAuDjB;IA/CG;;;OAGG;IACH,wBAAgB;IAEhB;;;OAGG;IACH,gBAFU,qBAAsB,CAET;IAEvB;;;OAGG;IACH,MAFU,WAAW,CAEuB;IAE5C;;;OAGG;IACH,gBAFU,MAAM,CAEyB;IAEzC;;;OAGG;IACH,QAFU,MAAM,CAED;IAEf;;;OAGG;IACH,UAFU,MAAM,CAEC;IAEjB;;;OAGG;IACH,UAFU,QAAQ,CAEE;IAEpB;;MAEC;IAKL;;OAEG;IACH,mBAiBC;IAXG;;;OAGG;IACH,sBAFmB,QAAQ,QAAE,MAAM,QAAE,MAAM,EAAE,KAAG,IAAI,CAEb;IAEvC;;;OAGG;IACH,uBAFmB,QAAQ,QAAE,MAAM,QAAE,MAAM,EAAE,KAAG,IAAI,CAEX;IAG7C;;;;OAIG;IACH,uDAMC;IAED;;;OAGG;IACH,QAFa,MAAM,CA4BlB;IAED;;;OAGG;IACH,sBAFW,MAAM,QA+ChB;IAED;;OAEG;IACH,aAEC;IAED;;;OAGG;IACH,iBAFW,MAAM,QAchB;IAED;;;;;OAKG;IACH,yBAJW,MAAM,eACN,MAAM,SACN,MAAM,QAchB;IAED;;;;;OAKG;IACH,wBAJW,MAAM,eACN,MAAM,GACJ,MAAM,CAclB;IAED;;;;OAIG;IACH,kBAHW,MAAM,YACN,MAAM,QAyBhB;IAED;;;;;OAKG;IACH,kBAHW,MAAM,YACN,MAAM,QAqBhB;IAED;;;OAGG;IACH,eAFW,MAAO,MAAM,CAAC,QAexB;IAED;;;;OAIG;IACH,eAHW,MAAM,4BAoChB;IAED;;;;OAIG;IACH,gBAHW,MAAM,UACN,MAAM,QAwBhB;IAED;;;;OAIG;IACH,YAFW,aAAa,QAsBvB;IAED;;;OAGG;IACH,cAHW,aAAa,GACX,OAAO,CAyBnB;IAED;;;;OAIG;IACH,wCAIC;IAED;;;;OAIG;IACH,cAHW,MAAM,UACN,MAAM,EAAE,QAMlB;IAED;;OAEG;IACH,qBA4BC;IAED;;OAEG;IACH,cAIC;IAED;;;OAGG;IACH,wBAEC;IAED;;;OAGG;IACH,cAFa,MAAM,EAAE,EAAE,CAgBtB;IAED;;OAEG;IACH,uBAIC;CACJ;mBAxiBkB,+BAA+B"}
|
|
@@ -142,7 +142,7 @@ export class RowFirstTable {
|
|
|
142
142
|
setCapacity(rowCount) {
|
|
143
143
|
assert.isNonNegativeInteger(rowCount, 'rowCount');
|
|
144
144
|
|
|
145
|
-
if(this.capacity === rowCount){
|
|
145
|
+
if (this.capacity === rowCount) {
|
|
146
146
|
// already right size
|
|
147
147
|
return;
|
|
148
148
|
}
|
|
@@ -367,6 +367,35 @@ export class RowFirstTable {
|
|
|
367
367
|
|
|
368
368
|
}
|
|
369
369
|
|
|
370
|
+
/**
|
|
371
|
+
* Copy a single row, value in the source row is unaffected
|
|
372
|
+
* @param {number} source
|
|
373
|
+
* @param {number} target
|
|
374
|
+
*/
|
|
375
|
+
copyRow(source, target) {
|
|
376
|
+
assert.isNonNegativeInteger(source, 'source');
|
|
377
|
+
assert.isNonNegativeInteger(target, 'target');
|
|
378
|
+
|
|
379
|
+
if (source === target) {
|
|
380
|
+
// no operation
|
|
381
|
+
return;
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
// figure out addresses
|
|
385
|
+
const bytes_per_record = this.bytesPerRecord;
|
|
386
|
+
|
|
387
|
+
const source_address = source * bytes_per_record;
|
|
388
|
+
const target_address = source * bytes_per_record;
|
|
389
|
+
|
|
390
|
+
const data_view = this.dataView;
|
|
391
|
+
|
|
392
|
+
for (let i = 0; i < bytes_per_record; i++) {
|
|
393
|
+
const v = data_view.getUint8(source_address + i);
|
|
394
|
+
|
|
395
|
+
data_view.setUint8(target_address + i, v);
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
|
|
370
399
|
/**
|
|
371
400
|
* Copy data from another table. Specs must match.
|
|
372
401
|
* NOTE: does not send onAdded signal
|
|
@@ -429,7 +458,7 @@ export class RowFirstTable {
|
|
|
429
458
|
* @param {Array} result where row values are to be stored
|
|
430
459
|
*/
|
|
431
460
|
getRow(index, result) {
|
|
432
|
-
assert.isNonNegativeInteger(index,'index');
|
|
461
|
+
assert.isNonNegativeInteger(index, 'index');
|
|
433
462
|
|
|
434
463
|
this.readRowMethod(this.dataView, this.bytesPerRecord * index, result);
|
|
435
464
|
}
|
|
@@ -440,7 +469,7 @@ export class RowFirstTable {
|
|
|
440
469
|
* @param {number[]} record
|
|
441
470
|
*/
|
|
442
471
|
setRow(index, record) {
|
|
443
|
-
assert.isNonNegativeInteger(index,'index');
|
|
472
|
+
assert.isNonNegativeInteger(index, 'index');
|
|
444
473
|
|
|
445
474
|
this.writeRowMethod(this.dataView, this.bytesPerRecord * index, record);
|
|
446
475
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AttributeSpec.d.ts","sourceRoot":"","sources":["../../../../../src/engine/graphics/geometry/AttributeSpec.js"],"names":[],"mappings":"AAKA;;;GAGG;AACH;IA+BI,uCAMC;
|
|
1
|
+
{"version":3,"file":"AttributeSpec.d.ts","sourceRoot":"","sources":["../../../../../src/engine/graphics/geometry/AttributeSpec.js"],"names":[],"mappings":"AAKA;;;GAGG;AACH;IA+BI,uCAMC;IA6ED;;;;;OAKG;IACH,iBAJW,aAAa,KACb,aAAa,GACZ,MAAM,CAIjB;IAxHD;;;OAGG;IACH,MAFU,MAAM,CAEN;IAEV;;;OAGG;IACH,MAFU,cAAc,CAEM;IAE9B;;;;;OAKG;IACH,UAFU,MAAM,CAEH;IAEb;;;;;OAKG;IACH,YAFU,OAAO,CAEE;IAWnB;;;;;aAoBC;IAED;;;;;MAOC;IAED,eAEC;IAED;;;;OAIG;IACH,cAHW,aAAa,GACX,OAAO,CAQnB;IAED;;;OAGG;IACH,YAFW,aAAa,QAOvB;IAED,uBAMC;IAED;;;OAGG;IACH,eAFa,MAAM,CAIlB;IAaL;;;OAGG;IACH,0BAFU,OAAO,CAEsB;CANtC;+BAnI8B,6CAA6C"}
|
|
@@ -9,33 +9,33 @@ import { computeStringHash } from "../../../core/primitives/strings/computeStrin
|
|
|
9
9
|
*/
|
|
10
10
|
export class AttributeSpec {
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
12
|
+
/**
|
|
13
|
+
* Typically unique within a given set, used to identify the attribute
|
|
14
|
+
* @type {string}
|
|
15
|
+
*/
|
|
16
|
+
name = "";
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* How the attribute is stored in memory and interpreted
|
|
20
|
+
* @type {BinaryDataType}
|
|
21
|
+
*/
|
|
22
|
+
type = BinaryDataType.Float32;
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* How many elements the attribute uses. This is cardinality of a vector.
|
|
26
|
+
* 1 means the attribute is a scalar
|
|
27
|
+
* must be greater or equal to 1
|
|
28
|
+
* @type {number}
|
|
29
|
+
*/
|
|
30
|
+
itemSize = 1;
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Normalized values will be automatically converted to float32 in the shader
|
|
34
|
+
* This gives good optimization opportunities for things like normal vectors
|
|
35
|
+
* Applies to integer types only
|
|
36
|
+
* @type {boolean}
|
|
37
|
+
*/
|
|
38
|
+
normalized = false;
|
|
39
39
|
|
|
40
40
|
|
|
41
41
|
static fromJSON(j) {
|
|
@@ -96,14 +96,33 @@ export class AttributeSpec {
|
|
|
96
96
|
|
|
97
97
|
/**
|
|
98
98
|
*
|
|
99
|
-
* @
|
|
99
|
+
* @param {AttributeSpec} other
|
|
100
|
+
*/
|
|
101
|
+
copy(other) {
|
|
102
|
+
this.type = other.type;
|
|
103
|
+
this.name = other.name;
|
|
104
|
+
this.itemSize = other.itemSize;
|
|
105
|
+
this.normalized = other.normalized;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
clone() {
|
|
109
|
+
const r = new AttributeSpec();
|
|
110
|
+
|
|
111
|
+
r.copy(this);
|
|
112
|
+
|
|
113
|
+
return r;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* How much space a single attribute value takes up
|
|
118
|
+
* @returns {number} in bytes
|
|
100
119
|
*/
|
|
101
120
|
getByteSize() {
|
|
102
121
|
return this.itemSize * DataTypeByteSizes[this.type];
|
|
103
122
|
}
|
|
104
123
|
|
|
105
124
|
/**
|
|
106
|
-
*
|
|
125
|
+
* Sorting comparator
|
|
107
126
|
* @param {AttributeSpec} a
|
|
108
127
|
* @param {AttributeSpec} b
|
|
109
128
|
* @return {number}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VertexDataSpec.d.ts","sourceRoot":"","sources":["../../../../../src/engine/graphics/geometry/VertexDataSpec.js"],"names":[],"mappings":"AAYA;;;GAGG;AACH;IAeI;;;;OAIG;IACH,2BAHW,aAAa,GACX,cAAc,CAQ1B;IAxBD;;;OAGG;IACH,YAFU,aAAa,EAAE,CAET;IAsBhB;;;;OAIG;IACH,yBAHW,MAAM,GACL,aAAa,GAAC,SAAS,CAgBlC;IAED;;;OAGG;IACH,8BAFW,MAAM,GADJ,MAAM,CAiBlB;IAED;;;OAGG;IACH,oBAFW,aAAa,EAAE,QAOzB;IAED;;;;OAIG;IACH,eAHW,aAAa,GACZ,cAAc,CAkBzB;IAED;;;OAGG;IACH,0BAFW,aAAa,EAAE,QAQzB;IAED,cAMC;IAED;;;;OAIG;IACH,cAHW,cAAc,GACZ,OAAO,CAQnB;IAED,
|
|
1
|
+
{"version":3,"file":"VertexDataSpec.d.ts","sourceRoot":"","sources":["../../../../../src/engine/graphics/geometry/VertexDataSpec.js"],"names":[],"mappings":"AAYA;;;GAGG;AACH;IAeI;;;;OAIG;IACH,2BAHW,aAAa,GACX,cAAc,CAQ1B;IAxBD;;;OAGG;IACH,YAFU,aAAa,EAAE,CAET;IAsBhB;;;;OAIG;IACH,yBAHW,MAAM,GACL,aAAa,GAAC,SAAS,CAgBlC;IAED;;;OAGG;IACH,8BAFW,MAAM,GADJ,MAAM,CAiBlB;IAED;;;OAGG;IACH,oBAFW,aAAa,EAAE,QAOzB;IAED;;;;OAIG;IACH,eAHW,aAAa,GACZ,cAAc,CAkBzB;IAED;;;OAGG;IACH,0BAFW,aAAa,EAAE,QAQzB;IAED,cAMC;IAED;;;;OAIG;IACH,cAHW,cAAc,GACZ,OAAO,CAQnB;IAED,sBASC;IAED,eAMC;IAED;;MAIC;IAED;;aAkBC;IAED;;;OAGG;IACH,eAFa,MAAM,CAelB;IAIL;;;OAGG;IACH,2BAFU,OAAO,CAEwB;;CAPxC;8BAnN6B,oBAAoB"}
|
|
@@ -8,7 +8,7 @@ import { AttributeSpec } from "./AttributeSpec.js";
|
|
|
8
8
|
* @readonly
|
|
9
9
|
* @type {number}
|
|
10
10
|
*/
|
|
11
|
-
const
|
|
11
|
+
const RESERVED_HASH = 1234567;
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
14
|
* Describes a set of data attributes. A good analogy would be "all data associated with geometry vertex"
|
|
@@ -27,7 +27,7 @@ export class VertexDataSpec {
|
|
|
27
27
|
* @type {number}
|
|
28
28
|
* @private
|
|
29
29
|
*/
|
|
30
|
-
#hash =
|
|
30
|
+
#hash = RESERVED_HASH;
|
|
31
31
|
|
|
32
32
|
/**
|
|
33
33
|
*
|
|
@@ -111,7 +111,7 @@ export class VertexDataSpec {
|
|
|
111
111
|
this.attributes.push(attribute);
|
|
112
112
|
|
|
113
113
|
// reset hash
|
|
114
|
-
this.#hash =
|
|
114
|
+
this.#hash = RESERVED_HASH;
|
|
115
115
|
|
|
116
116
|
//for chaining, return self
|
|
117
117
|
return this;
|
|
@@ -134,7 +134,7 @@ export class VertexDataSpec {
|
|
|
134
134
|
this.attributes.splice(0, count);
|
|
135
135
|
|
|
136
136
|
// reset hash to trigger hash update
|
|
137
|
-
this.#hash =
|
|
137
|
+
this.#hash = RESERVED_HASH;
|
|
138
138
|
}
|
|
139
139
|
|
|
140
140
|
/**
|
|
@@ -151,11 +151,18 @@ export class VertexDataSpec {
|
|
|
151
151
|
}
|
|
152
152
|
|
|
153
153
|
computeHash() {
|
|
154
|
-
|
|
154
|
+
const hash_value = computeHashArray(this.attributes, invokeObjectHash);
|
|
155
|
+
|
|
156
|
+
if (hash_value === RESERVED_HASH) {
|
|
157
|
+
// collision with reserved hash, replace
|
|
158
|
+
return 0;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
return hash_value;
|
|
155
162
|
}
|
|
156
163
|
|
|
157
164
|
hash() {
|
|
158
|
-
if (this.#hash ===
|
|
165
|
+
if (this.#hash === RESERVED_HASH) {
|
|
159
166
|
this.#hash = this.computeHash();
|
|
160
167
|
}
|
|
161
168
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MaterialOptimizationContext.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/graphics/material/optimization/MaterialOptimizationContext.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"MaterialOptimizationContext.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/graphics/material/optimization/MaterialOptimizationContext.js"],"names":[],"mappings":"AAkXA;IAEQ;;;OAGG;IACH,UAFU,MAAM,OAAO,EAAE,CAEP;IAElB;;;OAGG;IACH,QAFU,MAAM,IAAI,EAAE,CAEN;IAGhB;;;OAGG;IACH,SAFU,IAAI,MAAM,EAAC,SAAS,CAAC,CAEP;IAExB;;;OAGG;IACH,YAFU,SAAS,CAEC;IAGxB;;;OAGG;IACH,sBAFW,kBAAkB,EAAE,QAkE9B;IAED;;;OAGG;IACH,gCAFW,kBAAkB,EAAE,QAmE9B;IAED;;;OAGG;IACH,kCAFW,kBAAkB,QA4E5B;IAED;;;OAGG;IACH,cAFW,MAAM,IAAI,QAUpB;IAED;;;OAGG;IACH,iCAMC;IAED;;OAEG;IACH,eAwIC;IAED;;;OAGG;IACH,6BAFY,IAAI,MAAM,EAAE,iBAAiB,CAAC,CAyBzC;IAED;;;;OAIG;IACH,0CAHW,MAAM,cAAc,OACpB,kBAAkB,QA+C5B;CACJ;;0BAIS,MAAM;;0BAx0BU,oCAAoC;mCAK3B,yBAAyB;4BA3BrD,OAAO"}
|
|
@@ -12,7 +12,9 @@ import {
|
|
|
12
12
|
compute_typed_array_constructor_from_data_type
|
|
13
13
|
} from "../../../../core/binary/type/DataType2TypedArrayConstructorMapping.js";
|
|
14
14
|
import { array_push_if_unique } from "../../../../core/collection/array/array_push_if_unique.js";
|
|
15
|
-
import {
|
|
15
|
+
import {
|
|
16
|
+
compute_binary_data_type_from_typed_array
|
|
17
|
+
} from "../../../../core/collection/array/typed/compute_binary_data_type_from_typed_array.js";
|
|
16
18
|
import { collectIteratorValueToArray } from "../../../../core/collection/collectIteratorValueToArray.js";
|
|
17
19
|
import { HashMap } from "../../../../core/collection/map/HashMap.js";
|
|
18
20
|
import AABB2 from "../../../../core/geom/AABB2.js";
|
|
@@ -791,7 +793,7 @@ export class MaterialOptimizationContext {
|
|
|
791
793
|
//build new textures
|
|
792
794
|
for (const [name, sampler] of this.atlases) {
|
|
793
795
|
|
|
794
|
-
const sampler_data_type =
|
|
796
|
+
const sampler_data_type = compute_binary_data_type_from_typed_array(sampler.data);
|
|
795
797
|
|
|
796
798
|
const format = channelCountToThreeTextureFormat(sampler.itemSize);
|
|
797
799
|
const type = computeThreeTextureTypeFromDataType(sampler_data_type);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Sampler2D.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/graphics/texture/sampler/Sampler2D.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Sampler2D.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/graphics/texture/sampler/Sampler2D.js"],"names":[],"mappings":"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"}
|
|
@@ -3,8 +3,10 @@ import { Base64 } from "../../../../core/binary/Base64.js";
|
|
|
3
3
|
import {
|
|
4
4
|
compute_typed_array_constructor_from_data_type
|
|
5
5
|
} from "../../../../core/binary/type/DataType2TypedArrayConstructorMapping.js";
|
|
6
|
+
import {
|
|
7
|
+
compute_binary_data_type_from_typed_array
|
|
8
|
+
} from "../../../../core/collection/array/typed/compute_binary_data_type_from_typed_array.js";
|
|
6
9
|
import { is_typed_array_equals } from "../../../../core/collection/array/typed/is_typed_array_equals.js";
|
|
7
|
-
import { typedArrayToDataType } from "../../../../core/collection/array/typed/typedArrayToDataType.js";
|
|
8
10
|
import { clamp } from "../../../../core/math/clamp.js";
|
|
9
11
|
import { lerp } from "../../../../core/math/lerp.js";
|
|
10
12
|
import { max2 } from "../../../../core/math/max2.js";
|
|
@@ -949,7 +951,7 @@ export class Sampler2D {
|
|
|
949
951
|
height: this.height,
|
|
950
952
|
width: this.width,
|
|
951
953
|
itemSize: this.itemSize,
|
|
952
|
-
type:
|
|
954
|
+
type: compute_binary_data_type_from_typed_array(this.data),
|
|
953
955
|
data: encoded
|
|
954
956
|
}
|
|
955
957
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sampler2d_compute_texel_value_conversion_scale_to_uint8.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/graphics/texture/sampler/sampler2d_compute_texel_value_conversion_scale_to_uint8.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"sampler2d_compute_texel_value_conversion_scale_to_uint8.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/graphics/texture/sampler/sampler2d_compute_texel_value_conversion_scale_to_uint8.js"],"names":[],"mappings":"AAUA;;;;GAIG;AACH;YAFsB,MAAM;WAAS,MAAM;EAqC1C"}
|