@mml-io/3d-web-client-core 0.21.6 → 0.23.0
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/build/camera/CameraManager.d.ts +7 -4
- package/build/character/Character.d.ts +25 -9
- package/build/character/CharacterManager.d.ts +79 -15
- package/build/character/CharacterModel.d.ts +12 -8
- package/build/character/CharacterState.d.ts +0 -10
- package/build/character/CharacterTooltip.d.ts +1 -0
- package/build/character/LocalController.d.ts +25 -15
- package/build/character/LowPolyModel.d.ts +1 -0
- package/build/character/RemoteController.d.ts +5 -5
- package/build/character/Spawning.d.ts +8 -0
- package/build/character/instancing/CharacterColourSamplingUtils.d.ts +14 -0
- package/build/character/instancing/CharacterInstances.d.ts +92 -0
- package/build/character/instancing/CharacterInstancingAnimationUtils.d.ts +7 -0
- package/build/character/instancing/CharacterInstancingUtils.d.ts +3 -0
- package/build/character/instancing/vendor/core/InstancedEntity.d.ts +191 -0
- package/build/character/instancing/vendor/core/InstancedMesh2.d.ts +361 -0
- package/build/character/instancing/vendor/core/InstancedMeshBVH.d.ts +145 -0
- package/build/character/instancing/vendor/core/feature/Capacity.d.ts +13 -0
- package/build/character/instancing/vendor/core/feature/FrustumCulling.d.ts +37 -0
- package/build/character/instancing/vendor/core/feature/Instances.d.ts +49 -0
- package/build/character/instancing/vendor/core/feature/LOD.d.ts +89 -0
- package/build/character/instancing/vendor/core/feature/Morph.d.ts +18 -0
- package/build/character/instancing/vendor/core/feature/Raycasting.d.ts +7 -0
- package/build/character/instancing/vendor/core/feature/Skeleton.d.ts +19 -0
- package/build/character/instancing/vendor/core/feature/Uniforms.d.ts +42 -0
- package/build/character/instancing/vendor/core/utils/GLInstancedBufferAttribute.d.ts +42 -0
- package/build/character/instancing/vendor/core/utils/InstancedRenderList.d.ts +25 -0
- package/build/character/instancing/vendor/core/utils/SquareDataTexture.d.ts +156 -0
- package/build/character/instancing/vendor/index.d.ts +25 -0
- package/build/character/instancing/vendor/shaders/ShaderChunk.d.ts +1 -0
- package/build/character/instancing/vendor/shaders/chunks/instanced_color_pars_vertex.d.ts +1 -0
- package/build/character/instancing/vendor/shaders/chunks/instanced_color_vertex.d.ts +1 -0
- package/build/character/instancing/vendor/shaders/chunks/instanced_material_color_pars_vertex.d.ts +1 -0
- package/build/character/instancing/vendor/shaders/chunks/instanced_material_color_vertex.d.ts +1 -0
- package/build/character/instancing/vendor/shaders/chunks/instanced_pars_vertex.d.ts +1 -0
- package/build/character/instancing/vendor/shaders/chunks/instanced_skinning_pars_vertex.d.ts +1 -0
- package/build/character/instancing/vendor/shaders/chunks/instanced_vertex.d.ts +1 -0
- package/build/character/instancing/vendor/utils/CreateFrom.d.ts +9 -0
- package/build/character/instancing/vendor/utils/SortingUtils.d.ts +16 -0
- package/build/character/loading/CharacterModelLoader.d.ts +11 -0
- package/build/character/loading/GLTFLoadingWorker.worker.d.ts +2 -0
- package/build/character/loading/GLTFLoadingWorkerBrowserCache.d.ts +8 -0
- package/build/character/loading/GLTFLoadingWorkerPool.d.ts +22 -0
- package/build/character/loading/GLTFLoadingWorkerTypes.d.ts +18 -0
- package/build/character/url-position.d.ts +7 -5
- package/build/collisions/CollisionsManager.d.ts +13 -8
- package/build/helpers/math-helpers.d.ts +3 -3
- package/build/index.d.ts +6 -3
- package/build/index.js +10822 -4088
- package/build/index.js.map +4 -4
- package/build/input/KeyInputManager.d.ts +1 -0
- package/build/math/Box.d.ts +16 -0
- package/build/math/EulXYZ.d.ts +24 -0
- package/build/math/Line.d.ts +19 -0
- package/build/math/Matr4.d.ts +77 -0
- package/build/math/Quat.d.ts +57 -0
- package/build/math/Ray.d.ts +15 -0
- package/build/math/Vect3.d.ts +45 -0
- package/build/math/index.d.ts +8 -0
- package/build/math/radToDeg.d.ts +2 -0
- package/build/mml/MMLCompositionScene.d.ts +1 -1
- package/build/rendering/PostProcessingManager.d.ts +92 -0
- package/build/rendering/composer.d.ts +27 -25
- package/build/time/TimeManager.d.ts +2 -1
- package/build/tweakpane/TweakPane.d.ts +10 -5
- package/build/tweakpane/blades/{bcsFolder.d.ts → effects/bcsFolder.d.ts} +2 -2
- package/build/tweakpane/blades/effects/bloomAndGrain.d.ts +12 -0
- package/build/tweakpane/blades/{ssaoFolder.d.ts → effects/ssaoFolder.d.ts} +6 -31
- package/build/tweakpane/blades/{toneMappingFolder.d.ts → effects/toneMappingFolder.d.ts} +1 -1
- package/build/tweakpane/blades/environmentFolder.d.ts +6 -3
- package/build/tweakpane/blades/postProcessingFolder.d.ts +31 -0
- package/build/tweakpane/blades/rendererFolder.d.ts +1 -1
- package/build/tweakpane/blades/rendererStatsFolder.d.ts +0 -2
- package/package.json +16 -11
- package/build/character/CharacterModelLoader.d.ts +0 -11
- package/build/character/CharacterSpeakingIndicator.d.ts +0 -17
- package/build/tweakpane/blades/postExtrasFolder.d.ts +0 -12
@@ -0,0 +1,18 @@
|
|
1
|
+
export type GLTFWorkerRequest = {
|
2
|
+
id: string;
|
3
|
+
} & ({
|
4
|
+
type: "load-gltf";
|
5
|
+
fileUrl: string;
|
6
|
+
maxTextureSize: number;
|
7
|
+
} | {
|
8
|
+
type: "cancel-load-gltf";
|
9
|
+
});
|
10
|
+
export type GLTFWorkerResponse = {
|
11
|
+
id: string;
|
12
|
+
} & ({
|
13
|
+
type: "success";
|
14
|
+
gltfBuffer: Uint8Array;
|
15
|
+
} | {
|
16
|
+
type: "error";
|
17
|
+
error: string;
|
18
|
+
});
|
@@ -1,12 +1,14 @@
|
|
1
|
-
import { Object3D
|
1
|
+
import { Object3D } from "three";
|
2
|
+
import { Quat } from "../math/Quat";
|
3
|
+
import { Vect3 } from "../math/Vect3";
|
2
4
|
export declare function encodeCharacterAndCamera(character: Object3D, camera: Object3D): string;
|
3
5
|
export declare function decodeCharacterAndCamera(hash: string): {
|
4
6
|
character: {
|
5
|
-
position:
|
6
|
-
quaternion:
|
7
|
+
position: Vect3;
|
8
|
+
quaternion: Quat;
|
7
9
|
};
|
8
10
|
camera: {
|
9
|
-
position:
|
10
|
-
quaternion:
|
11
|
+
position: Vect3;
|
12
|
+
quaternion: Quat;
|
11
13
|
};
|
12
14
|
};
|
@@ -1,8 +1,12 @@
|
|
1
1
|
import { MElement } from "@mml-io/mml-web";
|
2
|
-
import { Group,
|
2
|
+
import { Group, Scene } from "three";
|
3
3
|
import { MeshBVH } from "three-mesh-bvh";
|
4
|
+
import { Line } from "../math/Line";
|
5
|
+
import { Matr4 } from "../math/Matr4";
|
6
|
+
import { Ray } from "../math/Ray";
|
7
|
+
import { Vect3 } from "../math/Vect3";
|
4
8
|
export type CollisionMeshState = {
|
5
|
-
matrix:
|
9
|
+
matrix: Matr4;
|
6
10
|
source: Group;
|
7
11
|
meshBVH: MeshBVH;
|
8
12
|
debugGroup?: Group;
|
@@ -13,24 +17,25 @@ export declare class CollisionsManager {
|
|
13
17
|
private scene;
|
14
18
|
private tempVector;
|
15
19
|
private tempVector2;
|
16
|
-
private
|
17
|
-
private
|
20
|
+
private tempVect3;
|
21
|
+
private tempQuat;
|
18
22
|
private tempRay;
|
19
23
|
private tempMatrix;
|
20
|
-
private
|
24
|
+
private tempMatrixThree;
|
25
|
+
private tempMatrix2Three;
|
21
26
|
private tempBox;
|
22
|
-
private
|
27
|
+
private tempEulXYZ;
|
23
28
|
private tempSegment;
|
24
29
|
private tempSegment2;
|
25
30
|
collisionMeshState: Map<Group, CollisionMeshState>;
|
26
31
|
private collisionTrigger;
|
27
32
|
private previouslyCollidingElements;
|
28
33
|
constructor(scene: Scene);
|
29
|
-
raycastFirst(ray: Ray, maximumDistance?: number | null): [number,
|
34
|
+
raycastFirst(ray: Ray, maximumDistance?: number | null): [number, Vect3, CollisionMeshState, Vect3] | null;
|
30
35
|
private createCollisionMeshState;
|
31
36
|
addMeshesGroup(group: Group, mElement?: MElement): void;
|
32
37
|
updateMeshesGroup(group: Group): void;
|
33
38
|
removeMeshesGroup(group: Group): void;
|
34
39
|
private applyCollider;
|
35
|
-
applyColliders(tempSegment:
|
40
|
+
applyColliders(tempSegment: Line, radius: number): void;
|
36
41
|
}
|
@@ -1,7 +1,7 @@
|
|
1
|
-
import {
|
1
|
+
import { Quat, Vect3 } from "../math";
|
2
2
|
export declare const roundToDecimalPlaces: (value: number, decimalPlaces: number) => number;
|
3
|
-
export declare const toArray: (origin:
|
4
|
-
export declare const getSpawnPositionInsideCircle: (radius: number, positions: number, id: number, yPos?: number) =>
|
3
|
+
export declare const toArray: (origin: Vect3 | Quat, precision?: number) => number[];
|
4
|
+
export declare const getSpawnPositionInsideCircle: (radius: number, positions: number, id: number, yPos?: number) => Vect3;
|
5
5
|
export declare const round: (n: number, digits: number) => number;
|
6
6
|
export declare const ease: (target: number, n: number, factor: number) => number;
|
7
7
|
export declare function clamp(value: number, min: number, max: number): number;
|
package/build/index.d.ts
CHANGED
@@ -1,9 +1,11 @@
|
|
1
1
|
export { CameraManager } from "./camera/CameraManager";
|
2
|
-
export { CharacterDescription, AnimationConfig } from "./character/Character";
|
3
|
-
export { CharacterManager } from "./character/CharacterManager";
|
2
|
+
export { CharacterDescription, AnimationConfig, LoadedAnimations, Character, } from "./character/Character";
|
3
|
+
export { CharacterManager, SpawnConfiguration, SpawnConfigurationState, } from "./character/CharacterManager";
|
4
|
+
export * from "./character/Spawning";
|
4
5
|
export * from "./character/url-position";
|
5
6
|
export * from "./helpers/math-helpers";
|
6
|
-
export { CharacterModelLoader } from "./character/CharacterModelLoader";
|
7
|
+
export { CharacterModelLoader } from "./character/loading/CharacterModelLoader";
|
8
|
+
export { TextureWorkerPool } from "./character/loading/GLTFLoadingWorkerPool";
|
7
9
|
export { CharacterState, AnimationState } from "./character/CharacterState";
|
8
10
|
export { Key, KeyInputManager } from "./input/KeyInputManager";
|
9
11
|
export { VirtualJoystick } from "./input/VirtualJoystick";
|
@@ -17,3 +19,4 @@ export { GroundPlane } from "./ground-plane/GroundPlane";
|
|
17
19
|
export { LoadingScreenConfig, LoadingScreen } from "./loading-screen/LoadingScreen";
|
18
20
|
export { ErrorScreen } from "./error-screen/ErrorScreen";
|
19
21
|
export { EnvironmentConfiguration } from "./rendering/composer";
|
22
|
+
export * from "./math";
|