Merge branch 'master' of http://git.cf/cx/CADViewComponent
This commit is contained in:
commit
5fc8d4b0f4
15
.vscode/settings.json
vendored
15
.vscode/settings.json
vendored
@ -1,3 +1,16 @@
|
||||
// 将设置放入此文件中以覆盖默认值和用户设置。
|
||||
{
|
||||
"editor.formatOnSave": true
|
||||
"typescript.tsdk": "node_modules\\typescript\\lib",
|
||||
//格式化设置
|
||||
"editor.tabSize": 4,
|
||||
"editor.formatOnPaste": true,
|
||||
"editor.formatOnSave": true,
|
||||
//格式设置
|
||||
"typescript.format.placeOpenBraceOnNewLineForFunctions": true,
|
||||
"typescript.format.placeOpenBraceOnNewLineForControlBlocks": true,
|
||||
"typescript.referencesCodeLens.enabled": true,
|
||||
"javascript.format.placeOpenBraceOnNewLineForFunctions": true,
|
||||
"javascript.format.enable": true,
|
||||
"files.insertFinalNewline": true,
|
||||
"editor.detectIndentation": true,
|
||||
}
|
||||
|
4
dist/createBoard.js
vendored
4
dist/createBoard.js
vendored
@ -80,10 +80,10 @@ function createBoard(boardData) {
|
||||
boardMat.setPosition(pBase);
|
||||
matInv.getInverse(boardMat, true);
|
||||
}
|
||||
if (boardPts)
|
||||
if (boardPts && boardPts.length !== 0)
|
||||
for (let i = 0; i < boardPts.length; i++) {
|
||||
let pt = getVec(boardPts[i]);
|
||||
if (pt.z !== undefined)
|
||||
if (boardPts[i].z !== undefined)
|
||||
pt.applyMatrix4(matInv);
|
||||
pts.push(new THREE.Vector2(pt.x, pt.y));
|
||||
buls.push(boardBuls[i]);
|
||||
|
2
dist/createBoard.js.map
vendored
2
dist/createBoard.js.map
vendored
File diff suppressed because one or more lines are too long
@ -1,11 +1,13 @@
|
||||
{
|
||||
"name": "cadview",
|
||||
"version": "1.0.2",
|
||||
"version": "1.0.4",
|
||||
"description": "",
|
||||
"main": "dist/index.js",
|
||||
"types": "dist/index.d.ts",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"build": "tsc"
|
||||
"build": "tsc",
|
||||
"dev": "tsc -w"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
@ -101,11 +101,11 @@ export function createBoard(boardData: object)
|
||||
matInv.getInverse(boardMat, true);
|
||||
}
|
||||
|
||||
if (boardPts)
|
||||
if (boardPts && boardPts.length !== 0)
|
||||
for (let i = 0; i < boardPts.length; i++)
|
||||
{
|
||||
let pt = getVec(boardPts[i]);
|
||||
if (pt.z !== undefined)
|
||||
if (boardPts[i].z !== undefined)
|
||||
pt.applyMatrix4(matInv);
|
||||
pts.push(new THREE.Vector2(pt.x, pt.y));
|
||||
buls.push(boardBuls[i]);
|
||||
|
Loading…
Reference in New Issue
Block a user