simulationjsv2 0.10.3 → 0.10.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/TODO.md +1 -0
- package/dist/graphics.d.ts +1 -0
- package/dist/graphics.js +8 -0
- package/dist/simulation.d.ts +1 -0
- package/dist/simulation.js +6 -0
- package/package.json +1 -1
package/TODO.md
CHANGED
package/dist/graphics.d.ts
CHANGED
package/dist/graphics.js
CHANGED
|
@@ -44,7 +44,13 @@ export class SimulationElement3d {
|
|
|
44
44
|
this.cullMode = 'none';
|
|
45
45
|
this.id = null;
|
|
46
46
|
}
|
|
47
|
+
emptyShallow() {
|
|
48
|
+
this.children = [];
|
|
49
|
+
}
|
|
47
50
|
empty() {
|
|
51
|
+
for (let i = 0; i < this.children.length; i++) {
|
|
52
|
+
this.children[i].empty();
|
|
53
|
+
}
|
|
48
54
|
this.children = [];
|
|
49
55
|
}
|
|
50
56
|
getId() {
|
|
@@ -112,11 +118,13 @@ export class SimulationElement3d {
|
|
|
112
118
|
this.geometry.setSubdivisions(divisions, vertexLimit);
|
|
113
119
|
this.vertexCache.updated();
|
|
114
120
|
this.geometry.compute();
|
|
121
|
+
this.geometry.triangulate();
|
|
115
122
|
}
|
|
116
123
|
clearSubdivisions() {
|
|
117
124
|
this.geometry.clearSubdivisions();
|
|
118
125
|
this.vertexCache.updated();
|
|
119
126
|
this.geometry.compute();
|
|
127
|
+
this.geometry.triangulate();
|
|
120
128
|
}
|
|
121
129
|
setSubdivisionVertexLimit(limit) {
|
|
122
130
|
this.geometry.setSubdivisionVertexLimit(limit);
|
package/dist/simulation.d.ts
CHANGED
|
@@ -45,6 +45,7 @@ export declare class Simulation extends Settings {
|
|
|
45
45
|
add(el: SimulationElement3d, id?: string): void;
|
|
46
46
|
remove(el: SimulationElement3d): void;
|
|
47
47
|
removeId(id: string): void;
|
|
48
|
+
empty(): void;
|
|
48
49
|
private applyCanvasSize;
|
|
49
50
|
setCanvasSize(width: number, height: number): void;
|
|
50
51
|
start(): void;
|
package/dist/simulation.js
CHANGED
|
@@ -214,6 +214,12 @@ export class Simulation extends Settings {
|
|
|
214
214
|
removeId(id) {
|
|
215
215
|
removeSceneId(this.scene, id);
|
|
216
216
|
}
|
|
217
|
+
empty() {
|
|
218
|
+
for (let i = 0; i < this.scene.length; i++) {
|
|
219
|
+
this.scene[i].empty();
|
|
220
|
+
}
|
|
221
|
+
this.scene = [];
|
|
222
|
+
}
|
|
217
223
|
applyCanvasSize(width, height) {
|
|
218
224
|
if (this.canvasRef === null)
|
|
219
225
|
return;
|