修正z轴为空的时候 判断错误的问题.

This commit is contained in:
ChenX
2018-05-29 10:13:37 +08:00
parent 98cd31e18c
commit aed2217f2e
3 changed files with 3 additions and 3 deletions

2
dist/createBoard.js vendored
View File

@@ -83,7 +83,7 @@ function createBoard(boardData) {
if (boardPts && boardPts.length !== 0) if (boardPts && boardPts.length !== 0)
for (let i = 0; i < boardPts.length; i++) { for (let i = 0; i < boardPts.length; i++) {
let pt = getVec(boardPts[i]); let pt = getVec(boardPts[i]);
if (pt.z !== undefined) if (boardPts[i].z !== undefined)
pt.applyMatrix4(matInv); pt.applyMatrix4(matInv);
pts.push(new THREE.Vector2(pt.x, pt.y)); pts.push(new THREE.Vector2(pt.x, pt.y));
buls.push(boardBuls[i]); buls.push(boardBuls[i]);

File diff suppressed because one or more lines are too long

View File

@@ -105,7 +105,7 @@ export function createBoard(boardData: object)
for (let i = 0; i < boardPts.length; i++) for (let i = 0; i < boardPts.length; i++)
{ {
let pt = getVec(boardPts[i]); let pt = getVec(boardPts[i]);
if (pt.z !== undefined) if (boardPts[i].z !== undefined)
pt.applyMatrix4(matInv); pt.applyMatrix4(matInv);
pts.push(new THREE.Vector2(pt.x, pt.y)); pts.push(new THREE.Vector2(pt.x, pt.y));
buls.push(boardBuls[i]); buls.push(boardBuls[i]);