提交 b000372c 编写于 作者: D Don McCurdy

GLTFLoader: Keep uvScaleMap updates backwards-compatible.

上级 f17f5d9c
......@@ -760,18 +760,36 @@ THREE.GLTFLoader = ( function () {
}
if ( uvScaleMap.matrixAutoUpdate === true ) {
var offset;
var repeat;
var offset = uvScaleMap.offset;
var repeat = uvScaleMap.repeat;
var rotation = uvScaleMap.rotation;
var center = uvScaleMap.center;
if ( uvScaleMap.matrix !== undefined ) {
uvScaleMap.matrix.setUvTransform( offset.x, offset.y, repeat.x, repeat.y, rotation, center.x, center.y );
// > r88.
}
if ( uvScaleMap.matrixAutoUpdate === true ) {
offset = uvScaleMap.offset;
repeat = uvScaleMap.repeat;
var rotation = uvScaleMap.rotation;
var center = uvScaleMap.center;
uvScaleMap.matrix.setUvTransform( offset.x, offset.y, repeat.x, repeat.y, rotation, center.x, center.y );
}
uniforms.uvTransform.value.copy( uvScaleMap.matrix );
uniforms.uvTransform.value.copy( uvScaleMap.matrix );
} else {
// <= r87. Remove when reasonable.
offset = uvScaleMap.offset;
repeat = uvScaleMap.repeat;
uniforms.offsetRepeat.value.set( offset.x, offset.y, repeat.x, repeat.y );
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册