fix: track movement invalidation

This commit is contained in:
TrèsAbhi committed 2024-08-28 18:02:20 -05:00
1 parent 0c2877d42f
commit 8f12a77e12
1 file changed
+3 -1
@@ -1,4 +1,4 @@
import { ThreeEvent, useThree } from '@react-three/fiber';
import { invalidate, ThreeEvent, useThree } from '@react-three/fiber';
import { memo, useRef } from 'react';
import { Group, Mesh, MeshStandardMaterial, Vector2 } from 'three';
import { ModelTankWrapper } from '../../../../../../../components/Armor/components/ModelTankWrapper';
@@ -52,6 +52,8 @@ export const TankModel = memo(() => {
if (!material) return;
invalidate();
if (material.map) material.map.offset.y += offset;
if (material.aoMap) material.aoMap.offset.y += offset;
if (material.normalMap) material.normalMap.offset.y += offset;