q5 4.8.2 → 4.8.3
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/deno.json +1 -1
- package/package.json +1 -1
- package/q5.js +11 -4
package/deno.json
CHANGED
package/package.json
CHANGED
package/q5.js
CHANGED
|
@@ -180,11 +180,11 @@ function Q5(scope, parent, renderer) {
|
|
|
180
180
|
}
|
|
181
181
|
$._redraw = false;
|
|
182
182
|
};
|
|
183
|
-
$.remove =
|
|
183
|
+
$.remove = () => {
|
|
184
184
|
$._removed = true;
|
|
185
185
|
$.noLoop();
|
|
186
186
|
if ($.canvas.remove) $.canvas.remove();
|
|
187
|
-
|
|
187
|
+
return runHooks('remove');
|
|
188
188
|
};
|
|
189
189
|
|
|
190
190
|
$.frameRate = (hz) => {
|
|
@@ -2499,6 +2499,7 @@ Q5.modules.color = ($, q) => {
|
|
|
2499
2499
|
|
|
2500
2500
|
$._namedColors = {
|
|
2501
2501
|
aqua: [0, 255, 255],
|
|
2502
|
+
beige: [245, 245, 220],
|
|
2502
2503
|
black: [0, 0, 0],
|
|
2503
2504
|
blue: [0, 0, 255],
|
|
2504
2505
|
brown: [165, 42, 42],
|
|
@@ -9020,7 +9021,7 @@ fn fragMain(f : FragParams) -> @location(0) vec4f {
|
|
|
9020
9021
|
for (let b of $._buffers) b.destroy();
|
|
9021
9022
|
$._buffers = [];
|
|
9022
9023
|
|
|
9023
|
-
_remove();
|
|
9024
|
+
return _remove();
|
|
9024
9025
|
};
|
|
9025
9026
|
};
|
|
9026
9027
|
|
|
@@ -9084,8 +9085,14 @@ Q5._requestGPU = async () => {
|
|
|
9084
9085
|
Q5.MAX_TEXTS = min(Q5.MAX_TEXTS, floor(maxStorage / 32));
|
|
9085
9086
|
|
|
9086
9087
|
device.lost.then((e) => {
|
|
9087
|
-
|
|
9088
|
+
// if purposefully destroyed, do nothing.
|
|
9089
|
+
if (e.reason == 'destroyed') return;
|
|
9090
|
+
// else attempt restart
|
|
9088
9091
|
console.error(e);
|
|
9092
|
+
requestAnimationFrame(async () => {
|
|
9093
|
+
Q5.device = Q5._gpuTask = null;
|
|
9094
|
+
await Q5.initWebGPU();
|
|
9095
|
+
});
|
|
9089
9096
|
});
|
|
9090
9097
|
|
|
9091
9098
|
Q5.device = device;
|