@jdultra/threedtiles 14.0.18 → 14.0.20
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/dist/simulation/ColliderShape.d.ts +112 -0
- package/dist/simulation/physics.d.ts +157 -0
- package/dist/simulation/physicsRapier.worker.d.ts +1 -0
- package/dist/threedtiles.cjs.js +54 -56
- package/dist/threedtiles.cjs.js.map +1 -1
- package/dist/threedtiles.es.js +4222 -4108
- package/dist/threedtiles.es.js.map +1 -1
- package/dist/threedtiles.umd.js +54 -56
- package/dist/threedtiles.umd.js.map +1 -1
- package/dist/tileset/OGC3DTile.d.ts +23 -0
- package/package.json +5 -2
- package/dist/geometry/obb copy.d.ts +0 -16
|
@@ -46,6 +46,13 @@ export class OGC3DTile extends THREE.Object3D<THREE.Object3DEventMap> {
|
|
|
46
46
|
* @param {number} [properties.splatsSaturation = 1.0] - optional saturation multiplier. Typical useful range: 0.0 → 2.0 (1.0 = unchanged).
|
|
47
47
|
* @param {number} [properties.splatsContrast = 1.0] - optional contrast multiplier. Typical useful range: 0.0 → 2.0 (1.0 = unchanged).
|
|
48
48
|
* @param {Array|Object} [properties.splatsTempTint = [0.0, 0.0]] - optional temperature and tint pair for simple white-balance adjustment. Values: temperature ∈ [-100,100], tint ∈ [-100,100]. Default [0,0].
|
|
49
|
+
* @param {Object} [options.physics.sim = undefined] - physics sim helper {@link physics.js}
|
|
50
|
+
* @param {String} [options.physics.type = fixed] - type: 'dynamic' | 'kinematic' | 'fixed' (default 'fixed')
|
|
51
|
+
* @param {String} [options.physics.shape = none] - collider shape: none, mesh, bounds
|
|
52
|
+
* @param {number} [options.physics.mass = 1] - mass
|
|
53
|
+
* @param {number} [options.physics.maxLOD = infinity] - max LOD for constructing colliders. Higher is more accurate and more costly. Only the currently loaded LODs are used.
|
|
54
|
+
* @param {Array|Vector3} [options.physics.velocity = [0,0,0]] - velocity vector
|
|
55
|
+
* @param {Array|Vector3} [options.physics.angularVelocity = [0,0,0]] - angular velocity
|
|
49
56
|
*/
|
|
50
57
|
constructor(properties?: {
|
|
51
58
|
url?: string | undefined;
|
|
@@ -85,6 +92,7 @@ export class OGC3DTile extends THREE.Object3D<THREE.Object3DEventMap> {
|
|
|
85
92
|
splatsContrast?: number | undefined;
|
|
86
93
|
splatsTempTint?: Object | any[] | undefined;
|
|
87
94
|
});
|
|
95
|
+
physics: any;
|
|
88
96
|
splatsMesh: any;
|
|
89
97
|
oldUltraMeshSplats: any;
|
|
90
98
|
iosCompatibility: any;
|
|
@@ -243,6 +251,21 @@ export class OGC3DTile extends THREE.Object3D<THREE.Object3DEventMap> {
|
|
|
243
251
|
_isReady(): boolean;
|
|
244
252
|
_isReadyImmediate(): boolean;
|
|
245
253
|
_changeContentVisibility(visibility: any): void;
|
|
254
|
+
/**
|
|
255
|
+
* Set the world-space pose of this tileset.
|
|
256
|
+
*
|
|
257
|
+
* IMPORTANT: When a physics simulation is attached (this.physics && this.physics.sim && this.physics.rigidBodyID),
|
|
258
|
+
* you MUST use this method to transform the object. Do NOT modify transforms using THREE.Object3D core methods
|
|
259
|
+
* (e.g. position.set, quaternion.set, applyQuaternion, setRotationFromEuler, etc.) because the physics engine
|
|
260
|
+
* is authoritative for the object's transform. This method keeps the physics rigid body in sync and updates colliders.
|
|
261
|
+
*
|
|
262
|
+
* @param {THREE.Vector3} position - New world-space position. Must be an instance of THREE.Vector3.
|
|
263
|
+
* @param {THREE.Euler|THREE.Quaternion} rotation - Rotation can be either a THREE.Euler or a THREE.Quaternion.
|
|
264
|
+
* @param {THREE.Vector3} scale - New scale. Must be an instance of THREE.Vector3.
|
|
265
|
+
* @throws {TypeError} If position or scale are not THREE.Vector3, or if rotation is not THREE.Euler/THREE.Quaternion.
|
|
266
|
+
*/
|
|
267
|
+
setPose(position: THREE.Vector3, rotation: THREE.Euler | THREE.Quaternion, scale: THREE.Vector3): void;
|
|
268
|
+
_updateCollider(): void;
|
|
246
269
|
_calculateUpdateMetric(camera: any, frustum: any): number;
|
|
247
270
|
_getSiblings(): any[];
|
|
248
271
|
_calculateDistanceToCamera(camera: any): number;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jdultra/threedtiles",
|
|
3
|
-
"version": "14.0.
|
|
3
|
+
"version": "14.0.20",
|
|
4
4
|
"author": "Emeric Beaufays",
|
|
5
5
|
"description": "An OGC 3DTiles viewer for Three.js",
|
|
6
6
|
"main": "dist/threedtiles.cjs.js",
|
|
@@ -32,6 +32,7 @@
|
|
|
32
32
|
"three": "^0.180.0"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
+
"@dimforge/rapier3d-compat": "^0.19.2",
|
|
35
36
|
"@haragei/dag": "^1.1.0",
|
|
36
37
|
"@spz-loader/core": "^0.3.0",
|
|
37
38
|
"data-structure-typed": "^2.0.4",
|
|
@@ -56,6 +57,8 @@
|
|
|
56
57
|
"typescript": "^5.9.2",
|
|
57
58
|
"vite": "^7.1.6",
|
|
58
59
|
"vite-plugin-static-copy": "^3.1.0",
|
|
59
|
-
"vitest": "^3.2.4"
|
|
60
|
+
"vitest": "^3.2.4",
|
|
61
|
+
"vite-plugin-top-level-await": "^1.3.0",
|
|
62
|
+
"vite-plugin-wasm": "^3.2.1"
|
|
60
63
|
}
|
|
61
64
|
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
export class OBB {
|
|
2
|
-
constructor(values: any);
|
|
3
|
-
center: Vector3;
|
|
4
|
-
halfWidth: number;
|
|
5
|
-
halfHeight: number;
|
|
6
|
-
halfDepth: number;
|
|
7
|
-
aabb: Box3;
|
|
8
|
-
sphere: Sphere;
|
|
9
|
-
matrixToOBBCoordinateSystem: Matrix3;
|
|
10
|
-
inFrustum(frustum: any): any;
|
|
11
|
-
distanceToPoint(point: any): number;
|
|
12
|
-
}
|
|
13
|
-
import { Vector3 } from "three";
|
|
14
|
-
import { Box3 } from "three";
|
|
15
|
-
import { Sphere } from "three";
|
|
16
|
-
import { Matrix3 } from "three";
|