|
|
|
@ -51,7 +51,7 @@ export class BabylonTool {
|
|
|
|
|
static getWorldPosition(mesh: AbstractMesh): Vector3 { |
|
|
|
|
let result = mesh.position; |
|
|
|
|
if (mesh.parent != null) { |
|
|
|
|
result = mesh.absolutePosition; |
|
|
|
|
result = mesh.getAbsolutePosition(); |
|
|
|
|
} |
|
|
|
|
return result.clone(); |
|
|
|
|
} |
|
|
|
@ -436,8 +436,6 @@ export class BabylonTool {
|
|
|
|
|
public static limitPI(value: number) { |
|
|
|
|
let result = value; |
|
|
|
|
|
|
|
|
|
console.log("输入", result); |
|
|
|
|
|
|
|
|
|
while (result < - Math.PI) { |
|
|
|
|
result += Math.PI * 2; |
|
|
|
|
} |
|
|
|
@ -445,7 +443,6 @@ export class BabylonTool {
|
|
|
|
|
while (result > Math.PI * 2) { |
|
|
|
|
result -= Math.PI * 2; |
|
|
|
|
} |
|
|
|
|
console.log("输出", result); |
|
|
|
|
return result; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|