@woosh/meep-engine 2.134.1 → 2.134.4
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/package.json +1 -1
- package/src/core/collection/map/HashMap.js +1 -1
- package/src/engine/animation/curve/AnimationCurve.d.ts +5 -2
- package/src/engine/animation/curve/AnimationCurve.d.ts.map +1 -1
- package/src/engine/animation/curve/AnimationCurve.js +10 -12
- package/src/engine/animation/curve/view/prototype.js +1 -1
- package/src/engine/asset/loaders/image/jpeg/buildHuffmanTable.d.ts +2 -2
- package/src/engine/asset/loaders/image/jpeg/buildHuffmanTable.d.ts.map +1 -1
- package/src/engine/asset/loaders/image/jpeg/buildHuffmanTable.js +1 -1
- package/src/engine/graphics/render/frame_graph/FrameGraph.d.ts +5 -0
- package/src/engine/graphics/render/frame_graph/FrameGraph.d.ts.map +1 -1
- package/src/engine/graphics/render/frame_graph/FrameGraph.js +15 -10
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"description": "Pure JavaScript game engine. Fully featured and production ready.",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"author": "Alexander Goldring",
|
|
8
|
-
"version": "2.134.
|
|
8
|
+
"version": "2.134.4",
|
|
9
9
|
"main": "build/meep.module.js",
|
|
10
10
|
"module": "build/meep.module.js",
|
|
11
11
|
"exports": {
|
|
@@ -614,7 +614,7 @@ export class HashMap {
|
|
|
614
614
|
const raw_hash = this.#build_key_hash(key);
|
|
615
615
|
let bin_index = this.compute_bin_index(raw_hash);
|
|
616
616
|
|
|
617
|
-
assert.
|
|
617
|
+
assert.isFinite(bin_index, 'hash');
|
|
618
618
|
|
|
619
619
|
const bins = this.__bins;
|
|
620
620
|
const entries = this.__entries;
|
|
@@ -136,12 +136,15 @@ export class AnimationCurve implements Iterable<Keyframe> {
|
|
|
136
136
|
*/
|
|
137
137
|
alignTangents(index: number): void;
|
|
138
138
|
/**
|
|
139
|
-
*
|
|
139
|
+
* @deprecated
|
|
140
140
|
* @param {number} index Index of keyframe to be affected
|
|
141
141
|
* @param {number} weight How much smoothing to apply, 1 will be fully smoothed out and 0 will have no effect at all. Value between 0 and 1
|
|
142
142
|
*/
|
|
143
143
|
smoothTangents(index: number, weight: number): void;
|
|
144
|
-
|
|
144
|
+
/**
|
|
145
|
+
* Smooth out the curve
|
|
146
|
+
*/
|
|
147
|
+
alignAllTangents(): void;
|
|
145
148
|
/**
|
|
146
149
|
* The copy is deep
|
|
147
150
|
* @param {AnimationCurve} other
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AnimationCurve.d.ts","sourceRoot":"","sources":["../../../../../src/engine/animation/curve/AnimationCurve.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AnimationCurve.d.ts","sourceRoot":"","sources":["../../../../../src/engine/animation/curve/AnimationCurve.js"],"names":[],"mappings":"AASA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,gDANwB,QAAQ;IAqZ5B;;;;OAIG;IACH,kBAHW,QAAQ,EAAE,GACR,cAAc,CAQ1B;IAED;;;;;;;;;OASG;IACH,6BANW,MAAM,eACN,MAAM,YACN,MAAM,aACN,MAAM,GACL,cAAc,CAUzB;IAED;;;;;;OAMG;IACH,4BALW,MAAM,YACN,MAAM,UACN,MAAM,GACL,cAAc,CAOzB;IAED;;;;;;;OAOG;IACH,0BANW,MAAM,eACN,MAAM,YACN,MAAM,aACN,MAAM,GACL,cAAc,CAezB;IAldD;;;;;OAKG;IACH,eAFU,QAAQ,EAAE,CAEV;IAEV;;;;;OAKG;IACH,SAHW,QAAQ,GACN,MAAM,CAuClB;IAED;;;OAGG;IACH,cAFW,QAAQ,EAAE,QAUpB;IAED;;;;OAIG;IACH,YAHW,QAAQ,GACN,OAAO,CAYnB;IAED;;OAEG;IACH,cAEC;IAGD;;;OAGG;IACH,WAFY,OAAO,CAIlB;IAED;;;OAGG;IACH,qBAEC;IAED;;;;OAIG;IACH,yBAUC;IAED;;;;OAIG;IACH,uBAUC;IAED;;;;OAIG;IACH,uBAcC;IAED;;;;;;OAMG;IACH,qBAHW,MAAM,GACJ,MAAM,CAmDlB;IAED;;;;OAIG;IACH,eAHW,MAAM,GACL,MAAM,CAoCjB;IAED;;;;OAIG;IACH,qBAFW,MAAM,QAmChB;IAED;;;;OAIG;IACH,sBAHW,MAAM,UACN,MAAM,QAIhB;IAED;;OAEG;IACH,yBAQC;IAGD;;;OAGG;IACH,YAFW,cAAc,QAIxB;IAED;;;OAGG;IACH,SAFY,cAAc,CAQzB;IAED;;;;OAIG;IACH,cAHW,cAAc,GACb,OAAO,CAIlB;IAED;;;OAGG;IACH,QAFY,MAAM,CAIjB;IAED;;MAIC;IAED;;aAkBC;IAoFL;;;;OAIG;IACH,2BAFU,OAAO,CAEwB;IAGzC;;OAEG;IACH,0BA1Te,MAAM,KACJ,MAAM,CAyTmB;IA7FtC,wDAQC;CAuEJ;yBA/ewB,eAAe"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { assert } from "../../../core/assert.js";
|
|
2
2
|
import { computeHashArray } from "../../../core/collection/array/computeHashArray.js";
|
|
3
3
|
import { isArrayEqual } from "../../../core/collection/array/isArrayEqual.js";
|
|
4
|
-
import { lerp } from "../../../core/math/lerp.js";
|
|
5
4
|
import { invokeObjectClone } from "../../../core/model/object/invokeObjectClone.js";
|
|
6
5
|
import { invokeObjectHash } from "../../../core/model/object/invokeObjectHash.js";
|
|
7
6
|
import { invokeObjectToJSON } from "../../../core/model/object/invokeObjectToJSON.js";
|
|
@@ -337,25 +336,24 @@ export class AnimationCurve {
|
|
|
337
336
|
}
|
|
338
337
|
|
|
339
338
|
/**
|
|
340
|
-
*
|
|
339
|
+
* @deprecated
|
|
341
340
|
* @param {number} index Index of keyframe to be affected
|
|
342
341
|
* @param {number} weight How much smoothing to apply, 1 will be fully smoothed out and 0 will have no effect at all. Value between 0 and 1
|
|
343
342
|
*/
|
|
344
343
|
smoothTangents(index, weight) {
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
const key = keys[index];
|
|
348
|
-
|
|
349
|
-
const average = lerp(key.inTangent, key.outTangent, 0.5);
|
|
350
|
-
|
|
351
|
-
key.inTangent = lerp(key.inTangent, average, weight);
|
|
352
|
-
key.outTangent = lerp(key.outTangent, average, weight);
|
|
344
|
+
throw new Error('Deprecated, use alignTagents() instead');
|
|
353
345
|
}
|
|
354
346
|
|
|
355
|
-
|
|
347
|
+
/**
|
|
348
|
+
* Smooth out the curve
|
|
349
|
+
*/
|
|
350
|
+
alignAllTangents() {
|
|
356
351
|
const n = this.length;
|
|
352
|
+
|
|
353
|
+
// TODO add support for looping curves
|
|
354
|
+
|
|
357
355
|
for (let i = 0; i < n; i++) {
|
|
358
|
-
this.
|
|
356
|
+
this.alignTangents(i);
|
|
359
357
|
}
|
|
360
358
|
}
|
|
361
359
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
*
|
|
3
3
|
* @param {Uint8Array} codeLengths
|
|
4
4
|
* @param {Uint8Array} values
|
|
5
|
-
* @return {[]}
|
|
5
|
+
* @return {number[]}
|
|
6
6
|
*/
|
|
7
|
-
export function buildHuffmanTable(codeLengths: Uint8Array, values: Uint8Array): [];
|
|
7
|
+
export function buildHuffmanTable(codeLengths: Uint8Array, values: Uint8Array): number[];
|
|
8
8
|
//# sourceMappingURL=buildHuffmanTable.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"buildHuffmanTable.d.ts","sourceRoot":"","sources":["../../../../../../../src/engine/asset/loaders/image/jpeg/buildHuffmanTable.js"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,+CAJW,UAAU,UACV,UAAU,GACT,EAAE,
|
|
1
|
+
{"version":3,"file":"buildHuffmanTable.d.ts","sourceRoot":"","sources":["../../../../../../../src/engine/asset/loaders/image/jpeg/buildHuffmanTable.js"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,+CAJW,UAAU,UACV,UAAU,GACT,MAAM,EAAE,CAyCnB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FrameGraph.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/graphics/render/frame_graph/FrameGraph.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FrameGraph.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/graphics/render/frame_graph/FrameGraph.js"],"names":[],"mappings":"AAeA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH;IAmCI;;;OAGG;IACH,mBAFW,MAAM,EAOhB;IA3CD;;;;OAIG;IACH,MAFU,MAAM,CAEN;IAEV;;;OAGG;IACH,6CAA0B;IAE1B;;;;OAIG;IACH,qBAAkB;IAElB;;;;OAIG;IACH,yBAAsB;IAEtB;;;;OAIG;IACH,4BAAyB;IAazB;;;;OAIG;IACH,qBAHW,MAAM,sBAehB;IAED;;;;OAIG;IACH,oBAHW,MAAM,qBAehB;IAED;;;;OAIG;IACH,qBAHW,MAAM,KAKhB;IAED;;;;;OAKG;IACH,2BAJW,MAAM,oBAEJ,MAAM,CAWlB;IAED;;;;;OAKG;IACH,6BAYC;IAED;;;;;;OAMG;IACH,4BAeC;IAED;;;;OAIG;IACH,wBAHW,MAAM,GACJ,MAAM,CAkBlB;IAED;;;;;;OAMG;IACH,2BALW,MAAM,wDAGJ,MAAM,CAUlB;IAED;;;OAGG;IACH,4BAHa,OAAO,CAQnB;IAED;;;;;;;OAOG;IACH,eALW,MAAM,4BAGJ,gBAAgB,CA2B5B;IAED;;;;;;OAMG;IACH,iEAFa,OAAO,CAQnB;IAED,gBA6FC;IAED;;;OAGG;IACH,2CAuDC;IAED;;;;;;;OAOG;IACH;gBAFqB,EAAE;mBAAa,EAAE;MA2DrC;IAED;;;;;OAKG;IACH,eAFY,MAAM,CA0GjB;IAGL;;;;OAIG;IACH,uBAFU,OAAO,CAEgB;CAPhC;8BAxnB6B,oBAAoB;6BACrB,mBAAmB;iCAJf,uBAAuB"}
|
|
@@ -3,6 +3,7 @@ import { float_to_uint8 } from "../../../../core/binary/float_to_uint8.js";
|
|
|
3
3
|
import LineBuilder from "../../../../core/codegen/LineBuilder.js";
|
|
4
4
|
import { rgb2hex } from "../../../../core/color/hex/rgb2hex.js";
|
|
5
5
|
import { okhsv_to_linear_srgb } from "../../../../core/color/oklab/okhsv_to_linear_srgb.js";
|
|
6
|
+
import { Signal } from "../../../../core/events/signal/Signal.js";
|
|
6
7
|
import { graphviz_escape_string } from "../../../../core/graph/format/graphviz/graphviz_escape_string.js";
|
|
7
8
|
import { lerp } from "../../../../core/math/lerp.js";
|
|
8
9
|
import { computeStringHash } from "../../../../core/primitives/strings/computeStringHash.js";
|
|
@@ -60,6 +61,12 @@ export class FrameGraph {
|
|
|
60
61
|
*/
|
|
61
62
|
name = "";
|
|
62
63
|
|
|
64
|
+
/**
|
|
65
|
+
*
|
|
66
|
+
* @type {Signal<IFrameGraphContext,this>}
|
|
67
|
+
*/
|
|
68
|
+
onExecuted = new Signal();
|
|
69
|
+
|
|
63
70
|
/**
|
|
64
71
|
*
|
|
65
72
|
* @type {FramePassNode[]}
|
|
@@ -119,19 +126,15 @@ export class FrameGraph {
|
|
|
119
126
|
getResourceNode(id) {
|
|
120
127
|
assert.isNonNegativeInteger(id, 'id');
|
|
121
128
|
|
|
122
|
-
const
|
|
123
|
-
const node_count = nodes.length;
|
|
124
|
-
|
|
125
|
-
for (let i = 0; i < node_count; i++) {
|
|
126
|
-
const node = nodes[i];
|
|
127
|
-
|
|
128
|
-
if (node.id === id) {
|
|
129
|
-
return node;
|
|
130
|
-
}
|
|
129
|
+
const resource = this.__resource_nodes[id];
|
|
131
130
|
|
|
131
|
+
if (resource === undefined) {
|
|
132
|
+
throw new Error(`Resource Node ${id} not found`);
|
|
132
133
|
}
|
|
133
134
|
|
|
134
|
-
|
|
135
|
+
assert.equal(resource.id, id, 'resource.id does not match');
|
|
136
|
+
|
|
137
|
+
return resource;
|
|
135
138
|
}
|
|
136
139
|
|
|
137
140
|
/**
|
|
@@ -457,6 +460,8 @@ export class FrameGraph {
|
|
|
457
460
|
}
|
|
458
461
|
|
|
459
462
|
}
|
|
463
|
+
|
|
464
|
+
this.onExecuted.send2(context, this);
|
|
460
465
|
}
|
|
461
466
|
|
|
462
467
|
/**
|