mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-23 19:49:50 +02:00
fix: track movement invalidation
This commit is contained in:
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 { memo, useRef } from 'react';
|
||||||
import { Group, Mesh, MeshStandardMaterial, Vector2 } from 'three';
|
import { Group, Mesh, MeshStandardMaterial, Vector2 } from 'three';
|
||||||
import { ModelTankWrapper } from '../../../../../../../components/Armor/components/ModelTankWrapper';
|
import { ModelTankWrapper } from '../../../../../../../components/Armor/components/ModelTankWrapper';
|
||||||
@@ -52,6 +52,8 @@ export const TankModel = memo(() => {
|
|||||||
|
|
||||||
if (!material) return;
|
if (!material) return;
|
||||||
|
|
||||||
|
invalidate();
|
||||||
|
|
||||||
if (material.map) material.map.offset.y += offset;
|
if (material.map) material.map.offset.y += offset;
|
||||||
if (material.aoMap) material.aoMap.offset.y += offset;
|
if (material.aoMap) material.aoMap.offset.y += offset;
|
||||||
if (material.normalMap) material.normalMap.offset.y += offset;
|
if (material.normalMap) material.normalMap.offset.y += offset;
|
||||||
|
|||||||
Reference in new issue
Block a user