Skip to content

Commit c85fa6e

Browse files
committed
fix: NodeMaterials, .temp() -> .toVar()
`.temp()` is deprecated in r170 See: mrdoob/three.js#29516 examples are working even in r167
1 parent 5a0baf9 commit c85fa6e

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

packages/three-vrm-materials-mtoon/src/nodes/MToonAnimatedUVNode.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,6 @@ export class MToonAnimatedUVNode extends THREE.TempNode {
4141
const scroll = THREE.vec2(refUVAnimationScrollXOffset, refUVAnimationScrollYOffset).mul(uvAnimationMask);
4242
uv = uv.add(scroll);
4343

44-
return uv.temp('AnimatedUV');
44+
return uv.toVar('AnimatedUV');
4545
}
4646
}
Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import * as THREE from 'three/webgpu';
22

3-
export const shadeColor = THREE.nodeImmutable(THREE.PropertyNode, 'vec3').temp('ShadeColor');
4-
export const shadingShift = THREE.nodeImmutable(THREE.PropertyNode, 'float').temp('ShadingShift');
5-
export const shadingToony = THREE.nodeImmutable(THREE.PropertyNode, 'float').temp('ShadingToony');
6-
export const rimLightingMix = THREE.nodeImmutable(THREE.PropertyNode, 'float').temp('RimLightingMix');
7-
export const rimMultiply = THREE.nodeImmutable(THREE.PropertyNode, 'vec3').temp('RimMultiply');
8-
export const matcap = THREE.nodeImmutable(THREE.PropertyNode, 'vec3').temp('matcap');
9-
export const parametricRim = THREE.nodeImmutable(THREE.PropertyNode, 'vec3').temp('ParametricRim');
3+
export const shadeColor = THREE.nodeImmutable(THREE.PropertyNode, 'vec3').toVar('ShadeColor');
4+
export const shadingShift = THREE.nodeImmutable(THREE.PropertyNode, 'float').toVar('ShadingShift');
5+
export const shadingToony = THREE.nodeImmutable(THREE.PropertyNode, 'float').toVar('ShadingToony');
6+
export const rimLightingMix = THREE.nodeImmutable(THREE.PropertyNode, 'float').toVar('RimLightingMix');
7+
export const rimMultiply = THREE.nodeImmutable(THREE.PropertyNode, 'vec3').toVar('RimMultiply');
8+
export const matcap = THREE.nodeImmutable(THREE.PropertyNode, 'vec3').toVar('matcap');
9+
export const parametricRim = THREE.nodeImmutable(THREE.PropertyNode, 'vec3').toVar('ParametricRim');

0 commit comments

Comments
 (0)