mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-24 03:59:50 +02:00
Merge pull request #356 from Hitjack007/track-texture-scroll-rates
This commit is contained in:
1 file changed
+11
-5
+11
-5
@@ -51,11 +51,17 @@ export function TankModel() {
|
|||||||
|
|
||||||
invalidate();
|
invalidate();
|
||||||
|
|
||||||
if (material.map) material.map.offset.y += offset;
|
const textures = new Set([
|
||||||
if (material.aoMap) material.aoMap.offset.y += offset;
|
material.map,
|
||||||
if (material.normalMap) material.normalMap.offset.y += offset;
|
material.aoMap,
|
||||||
if (material.roughnessMap) material.roughnessMap.offset.y += offset;
|
material.normalMap,
|
||||||
if (material.metalnessMap) material.metalnessMap.offset.y += offset;
|
material.roughnessMap,
|
||||||
|
material.metalnessMap,
|
||||||
|
]);
|
||||||
|
|
||||||
|
for (const texture of textures) {
|
||||||
|
if (texture) texture.offset.y += offset;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function onPointerDown(event: ThreeEvent<PointerEvent>) {
|
function onPointerDown(event: ThreeEvent<PointerEvent>) {
|
||||||
|
|||||||
Reference in new issue
Block a user