Spaces:
Running
Running
Commit
•
18a4acc
1
Parent(s):
63b7260
fix download bug
Browse files- editor/src/DefaultMode.ts +1 -1
- editor/src/OrbitControls.ts +3 -3
- editor/src/SelectionManager.ts +1 -1
- editor/src/main.ts +2 -2
editor/src/DefaultMode.ts
CHANGED
@@ -44,7 +44,7 @@ class DefaultMode implements InputMode {
|
|
44 |
}
|
45 |
};
|
46 |
|
47 |
-
let mouseDownPosition: SPLAT.Vector3;
|
48 |
const handleMouseDown = () => {
|
49 |
mouseDownPosition = engine.mouseManager.currentMousePosition;
|
50 |
};
|
|
|
44 |
}
|
45 |
};
|
46 |
|
47 |
+
let mouseDownPosition: SPLAT.Vector3 = new SPLAT.Vector3();
|
48 |
const handleMouseDown = () => {
|
49 |
mouseDownPosition = engine.mouseManager.currentMousePosition;
|
50 |
};
|
editor/src/OrbitControls.ts
CHANGED
@@ -21,7 +21,7 @@ class OrbitControls {
|
|
21 |
alpha: number = 0.5,
|
22 |
beta: number = 0.5,
|
23 |
radius: number = 13,
|
24 |
-
inputTarget: SPLAT.Vector3 = new SPLAT.Vector3()
|
25 |
) {
|
26 |
let target = inputTarget.clone();
|
27 |
|
@@ -120,7 +120,7 @@ class OrbitControls {
|
|
120 |
desiredBeta += dy * this.orbitSpeed * 0.003;
|
121 |
desiredBeta = Math.min(
|
122 |
Math.max(desiredBeta, (this.minAngle * Math.PI) / 180),
|
123 |
-
(this.maxAngle * Math.PI) / 180
|
124 |
);
|
125 |
}
|
126 |
|
@@ -202,7 +202,7 @@ class OrbitControls {
|
|
202 |
desiredBeta += dy * this.orbitSpeed * 0.003;
|
203 |
desiredBeta = Math.min(
|
204 |
Math.max(desiredBeta, (this.minAngle * Math.PI) / 180),
|
205 |
-
(this.maxAngle * Math.PI) / 180
|
206 |
);
|
207 |
|
208 |
lastX = e.touches[0].clientX;
|
|
|
21 |
alpha: number = 0.5,
|
22 |
beta: number = 0.5,
|
23 |
radius: number = 13,
|
24 |
+
inputTarget: SPLAT.Vector3 = new SPLAT.Vector3(),
|
25 |
) {
|
26 |
let target = inputTarget.clone();
|
27 |
|
|
|
120 |
desiredBeta += dy * this.orbitSpeed * 0.003;
|
121 |
desiredBeta = Math.min(
|
122 |
Math.max(desiredBeta, (this.minAngle * Math.PI) / 180),
|
123 |
+
(this.maxAngle * Math.PI) / 180,
|
124 |
);
|
125 |
}
|
126 |
|
|
|
202 |
desiredBeta += dy * this.orbitSpeed * 0.003;
|
203 |
desiredBeta = Math.min(
|
204 |
Math.max(desiredBeta, (this.minAngle * Math.PI) / 180),
|
205 |
+
(this.maxAngle * Math.PI) / 180,
|
206 |
);
|
207 |
|
208 |
lastX = e.touches[0].clientX;
|
editor/src/SelectionManager.ts
CHANGED
@@ -3,7 +3,7 @@ import * as SPLAT from "gsplat";
|
|
3 |
class SelectionManager {
|
4 |
private static _instance: SelectionManager;
|
5 |
|
6 |
-
private static _selectedSplat: SPLAT.Splat | null;
|
7 |
|
8 |
public static get instance(): SelectionManager {
|
9 |
if (!SelectionManager._instance) {
|
|
|
3 |
class SelectionManager {
|
4 |
private static _instance: SelectionManager;
|
5 |
|
6 |
+
private static _selectedSplat: SPLAT.Splat | null = null;
|
7 |
|
8 |
public static get instance(): SelectionManager {
|
9 |
if (!SelectionManager._instance) {
|
editor/src/main.ts
CHANGED
@@ -42,7 +42,7 @@ async function selectFile(file: File) {
|
|
42 |
(progress: number) => {
|
43 |
progressIndicator.value = progress * 100;
|
44 |
},
|
45 |
-
format
|
46 |
);
|
47 |
progressDialog.close();
|
48 |
} else {
|
@@ -125,7 +125,7 @@ async function main() {
|
|
125 |
await SPLAT.PLYLoader.LoadAsync(
|
126 |
url,
|
127 |
engine.scene,
|
128 |
-
(progress) => (progressIndicator.value = progress * 100)
|
129 |
);
|
130 |
progressDialog.close();
|
131 |
} else {
|
|
|
42 |
(progress: number) => {
|
43 |
progressIndicator.value = progress * 100;
|
44 |
},
|
45 |
+
format,
|
46 |
);
|
47 |
progressDialog.close();
|
48 |
} else {
|
|
|
125 |
await SPLAT.PLYLoader.LoadAsync(
|
126 |
url,
|
127 |
engine.scene,
|
128 |
+
(progress) => (progressIndicator.value = progress * 100),
|
129 |
);
|
130 |
progressDialog.close();
|
131 |
} else {
|