Merge pull request !245 from ChenX/up_package
pull/245/MERGE
ChenX 6 years ago
parent dbc52e9017
commit cbceac90e9

1
.gitignore vendored

@ -60,3 +60,4 @@ typings/
#custom
.vscode
/dist*
/package-lock.json

11048
package-lock.json generated

File diff suppressed because it is too large Load Diff

@ -23,20 +23,20 @@
"@types/dat-gui": "^0.6.3",
"@types/hard-source-webpack-plugin": "^1.0.0",
"@types/html-webpack-plugin": "^3.2.0",
"@types/jest": "^23.3.11",
"@types/node": "^10.12.12",
"@types/react": "^16.7.13",
"@types/jest": "^24.0.0",
"@types/node": "^10.12.24",
"@types/react": "^16.8.2",
"@types/react-color": "^2.14.0",
"@types/react-dom": "^16.0.11",
"@types/react-dom": "^16.8.0",
"@types/stats.js": "^0.17.0",
"@types/three": "^0.93.15",
"@types/webpack": "^4.4.21",
"@types/webpack-dev-server": "^3.1.1",
"@types/webpack-env": "^1.13.6",
"@types/webpack": "^4.4.24",
"@types/webpack-dev-server": "^3.1.2",
"@types/webpack-env": "^1.13.7",
"@types/webpack-merge": "^4.1.3",
"add-asset-html-webpack-plugin": "^3.1.2",
"cache-loader": "^2.0.0",
"clean-webpack-plugin": "^1.0.0",
"add-asset-html-webpack-plugin": "^3.1.3",
"cache-loader": "^2.0.1",
"clean-webpack-plugin": "^1.0.1",
"cross-env": "^5.2.0",
"css-loader": "^2.0.0",
"extract-text-webpack-plugin": "^3.0.2",
@ -46,42 +46,42 @@
"hard-source-webpack-plugin": "https://github.com/FishOrBear/hard-source-webpack-plugin",
"html-loader": "^0.5.5",
"html-webpack-plugin": "^3.2.0",
"jest": "^23.5.0",
"jest": "^23.6.0",
"less": "^3.9.0",
"less-loader": "^4.1.0",
"mobx-react-devtools": "^6.0.3",
"react-hot-loader": "^4.6.3",
"react-hot-loader": "^4.6.5",
"request": "^2.88.0",
"request-promise-native": "^1.0.5",
"required-loader": "^1.3.16",
"shader-loader": "^1.3.1",
"source-map-loader": "^0.2.4",
"style-loader": "^0.23.1",
"terser-webpack-plugin": "^1.2.1",
"terser-webpack-plugin": "^1.2.2",
"ts-jest": "^23.10.5",
"ts-loader": "^5.3.2",
"ts-node": "^7.0.1",
"tsconfig-paths": "^3.7.0",
"typescript": "^3.2.2",
"ts-loader": "^5.3.3",
"ts-node": "^8.0.2",
"tsconfig-paths": "^3.8.0",
"typescript": "^3.3.3",
"url-loader": "^1.1.2",
"wallaby-webpack": "^3.9.13",
"webpack": "^4.28.3",
"webpack-cli": "^3.1.2",
"webpack": "^4.29.3",
"webpack-cli": "^3.2.3",
"webpack-dev-server": "^3.1.14",
"webpack-merge": "^4.1.5"
"webpack-merge": "^4.2.1"
},
"dependencies": {
"@blueprintjs/core": "^3.10.0",
"@blueprintjs/core": "^3.13.0",
"blueimp-md5": "^2.10.0",
"dat.gui": "^0.7.3",
"dat.gui": "^0.7.5",
"golden-layout": "^1.5.9",
"mobx": "^5.7.0",
"mobx": "^5.9.0",
"mobx-react": "^5.4.3",
"react": "^16.7.0",
"react": "^16.8.1",
"react-color": "^2.17.0",
"react-dom": "^16.7.0",
"react-dom": "^16.8.1",
"stats.js": "^0.17.0",
"three": "^0.100.0",
"three": "^0.101.1",
"xaop": "^1.3.2"
},
"jest": {

@ -1,6 +1,5 @@
import { Vector3 } from "three";
import { app } from "../ApplicationServices/Application";
import { Singleton } from "../Common/Singleton";
import { CADFiler } from "../DatabaseServices/CADFiler";
import { Database } from "../DatabaseServices/Database";
import { Entity } from "../DatabaseServices/Entity";
@ -51,7 +50,7 @@ export class Command_Insert implements Command
let ptRes = await app.m_Editor.GetPoint(
{
Msg: "请点击移动终点:",
Callback: (p: THREE.Vector3) =>
Callback: (p: Vector3) =>
{
let moveMatrix = MoveMatrix(p.clone().sub(ptLast));
ensClone.forEach(e => e.ApplyMatrix(moveMatrix));

@ -1,4 +1,4 @@
import { Box3, ExtrudeGeometry, ExtrudeGeometryOptions, Geometry, Matrix3, Matrix4, Mesh, Object3D, Vector3, MeshPhysicalMaterial } from "three";
import { Box3, ExtrudeGeometry, ExtrudeGeometryOptions, Geometry, Matrix3, Matrix4, Mesh, Object3D, Vector3 } from "three";
import { arrayClone, arrayRemoveIf, arraySortByNumber } from "../Common/ArrayExt";
import { Status, UpdateDraw } from "../Common/Status";
import { ObjectSnapMode } from "../Editor/ObjectSnapMode";

@ -1,4 +1,4 @@
import { Vector3 } from "three";
import { Vector3, LineSegments } from "three";
import { isNumber, isArray } from "util";
import * as THREE from 'three';
@ -214,7 +214,7 @@ class OctreeNode
// store or create tree
if (parameters.tree instanceof THREE.Octree)
if (parameters.tree instanceof Octree)
{
this.tree = parameters.tree;
@ -224,14 +224,14 @@ class OctreeNode
parameters.root = this;
this.tree = new THREE.Octree(parameters);
this.tree = new Octree(parameters);
}
// basic properties
this.id = this.tree.nodeCount++;
this.position = parameters.position instanceof THREE.Vector3 ? parameters.position : new THREE.Vector3();
this.position = parameters.position instanceof Vector3 ? parameters.position : new Vector3();
this.radius = parameters.radius > 0 ? parameters.radius : 1;
this.indexOctant = parameters.indexOctant;
this.depth = 0;
@ -257,7 +257,7 @@ class OctreeNode
if (this.tree.scene)
{
this.visual = new THREE.LineSegments(this.tree.visualGeometry, this.tree.visualMaterial);
this.visual = new LineSegments(this.tree.visualGeometry, this.tree.visualMaterial);
this.visual.scale.set(this.radiusOverlap * 2, this.radiusOverlap * 2, this.radiusOverlap * 2);
this.visual.position.copy(this.position);
this.tree.scene.add(this.visual);

@ -1,5 +1,5 @@
import { autorun, observable } from "mobx";
import { Vector3, Light as TLg } from 'three';
import { Vector3, Light as TLight, Mesh, MeshPhysicalMaterial } from 'three';
import { app } from "../../ApplicationServices/Application";
import { AmbientLight } from "../../DatabaseServices/Lights/AmbientLight";
import { DirectionalLight } from "../../DatabaseServices/Lights/DirectionalLight";
@ -120,7 +120,7 @@ export class LightStore
if (obj.visible && obj.userData && obj.userData.Entity instanceof Board)
{
obj.receiveShadow = isShow;
((obj as THREE.Mesh).material as THREE.MeshPhysicalMaterial).needsUpdate = true;
((obj as Mesh).material as MeshPhysicalMaterial).needsUpdate = true;
}
})
app.m_Editor.UpdateScreen();
@ -129,12 +129,12 @@ export class LightStore
{
if (!window.confirm("确定清除掉全部场景内的灯"))
return;
let lights: TLg[] = [];
let lights: TLight[] = [];
app.m_Viewer.Scene.traverse(obj =>
{
if (obj.userData && obj.userData.Entity instanceof Light)
{
lights.push(obj as TLg);
lights.push(obj as TLight);
}
})
app.m_Viewer.Scene.remove(...lights);

Loading…
Cancel
Save