提交 31331a69 编写于 作者: M Mugen87

GLTFLoader: Add comments in computeBounds().

上级 4ef9e7fe
......@@ -2295,6 +2295,8 @@ THREE.GLTFLoader = ( function () {
var min = accessor.min;
var max = accessor.max;
// glTF requires 'min' and 'max', but VRM (which extends glTF) currently ignores that requirement.
if ( min !== undefined && max !== undefined ) {
box.set(
......@@ -2329,6 +2331,8 @@ THREE.GLTFLoader = ( function () {
var min = accessor.min;
var max = accessor.max;
// glTF requires 'min' and 'max', but VRM (which extends glTF) currently ignores that requirement.
if ( min !== undefined && max !== undefined ) {
// we need to get max of absolute components because target weight is [-1,1]
......
......@@ -2362,12 +2362,18 @@ var GLTFLoader = ( function () {
var min = accessor.min;
var max = accessor.max;
// glTF requires 'min' and 'max', but VRM (which extends glTF) currently ignores that requirement.
if ( min !== undefined && max !== undefined ) {
box.set(
new Vector3( min[ 0 ], min[ 1 ], min[ 2 ] ),
new Vector3( max[ 0 ], max[ 1 ], max[ 2 ] ) );
} else {
return;
}
} else {
......@@ -2392,6 +2398,8 @@ var GLTFLoader = ( function () {
var min = accessor.min;
var max = accessor.max;
// glTF requires 'min' and 'max', but VRM (which extends glTF) currently ignores that requirement.
if ( min !== undefined && max !== undefined ) {
// we need to get max of absolute components because target weight is [-1,1]
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册