force script update
This commit is contained in:
@@ -47,7 +47,6 @@ export const NetrunnerMatrix: React.FC<NetrunnerMatrixProps> = ({
|
|||||||
|
|
||||||
if (!canvas || !container || hasTransferred.current) return;
|
if (!canvas || !container || hasTransferred.current) return;
|
||||||
|
|
||||||
|
|
||||||
const getEyeY = (scale: number) => {
|
const getEyeY = (scale: number) => {
|
||||||
const anchor = document.getElementById("eye-anchor");
|
const anchor = document.getElementById("eye-anchor");
|
||||||
const canvas = canvasRef.current;
|
const canvas = canvasRef.current;
|
||||||
@@ -72,7 +71,7 @@ export const NetrunnerMatrix: React.FC<NetrunnerMatrixProps> = ({
|
|||||||
canvas.width = initialWidth;
|
canvas.width = initialWidth;
|
||||||
canvas.height = initialHeight;
|
canvas.height = initialHeight;
|
||||||
|
|
||||||
const worker = new Worker("/wasm-matrix/matrix_worker.js", {
|
const worker = new Worker("/wasm-matrix/matrix_worker.js?v=1.0", {
|
||||||
type: "module",
|
type: "module",
|
||||||
});
|
});
|
||||||
workerRef.current = worker;
|
workerRef.current = worker;
|
||||||
@@ -105,7 +104,9 @@ export const NetrunnerMatrix: React.FC<NetrunnerMatrixProps> = ({
|
|||||||
resizeTimeout = setTimeout(() => {
|
resizeTimeout = setTimeout(() => {
|
||||||
if (!container || !workerRef.current) return;
|
if (!container || !workerRef.current) return;
|
||||||
const isMob = checkIsMobile();
|
const isMob = checkIsMobile();
|
||||||
const scale = isMob ? 1.0 : Math.min(window.devicePixelRatio || 1, 1.5);
|
const scale = isMob
|
||||||
|
? 1.0
|
||||||
|
: Math.min(window.devicePixelRatio || 1, 1.5);
|
||||||
const w = container.clientWidth * scale;
|
const w = container.clientWidth * scale;
|
||||||
const h = container.clientHeight * scale;
|
const h = container.clientHeight * scale;
|
||||||
dimensionsRef.current = { width: w, height: h };
|
dimensionsRef.current = { width: w, height: h };
|
||||||
|
|||||||
Reference in New Issue
Block a user