@woosh/meep-engine 2.128.14 → 2.128.16
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
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.128.
|
|
8
|
+
"version": "2.128.16",
|
|
9
9
|
"main": "build/meep.module.js",
|
|
10
10
|
"module": "build/meep.module.js",
|
|
11
11
|
"exports": {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RenderGraph.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/graphics/render/frame_graph/RenderGraph.js"],"names":[],"mappings":"AAcA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH;IA6BI;;;OAGG;IACH,mBAFW,MAAM,EAOhB;IArCD;;;;OAIG;IACH,MAFU,MAAM,CAEN;IAEV;;;;OAIG;IACH,qBAAkB;IAElB;;;;OAIG;IACH,yBAAsB;IAEtB;;;;OAIG;IACH,4BAAyB;IAazB;;;;OAIG;IACH,qBAHW,MAAM,sBAahB;IAED;;;;OAIG;IACH,oBAHW,MAAM,qBAmBhB;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,iBAAiB,CA2B7B;IAED;;;;;;OAMG;IACH,iEAFa,OAAO,CAQnB;IAED,gBA6FC;IAED;;;OAGG;IACH,uCA2CC;IAED;;;;;;;OAOG;IACH;gBAFqB,EAAE;mBAAa,EAAE;MA2DrC;IAED;;;;;OAKG;IACH,eAFY,MAAM,
|
|
1
|
+
{"version":3,"file":"RenderGraph.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/graphics/render/frame_graph/RenderGraph.js"],"names":[],"mappings":"AAcA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH;IA6BI;;;OAGG;IACH,mBAFW,MAAM,EAOhB;IArCD;;;;OAIG;IACH,MAFU,MAAM,CAEN;IAEV;;;;OAIG;IACH,qBAAkB;IAElB;;;;OAIG;IACH,yBAAsB;IAEtB;;;;OAIG;IACH,4BAAyB;IAazB;;;;OAIG;IACH,qBAHW,MAAM,sBAahB;IAED;;;;OAIG;IACH,oBAHW,MAAM,qBAmBhB;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,iBAAiB,CA2B7B;IAED;;;;;;OAMG;IACH,iEAFa,OAAO,CAQnB;IAED,gBA6FC;IAED;;;OAGG;IACH,uCA2CC;IAED;;;;;;;OAOG;IACH;gBAFqB,EAAE;mBAAa,EAAE;MA2DrC;IAED;;;;;OAKG;IACH,eAFY,MAAM,CAuGjB;IAGL;;;OAGG;IACH,wBAFU,OAAO,CAEkB;CANlC;8BA7lB6B,oBAAoB;6BACrB,mBAAmB;kCAJd,wBAAwB"}
|
|
@@ -534,15 +534,15 @@ export class RenderGraph {
|
|
|
534
534
|
/**
|
|
535
535
|
*
|
|
536
536
|
* @param {string} type
|
|
537
|
+
* @returns {number}
|
|
537
538
|
*/
|
|
538
539
|
function type_to_color(type) {
|
|
539
540
|
|
|
540
|
-
const
|
|
541
|
+
const hash_32 = computeStringHash(type);
|
|
541
542
|
|
|
542
|
-
const
|
|
543
|
-
const value = (hash >>> 16) / 0xffff;
|
|
543
|
+
const hash_16 = (hash_32 & 0xffff) ^ (hash_32 >>> 16);
|
|
544
544
|
|
|
545
|
-
return
|
|
545
|
+
return hash_16 / 0xffff;
|
|
546
546
|
}
|
|
547
547
|
|
|
548
548
|
/**
|
|
@@ -552,12 +552,15 @@ export class RenderGraph {
|
|
|
552
552
|
*/
|
|
553
553
|
function entry_to_background_color(entry) {
|
|
554
554
|
|
|
555
|
-
|
|
555
|
+
let color_hue= type_to_color(entry.resource_descriptor?.type ?? "");
|
|
556
556
|
|
|
557
|
-
|
|
557
|
+
// remap hue away from red
|
|
558
|
+
color_hue = lerp(0.10, 0.90, color_hue);
|
|
559
|
+
|
|
560
|
+
const saturation = entry.isImported() ? 0.7 : 0.3;
|
|
558
561
|
|
|
559
562
|
const color_rgb = [];
|
|
560
|
-
okhsv_to_linear_srgb(color_rgb, color_hue, saturation,
|
|
563
|
+
okhsv_to_linear_srgb(color_rgb, color_hue, saturation, 0.9)
|
|
561
564
|
|
|
562
565
|
const hex = rgb2hex(...color_rgb.map(float_to_uint8));
|
|
563
566
|
|