Hi all! I’ve been migrating an app that used r94 to r148. I do have this snippet of code that worked perfectly fine on the former version:
if ( texture.normal ) {
material.normalMap = loader.load( texture.normal.uri );
material.normalMap.wrapS = RepeatWrapping;
material.normalMap.wrapT = RepeatWrapping;
material.normalScale =
new Vector2(
texture.normal.normalScaleX,
texture.normal.normalScaleY
);
material
.normalMap
.repeat
.set(
length * texture.normal.lengthRepeatScale,
height * texture.normal.heightRepeatScale
);
}
But with the new version, it seems like the way data is handled has changed, so I get that the uniforms.normalMap property is undefined when trying to assign it the materials.normalMap property. The error comes from three.module.js itself. Any ideas on how to make this work on newer versions? Thanks in advance.