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/browser/index.d.mts
CHANGED
|
@@ -729,11 +729,15 @@ declare class DefaultBlockStates implements MinecraftAsset {
|
|
|
729
729
|
[k: string]: BlockStatePropertyDefaults;
|
|
730
730
|
}
|
|
731
731
|
|
|
732
|
-
interface
|
|
732
|
+
interface EntityLayer {
|
|
733
733
|
key: BasicAssetKey;
|
|
734
734
|
texture?: AssetKey;
|
|
735
735
|
layer: EntityModelLayer;
|
|
736
|
+
}
|
|
737
|
+
interface EntityModel extends EntityLayer {
|
|
736
738
|
id: string;
|
|
739
|
+
/** Selected layers; the top-level fields describe the first selection. */
|
|
740
|
+
layers?: Record<string, EntityLayer>;
|
|
737
741
|
}
|
|
738
742
|
interface EntityModelFile extends MinecraftAsset {
|
|
739
743
|
id: string;
|
|
@@ -764,6 +768,8 @@ interface EntityModelCube {
|
|
|
764
768
|
|
|
765
769
|
declare class Entities {
|
|
766
770
|
static getEntityList(): Promise<string[]>;
|
|
771
|
+
private static getModelFile;
|
|
772
|
+
static getLayerList(modelKey: BasicAssetKey): Promise<string[]>;
|
|
767
773
|
static getEntity(modelKey: BasicAssetKey, textureKey?: BasicAssetKey, options?: EntityModelOptions): Promise<Maybe<EntityModel>>;
|
|
768
774
|
static resolveTexture(modelKey: BasicAssetKey): Promise<Maybe<AssetKey>>;
|
|
769
775
|
/** @deprecated Use getEntityList(); block entities share the entity dataset. */
|
|
@@ -773,6 +779,10 @@ declare class Entities {
|
|
|
773
779
|
}
|
|
774
780
|
interface EntityModelOptions {
|
|
775
781
|
layer?: string;
|
|
782
|
+
/** Layer names in draw order; defaults to layer or "main". */
|
|
783
|
+
layers?: string[];
|
|
784
|
+
/** Per-layer texture overrides. The positional texture key applies to the first selected layer. */
|
|
785
|
+
textures?: Record<string, BasicAssetKey>;
|
|
776
786
|
}
|
|
777
787
|
|
|
778
788
|
declare class Models {
|
|
@@ -820,6 +830,8 @@ declare class BlockTints {
|
|
|
820
830
|
|
|
821
831
|
interface Instanceable {
|
|
822
832
|
nextInstance(): InstanceReference<SceneObject>;
|
|
833
|
+
removeInstanceAt(index: number): void;
|
|
834
|
+
isInstanceActive(index: number, reference: InstanceReference<Instanceable>): boolean;
|
|
823
835
|
getMatrixAt(index: number, matrix?: Matrix4): Matrix4;
|
|
824
836
|
setMatrixAt(index: number, matrix: Matrix4): void;
|
|
825
837
|
setPositionRotationScaleAt(index: number, position?: Vector3, rotation?: Euler, scale?: Vector3): void;
|
|
@@ -832,12 +844,15 @@ interface Instanceable {
|
|
|
832
844
|
}
|
|
833
845
|
declare function isInstanceable(obj: any): obj is Instanceable;
|
|
834
846
|
|
|
835
|
-
declare class InstanceReference<T extends Instanceable> implements Transformable {
|
|
847
|
+
declare class InstanceReference<T extends Instanceable> implements Transformable, Disposable {
|
|
836
848
|
readonly instanceable: T;
|
|
837
849
|
readonly index: number;
|
|
838
850
|
readonly isInstanceReference: true;
|
|
839
851
|
constructor(instanceable: T, index: number);
|
|
840
852
|
nextInstance(): InstanceReference<SceneObject>;
|
|
853
|
+
private get activeInstanceable();
|
|
854
|
+
removeFromScene(): void;
|
|
855
|
+
dispose(): void;
|
|
841
856
|
getMatrix(matrix?: Matrix4): Matrix4;
|
|
842
857
|
setMatrix(matrix: Matrix4): void;
|
|
843
858
|
setPositionRotationScale(position?: Vector3, rotation?: Euler, scale?: Vector3): void;
|
|
@@ -867,7 +882,6 @@ declare class ModelObject extends SceneObject {
|
|
|
867
882
|
private meshesCreated;
|
|
868
883
|
constructor(originalModel: Model, options?: Partial<ModelObjectOptions>);
|
|
869
884
|
init(): Promise<void>;
|
|
870
|
-
dispose(): void;
|
|
871
885
|
get textureAtlas(): Maybe<TextureAtlas>;
|
|
872
886
|
protected loadTextures(): Promise<void>;
|
|
873
887
|
protected createMeshes(force?: boolean): void;
|
|
@@ -948,13 +962,16 @@ declare class EntityObject extends SceneObject {
|
|
|
948
962
|
readonly isEntityObject: true;
|
|
949
963
|
static readonly DEFAULT_OPTIONS: EntityObjectOptions;
|
|
950
964
|
readonly options: EntityObjectOptions;
|
|
951
|
-
private imageData?;
|
|
952
965
|
private meshesCreated;
|
|
953
966
|
constructor(entity: EntityModel, options?: Partial<EntityObjectOptions>);
|
|
954
967
|
init(): Promise<void>;
|
|
955
968
|
dispose(): void;
|
|
956
|
-
|
|
957
|
-
|
|
969
|
+
getLayerGroup(name: string): Maybe<Object3D>;
|
|
970
|
+
getGroupByName(name: string, layerName?: string): Maybe<Object3D>;
|
|
971
|
+
getMeshByName(name: string, layerName?: string): Maybe<Mesh>;
|
|
972
|
+
private get entityLayers();
|
|
973
|
+
private getTextureKey;
|
|
974
|
+
protected loadTextures(layer?: EntityLayer): Promise<Maybe<ExtractableImageData>>;
|
|
958
975
|
protected createMeshes(force?: boolean): void;
|
|
959
976
|
private createPart;
|
|
960
977
|
protected applyTextures(): Promise<void>;
|
|
@@ -998,6 +1015,9 @@ declare class SceneObject extends Object3D<Object3DEventMap & {
|
|
|
998
1015
|
private materialCallbacks;
|
|
999
1016
|
protected _isInstanced: boolean;
|
|
1000
1017
|
_instanceCounter: number;
|
|
1018
|
+
protected instanceMesh?: InstancedMesh;
|
|
1019
|
+
private readonly instanceReferences;
|
|
1020
|
+
private readonly freeInstanceIndices;
|
|
1001
1021
|
constructor(options?: Partial<SceneObjectOptions>);
|
|
1002
1022
|
set scene(scene: MineRenderScene);
|
|
1003
1023
|
get scene(): MineRenderScene;
|
|
@@ -1037,6 +1057,10 @@ declare class SceneObject extends Object3D<Object3DEventMap & {
|
|
|
1037
1057
|
get instanceCounter(): number;
|
|
1038
1058
|
protected constructInstanceReference(i: number): InstanceReference<SceneObject>;
|
|
1039
1059
|
nextInstance(): InstanceReference<SceneObject>;
|
|
1060
|
+
isInstanceActive(index: number, reference: InstanceReference<Instanceable>): boolean;
|
|
1061
|
+
removeInstanceAt(index: number): void;
|
|
1062
|
+
private growInstances;
|
|
1063
|
+
protected activeInstanceIndices(): Iterable<number>;
|
|
1040
1064
|
getMatrixAt(index: number, matrix?: Matrix4): Matrix4;
|
|
1041
1065
|
setMatrixAt(index: number, matrix: Matrix4): void;
|
|
1042
1066
|
setPositionRotationScaleAt(index: number, position?: Vector3, rotation?: Euler, scale?: Vector3): void;
|
|
@@ -1077,6 +1101,7 @@ declare class BlockObject extends SceneObject {
|
|
|
1077
1101
|
init(): Promise<void>;
|
|
1078
1102
|
dispose(): void;
|
|
1079
1103
|
removeFromScene(): void;
|
|
1104
|
+
private clearModels;
|
|
1080
1105
|
get state(): {
|
|
1081
1106
|
[key: string]: string;
|
|
1082
1107
|
};
|
|
@@ -1747,4 +1772,4 @@ declare class BrowserCache extends PersistentCache<LocalForage> {
|
|
|
1747
1772
|
*/
|
|
1748
1773
|
declare function probeImageSize(data: Uint8Array): ImageSizeInfo;
|
|
1749
1774
|
|
|
1750
|
-
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, BrowserCache, BrowserEnv, 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, 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, probeImageSize, registerBrowserEnv, serializeBoxGeometryKey, serializeImageKey, serializeMaterialKey, serializeMeshKey, serializeTextureKey, sha1, sha256, sha512, shutdown, sleep, slimSkinGeometries, slimSkinTextureCoordinates, timingEnd, timingStart, toDegrees, toRadians, toTrianglesDrawMode };
|
|
1775
|
+
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, BrowserCache, BrowserEnv, 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, 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, probeImageSize, registerBrowserEnv, serializeBoxGeometryKey, serializeImageKey, serializeMaterialKey, serializeMeshKey, serializeTextureKey, sha1, sha256, sha512, shutdown, sleep, slimSkinGeometries, slimSkinTextureCoordinates, timingEnd, timingStart, toDegrees, toRadians, toTrianglesDrawMode };
|
package/dist/browser/index.d.ts
CHANGED
|
@@ -729,11 +729,15 @@ declare class DefaultBlockStates implements MinecraftAsset {
|
|
|
729
729
|
[k: string]: BlockStatePropertyDefaults;
|
|
730
730
|
}
|
|
731
731
|
|
|
732
|
-
interface
|
|
732
|
+
interface EntityLayer {
|
|
733
733
|
key: BasicAssetKey;
|
|
734
734
|
texture?: AssetKey;
|
|
735
735
|
layer: EntityModelLayer;
|
|
736
|
+
}
|
|
737
|
+
interface EntityModel extends EntityLayer {
|
|
736
738
|
id: string;
|
|
739
|
+
/** Selected layers; the top-level fields describe the first selection. */
|
|
740
|
+
layers?: Record<string, EntityLayer>;
|
|
737
741
|
}
|
|
738
742
|
interface EntityModelFile extends MinecraftAsset {
|
|
739
743
|
id: string;
|
|
@@ -764,6 +768,8 @@ interface EntityModelCube {
|
|
|
764
768
|
|
|
765
769
|
declare class Entities {
|
|
766
770
|
static getEntityList(): Promise<string[]>;
|
|
771
|
+
private static getModelFile;
|
|
772
|
+
static getLayerList(modelKey: BasicAssetKey): Promise<string[]>;
|
|
767
773
|
static getEntity(modelKey: BasicAssetKey, textureKey?: BasicAssetKey, options?: EntityModelOptions): Promise<Maybe<EntityModel>>;
|
|
768
774
|
static resolveTexture(modelKey: BasicAssetKey): Promise<Maybe<AssetKey>>;
|
|
769
775
|
/** @deprecated Use getEntityList(); block entities share the entity dataset. */
|
|
@@ -773,6 +779,10 @@ declare class Entities {
|
|
|
773
779
|
}
|
|
774
780
|
interface EntityModelOptions {
|
|
775
781
|
layer?: string;
|
|
782
|
+
/** Layer names in draw order; defaults to layer or "main". */
|
|
783
|
+
layers?: string[];
|
|
784
|
+
/** Per-layer texture overrides. The positional texture key applies to the first selected layer. */
|
|
785
|
+
textures?: Record<string, BasicAssetKey>;
|
|
776
786
|
}
|
|
777
787
|
|
|
778
788
|
declare class Models {
|
|
@@ -820,6 +830,8 @@ declare class BlockTints {
|
|
|
820
830
|
|
|
821
831
|
interface Instanceable {
|
|
822
832
|
nextInstance(): InstanceReference<SceneObject>;
|
|
833
|
+
removeInstanceAt(index: number): void;
|
|
834
|
+
isInstanceActive(index: number, reference: InstanceReference<Instanceable>): boolean;
|
|
823
835
|
getMatrixAt(index: number, matrix?: Matrix4): Matrix4;
|
|
824
836
|
setMatrixAt(index: number, matrix: Matrix4): void;
|
|
825
837
|
setPositionRotationScaleAt(index: number, position?: Vector3, rotation?: Euler, scale?: Vector3): void;
|
|
@@ -832,12 +844,15 @@ interface Instanceable {
|
|
|
832
844
|
}
|
|
833
845
|
declare function isInstanceable(obj: any): obj is Instanceable;
|
|
834
846
|
|
|
835
|
-
declare class InstanceReference<T extends Instanceable> implements Transformable {
|
|
847
|
+
declare class InstanceReference<T extends Instanceable> implements Transformable, Disposable {
|
|
836
848
|
readonly instanceable: T;
|
|
837
849
|
readonly index: number;
|
|
838
850
|
readonly isInstanceReference: true;
|
|
839
851
|
constructor(instanceable: T, index: number);
|
|
840
852
|
nextInstance(): InstanceReference<SceneObject>;
|
|
853
|
+
private get activeInstanceable();
|
|
854
|
+
removeFromScene(): void;
|
|
855
|
+
dispose(): void;
|
|
841
856
|
getMatrix(matrix?: Matrix4): Matrix4;
|
|
842
857
|
setMatrix(matrix: Matrix4): void;
|
|
843
858
|
setPositionRotationScale(position?: Vector3, rotation?: Euler, scale?: Vector3): void;
|
|
@@ -867,7 +882,6 @@ declare class ModelObject extends SceneObject {
|
|
|
867
882
|
private meshesCreated;
|
|
868
883
|
constructor(originalModel: Model, options?: Partial<ModelObjectOptions>);
|
|
869
884
|
init(): Promise<void>;
|
|
870
|
-
dispose(): void;
|
|
871
885
|
get textureAtlas(): Maybe<TextureAtlas>;
|
|
872
886
|
protected loadTextures(): Promise<void>;
|
|
873
887
|
protected createMeshes(force?: boolean): void;
|
|
@@ -948,13 +962,16 @@ declare class EntityObject extends SceneObject {
|
|
|
948
962
|
readonly isEntityObject: true;
|
|
949
963
|
static readonly DEFAULT_OPTIONS: EntityObjectOptions;
|
|
950
964
|
readonly options: EntityObjectOptions;
|
|
951
|
-
private imageData?;
|
|
952
965
|
private meshesCreated;
|
|
953
966
|
constructor(entity: EntityModel, options?: Partial<EntityObjectOptions>);
|
|
954
967
|
init(): Promise<void>;
|
|
955
968
|
dispose(): void;
|
|
956
|
-
|
|
957
|
-
|
|
969
|
+
getLayerGroup(name: string): Maybe<Object3D>;
|
|
970
|
+
getGroupByName(name: string, layerName?: string): Maybe<Object3D>;
|
|
971
|
+
getMeshByName(name: string, layerName?: string): Maybe<Mesh>;
|
|
972
|
+
private get entityLayers();
|
|
973
|
+
private getTextureKey;
|
|
974
|
+
protected loadTextures(layer?: EntityLayer): Promise<Maybe<ExtractableImageData>>;
|
|
958
975
|
protected createMeshes(force?: boolean): void;
|
|
959
976
|
private createPart;
|
|
960
977
|
protected applyTextures(): Promise<void>;
|
|
@@ -998,6 +1015,9 @@ declare class SceneObject extends Object3D<Object3DEventMap & {
|
|
|
998
1015
|
private materialCallbacks;
|
|
999
1016
|
protected _isInstanced: boolean;
|
|
1000
1017
|
_instanceCounter: number;
|
|
1018
|
+
protected instanceMesh?: InstancedMesh;
|
|
1019
|
+
private readonly instanceReferences;
|
|
1020
|
+
private readonly freeInstanceIndices;
|
|
1001
1021
|
constructor(options?: Partial<SceneObjectOptions>);
|
|
1002
1022
|
set scene(scene: MineRenderScene);
|
|
1003
1023
|
get scene(): MineRenderScene;
|
|
@@ -1037,6 +1057,10 @@ declare class SceneObject extends Object3D<Object3DEventMap & {
|
|
|
1037
1057
|
get instanceCounter(): number;
|
|
1038
1058
|
protected constructInstanceReference(i: number): InstanceReference<SceneObject>;
|
|
1039
1059
|
nextInstance(): InstanceReference<SceneObject>;
|
|
1060
|
+
isInstanceActive(index: number, reference: InstanceReference<Instanceable>): boolean;
|
|
1061
|
+
removeInstanceAt(index: number): void;
|
|
1062
|
+
private growInstances;
|
|
1063
|
+
protected activeInstanceIndices(): Iterable<number>;
|
|
1040
1064
|
getMatrixAt(index: number, matrix?: Matrix4): Matrix4;
|
|
1041
1065
|
setMatrixAt(index: number, matrix: Matrix4): void;
|
|
1042
1066
|
setPositionRotationScaleAt(index: number, position?: Vector3, rotation?: Euler, scale?: Vector3): void;
|
|
@@ -1077,6 +1101,7 @@ declare class BlockObject extends SceneObject {
|
|
|
1077
1101
|
init(): Promise<void>;
|
|
1078
1102
|
dispose(): void;
|
|
1079
1103
|
removeFromScene(): void;
|
|
1104
|
+
private clearModels;
|
|
1080
1105
|
get state(): {
|
|
1081
1106
|
[key: string]: string;
|
|
1082
1107
|
};
|
|
@@ -1747,4 +1772,4 @@ declare class BrowserCache extends PersistentCache<LocalForage> {
|
|
|
1747
1772
|
*/
|
|
1748
1773
|
declare function probeImageSize(data: Uint8Array): ImageSizeInfo;
|
|
1749
1774
|
|
|
1750
|
-
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, BrowserCache, BrowserEnv, 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, 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, probeImageSize, registerBrowserEnv, serializeBoxGeometryKey, serializeImageKey, serializeMaterialKey, serializeMeshKey, serializeTextureKey, sha1, sha256, sha512, shutdown, sleep, slimSkinGeometries, slimSkinTextureCoordinates, timingEnd, timingStart, toDegrees, toRadians, toTrianglesDrawMode };
|
|
1775
|
+
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, BrowserCache, BrowserEnv, 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, 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, probeImageSize, registerBrowserEnv, serializeBoxGeometryKey, serializeImageKey, serializeMaterialKey, serializeMeshKey, serializeTextureKey, sha1, sha256, sha512, shutdown, sleep, slimSkinGeometries, slimSkinTextureCoordinates, timingEnd, timingStart, toDegrees, toRadians, toTrianglesDrawMode };
|