minerender 2.1.0-alpha.32 → 2.1.0-alpha.34
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/browser/index.d.mts +32 -7
- package/dist/browser/index.d.ts +32 -7
- package/dist/browser/index.js +287 -216
- package/dist/browser/index.js.map +1 -1
- package/dist/browser/index.mjs +183 -112
- package/dist/browser/index.mjs.map +1 -1
- package/dist/bundle.js +181 -110
- package/dist/bundle.js.map +1 -1
- package/dist/node/index.d.mts +32 -7
- package/dist/node/index.d.ts +32 -7
- package/dist/node/index.js +287 -216
- package/dist/node/index.js.map +1 -1
- package/dist/node/index.mjs +183 -112
- package/dist/node/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/node/index.d.mts
CHANGED
|
@@ -730,11 +730,15 @@ declare class DefaultBlockStates implements MinecraftAsset {
|
|
|
730
730
|
[k: string]: BlockStatePropertyDefaults;
|
|
731
731
|
}
|
|
732
732
|
|
|
733
|
-
interface
|
|
733
|
+
interface EntityLayer {
|
|
734
734
|
key: BasicAssetKey;
|
|
735
735
|
texture?: AssetKey;
|
|
736
736
|
layer: EntityModelLayer;
|
|
737
|
+
}
|
|
738
|
+
interface EntityModel extends EntityLayer {
|
|
737
739
|
id: string;
|
|
740
|
+
/** Selected layers; the top-level fields describe the first selection. */
|
|
741
|
+
layers?: Record<string, EntityLayer>;
|
|
738
742
|
}
|
|
739
743
|
interface EntityModelFile extends MinecraftAsset {
|
|
740
744
|
id: string;
|
|
@@ -765,6 +769,8 @@ interface EntityModelCube {
|
|
|
765
769
|
|
|
766
770
|
declare class Entities {
|
|
767
771
|
static getEntityList(): Promise<string[]>;
|
|
772
|
+
private static getModelFile;
|
|
773
|
+
static getLayerList(modelKey: BasicAssetKey): Promise<string[]>;
|
|
768
774
|
static getEntity(modelKey: BasicAssetKey, textureKey?: BasicAssetKey, options?: EntityModelOptions): Promise<Maybe<EntityModel>>;
|
|
769
775
|
static resolveTexture(modelKey: BasicAssetKey): Promise<Maybe<AssetKey>>;
|
|
770
776
|
/** @deprecated Use getEntityList(); block entities share the entity dataset. */
|
|
@@ -774,6 +780,10 @@ declare class Entities {
|
|
|
774
780
|
}
|
|
775
781
|
interface EntityModelOptions {
|
|
776
782
|
layer?: string;
|
|
783
|
+
/** Layer names in draw order; defaults to layer or "main". */
|
|
784
|
+
layers?: string[];
|
|
785
|
+
/** Per-layer texture overrides. The positional texture key applies to the first selected layer. */
|
|
786
|
+
textures?: Record<string, BasicAssetKey>;
|
|
777
787
|
}
|
|
778
788
|
|
|
779
789
|
declare class Models {
|
|
@@ -821,6 +831,8 @@ declare class BlockTints {
|
|
|
821
831
|
|
|
822
832
|
interface Instanceable {
|
|
823
833
|
nextInstance(): InstanceReference<SceneObject>;
|
|
834
|
+
removeInstanceAt(index: number): void;
|
|
835
|
+
isInstanceActive(index: number, reference: InstanceReference<Instanceable>): boolean;
|
|
824
836
|
getMatrixAt(index: number, matrix?: Matrix4): Matrix4;
|
|
825
837
|
setMatrixAt(index: number, matrix: Matrix4): void;
|
|
826
838
|
setPositionRotationScaleAt(index: number, position?: Vector3, rotation?: Euler, scale?: Vector3): void;
|
|
@@ -833,12 +845,15 @@ interface Instanceable {
|
|
|
833
845
|
}
|
|
834
846
|
declare function isInstanceable(obj: any): obj is Instanceable;
|
|
835
847
|
|
|
836
|
-
declare class InstanceReference<T extends Instanceable> implements Transformable {
|
|
848
|
+
declare class InstanceReference<T extends Instanceable> implements Transformable, Disposable {
|
|
837
849
|
readonly instanceable: T;
|
|
838
850
|
readonly index: number;
|
|
839
851
|
readonly isInstanceReference: true;
|
|
840
852
|
constructor(instanceable: T, index: number);
|
|
841
853
|
nextInstance(): InstanceReference<SceneObject>;
|
|
854
|
+
private get activeInstanceable();
|
|
855
|
+
removeFromScene(): void;
|
|
856
|
+
dispose(): void;
|
|
842
857
|
getMatrix(matrix?: Matrix4): Matrix4;
|
|
843
858
|
setMatrix(matrix: Matrix4): void;
|
|
844
859
|
setPositionRotationScale(position?: Vector3, rotation?: Euler, scale?: Vector3): void;
|
|
@@ -868,7 +883,6 @@ declare class ModelObject extends SceneObject {
|
|
|
868
883
|
private meshesCreated;
|
|
869
884
|
constructor(originalModel: Model, options?: Partial<ModelObjectOptions>);
|
|
870
885
|
init(): Promise<void>;
|
|
871
|
-
dispose(): void;
|
|
872
886
|
get textureAtlas(): Maybe<TextureAtlas>;
|
|
873
887
|
protected loadTextures(): Promise<void>;
|
|
874
888
|
protected createMeshes(force?: boolean): void;
|
|
@@ -949,13 +963,16 @@ declare class EntityObject extends SceneObject {
|
|
|
949
963
|
readonly isEntityObject: true;
|
|
950
964
|
static readonly DEFAULT_OPTIONS: EntityObjectOptions;
|
|
951
965
|
readonly options: EntityObjectOptions;
|
|
952
|
-
private imageData?;
|
|
953
966
|
private meshesCreated;
|
|
954
967
|
constructor(entity: EntityModel, options?: Partial<EntityObjectOptions>);
|
|
955
968
|
init(): Promise<void>;
|
|
956
969
|
dispose(): void;
|
|
957
|
-
|
|
958
|
-
|
|
970
|
+
getLayerGroup(name: string): Maybe<Object3D>;
|
|
971
|
+
getGroupByName(name: string, layerName?: string): Maybe<Object3D>;
|
|
972
|
+
getMeshByName(name: string, layerName?: string): Maybe<Mesh>;
|
|
973
|
+
private get entityLayers();
|
|
974
|
+
private getTextureKey;
|
|
975
|
+
protected loadTextures(layer?: EntityLayer): Promise<Maybe<ExtractableImageData>>;
|
|
959
976
|
protected createMeshes(force?: boolean): void;
|
|
960
977
|
private createPart;
|
|
961
978
|
protected applyTextures(): Promise<void>;
|
|
@@ -999,6 +1016,9 @@ declare class SceneObject extends Object3D<Object3DEventMap & {
|
|
|
999
1016
|
private materialCallbacks;
|
|
1000
1017
|
protected _isInstanced: boolean;
|
|
1001
1018
|
_instanceCounter: number;
|
|
1019
|
+
protected instanceMesh?: InstancedMesh;
|
|
1020
|
+
private readonly instanceReferences;
|
|
1021
|
+
private readonly freeInstanceIndices;
|
|
1002
1022
|
constructor(options?: Partial<SceneObjectOptions>);
|
|
1003
1023
|
set scene(scene: MineRenderScene);
|
|
1004
1024
|
get scene(): MineRenderScene;
|
|
@@ -1038,6 +1058,10 @@ declare class SceneObject extends Object3D<Object3DEventMap & {
|
|
|
1038
1058
|
get instanceCounter(): number;
|
|
1039
1059
|
protected constructInstanceReference(i: number): InstanceReference<SceneObject>;
|
|
1040
1060
|
nextInstance(): InstanceReference<SceneObject>;
|
|
1061
|
+
isInstanceActive(index: number, reference: InstanceReference<Instanceable>): boolean;
|
|
1062
|
+
removeInstanceAt(index: number): void;
|
|
1063
|
+
private growInstances;
|
|
1064
|
+
protected activeInstanceIndices(): Iterable<number>;
|
|
1041
1065
|
getMatrixAt(index: number, matrix?: Matrix4): Matrix4;
|
|
1042
1066
|
setMatrixAt(index: number, matrix: Matrix4): void;
|
|
1043
1067
|
setPositionRotationScaleAt(index: number, position?: Vector3, rotation?: Euler, scale?: Vector3): void;
|
|
@@ -1078,6 +1102,7 @@ declare class BlockObject extends SceneObject {
|
|
|
1078
1102
|
init(): Promise<void>;
|
|
1079
1103
|
dispose(): void;
|
|
1080
1104
|
removeFromScene(): void;
|
|
1105
|
+
private clearModels;
|
|
1081
1106
|
get state(): {
|
|
1082
1107
|
[key: string]: string;
|
|
1083
1108
|
};
|
|
@@ -1750,4 +1775,4 @@ declare class NodeCache extends PersistentCache<LocalStorage> {
|
|
|
1750
1775
|
forEach<T>(callback: (v: T, k: string) => void): Promise<void>;
|
|
1751
1776
|
}
|
|
1752
1777
|
|
|
1753
|
-
export { AXES, type AnimationFrame, type AnimationMeta, type AnimatorFunction, ArchiveAssetSource, type ArchiveEntry, type ArchiveProxy, AssetKey, AssetLoadError, AssetLoader, AssetParser, AssetSource, type AssetType, Assets, Axis, BUILTIN_ENTITY, BUILTIN_GENERATED, BasicAssetKey, type BasicMinecraftAsset, BatchedExecutor, type BedrockBone, type BedrockCube, type BedrockEntityDescription, type BedrockEntityFile, type BedrockGeometry, type BedrockGeometryFile, type Block, type BlockInfo, type BlockModel, type BlockModelTextures, BlockObject, type BlockObjectOptions, type BlockState, type BlockStateMultipart, type BlockStateProperties, type BlockStateProperty, type BlockStatePropertyDefaults, type BlockStatePropertyValue, type BlockStateVariant, type BlockStateVariants, BlockStates, BlockTints, type BoxGeometryKey, BrowserArchiveProxy, CUBE_FACES, type CacheKey, Caching, type CameraOptions, CanvasImage, type CapeLayout, Chunk, type CompatCanvas, type CompatImage, type ComposerOptions, type ControlsOptions, CubeFace, CubeFaceIndex, DEFAULT_ELEMENTS, DEFAULT_NAMESPACE, DEFAULT_ROOT, DEFAULT_UV, DISPLAY_POSITIONS, type DebugOptions, type DeepPartial, DefaultBlockStates, DisplayPosition, DisplayTransforms, type Disposable, type DoubleArray, type ElementFace, type ElementRotation, Entities, type EntityModel, type EntityModelCube, type EntityModelFile, type EntityModelLayer, type EntityModelOptions, type EntityModelPart, EntityObject, type EntityObjectOptions, Env, type EnvProvider, type ExtractableImageData, type FromTo, Geometries, GuiLight, GuiObject, type GuiObjectOptions, HostedAssetSource, type IModelTextures, ITEM_GENERATED, type ImageInfo, ImageLoader, type ImageSizeInfo, InstanceManager, InstanceReference, type Instanceable, type ItemModel, type ItemModelTextures, type ListAsset, MapControls, type MaterialKey, Materials, type Maybe, type MeshKey, Meshes, MineRenderError, MineRenderScene, type MineRenderSceneOptions, MineRenderWorld, type MinecraftAsset, MinecraftCubeTexture, MinecraftFaceUV, type MinecraftTextureMeta, type Model, type ModelDisplay, type ModelElement, type ModelFaces, ModelGenerator, ModelMerger, ModelObject, type ModelObjectOptions, ModelTextures, Models, type MultiBlockBlock, type MultiBlockStructure, type MultipartCondition, type NBTAsset, NBTHelper, NodeCache, NodeEnv, OrbitControls, PersistentCache, type QuadArray, type RawImageKey, type RenderOptions, Renderer, type RendererOptions, type RequestConfig, RequestError, type RequestResponse, Requests, type ResponseParser, SKIN_PARTS, SceneInspector, SceneObject, type SceneObjectOptions, SceneStats, SceneStatsDisplay, SchematicParser, type Serializable, type SkinGeometries, SkinImage, SkinObject, type SkinObjectOptions, SkinPart, type SkinTexture, type SkinTextureCoordinates, SkinTextures, Skins, type StructureNBT, StructureParser, type TextureAsset, TextureAtlas, type TextureKey, TextureLoader, Textures, Ticker, type TickerFunction, TintColors, type Transformable, type TripleArray, UVMapper, WrappedImage, addBox3WireframeToObject, addWireframeToMesh, addWireframeToObject, applyElementRotation, applyGenericRotation, axisToVec3, base64decode, base64encode, capeTextureSizes, captureException, changeEvent, clampRotationDegrees, classicSkinGeometries, classicSkinTextureCoordinates, computeMorphedAttributes, createCanvas, createImage, estimateBytesUsed, interleaveAttributes, isAssetKey, isBasicAssetKey, isBlockObject, isDisposable, isDoubleArray, isEntityObject, isInstanceManager, isInstanceReference, isInstanceable, isInstancedMesh, isMesh, isMineRenderScene, isModelObject, isObject3D, isOrthographicCamera, isPerspectiveCamera, isQuadArray, isSceneObject, isTransformable, isTripleArray, isVector3, md5, mergeBufferAttributes, mergeBufferGeometries, mergeVertices, prefix, registerNodeEnv, serializeBoxGeometryKey, serializeImageKey, serializeMaterialKey, serializeMeshKey, serializeTextureKey, sha1, sha256, sha512, shutdown, sleep, slimSkinGeometries, slimSkinTextureCoordinates, timingEnd, timingStart, toDegrees, toRadians, toTrianglesDrawMode };
|
|
1778
|
+
export { AXES, type AnimationFrame, type AnimationMeta, type AnimatorFunction, ArchiveAssetSource, type ArchiveEntry, type ArchiveProxy, AssetKey, AssetLoadError, AssetLoader, AssetParser, AssetSource, type AssetType, Assets, Axis, BUILTIN_ENTITY, BUILTIN_GENERATED, BasicAssetKey, type BasicMinecraftAsset, BatchedExecutor, type BedrockBone, type BedrockCube, type BedrockEntityDescription, type BedrockEntityFile, type BedrockGeometry, type BedrockGeometryFile, type Block, type BlockInfo, type BlockModel, type BlockModelTextures, BlockObject, type BlockObjectOptions, type BlockState, type BlockStateMultipart, type BlockStateProperties, type BlockStateProperty, type BlockStatePropertyDefaults, type BlockStatePropertyValue, type BlockStateVariant, type BlockStateVariants, BlockStates, BlockTints, type BoxGeometryKey, BrowserArchiveProxy, CUBE_FACES, type CacheKey, Caching, type CameraOptions, CanvasImage, type CapeLayout, Chunk, type CompatCanvas, type CompatImage, type ComposerOptions, type ControlsOptions, CubeFace, CubeFaceIndex, DEFAULT_ELEMENTS, DEFAULT_NAMESPACE, DEFAULT_ROOT, DEFAULT_UV, DISPLAY_POSITIONS, type DebugOptions, type DeepPartial, DefaultBlockStates, DisplayPosition, DisplayTransforms, type Disposable, type DoubleArray, type ElementFace, type ElementRotation, Entities, type EntityLayer, type EntityModel, type EntityModelCube, type EntityModelFile, type EntityModelLayer, type EntityModelOptions, type EntityModelPart, EntityObject, type EntityObjectOptions, Env, type EnvProvider, type ExtractableImageData, type FromTo, Geometries, GuiLight, GuiObject, type GuiObjectOptions, HostedAssetSource, type IModelTextures, ITEM_GENERATED, type ImageInfo, ImageLoader, type ImageSizeInfo, InstanceManager, InstanceReference, type Instanceable, type ItemModel, type ItemModelTextures, type ListAsset, MapControls, type MaterialKey, Materials, type Maybe, type MeshKey, Meshes, MineRenderError, MineRenderScene, type MineRenderSceneOptions, MineRenderWorld, type MinecraftAsset, MinecraftCubeTexture, MinecraftFaceUV, type MinecraftTextureMeta, type Model, type ModelDisplay, type ModelElement, type ModelFaces, ModelGenerator, ModelMerger, ModelObject, type ModelObjectOptions, ModelTextures, Models, type MultiBlockBlock, type MultiBlockStructure, type MultipartCondition, type NBTAsset, NBTHelper, NodeCache, NodeEnv, OrbitControls, PersistentCache, type QuadArray, type RawImageKey, type RenderOptions, Renderer, type RendererOptions, type RequestConfig, RequestError, type RequestResponse, Requests, type ResponseParser, SKIN_PARTS, SceneInspector, SceneObject, type SceneObjectOptions, SceneStats, SceneStatsDisplay, SchematicParser, type Serializable, type SkinGeometries, SkinImage, SkinObject, type SkinObjectOptions, SkinPart, type SkinTexture, type SkinTextureCoordinates, SkinTextures, Skins, type StructureNBT, StructureParser, type TextureAsset, TextureAtlas, type TextureKey, TextureLoader, Textures, Ticker, type TickerFunction, TintColors, type Transformable, type TripleArray, UVMapper, WrappedImage, addBox3WireframeToObject, addWireframeToMesh, addWireframeToObject, applyElementRotation, applyGenericRotation, axisToVec3, base64decode, base64encode, capeTextureSizes, captureException, changeEvent, clampRotationDegrees, classicSkinGeometries, classicSkinTextureCoordinates, computeMorphedAttributes, createCanvas, createImage, estimateBytesUsed, interleaveAttributes, isAssetKey, isBasicAssetKey, isBlockObject, isDisposable, isDoubleArray, isEntityObject, isInstanceManager, isInstanceReference, isInstanceable, isInstancedMesh, isMesh, isMineRenderScene, isModelObject, isObject3D, isOrthographicCamera, isPerspectiveCamera, isQuadArray, isSceneObject, isTransformable, isTripleArray, isVector3, md5, mergeBufferAttributes, mergeBufferGeometries, mergeVertices, prefix, registerNodeEnv, serializeBoxGeometryKey, serializeImageKey, serializeMaterialKey, serializeMeshKey, serializeTextureKey, sha1, sha256, sha512, shutdown, sleep, slimSkinGeometries, slimSkinTextureCoordinates, timingEnd, timingStart, toDegrees, toRadians, toTrianglesDrawMode };
|
package/dist/node/index.d.ts
CHANGED
|
@@ -730,11 +730,15 @@ declare class DefaultBlockStates implements MinecraftAsset {
|
|
|
730
730
|
[k: string]: BlockStatePropertyDefaults;
|
|
731
731
|
}
|
|
732
732
|
|
|
733
|
-
interface
|
|
733
|
+
interface EntityLayer {
|
|
734
734
|
key: BasicAssetKey;
|
|
735
735
|
texture?: AssetKey;
|
|
736
736
|
layer: EntityModelLayer;
|
|
737
|
+
}
|
|
738
|
+
interface EntityModel extends EntityLayer {
|
|
737
739
|
id: string;
|
|
740
|
+
/** Selected layers; the top-level fields describe the first selection. */
|
|
741
|
+
layers?: Record<string, EntityLayer>;
|
|
738
742
|
}
|
|
739
743
|
interface EntityModelFile extends MinecraftAsset {
|
|
740
744
|
id: string;
|
|
@@ -765,6 +769,8 @@ interface EntityModelCube {
|
|
|
765
769
|
|
|
766
770
|
declare class Entities {
|
|
767
771
|
static getEntityList(): Promise<string[]>;
|
|
772
|
+
private static getModelFile;
|
|
773
|
+
static getLayerList(modelKey: BasicAssetKey): Promise<string[]>;
|
|
768
774
|
static getEntity(modelKey: BasicAssetKey, textureKey?: BasicAssetKey, options?: EntityModelOptions): Promise<Maybe<EntityModel>>;
|
|
769
775
|
static resolveTexture(modelKey: BasicAssetKey): Promise<Maybe<AssetKey>>;
|
|
770
776
|
/** @deprecated Use getEntityList(); block entities share the entity dataset. */
|
|
@@ -774,6 +780,10 @@ declare class Entities {
|
|
|
774
780
|
}
|
|
775
781
|
interface EntityModelOptions {
|
|
776
782
|
layer?: string;
|
|
783
|
+
/** Layer names in draw order; defaults to layer or "main". */
|
|
784
|
+
layers?: string[];
|
|
785
|
+
/** Per-layer texture overrides. The positional texture key applies to the first selected layer. */
|
|
786
|
+
textures?: Record<string, BasicAssetKey>;
|
|
777
787
|
}
|
|
778
788
|
|
|
779
789
|
declare class Models {
|
|
@@ -821,6 +831,8 @@ declare class BlockTints {
|
|
|
821
831
|
|
|
822
832
|
interface Instanceable {
|
|
823
833
|
nextInstance(): InstanceReference<SceneObject>;
|
|
834
|
+
removeInstanceAt(index: number): void;
|
|
835
|
+
isInstanceActive(index: number, reference: InstanceReference<Instanceable>): boolean;
|
|
824
836
|
getMatrixAt(index: number, matrix?: Matrix4): Matrix4;
|
|
825
837
|
setMatrixAt(index: number, matrix: Matrix4): void;
|
|
826
838
|
setPositionRotationScaleAt(index: number, position?: Vector3, rotation?: Euler, scale?: Vector3): void;
|
|
@@ -833,12 +845,15 @@ interface Instanceable {
|
|
|
833
845
|
}
|
|
834
846
|
declare function isInstanceable(obj: any): obj is Instanceable;
|
|
835
847
|
|
|
836
|
-
declare class InstanceReference<T extends Instanceable> implements Transformable {
|
|
848
|
+
declare class InstanceReference<T extends Instanceable> implements Transformable, Disposable {
|
|
837
849
|
readonly instanceable: T;
|
|
838
850
|
readonly index: number;
|
|
839
851
|
readonly isInstanceReference: true;
|
|
840
852
|
constructor(instanceable: T, index: number);
|
|
841
853
|
nextInstance(): InstanceReference<SceneObject>;
|
|
854
|
+
private get activeInstanceable();
|
|
855
|
+
removeFromScene(): void;
|
|
856
|
+
dispose(): void;
|
|
842
857
|
getMatrix(matrix?: Matrix4): Matrix4;
|
|
843
858
|
setMatrix(matrix: Matrix4): void;
|
|
844
859
|
setPositionRotationScale(position?: Vector3, rotation?: Euler, scale?: Vector3): void;
|
|
@@ -868,7 +883,6 @@ declare class ModelObject extends SceneObject {
|
|
|
868
883
|
private meshesCreated;
|
|
869
884
|
constructor(originalModel: Model, options?: Partial<ModelObjectOptions>);
|
|
870
885
|
init(): Promise<void>;
|
|
871
|
-
dispose(): void;
|
|
872
886
|
get textureAtlas(): Maybe<TextureAtlas>;
|
|
873
887
|
protected loadTextures(): Promise<void>;
|
|
874
888
|
protected createMeshes(force?: boolean): void;
|
|
@@ -949,13 +963,16 @@ declare class EntityObject extends SceneObject {
|
|
|
949
963
|
readonly isEntityObject: true;
|
|
950
964
|
static readonly DEFAULT_OPTIONS: EntityObjectOptions;
|
|
951
965
|
readonly options: EntityObjectOptions;
|
|
952
|
-
private imageData?;
|
|
953
966
|
private meshesCreated;
|
|
954
967
|
constructor(entity: EntityModel, options?: Partial<EntityObjectOptions>);
|
|
955
968
|
init(): Promise<void>;
|
|
956
969
|
dispose(): void;
|
|
957
|
-
|
|
958
|
-
|
|
970
|
+
getLayerGroup(name: string): Maybe<Object3D>;
|
|
971
|
+
getGroupByName(name: string, layerName?: string): Maybe<Object3D>;
|
|
972
|
+
getMeshByName(name: string, layerName?: string): Maybe<Mesh>;
|
|
973
|
+
private get entityLayers();
|
|
974
|
+
private getTextureKey;
|
|
975
|
+
protected loadTextures(layer?: EntityLayer): Promise<Maybe<ExtractableImageData>>;
|
|
959
976
|
protected createMeshes(force?: boolean): void;
|
|
960
977
|
private createPart;
|
|
961
978
|
protected applyTextures(): Promise<void>;
|
|
@@ -999,6 +1016,9 @@ declare class SceneObject extends Object3D<Object3DEventMap & {
|
|
|
999
1016
|
private materialCallbacks;
|
|
1000
1017
|
protected _isInstanced: boolean;
|
|
1001
1018
|
_instanceCounter: number;
|
|
1019
|
+
protected instanceMesh?: InstancedMesh;
|
|
1020
|
+
private readonly instanceReferences;
|
|
1021
|
+
private readonly freeInstanceIndices;
|
|
1002
1022
|
constructor(options?: Partial<SceneObjectOptions>);
|
|
1003
1023
|
set scene(scene: MineRenderScene);
|
|
1004
1024
|
get scene(): MineRenderScene;
|
|
@@ -1038,6 +1058,10 @@ declare class SceneObject extends Object3D<Object3DEventMap & {
|
|
|
1038
1058
|
get instanceCounter(): number;
|
|
1039
1059
|
protected constructInstanceReference(i: number): InstanceReference<SceneObject>;
|
|
1040
1060
|
nextInstance(): InstanceReference<SceneObject>;
|
|
1061
|
+
isInstanceActive(index: number, reference: InstanceReference<Instanceable>): boolean;
|
|
1062
|
+
removeInstanceAt(index: number): void;
|
|
1063
|
+
private growInstances;
|
|
1064
|
+
protected activeInstanceIndices(): Iterable<number>;
|
|
1041
1065
|
getMatrixAt(index: number, matrix?: Matrix4): Matrix4;
|
|
1042
1066
|
setMatrixAt(index: number, matrix: Matrix4): void;
|
|
1043
1067
|
setPositionRotationScaleAt(index: number, position?: Vector3, rotation?: Euler, scale?: Vector3): void;
|
|
@@ -1078,6 +1102,7 @@ declare class BlockObject extends SceneObject {
|
|
|
1078
1102
|
init(): Promise<void>;
|
|
1079
1103
|
dispose(): void;
|
|
1080
1104
|
removeFromScene(): void;
|
|
1105
|
+
private clearModels;
|
|
1081
1106
|
get state(): {
|
|
1082
1107
|
[key: string]: string;
|
|
1083
1108
|
};
|
|
@@ -1750,4 +1775,4 @@ declare class NodeCache extends PersistentCache<LocalStorage> {
|
|
|
1750
1775
|
forEach<T>(callback: (v: T, k: string) => void): Promise<void>;
|
|
1751
1776
|
}
|
|
1752
1777
|
|
|
1753
|
-
export { AXES, type AnimationFrame, type AnimationMeta, type AnimatorFunction, ArchiveAssetSource, type ArchiveEntry, type ArchiveProxy, AssetKey, AssetLoadError, AssetLoader, AssetParser, AssetSource, type AssetType, Assets, Axis, BUILTIN_ENTITY, BUILTIN_GENERATED, BasicAssetKey, type BasicMinecraftAsset, BatchedExecutor, type BedrockBone, type BedrockCube, type BedrockEntityDescription, type BedrockEntityFile, type BedrockGeometry, type BedrockGeometryFile, type Block, type BlockInfo, type BlockModel, type BlockModelTextures, BlockObject, type BlockObjectOptions, type BlockState, type BlockStateMultipart, type BlockStateProperties, type BlockStateProperty, type BlockStatePropertyDefaults, type BlockStatePropertyValue, type BlockStateVariant, type BlockStateVariants, BlockStates, BlockTints, type BoxGeometryKey, BrowserArchiveProxy, CUBE_FACES, type CacheKey, Caching, type CameraOptions, CanvasImage, type CapeLayout, Chunk, type CompatCanvas, type CompatImage, type ComposerOptions, type ControlsOptions, CubeFace, CubeFaceIndex, DEFAULT_ELEMENTS, DEFAULT_NAMESPACE, DEFAULT_ROOT, DEFAULT_UV, DISPLAY_POSITIONS, type DebugOptions, type DeepPartial, DefaultBlockStates, DisplayPosition, DisplayTransforms, type Disposable, type DoubleArray, type ElementFace, type ElementRotation, Entities, type EntityModel, type EntityModelCube, type EntityModelFile, type EntityModelLayer, type EntityModelOptions, type EntityModelPart, EntityObject, type EntityObjectOptions, Env, type EnvProvider, type ExtractableImageData, type FromTo, Geometries, GuiLight, GuiObject, type GuiObjectOptions, HostedAssetSource, type IModelTextures, ITEM_GENERATED, type ImageInfo, ImageLoader, type ImageSizeInfo, InstanceManager, InstanceReference, type Instanceable, type ItemModel, type ItemModelTextures, type ListAsset, MapControls, type MaterialKey, Materials, type Maybe, type MeshKey, Meshes, MineRenderError, MineRenderScene, type MineRenderSceneOptions, MineRenderWorld, type MinecraftAsset, MinecraftCubeTexture, MinecraftFaceUV, type MinecraftTextureMeta, type Model, type ModelDisplay, type ModelElement, type ModelFaces, ModelGenerator, ModelMerger, ModelObject, type ModelObjectOptions, ModelTextures, Models, type MultiBlockBlock, type MultiBlockStructure, type MultipartCondition, type NBTAsset, NBTHelper, NodeCache, NodeEnv, OrbitControls, PersistentCache, type QuadArray, type RawImageKey, type RenderOptions, Renderer, type RendererOptions, type RequestConfig, RequestError, type RequestResponse, Requests, type ResponseParser, SKIN_PARTS, SceneInspector, SceneObject, type SceneObjectOptions, SceneStats, SceneStatsDisplay, SchematicParser, type Serializable, type SkinGeometries, SkinImage, SkinObject, type SkinObjectOptions, SkinPart, type SkinTexture, type SkinTextureCoordinates, SkinTextures, Skins, type StructureNBT, StructureParser, type TextureAsset, TextureAtlas, type TextureKey, TextureLoader, Textures, Ticker, type TickerFunction, TintColors, type Transformable, type TripleArray, UVMapper, WrappedImage, addBox3WireframeToObject, addWireframeToMesh, addWireframeToObject, applyElementRotation, applyGenericRotation, axisToVec3, base64decode, base64encode, capeTextureSizes, captureException, changeEvent, clampRotationDegrees, classicSkinGeometries, classicSkinTextureCoordinates, computeMorphedAttributes, createCanvas, createImage, estimateBytesUsed, interleaveAttributes, isAssetKey, isBasicAssetKey, isBlockObject, isDisposable, isDoubleArray, isEntityObject, isInstanceManager, isInstanceReference, isInstanceable, isInstancedMesh, isMesh, isMineRenderScene, isModelObject, isObject3D, isOrthographicCamera, isPerspectiveCamera, isQuadArray, isSceneObject, isTransformable, isTripleArray, isVector3, md5, mergeBufferAttributes, mergeBufferGeometries, mergeVertices, prefix, registerNodeEnv, serializeBoxGeometryKey, serializeImageKey, serializeMaterialKey, serializeMeshKey, serializeTextureKey, sha1, sha256, sha512, shutdown, sleep, slimSkinGeometries, slimSkinTextureCoordinates, timingEnd, timingStart, toDegrees, toRadians, toTrianglesDrawMode };
|
|
1778
|
+
export { AXES, type AnimationFrame, type AnimationMeta, type AnimatorFunction, ArchiveAssetSource, type ArchiveEntry, type ArchiveProxy, AssetKey, AssetLoadError, AssetLoader, AssetParser, AssetSource, type AssetType, Assets, Axis, BUILTIN_ENTITY, BUILTIN_GENERATED, BasicAssetKey, type BasicMinecraftAsset, BatchedExecutor, type BedrockBone, type BedrockCube, type BedrockEntityDescription, type BedrockEntityFile, type BedrockGeometry, type BedrockGeometryFile, type Block, type BlockInfo, type BlockModel, type BlockModelTextures, BlockObject, type BlockObjectOptions, type BlockState, type BlockStateMultipart, type BlockStateProperties, type BlockStateProperty, type BlockStatePropertyDefaults, type BlockStatePropertyValue, type BlockStateVariant, type BlockStateVariants, BlockStates, BlockTints, type BoxGeometryKey, BrowserArchiveProxy, CUBE_FACES, type CacheKey, Caching, type CameraOptions, CanvasImage, type CapeLayout, Chunk, type CompatCanvas, type CompatImage, type ComposerOptions, type ControlsOptions, CubeFace, CubeFaceIndex, DEFAULT_ELEMENTS, DEFAULT_NAMESPACE, DEFAULT_ROOT, DEFAULT_UV, DISPLAY_POSITIONS, type DebugOptions, type DeepPartial, DefaultBlockStates, DisplayPosition, DisplayTransforms, type Disposable, type DoubleArray, type ElementFace, type ElementRotation, Entities, type EntityLayer, type EntityModel, type EntityModelCube, type EntityModelFile, type EntityModelLayer, type EntityModelOptions, type EntityModelPart, EntityObject, type EntityObjectOptions, Env, type EnvProvider, type ExtractableImageData, type FromTo, Geometries, GuiLight, GuiObject, type GuiObjectOptions, HostedAssetSource, type IModelTextures, ITEM_GENERATED, type ImageInfo, ImageLoader, type ImageSizeInfo, InstanceManager, InstanceReference, type Instanceable, type ItemModel, type ItemModelTextures, type ListAsset, MapControls, type MaterialKey, Materials, type Maybe, type MeshKey, Meshes, MineRenderError, MineRenderScene, type MineRenderSceneOptions, MineRenderWorld, type MinecraftAsset, MinecraftCubeTexture, MinecraftFaceUV, type MinecraftTextureMeta, type Model, type ModelDisplay, type ModelElement, type ModelFaces, ModelGenerator, ModelMerger, ModelObject, type ModelObjectOptions, ModelTextures, Models, type MultiBlockBlock, type MultiBlockStructure, type MultipartCondition, type NBTAsset, NBTHelper, NodeCache, NodeEnv, OrbitControls, PersistentCache, type QuadArray, type RawImageKey, type RenderOptions, Renderer, type RendererOptions, type RequestConfig, RequestError, type RequestResponse, Requests, type ResponseParser, SKIN_PARTS, SceneInspector, SceneObject, type SceneObjectOptions, SceneStats, SceneStatsDisplay, SchematicParser, type Serializable, type SkinGeometries, SkinImage, SkinObject, type SkinObjectOptions, SkinPart, type SkinTexture, type SkinTextureCoordinates, SkinTextures, Skins, type StructureNBT, StructureParser, type TextureAsset, TextureAtlas, type TextureKey, TextureLoader, Textures, Ticker, type TickerFunction, TintColors, type Transformable, type TripleArray, UVMapper, WrappedImage, addBox3WireframeToObject, addWireframeToMesh, addWireframeToObject, applyElementRotation, applyGenericRotation, axisToVec3, base64decode, base64encode, capeTextureSizes, captureException, changeEvent, clampRotationDegrees, classicSkinGeometries, classicSkinTextureCoordinates, computeMorphedAttributes, createCanvas, createImage, estimateBytesUsed, interleaveAttributes, isAssetKey, isBasicAssetKey, isBlockObject, isDisposable, isDoubleArray, isEntityObject, isInstanceManager, isInstanceReference, isInstanceable, isInstancedMesh, isMesh, isMineRenderScene, isModelObject, isObject3D, isOrthographicCamera, isPerspectiveCamera, isQuadArray, isSceneObject, isTransformable, isTripleArray, isVector3, md5, mergeBufferAttributes, mergeBufferGeometries, mergeVertices, prefix, registerNodeEnv, serializeBoxGeometryKey, serializeImageKey, serializeMaterialKey, serializeMeshKey, serializeTextureKey, sha1, sha256, sha512, shutdown, sleep, slimSkinGeometries, slimSkinTextureCoordinates, timingEnd, timingStart, toDegrees, toRadians, toTrianglesDrawMode };
|