Textures by default initiate with wrapS
and wrapT
set to THREE.ClampToEdgeWrapping
. Is there an easy way to override these defaults for all loaded textures so they’re all set to RepeatWrapping
without manually updating each one? I’m loading several textures per material with this convenient short-hand where TextureLoader.load()
returns the desired texture:
uNormalMap: { value: texLoader.load("denim-normals.png") },
uDiffuseMap: { value: texLoader.load("denim-diffuse.png") },
uAlphaMap: { value: texLoader.load("denim-alpha.png") },
However, if I have to set each wrapping value with
texture.wrapS = texture.wrapT = THREE.RepeatWrapping
… then the shorthand is no longer possible. Is there a way to override these defaults? I know Loader
has .setPath()
to avoid repetition, so I was wondering if there was something similar like .setDefaults()
or something like that.