@mml-io/3d-web-client-core 0.25.0 → 0.26.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 +45 -11
- package/build/camera/CameraManager.d.ts.map +1 -1
- package/build/character/AnimationMixer.d.ts +74 -0
- package/build/character/AnimationMixer.d.ts.map +1 -0
- package/build/character/CharacterManager.d.ts +28 -43
- package/build/character/CharacterManager.d.ts.map +1 -1
- package/build/character/LocalController.d.ts +10 -8
- package/build/character/LocalController.d.ts.map +1 -1
- package/build/character/RemoteController.d.ts +13 -10
- package/build/character/RemoteController.d.ts.map +1 -1
- package/build/character/types.d.ts +8 -0
- package/build/character/types.d.ts.map +1 -0
- package/build/character/url-position.d.ts +8 -3
- package/build/character/url-position.d.ts.map +1 -1
- package/build/collisions/CollisionsManager.d.ts +19 -16
- package/build/collisions/CollisionsManager.d.ts.map +1 -1
- package/build/collisions/getRelativePositionAndRotationRelativeToObject.d.ts +2 -2
- package/build/collisions/getRelativePositionAndRotationRelativeToObject.d.ts.map +1 -1
- package/build/index.d.ts +7 -11
- package/build/index.d.ts.map +1 -1
- package/build/index.js +2213 -11798
- package/build/index.js.map +4 -4
- package/build/math/EulXYZ.d.ts +6 -1
- package/build/math/EulXYZ.d.ts.map +1 -1
- package/build/math/Matr4.d.ts +3 -2
- package/build/math/Matr4.d.ts.map +1 -1
- package/build/math/Quat.d.ts +1 -1
- package/build/math/Quat.d.ts.map +1 -1
- package/build/rendering/IRenderer.d.ts +141 -0
- package/build/rendering/IRenderer.d.ts.map +1 -0
- package/build/tweakpane/TweakPane.d.ts +10 -31
- package/build/tweakpane/TweakPane.d.ts.map +1 -1
- package/build/tweakpane/blades/cameraFolder.d.ts +4 -49
- package/build/tweakpane/blades/cameraFolder.d.ts.map +1 -1
- package/build/tweakpane/blades/characterControlsFolder.d.ts +4 -59
- package/build/tweakpane/blades/characterControlsFolder.d.ts.map +1 -1
- package/package.json +4 -16
- package/build/character/CanvasText.d.ts +0 -35
- package/build/character/CanvasText.d.ts.map +0 -1
- package/build/character/Character.d.ts +0 -72
- package/build/character/Character.d.ts.map +0 -1
- package/build/character/CharacterMaterial.d.ts +0 -20
- package/build/character/CharacterMaterial.d.ts.map +0 -1
- package/build/character/CharacterModel.d.ts +0 -45
- package/build/character/CharacterModel.d.ts.map +0 -1
- package/build/character/CharacterTooltip.d.ts +0 -33
- package/build/character/CharacterTooltip.d.ts.map +0 -1
- package/build/character/LowPolyModel.d.ts +0 -2
- package/build/character/LowPolyModel.d.ts.map +0 -1
- package/build/character/instancing/CharacterColourSamplingUtils.d.ts +0 -15
- package/build/character/instancing/CharacterColourSamplingUtils.d.ts.map +0 -1
- package/build/character/instancing/CharacterInstances.d.ts +0 -93
- package/build/character/instancing/CharacterInstances.d.ts.map +0 -1
- package/build/character/instancing/CharacterInstancingAnimationUtils.d.ts +0 -8
- package/build/character/instancing/CharacterInstancingAnimationUtils.d.ts.map +0 -1
- package/build/character/instancing/CharacterInstancingUtils.d.ts +0 -4
- package/build/character/instancing/CharacterInstancingUtils.d.ts.map +0 -1
- package/build/character/instancing/vendor/core/InstancedEntity.d.ts +0 -192
- package/build/character/instancing/vendor/core/InstancedEntity.d.ts.map +0 -1
- package/build/character/instancing/vendor/core/InstancedMesh2.d.ts +0 -362
- package/build/character/instancing/vendor/core/InstancedMesh2.d.ts.map +0 -1
- package/build/character/instancing/vendor/core/InstancedMeshBVH.d.ts +0 -146
- package/build/character/instancing/vendor/core/InstancedMeshBVH.d.ts.map +0 -1
- package/build/character/instancing/vendor/core/feature/Capacity.d.ts +0 -14
- package/build/character/instancing/vendor/core/feature/Capacity.d.ts.map +0 -1
- package/build/character/instancing/vendor/core/feature/FrustumCulling.d.ts +0 -38
- package/build/character/instancing/vendor/core/feature/FrustumCulling.d.ts.map +0 -1
- package/build/character/instancing/vendor/core/feature/Instances.d.ts +0 -50
- package/build/character/instancing/vendor/core/feature/Instances.d.ts.map +0 -1
- package/build/character/instancing/vendor/core/feature/LOD.d.ts +0 -90
- package/build/character/instancing/vendor/core/feature/LOD.d.ts.map +0 -1
- package/build/character/instancing/vendor/core/feature/Morph.d.ts +0 -19
- package/build/character/instancing/vendor/core/feature/Morph.d.ts.map +0 -1
- package/build/character/instancing/vendor/core/feature/Raycasting.d.ts +0 -8
- package/build/character/instancing/vendor/core/feature/Raycasting.d.ts.map +0 -1
- package/build/character/instancing/vendor/core/feature/Skeleton.d.ts +0 -20
- package/build/character/instancing/vendor/core/feature/Skeleton.d.ts.map +0 -1
- package/build/character/instancing/vendor/core/feature/Uniforms.d.ts +0 -43
- package/build/character/instancing/vendor/core/feature/Uniforms.d.ts.map +0 -1
- package/build/character/instancing/vendor/core/utils/GLInstancedBufferAttribute.d.ts +0 -43
- package/build/character/instancing/vendor/core/utils/GLInstancedBufferAttribute.d.ts.map +0 -1
- package/build/character/instancing/vendor/core/utils/InstancedRenderList.d.ts +0 -26
- package/build/character/instancing/vendor/core/utils/InstancedRenderList.d.ts.map +0 -1
- package/build/character/instancing/vendor/core/utils/SquareDataTexture.d.ts +0 -157
- package/build/character/instancing/vendor/core/utils/SquareDataTexture.d.ts.map +0 -1
- package/build/character/instancing/vendor/index.d.ts +0 -26
- package/build/character/instancing/vendor/index.d.ts.map +0 -1
- package/build/character/instancing/vendor/shaders/ShaderChunk.d.ts +0 -2
- package/build/character/instancing/vendor/shaders/ShaderChunk.d.ts.map +0 -1
- package/build/character/instancing/vendor/shaders/chunks/instanced_color_pars_vertex.d.ts +0 -2
- package/build/character/instancing/vendor/shaders/chunks/instanced_color_pars_vertex.d.ts.map +0 -1
- package/build/character/instancing/vendor/shaders/chunks/instanced_color_vertex.d.ts +0 -2
- package/build/character/instancing/vendor/shaders/chunks/instanced_color_vertex.d.ts.map +0 -1
- package/build/character/instancing/vendor/shaders/chunks/instanced_material_color_pars_vertex.d.ts +0 -2
- package/build/character/instancing/vendor/shaders/chunks/instanced_material_color_pars_vertex.d.ts.map +0 -1
- package/build/character/instancing/vendor/shaders/chunks/instanced_material_color_vertex.d.ts +0 -2
- package/build/character/instancing/vendor/shaders/chunks/instanced_material_color_vertex.d.ts.map +0 -1
- package/build/character/instancing/vendor/shaders/chunks/instanced_pars_vertex.d.ts +0 -2
- package/build/character/instancing/vendor/shaders/chunks/instanced_pars_vertex.d.ts.map +0 -1
- package/build/character/instancing/vendor/shaders/chunks/instanced_skinning_pars_vertex.d.ts +0 -2
- package/build/character/instancing/vendor/shaders/chunks/instanced_skinning_pars_vertex.d.ts.map +0 -1
- package/build/character/instancing/vendor/shaders/chunks/instanced_vertex.d.ts +0 -2
- package/build/character/instancing/vendor/shaders/chunks/instanced_vertex.d.ts.map +0 -1
- package/build/character/instancing/vendor/utils/CreateFrom.d.ts +0 -10
- package/build/character/instancing/vendor/utils/CreateFrom.d.ts.map +0 -1
- package/build/character/instancing/vendor/utils/SortingUtils.d.ts +0 -17
- package/build/character/instancing/vendor/utils/SortingUtils.d.ts.map +0 -1
- package/build/character/loading/CharacterModelLoader.d.ts +0 -12
- package/build/character/loading/CharacterModelLoader.d.ts.map +0 -1
- package/build/character/loading/GLTFLoadingWorker.worker.d.ts +0 -3
- package/build/character/loading/GLTFLoadingWorker.worker.d.ts.map +0 -1
- package/build/character/loading/GLTFLoadingWorkerBrowserCache.d.ts +0 -9
- package/build/character/loading/GLTFLoadingWorkerBrowserCache.d.ts.map +0 -1
- package/build/character/loading/GLTFLoadingWorkerPool.d.ts +0 -23
- package/build/character/loading/GLTFLoadingWorkerPool.d.ts.map +0 -1
- package/build/character/loading/GLTFLoadingWorkerTypes.d.ts +0 -19
- package/build/character/loading/GLTFLoadingWorkerTypes.d.ts.map +0 -1
- package/build/ground-plane/GroundPlane.d.ts +0 -10
- package/build/ground-plane/GroundPlane.d.ts.map +0 -1
- package/build/mml/MMLCompositionScene.d.ts +0 -31
- package/build/mml/MMLCompositionScene.d.ts.map +0 -1
- package/build/rendering/PostProcessingManager.d.ts +0 -93
- package/build/rendering/PostProcessingManager.d.ts.map +0 -1
- package/build/rendering/composer.d.ts +0 -106
- package/build/rendering/composer.d.ts.map +0 -1
- package/build/rendering/post-effects/bright-contrast-sat.d.ts +0 -3
- package/build/rendering/post-effects/bright-contrast-sat.d.ts.map +0 -1
- package/build/rendering/post-effects/gauss-grain.d.ts +0 -3
- package/build/rendering/post-effects/gauss-grain.d.ts.map +0 -1
- package/build/rendering/post-effects/n8-ssao/BlueNoise.d.ts +0 -2
- package/build/rendering/post-effects/n8-ssao/BlueNoise.d.ts.map +0 -1
- package/build/rendering/post-effects/n8-ssao/DepthDownSample.d.ts +0 -18
- package/build/rendering/post-effects/n8-ssao/DepthDownSample.d.ts.map +0 -1
- package/build/rendering/post-effects/n8-ssao/EffectCompositer.d.ts +0 -40
- package/build/rendering/post-effects/n8-ssao/EffectCompositer.d.ts.map +0 -1
- package/build/rendering/post-effects/n8-ssao/EffectShader.d.ts +0 -32
- package/build/rendering/post-effects/n8-ssao/EffectShader.d.ts.map +0 -1
- package/build/rendering/post-effects/n8-ssao/FullScreenTriangle.d.ts +0 -12
- package/build/rendering/post-effects/n8-ssao/FullScreenTriangle.d.ts.map +0 -1
- package/build/rendering/post-effects/n8-ssao/N8SSAOPass.d.ts +0 -66
- package/build/rendering/post-effects/n8-ssao/N8SSAOPass.d.ts.map +0 -1
- package/build/rendering/post-effects/n8-ssao/PoissionBlur.d.ts +0 -31
- package/build/rendering/post-effects/n8-ssao/PoissionBlur.d.ts.map +0 -1
- package/build/rendering/shaders/bayer-dither.d.ts +0 -2
- package/build/rendering/shaders/bayer-dither.d.ts.map +0 -1
- package/build/rendering/shaders/shader-helpers.d.ts +0 -5
- package/build/rendering/shaders/shader-helpers.d.ts.map +0 -1
- package/build/rendering/shaders/vertex-shader.d.ts +0 -2
- package/build/rendering/shaders/vertex-shader.d.ts.map +0 -1
- package/build/sun/Sun.d.ts +0 -19
- package/build/sun/Sun.d.ts.map +0 -1
- package/build/time/TimeManager.d.ts +0 -21
- package/build/time/TimeManager.d.ts.map +0 -1
- package/build/tweakpane/blades/characterFolder.d.ts +0 -21
- package/build/tweakpane/blades/characterFolder.d.ts.map +0 -1
- package/build/tweakpane/blades/collisionsStatsFolder.d.ts +0 -8
- package/build/tweakpane/blades/collisionsStatsFolder.d.ts.map +0 -1
- package/build/tweakpane/blades/effects/bcsFolder.d.ts +0 -13
- package/build/tweakpane/blades/effects/bcsFolder.d.ts.map +0 -1
- package/build/tweakpane/blades/effects/bloomAndGrain.d.ts +0 -13
- package/build/tweakpane/blades/effects/bloomAndGrain.d.ts.map +0 -1
- package/build/tweakpane/blades/effects/ssaoFolder.d.ts +0 -50
- package/build/tweakpane/blades/effects/ssaoFolder.d.ts.map +0 -1
- package/build/tweakpane/blades/effects/toneMappingFolder.d.ts +0 -19
- package/build/tweakpane/blades/effects/toneMappingFolder.d.ts.map +0 -1
- package/build/tweakpane/blades/environmentFolder.d.ts +0 -54
- package/build/tweakpane/blades/environmentFolder.d.ts.map +0 -1
- package/build/tweakpane/blades/postProcessingFolder.d.ts +0 -32
- package/build/tweakpane/blades/postProcessingFolder.d.ts.map +0 -1
- package/build/tweakpane/blades/rendererFolder.d.ts +0 -14
- package/build/tweakpane/blades/rendererFolder.d.ts.map +0 -1
- package/build/tweakpane/blades/rendererStatsFolder.d.ts +0 -11
- package/build/tweakpane/blades/rendererStatsFolder.d.ts.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CharacterMaterial.d.ts","sourceRoot":"","sources":["../../src/character/CharacterMaterial.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,oBAAoB,EAAiB,MAAM,OAAO,CAAC;AAEnE,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAYxD,MAAM,MAAM,uBAAuB,GAAG;IACpC,OAAO,EAAE,OAAO,CAAC;IACjB,aAAa,EAAE,aAAa,CAAC;IAC7B,WAAW,EAAE,MAAM,CAAC;IACpB,gBAAgB,EAAE,oBAAoB,CAAC;IACvC,aAAa,CAAC,EAAE,KAAK,CAAC;CACvB,CAAC;AAEF,qBAAa,iBAAkB,SAAQ,oBAAoB;IAU7C,OAAO,CAAC,MAAM;IAT1B,OAAO,CAAC,QAAQ,CAId;IACF,OAAO,CAAC,aAAa,CAAe;IACpC,OAAO,CAAC,WAAW,CAAa;IAChC,OAAO,CAAC,YAAY,CAAa;gBAEb,MAAM,EAAE,uBAAuB;IA0EnD,OAAO,CAAC,iBAAiB;IAclB,MAAM;CA6Bd"}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { type MMLCharacterDescription } from "@mml-io/3d-web-avatar";
|
|
2
|
-
import { AnimationAction, AnimationMixer, Bone, Color, Object3D } from "three";
|
|
3
|
-
import { CameraManager } from "../camera/CameraManager";
|
|
4
|
-
import { CharacterDescription, LoadedAnimations } from "./Character";
|
|
5
|
-
import { AnimationState } from "./CharacterState";
|
|
6
|
-
import { CharacterModelLoader } from "./loading/CharacterModelLoader";
|
|
7
|
-
export declare const colorPartNamesIndex: readonly ["hair", "shirt_short", "shirt_long", "pants_short", "pants_long", "shoes", "skin", "lips"];
|
|
8
|
-
export type ColorPartName = (typeof colorPartNamesIndex)[number];
|
|
9
|
-
export declare function colorsToColorArray(colors: Map<ColorPartName, Color>): Array<[number, number, number]>;
|
|
10
|
-
export declare function colorArrayToColors(colorArray: Array<[number, number, number]>): Map<ColorPartName, Color>;
|
|
11
|
-
export type CharacterModelConfig = {
|
|
12
|
-
characterDescription: CharacterDescription;
|
|
13
|
-
animationsPromise: Promise<LoadedAnimations>;
|
|
14
|
-
characterModelLoader: CharacterModelLoader;
|
|
15
|
-
cameraManager: CameraManager;
|
|
16
|
-
characterId: number;
|
|
17
|
-
isLocal: boolean;
|
|
18
|
-
abortController?: AbortController;
|
|
19
|
-
};
|
|
20
|
-
export declare class CharacterModel {
|
|
21
|
-
private config;
|
|
22
|
-
mesh: Object3D | null;
|
|
23
|
-
headBone: Bone | null;
|
|
24
|
-
characterHeight: number | null;
|
|
25
|
-
private materials;
|
|
26
|
-
animations: Record<string, AnimationAction>;
|
|
27
|
-
animationMixer: AnimationMixer | null;
|
|
28
|
-
currentAnimation: AnimationState;
|
|
29
|
-
mmlCharacterDescription: MMLCharacterDescription;
|
|
30
|
-
private isPostDoubleJump;
|
|
31
|
-
private colors;
|
|
32
|
-
constructor(config: CharacterModelConfig);
|
|
33
|
-
init(): Promise<void>;
|
|
34
|
-
private applyCustomMaterials;
|
|
35
|
-
updateAnimation(targetAnimation: AnimationState): void;
|
|
36
|
-
private composeMMLCharacter;
|
|
37
|
-
private loadCharacterFromDescription;
|
|
38
|
-
getColors(): Array<[number, number, number]>;
|
|
39
|
-
private cleanAnimationClips;
|
|
40
|
-
private setAnimationFromFile;
|
|
41
|
-
private transitionToAnimation;
|
|
42
|
-
update(time: number): void;
|
|
43
|
-
dispose(): void;
|
|
44
|
-
}
|
|
45
|
-
//# sourceMappingURL=CharacterModel.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CharacterModel.d.ts","sourceRoot":"","sources":["../../src/character/CharacterModel.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,uBAAuB,EAE7B,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,eAAe,EAEf,cAAc,EACd,IAAI,EACJ,KAAK,EAKL,QAAQ,EAGT,MAAM,OAAO,CAAC;AAEf,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAExD,OAAO,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAErE,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,OAAO,EAAE,oBAAoB,EAAE,MAAM,gCAAgC,CAAC;AAEtE,eAAO,MAAM,mBAAmB,sGAStB,CAAC;AAEX,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEjE,wBAAgB,kBAAkB,CAChC,MAAM,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,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;IAgBnD,OAAO,CAAC,mBAAmB;IA0B3B,OAAO,CAAC,oBAAoB;IAmB5B,OAAO,CAAC,qBAAqB;IAuC7B,MAAM,CAAC,IAAI,EAAE,MAAM;IAOnB,OAAO;CA2BR"}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { Color, Sprite } from "three";
|
|
2
|
-
declare enum LabelAlignment {
|
|
3
|
-
left = "left",
|
|
4
|
-
center = "center",
|
|
5
|
-
right = "right"
|
|
6
|
-
}
|
|
7
|
-
export type CharacterTooltipConfig = {
|
|
8
|
-
alignment: LabelAlignment;
|
|
9
|
-
fontSize: number;
|
|
10
|
-
padding: number;
|
|
11
|
-
color: Color;
|
|
12
|
-
fontColor: Color;
|
|
13
|
-
visibleOpacity: number;
|
|
14
|
-
maxWidth?: number;
|
|
15
|
-
secondsToFadeOut: number | null;
|
|
16
|
-
};
|
|
17
|
-
export declare class CharacterTooltip extends Sprite {
|
|
18
|
-
private targetOpacity;
|
|
19
|
-
private fadingSpeed;
|
|
20
|
-
private config;
|
|
21
|
-
private content;
|
|
22
|
-
private hideTimeout;
|
|
23
|
-
constructor(configArg?: Partial<CharacterTooltipConfig>);
|
|
24
|
-
setHeightOffset(height: number): void;
|
|
25
|
-
private redrawText;
|
|
26
|
-
setText(text: string, onRemove?: () => void): void;
|
|
27
|
-
hide(): void;
|
|
28
|
-
show(): void;
|
|
29
|
-
update(): void;
|
|
30
|
-
dispose(): void;
|
|
31
|
-
}
|
|
32
|
-
export {};
|
|
33
|
-
//# sourceMappingURL=CharacterTooltip.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CharacterTooltip.d.ts","sourceRoot":"","sources":["../../src/character/CharacterTooltip.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAA2B,MAAM,EAAkB,MAAM,OAAO,CAAC;AAI/E,aAAK,cAAc;IACjB,IAAI,SAAS;IACb,MAAM,WAAW;IACjB,KAAK,UAAU;CAChB;AAWD,MAAM,MAAM,sBAAsB,GAAG;IACnC,SAAS,EAAE,cAAc,CAAC;IAC1B,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,KAAK,CAAC;IACb,SAAS,EAAE,KAAK,CAAC;IACjB,cAAc,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;CACjC,CAAC;AAEF,qBAAa,gBAAiB,SAAQ,MAAM;IAC1C,OAAO,CAAC,aAAa,CAAa;IAClC,OAAO,CAAC,WAAW,CAAgB;IACnC,OAAO,CAAC,MAAM,CAAyB;IACvC,OAAO,CAAC,OAAO,CAAuB;IACtC,OAAO,CAAC,WAAW,CAA+B;gBAEtC,SAAS,CAAC,EAAE,OAAO,CAAC,sBAAsB,CAAC;IAwBhD,eAAe,CAAC,MAAM,EAAE,MAAM;IAIrC,OAAO,CAAC,UAAU;IA2ClB,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,IAAI;IAoB3C,IAAI;IAIJ,IAAI;IAIJ,MAAM;IAyBN,OAAO;CAMR"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"LowPolyModel.d.ts","sourceRoot":"","sources":["../../src/character/LowPolyModel.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,kBAAkB,KAA2B,CAAC"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { Color, Object3D } from "three";
|
|
2
|
-
import { ColorPartName } from "../CharacterModel";
|
|
3
|
-
import { InstancedMesh2 } from "./vendor/";
|
|
4
|
-
export type ColorSamplingOptions = {
|
|
5
|
-
circularSamplingRadius?: number;
|
|
6
|
-
topDownSamplingSize?: {
|
|
7
|
-
width: number;
|
|
8
|
-
height: number;
|
|
9
|
-
};
|
|
10
|
-
debug?: boolean;
|
|
11
|
-
};
|
|
12
|
-
export declare function captureCharacterColors(characterMesh: Object3D, options: ColorSamplingOptions): Map<ColorPartName, Color>;
|
|
13
|
-
export declare function captureCharacterColorsFromObject3D(object3D: Object3D, options: ColorSamplingOptions): Map<ColorPartName, Color>;
|
|
14
|
-
export declare function updateDebugTextureCanvas(instancedMesh: InstancedMesh2): void;
|
|
15
|
-
//# sourceMappingURL=CharacterColourSamplingUtils.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CharacterColourSamplingUtils.d.ts","sourceRoot":"","sources":["../../../src/character/instancing/CharacterColourSamplingUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,KAAK,EAQL,QAAQ,EACT,MAAM,OAAO,CAAC;AAGf,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAGlD,OAAO,EAAE,cAAc,EAAqB,MAAM,WAAW,CAAC;AAE9D,MAAM,MAAM,oBAAoB,GAAG;IACjC,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,mBAAmB,CAAC,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;IACxD,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB,CAAC;AAcF,wBAAgB,sBAAsB,CACpC,aAAa,EAAE,QAAQ,EACvB,OAAO,EAAE,oBAAoB,GAC5B,GAAG,CAAC,aAAa,EAAE,KAAK,CAAC,CA0J3B;AAED,wBAAgB,kCAAkC,CAChD,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,oBAAoB,GAC5B,GAAG,CAAC,aAAa,EAAE,KAAK,CAAC,CAgB3B;AAmbD,wBAAgB,wBAAwB,CAAC,aAAa,EAAE,cAAc,GAAG,IAAI,CAmD5E"}
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
import { Color, Object3D, Quaternion, Vector3 } from "three";
|
|
2
|
-
import { CameraManager } from "../../camera/CameraManager";
|
|
3
|
-
import { EulXYZ, Vect3 } from "../../math";
|
|
4
|
-
import { TimeManager } from "../../time/TimeManager";
|
|
5
|
-
import { LoadedAnimations } from "../Character";
|
|
6
|
-
import { ColorPartName } from "../CharacterModel";
|
|
7
|
-
import { AnimationState } from "../CharacterState";
|
|
8
|
-
import { CharacterModelLoader } from "../loading/CharacterModelLoader";
|
|
9
|
-
export type CharacterInstancesConfig = {
|
|
10
|
-
animationsPromise: Promise<LoadedAnimations>;
|
|
11
|
-
characterModelLoader: CharacterModelLoader;
|
|
12
|
-
cameraManager: CameraManager;
|
|
13
|
-
timeManager: TimeManager;
|
|
14
|
-
debug?: boolean;
|
|
15
|
-
};
|
|
16
|
-
export type InstanceData = {
|
|
17
|
-
characterId: number;
|
|
18
|
-
instanceId: number;
|
|
19
|
-
isActive: boolean;
|
|
20
|
-
isShadowed: boolean;
|
|
21
|
-
time: number;
|
|
22
|
-
speed: number;
|
|
23
|
-
offset: number;
|
|
24
|
-
currentAnimationState: string;
|
|
25
|
-
animationTime: number;
|
|
26
|
-
targetPosition: Vector3;
|
|
27
|
-
targetQuaternion: Quaternion;
|
|
28
|
-
lerpSpeed: number;
|
|
29
|
-
hasNewTarget: boolean;
|
|
30
|
-
};
|
|
31
|
-
export declare class CharacterInstances {
|
|
32
|
-
private config;
|
|
33
|
-
private mixer;
|
|
34
|
-
private action;
|
|
35
|
-
private instancedMesh;
|
|
36
|
-
private skinnedMesh;
|
|
37
|
-
private propertyBindings;
|
|
38
|
-
private interpolants;
|
|
39
|
-
private propertyBindingsLOD;
|
|
40
|
-
private interpolantsLOD;
|
|
41
|
-
private invMatrixWorld;
|
|
42
|
-
private cameraLocalPosition;
|
|
43
|
-
private delta;
|
|
44
|
-
private characterScale;
|
|
45
|
-
private currentBindingMode;
|
|
46
|
-
private debug;
|
|
47
|
-
private animationClip;
|
|
48
|
-
private animationSegments;
|
|
49
|
-
private characterIdToInstanceIdMap;
|
|
50
|
-
private animationStateToSegmentName;
|
|
51
|
-
/**
|
|
52
|
-
* Apply colors to an instance at the given index
|
|
53
|
-
* @param instanceIndex The index of the instance to apply colors to
|
|
54
|
-
* @param colors Optional specific colors to apply, if not provided, random colors will be used
|
|
55
|
-
*/
|
|
56
|
-
private applyInstanceColors;
|
|
57
|
-
constructor(config: CharacterInstancesConfig);
|
|
58
|
-
initialize(): Promise<Object3D | null>;
|
|
59
|
-
spawnInstance(characterId: number, colors: Map<ColorPartName, Color>, position: Vect3, rotation: EulXYZ, animationState: AnimationState): void;
|
|
60
|
-
despawnInstance(characterId: number): void;
|
|
61
|
-
/**
|
|
62
|
-
* Shadows an instance instead of fully despawning it. This keeps the instance data
|
|
63
|
-
* intact (including colors) while hiding it when a real character is promoted.
|
|
64
|
-
* This avoids texture updates when the character is later demoted back to an instance.
|
|
65
|
-
*/
|
|
66
|
-
shadowInstance(characterId: number): void;
|
|
67
|
-
/**
|
|
68
|
-
* Reactivates a previously shadowed instance. This is used when a real character
|
|
69
|
-
* is demoted back to an instance, allowing us to reuse the existing instance data
|
|
70
|
-
* and avoid texture updates from creating a new instance.
|
|
71
|
-
*/
|
|
72
|
-
unshadowInstance(characterId: number): void;
|
|
73
|
-
updateInstance(characterId: number, position: Vect3, rotation: EulXYZ, animationState: AnimationState): void;
|
|
74
|
-
updateInstanceColors(characterId: number, colors: Map<string, Color>): void;
|
|
75
|
-
private updateInstancedMeshBounds;
|
|
76
|
-
private setMainMesh;
|
|
77
|
-
private loadAnimation;
|
|
78
|
-
private createInstancedMesh;
|
|
79
|
-
private setupAnimationOptimization;
|
|
80
|
-
private initializeSkeletonData;
|
|
81
|
-
getPositionForInstance(characterId: number): Vect3 | null;
|
|
82
|
-
private updateAllInstanceLerping;
|
|
83
|
-
update(deltaTime: number, totalTime: number): void;
|
|
84
|
-
setupFrustumCulling(): void;
|
|
85
|
-
clear(): void;
|
|
86
|
-
dispose(): void;
|
|
87
|
-
/**
|
|
88
|
-
* Immediately sets an instance position without lerping. Used when unshadowing
|
|
89
|
-
* instances to position them at the real character's last known position.
|
|
90
|
-
*/
|
|
91
|
-
setInstancePositionImmediate(characterId: number, position: Vect3, rotation: EulXYZ, animationState: AnimationState): boolean;
|
|
92
|
-
}
|
|
93
|
-
//# sourceMappingURL=CharacterInstances.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CharacterInstances.d.ts","sourceRoot":"","sources":["../../../src/character/instancing/CharacterInstances.ts"],"names":[],"mappings":"AACA,OAAO,EAIL,KAAK,EAKL,QAAQ,EAER,UAAU,EAEV,OAAO,EACR,MAAM,OAAO,CAAC;AAGf,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AAOvE,MAAM,MAAM,wBAAwB,GAAG;IACrC,iBAAiB,EAAE,OAAO,CAAC,gBAAgB,CAAC,CAAC;IAC7C,oBAAoB,EAAE,oBAAoB,CAAC;IAC3C,aAAa,EAAE,aAAa,CAAC;IAC7B,WAAW,EAAE,WAAW,CAAC;IACzB,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG;IACzB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,OAAO,CAAC;IAClB,UAAU,EAAE,OAAO,CAAC;IAEpB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IAEf,qBAAqB,EAAE,MAAM,CAAC;IA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AgB,CAAC,WAAW,EAAE,MAAM;IAqBpC,cAAc,CACnB,WAAW,EAAE,MAAM,EACnB,QAAQ,EAAE,KAAK,EACf,QAAQ,EAAE,MAAM,EAChB,cAAc,EAAE,cAAc,GAC7B,IAAI;IA4DA,oBAAoB,CAAC,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,KAAK,CAAC;IAqB3E,OAAO,CAAC,yBAAyB;IAiBjC,OAAO,CAAC,WAAW;YAsFL,aAAa;YAoEb,mBAAmB;IA8CjC,OAAO,CAAC,0BAA0B;IAoBlC,OAAO,CAAC,sBAAsB;IASvB,sBAAsB,CAAC,WAAW,EAAE,MAAM,GAAG,KAAK,GAAG,IAAI;IAgBhE,OAAO,CAAC,wBAAwB;IAqBzB,MAAM,CAAC,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,IAAI;IAgBlD,mBAAmB,IAAI,IAAI;IAuF3B,KAAK;IAkBL,OAAO,IAAI,IAAI;IAWtB;;;OAGG;IACI,4BAA4B,CACjC,WAAW,EAAE,MAAM,EACnB,QAAQ,EAAE,KAAK,EACf,QAAQ,EAAE,MAAM,EAChB,cAAc,EAAE,cAAc,GAC7B,OAAO;CAkDX"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { AnimationClip } from "three";
|
|
2
|
-
export type SegmentTime = {
|
|
3
|
-
startTime: number;
|
|
4
|
-
endTime: number;
|
|
5
|
-
duration: number;
|
|
6
|
-
};
|
|
7
|
-
export declare function createSingleTimeline(individualClips: Map<string, AnimationClip>): [Map<string, SegmentTime>, AnimationClip];
|
|
8
|
-
//# sourceMappingURL=CharacterInstancingAnimationUtils.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CharacterInstancingAnimationUtils.d.ts","sourceRoot":"","sources":["../../../src/character/instancing/CharacterInstancingAnimationUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EAId,MAAM,OAAO,CAAC;AAEf,MAAM,MAAM,WAAW,GAAG;IACxB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,wBAAgB,oBAAoB,CAClC,eAAe,EAAE,GAAG,CAAC,MAAM,EAAE,aAAa,CAAC,GAC1C,CAAC,GAAG,CAAC,MAAM,EAAE,WAAW,CAAC,EAAE,aAAa,CAAC,CA6I3C"}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { SkinnedMesh } from "three";
|
|
2
|
-
export declare function mergeSkinnedMeshes(skinnedMeshes: SkinnedMesh[], debug?: boolean): SkinnedMesh;
|
|
3
|
-
export declare function validateAndCleanSkeleton(skinnedMesh: SkinnedMesh): void;
|
|
4
|
-
//# sourceMappingURL=CharacterInstancingUtils.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CharacterInstancingUtils.d.ts","sourceRoot":"","sources":["../../../src/character/instancing/CharacterInstancingUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EAA6C,WAAW,EAAE,MAAM,OAAO,CAAC;AAG/E,wBAAgB,kBAAkB,CAAC,aAAa,EAAE,WAAW,EAAE,EAAE,KAAK,CAAC,EAAE,OAAO,GAAG,WAAW,CAiD7F;AAED,wBAAgB,wBAAwB,CAAC,WAAW,EAAE,WAAW,GAAG,IAAI,CAYvE"}
|
|
@@ -1,192 +0,0 @@
|
|
|
1
|
-
import { Color, ColorRepresentation, Euler, Matrix4, Mesh, Object3D, Quaternion, Vector3 } from "three";
|
|
2
|
-
import { InstancedMesh2 } from "./InstancedMesh2";
|
|
3
|
-
import { UniformValue, UniformValueObj } from "./utils/SquareDataTexture";
|
|
4
|
-
/**
|
|
5
|
-
* Represents an instance in an `InstancedMesh2`.
|
|
6
|
-
* This class stores transformation data (position, rotation, scale) and provides methods to manipulate them.
|
|
7
|
-
*/
|
|
8
|
-
export declare class InstancedEntity {
|
|
9
|
-
/**
|
|
10
|
-
* Indicates if this is an `InstancedEntity`.
|
|
11
|
-
*/
|
|
12
|
-
readonly isInstanceEntity = true;
|
|
13
|
-
/**
|
|
14
|
-
* The unique identifier for this instance (relative to the `InstancedMesh2` it references).
|
|
15
|
-
*/
|
|
16
|
-
readonly id: number;
|
|
17
|
-
/**
|
|
18
|
-
* `InstancedMesh2` to which this instance refers.
|
|
19
|
-
*/
|
|
20
|
-
readonly owner: InstancedMesh2;
|
|
21
|
-
/**
|
|
22
|
-
* The local position.
|
|
23
|
-
*/
|
|
24
|
-
position: Vector3;
|
|
25
|
-
/**
|
|
26
|
-
* The local scale.
|
|
27
|
-
*/
|
|
28
|
-
scale: Vector3;
|
|
29
|
-
/**
|
|
30
|
-
* The local rotation as `Quaternion`.
|
|
31
|
-
*/
|
|
32
|
-
quaternion: Quaternion;
|
|
33
|
-
/**
|
|
34
|
-
* The local rotation as `Euler`.
|
|
35
|
-
* This works only if `allowsEuler` is set to `true` in the `InstancedMesh2` constructor parameters.
|
|
36
|
-
*/
|
|
37
|
-
rotation: Euler;
|
|
38
|
-
/**
|
|
39
|
-
* The visibility state set and got from `owner.availabilityArray`.
|
|
40
|
-
*/
|
|
41
|
-
get visible(): boolean;
|
|
42
|
-
set visible(value: boolean);
|
|
43
|
-
/**
|
|
44
|
-
* The availability set and got from `owner.availabilityArray`.
|
|
45
|
-
*/
|
|
46
|
-
get active(): boolean;
|
|
47
|
-
set active(value: boolean);
|
|
48
|
-
/**
|
|
49
|
-
* Color set and got from `owner.colorsTexture`.
|
|
50
|
-
*/
|
|
51
|
-
get color(): Color;
|
|
52
|
-
set color(value: ColorRepresentation);
|
|
53
|
-
/**
|
|
54
|
-
* Opacity set and got from `owner.colorsTexture`.
|
|
55
|
-
*/
|
|
56
|
-
get opacity(): number;
|
|
57
|
-
set opacity(value: number);
|
|
58
|
-
/**
|
|
59
|
-
* Morph target influences set and got from `owner.morphTexture`.
|
|
60
|
-
*/
|
|
61
|
-
get morph(): Mesh;
|
|
62
|
-
set morph(value: Mesh);
|
|
63
|
-
/**
|
|
64
|
-
* The local transform matrix got from `owner.matricesTexture`.
|
|
65
|
-
*/
|
|
66
|
-
get matrix(): Matrix4;
|
|
67
|
-
/**
|
|
68
|
-
* The world transform matrix got by multiplying the matrix got from `owner.matricesTexture` and `this.owner.matrixWorld`.
|
|
69
|
-
*/
|
|
70
|
-
get matrixWorld(): Matrix4;
|
|
71
|
-
/**
|
|
72
|
-
* This object is instantiated automatically by setting `createEntities` to `true` in the `InstancedMesh2` constructor parameters.
|
|
73
|
-
* Dont instantiate this manually.
|
|
74
|
-
* @param owner The `InstancedMesh2` that owns this instance.
|
|
75
|
-
* @param id The unique identifier for this instance within the `InstancedMesh2`.
|
|
76
|
-
* @param useEuler Whether to use Euler rotations in addition to quaternion rotations.
|
|
77
|
-
*/
|
|
78
|
-
constructor(owner: InstancedMesh2, id: number, useEuler: boolean);
|
|
79
|
-
/**
|
|
80
|
-
* Set the transformation matrix to identity matrix.
|
|
81
|
-
*/
|
|
82
|
-
setMatrixIdentity(): void;
|
|
83
|
-
/**
|
|
84
|
-
* Updates the transformation matrix with its current position, quaternion, and scale.
|
|
85
|
-
* The updated matrix is stored in the `owner.matricesTexture`.
|
|
86
|
-
*/
|
|
87
|
-
updateMatrix(): void;
|
|
88
|
-
/**
|
|
89
|
-
* Updates only the position component of the transformation matrix.
|
|
90
|
-
* This is useful if only position changes, avoiding recalculating the full matrix.
|
|
91
|
-
* The updated matrix is stored in the `owner.matricesTexture`.
|
|
92
|
-
*/
|
|
93
|
-
updateMatrixPosition(): void;
|
|
94
|
-
/**
|
|
95
|
-
* Retrieves the uniform value associated with the given name.
|
|
96
|
-
* @param name The name of the uniform to retrieve.
|
|
97
|
-
* @param target Optional target object where the uniform value will be written.
|
|
98
|
-
* @returns The retrieved uniform value.
|
|
99
|
-
*/
|
|
100
|
-
getUniform(name: string, target?: UniformValueObj): UniformValue;
|
|
101
|
-
/**
|
|
102
|
-
* Updates the bones of the skeleton to the instance.
|
|
103
|
-
* @param updateBonesMatrices Whether to update the matrices of the bones. Default is `true`.
|
|
104
|
-
*/
|
|
105
|
-
updateBones(updateBonesMatrices?: boolean): void;
|
|
106
|
-
/**
|
|
107
|
-
* Sets the uniform value for the given name
|
|
108
|
-
* @param name The name of the uniform to set.
|
|
109
|
-
* @param value The new value for the uniform.
|
|
110
|
-
*/
|
|
111
|
-
setUniform(name: string, value: UniformValue): void;
|
|
112
|
-
/**
|
|
113
|
-
* Copies the transformation properties (`position`, `scale`, `quaternion`) of this instance to the specified `Object3D`.
|
|
114
|
-
* @param target The `Object3D` where the transformation properties will be copied.
|
|
115
|
-
*/
|
|
116
|
-
copyTo(target: Object3D): void;
|
|
117
|
-
/**
|
|
118
|
-
* Applies the matrix transform to the object and updates the object's position, rotation and scale.
|
|
119
|
-
* @param m The matrix to apply.
|
|
120
|
-
* @returns The instance of the object.
|
|
121
|
-
*/
|
|
122
|
-
applyMatrix4(m: Matrix4): this;
|
|
123
|
-
/**
|
|
124
|
-
* Applies the rotation represented by the quaternion to the object.
|
|
125
|
-
* @param q The quaternion representing the rotation to apply.
|
|
126
|
-
* @returns The instance of the object.
|
|
127
|
-
*/
|
|
128
|
-
applyQuaternion(q: Quaternion): this;
|
|
129
|
-
/**
|
|
130
|
-
* Rotate an object along an axis in object space. The axis is assumed to be normalized.
|
|
131
|
-
* @param axis A normalized vector in object space.
|
|
132
|
-
* @param angle The angle in radians.
|
|
133
|
-
* @returns The instance of the object.
|
|
134
|
-
*/
|
|
135
|
-
rotateOnAxis(axis: Vector3, angle: number): this;
|
|
136
|
-
/**
|
|
137
|
-
* Rotate an object along an axis in world space. The axis is assumed to be normalized. Method Assumes no rotated parent.
|
|
138
|
-
* @param axis A normalized vector in world space.
|
|
139
|
-
* @param angle The angle in radians.
|
|
140
|
-
* @returns The instance of the object.
|
|
141
|
-
*/
|
|
142
|
-
rotateOnWorldAxis(axis: Vector3, angle: number): this;
|
|
143
|
-
/**
|
|
144
|
-
* Rotates the object around x axis in local space.
|
|
145
|
-
* @param angle The angle to rotate in radians.
|
|
146
|
-
* @returns The instance of the object.
|
|
147
|
-
*/
|
|
148
|
-
rotateX(angle: number): this;
|
|
149
|
-
/**
|
|
150
|
-
* Rotates the object around y axis in local space.
|
|
151
|
-
* @param angle The angle to rotate in radians.
|
|
152
|
-
* @returns The instance of the object.
|
|
153
|
-
*/
|
|
154
|
-
rotateY(angle: number): this;
|
|
155
|
-
/**
|
|
156
|
-
* Rotates the object around z axis in local space.
|
|
157
|
-
* @param angle The angle to rotate in radians.
|
|
158
|
-
* @returns The instance of the object.
|
|
159
|
-
*/
|
|
160
|
-
rotateZ(angle: number): this;
|
|
161
|
-
/**
|
|
162
|
-
* Translate an object by distance along an axis in object space. The axis is assumed to be normalized.
|
|
163
|
-
* @param axis A normalized vector in object space.
|
|
164
|
-
* @param distance The distance to translate.
|
|
165
|
-
* @returns The instance of the object.
|
|
166
|
-
*/
|
|
167
|
-
translateOnAxis(axis: Vector3, distance: number): this;
|
|
168
|
-
/**
|
|
169
|
-
* Translates object along x axis in object space by distance units.
|
|
170
|
-
* @param distance The distance to translate.
|
|
171
|
-
* @returns The instance of the object.
|
|
172
|
-
*/
|
|
173
|
-
translateX(distance: number): this;
|
|
174
|
-
/**
|
|
175
|
-
* Translates object along y axis in object space by distance units.
|
|
176
|
-
* @param distance The distance to translate.
|
|
177
|
-
* @returns The instance of the object.
|
|
178
|
-
*/
|
|
179
|
-
translateY(distance: number): this;
|
|
180
|
-
/**
|
|
181
|
-
* Translates object along z axis in object space by distance units.
|
|
182
|
-
* @param distance The distance to translate.
|
|
183
|
-
* @returns The instance of the object.
|
|
184
|
-
*/
|
|
185
|
-
translateZ(distance: number): this;
|
|
186
|
-
/**
|
|
187
|
-
* Removes this entity from its owner instance.
|
|
188
|
-
* @returns The instance of the object.
|
|
189
|
-
*/
|
|
190
|
-
remove(): this;
|
|
191
|
-
}
|
|
192
|
-
//# sourceMappingURL=InstancedEntity.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"InstancedEntity.d.ts","sourceRoot":"","sources":["../../../../../src/character/instancing/vendor/core/InstancedEntity.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,EACL,mBAAmB,EACnB,KAAK,EACL,OAAO,EACP,IAAI,EACJ,QAAQ,EACR,UAAU,EACV,OAAO,EACR,MAAM,OAAO,CAAC;AAEf,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAK1E;;;GAGG;AACH,qBAAa,eAAe;IAC1B;;OAEG;IACH,SAAgB,gBAAgB,QAAQ;IACxC;;OAEG;IACH,SAAgB,EAAE,EAAE,MAAM,CAAC;IAC3B;;OAEG;IACH,SAAgB,KAAK,EAAE,cAAc,CAAC;IACtC;;OAEG;IACI,QAAQ,UAAiB;IAChC;;OAEG;IACI,KAAK,UAAwB;IACpC;;OAEG;IACI,UAAU,aAAoB;IACrC;;;OAGG;IACI,QAAQ,EAAE,KAAK,CAAC;IAEvB;;OAEG;IACH,IAAW,OAAO,IAAI,OAAO,CAE5B;IACD,IAAW,OAAO,CAAC,KAAK,EAAE,OAAO,EAEhC;IAED;;OAEG;IACH,IAAW,MAAM,IAAI,OAAO,CAE3B;IACD,IAAW,MAAM,CAAC,KAAK,EAAE,OAAO,EAE/B;IAED;;OAEG;IACH,IAAW,KAAK,IAAI,KAAK,CAExB;IACD,IAAW,KAAK,CAAC,KAAK,EAAE,mBAAmB,EAE1C;IAED;;OAEG;IACH,IAAW,OAAO,IAAI,MAAM,CAE3B;IACD,IAAW,OAAO,CAAC,KAAK,EAAE,MAAM,EAE/B;IAED;;OAEG;IACH,IAAW,KAAK,IAAI,IAAI,CAEvB;IACD,IAAW,KAAK,CAAC,KAAK,EAAE,IAAI,EAE3B;IAED;;OAEG;IACH,IAAW,MAAM,IAAI,OAAO,CAE3B;IAED;;O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