minerender 2.1.0-alpha.42 → 2.1.0-alpha.44

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.
@@ -10,7 +10,7 @@ import Stats from 'stats.js';
10
10
  import { EffectComposer } from 'postprocessing';
11
11
 
12
12
  interface AnimatorFunction {
13
- (): void;
13
+ (): boolean | void;
14
14
  }
15
15
 
16
16
  declare enum Axis {
@@ -524,6 +524,7 @@ declare class TextureAtlas implements Disposable {
524
524
  };
525
525
  readonly hasTransparency: boolean;
526
526
  ticker?: number;
527
+ private readonly subscribers;
527
528
  constructor(model: Model, image: CanvasImage, sizes: {
528
529
  [texture: string]: DoubleArray;
529
530
  }, positions: {
@@ -531,6 +532,8 @@ declare class TextureAtlas implements Disposable {
531
532
  }, hasAnimation: boolean, animatorFunctions: {
532
533
  [p: string]: AnimatorFunction;
533
534
  }, hasTransparency: boolean);
535
+ /** Calls subscribers when an animation frame changes; unused atlases do not tick. */
536
+ subscribe(callback: () => void): () => void;
534
537
  getData(texture: string): ImageData$1;
535
538
  dispose(): void;
536
539
  }
@@ -889,7 +892,10 @@ declare class ModelObject extends SceneObject {
889
892
  readonly isModelObject: true;
890
893
  static readonly DEFAULT_OPTIONS: ModelObjectOptions;
891
894
  readonly options: ModelObjectOptions;
892
- private atlas?;
895
+ protected atlas?: TextureAtlas;
896
+ private atlasMaterial?;
897
+ private atlasTexture?;
898
+ private unsubscribeAtlas?;
893
899
  blockParent: Maybe<BlockObject>;
894
900
  private meshesCreated;
895
901
  constructor(originalModel: Model, options?: Partial<ModelObjectOptions>);
@@ -899,6 +905,10 @@ declare class ModelObject extends SceneObject {
899
905
  protected loadTextures(): Promise<void>;
900
906
  protected createMeshes(force?: boolean): void;
901
907
  protected applyTextures(): void;
908
+ private updateAnimationSubscription;
909
+ nextInstance(): InstanceReference<SceneObject>;
910
+ removeInstanceAt(index: number): void;
911
+ disposeAndRemoveAllChildren(): void;
902
912
  }
903
913
  interface ModelObjectOptions extends SceneObjectOptions {
904
914
  /** Minecraft display pose applied around the model center, before scene transforms. */
@@ -1072,6 +1082,8 @@ declare class SceneObject extends Object3D<Object3DEventMap & {
1072
1082
  get instanceCounter(): number;
1073
1083
  protected constructInstanceReference(i: number): InstanceReference<SceneObject>;
1074
1084
  nextInstance(): InstanceReference<SceneObject>;
1085
+ /** Returns the live reference for a raycast hit on this object's instance mesh. */
1086
+ getInstanceReference(mesh: Object3D, index: number): Maybe<InstanceReference<SceneObject>>;
1075
1087
  isInstanceActive(index: number, reference: InstanceReference<Instanceable>): boolean;
1076
1088
  removeInstanceAt(index: number): void;
1077
1089
  private growInstances;
@@ -1099,6 +1111,17 @@ declare class SceneObject extends Object3D<Object3DEventMap & {
1099
1111
  }
1100
1112
  declare function isSceneObject(obj: any): obj is SceneObject;
1101
1113
 
1114
+ type FluidKind = "water" | "lava";
1115
+ declare function getFluidKind(key?: AssetKey): FluidKind | undefined;
1116
+ interface FluidSample {
1117
+ fluid?: FluidKind;
1118
+ level?: number;
1119
+ solid?: boolean;
1120
+ }
1121
+ type FluidSampler = (x: number, y: number, z: number) => FluidSample;
1122
+ /** Builds centered fluid faces with material groups 0 (still) and 1 (flowing). */
1123
+ declare function createFluidGeometry(kind: FluidKind, sample: FluidSampler): BufferGeometry;
1124
+
1102
1125
  declare class BlockObject extends SceneObject {
1103
1126
  readonly blockState: BlockState;
1104
1127
  readonly isBlockObject: true;
@@ -1113,6 +1136,8 @@ declare class BlockObject extends SceneObject {
1113
1136
  private _variants;
1114
1137
  private _models;
1115
1138
  private _cullMask;
1139
+ private _fluidKey?;
1140
+ private _fluidSampler?;
1116
1141
  constructor(blockState: BlockState, options?: Partial<BlockObjectOptions>);
1117
1142
  init(): Promise<void>;
1118
1143
  dispose(): void;
@@ -1126,6 +1151,9 @@ declare class BlockObject extends SceneObject {
1126
1151
  get state(): {
1127
1152
  [key: string]: string;
1128
1153
  };
1154
+ get fluidKind(): FluidKind | undefined;
1155
+ /** Refreshes fluid surfaces from relative neighbors; standalone previews use air around the block. */
1156
+ updateFluid(sample?: FluidSampler): Promise<void>;
1129
1157
  nextInstance(): InstanceReference<SceneObject>;
1130
1158
  protected mapStateToVariant(state: BlockStateProperties): Promise<BlockStateVariant[]>;
1131
1159
  recreateModels(): Promise<void>;
@@ -1149,6 +1177,21 @@ interface BlockObjectOptions extends ModelObjectOptions {
1149
1177
  }
1150
1178
  declare function isBlockObject(obj: any): obj is BlockObject;
1151
1179
 
1180
+ /** Saved fluid levels and solid neighbors determine the geometry shared by an instance pool. */
1181
+ declare function sampleFluid(kind: FluidKind, sample: FluidSampler): {
1182
+ key: string;
1183
+ sample: FluidSampler;
1184
+ };
1185
+ declare class FluidModelObject extends ModelObject {
1186
+ readonly kind: FluidKind;
1187
+ private readonly sample;
1188
+ private geometry?;
1189
+ constructor(kind: FluidKind, sample: FluidSampler, origin: AssetKey, options?: Partial<ModelObjectOptions>);
1190
+ protected createMeshes(): void;
1191
+ protected applyTextures(): void;
1192
+ disposeAndRemoveAllChildren(): void;
1193
+ }
1194
+
1152
1195
  interface MultiBlockStructure {
1153
1196
  readonly size: TripleArray;
1154
1197
  readonly blocks: MultiBlockBlock[];
@@ -1623,17 +1666,21 @@ declare class SceneInspector {
1623
1666
  protected readonly raycaster: Raycaster;
1624
1667
  private readonly mouse;
1625
1668
  private selectedObject?;
1669
+ private pointer?;
1670
+ private readonly listeners;
1626
1671
  constructor(renderer: Renderer);
1627
1672
  protected init(): void;
1673
+ dispose(): void;
1628
1674
  findMeshChildren(from: Object3D, out?: Mesh[]): Mesh<three.BufferGeometry<three.NormalBufferAttributes>, three.Material | three.Material[], three.Object3DEventMap>[];
1629
- onClick(event: any): void;
1675
+ onClick(event: MouseEvent): void;
1630
1676
  appendTo(el: HTMLElement): void;
1631
1677
  protected handleRaycasterObjects(intersections: Intersection[]): void;
1632
- selectObject(targetObject: Object3D, targetIntersection?: Intersection): void;
1633
- protected redraw(targetObject: Object3D, targetIntersection?: Intersection): void;
1634
- protected addControls(object: Object3D, intersection?: Intersection): void;
1678
+ private getIntersectionInstance;
1679
+ selectObject(targetObject: Object3D, targetIntersection?: Intersection, instance?: Maybe<InstanceReference<SceneObject>>): void;
1680
+ protected redraw(targetObject: Object3D, targetIntersection?: Intersection, instance?: InstanceReference<SceneObject>): void;
1681
+ protected addControls(object: Object3D, intersection?: Intersection, instance?: InstanceReference<SceneObject>): void;
1635
1682
  protected addInfoLine(name: string, id: string, value: any): HTMLElement;
1636
- protected addObjectControls(target: Object3D, intersection: Maybe<Intersection>, container: HTMLElement): void;
1683
+ protected addObjectControls(target: Object3D, intersection: Maybe<Intersection>, container: HTMLElement, instance?: InstanceReference<SceneObject>): void;
1637
1684
  protected buttonControl(name: string, id: string, click: () => void): HTMLElement;
1638
1685
  protected selectControl(name: string, id: string, options: string[], change: (v: string) => void): HTMLElement;
1639
1686
  protected toggleControl(name: string, id: string, val: boolean, change: (v: boolean) => void): HTMLElement;
@@ -1930,4 +1977,4 @@ declare class BrowserCache extends PersistentCache<LocalForage> {
1930
1977
  */
1931
1978
  declare function probeImageSize(data: Uint8Array): ImageSizeInfo;
1932
1979
 
1933
- export { AXES, type AnimationFrame, type AnimationMeta, type AnimatorFunction, type AnvilChunk, AnvilParser, type AnvilRegion, 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, BlockStateResolver, type BlockStateVariant, type BlockStateVariants, BlockStates, BlockTints, type BoxGeometryKey, BrowserArchiveProxy, BrowserCache, BrowserEnv, CUBE_FACES, CUBE_FACE_OFFSETS, type CacheKey, Caching, type CameraOptions, CanvasImage, type CapeLayout, Chunk, ChunkData, 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 MineRenderWorldOptions, type MinecraftAsset, MinecraftCubeTexture, MinecraftFaceUV, type MinecraftTextureMeta, type Model, ModelCulling, type ModelDisplay, type ModelElement, type ModelFaces, ModelGenerator, ModelMerger, ModelObject, type ModelObjectOptions, ModelTextures, Models, type MultiBlockBlock, type MultiBlockEntity, 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, SectionMesh, type SectionMeshEntry, type SectionMeshTemplate, SectionModels, 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 };
1980
+ export { AXES, type AnimationFrame, type AnimationMeta, type AnimatorFunction, type AnvilChunk, AnvilParser, type AnvilRegion, 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, BlockStateResolver, type BlockStateVariant, type BlockStateVariants, BlockStates, BlockTints, type BoxGeometryKey, BrowserArchiveProxy, BrowserCache, BrowserEnv, CUBE_FACES, CUBE_FACE_OFFSETS, type CacheKey, Caching, type CameraOptions, CanvasImage, type CapeLayout, Chunk, ChunkData, 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 FluidKind, FluidModelObject, type FluidSample, type FluidSampler, 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 MineRenderWorldOptions, type MinecraftAsset, MinecraftCubeTexture, MinecraftFaceUV, type MinecraftTextureMeta, type Model, ModelCulling, type ModelDisplay, type ModelElement, type ModelFaces, ModelGenerator, ModelMerger, ModelObject, type ModelObjectOptions, ModelTextures, Models, type MultiBlockBlock, type MultiBlockEntity, 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, SectionMesh, type SectionMeshEntry, type SectionMeshTemplate, SectionModels, 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, createFluidGeometry, createImage, estimateBytesUsed, getFluidKind, 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, sampleFluid, serializeBoxGeometryKey, serializeImageKey, serializeMaterialKey, serializeMeshKey, serializeTextureKey, sha1, sha256, sha512, shutdown, sleep, slimSkinGeometries, slimSkinTextureCoordinates, timingEnd, timingStart, toDegrees, toRadians, toTrianglesDrawMode };
@@ -10,7 +10,7 @@ import Stats from 'stats.js';
10
10
  import { EffectComposer } from 'postprocessing';
11
11
 
12
12
  interface AnimatorFunction {
13
- (): void;
13
+ (): boolean | void;
14
14
  }
15
15
 
16
16
  declare enum Axis {
@@ -524,6 +524,7 @@ declare class TextureAtlas implements Disposable {
524
524
  };
525
525
  readonly hasTransparency: boolean;
526
526
  ticker?: number;
527
+ private readonly subscribers;
527
528
  constructor(model: Model, image: CanvasImage, sizes: {
528
529
  [texture: string]: DoubleArray;
529
530
  }, positions: {
@@ -531,6 +532,8 @@ declare class TextureAtlas implements Disposable {
531
532
  }, hasAnimation: boolean, animatorFunctions: {
532
533
  [p: string]: AnimatorFunction;
533
534
  }, hasTransparency: boolean);
535
+ /** Calls subscribers when an animation frame changes; unused atlases do not tick. */
536
+ subscribe(callback: () => void): () => void;
534
537
  getData(texture: string): ImageData$1;
535
538
  dispose(): void;
536
539
  }
@@ -889,7 +892,10 @@ declare class ModelObject extends SceneObject {
889
892
  readonly isModelObject: true;
890
893
  static readonly DEFAULT_OPTIONS: ModelObjectOptions;
891
894
  readonly options: ModelObjectOptions;
892
- private atlas?;
895
+ protected atlas?: TextureAtlas;
896
+ private atlasMaterial?;
897
+ private atlasTexture?;
898
+ private unsubscribeAtlas?;
893
899
  blockParent: Maybe<BlockObject>;
894
900
  private meshesCreated;
895
901
  constructor(originalModel: Model, options?: Partial<ModelObjectOptions>);
@@ -899,6 +905,10 @@ declare class ModelObject extends SceneObject {
899
905
  protected loadTextures(): Promise<void>;
900
906
  protected createMeshes(force?: boolean): void;
901
907
  protected applyTextures(): void;
908
+ private updateAnimationSubscription;
909
+ nextInstance(): InstanceReference<SceneObject>;
910
+ removeInstanceAt(index: number): void;
911
+ disposeAndRemoveAllChildren(): void;
902
912
  }
903
913
  interface ModelObjectOptions extends SceneObjectOptions {
904
914
  /** Minecraft display pose applied around the model center, before scene transforms. */
@@ -1072,6 +1082,8 @@ declare class SceneObject extends Object3D<Object3DEventMap & {
1072
1082
  get instanceCounter(): number;
1073
1083
  protected constructInstanceReference(i: number): InstanceReference<SceneObject>;
1074
1084
  nextInstance(): InstanceReference<SceneObject>;
1085
+ /** Returns the live reference for a raycast hit on this object's instance mesh. */
1086
+ getInstanceReference(mesh: Object3D, index: number): Maybe<InstanceReference<SceneObject>>;
1075
1087
  isInstanceActive(index: number, reference: InstanceReference<Instanceable>): boolean;
1076
1088
  removeInstanceAt(index: number): void;
1077
1089
  private growInstances;
@@ -1099,6 +1111,17 @@ declare class SceneObject extends Object3D<Object3DEventMap & {
1099
1111
  }
1100
1112
  declare function isSceneObject(obj: any): obj is SceneObject;
1101
1113
 
1114
+ type FluidKind = "water" | "lava";
1115
+ declare function getFluidKind(key?: AssetKey): FluidKind | undefined;
1116
+ interface FluidSample {
1117
+ fluid?: FluidKind;
1118
+ level?: number;
1119
+ solid?: boolean;
1120
+ }
1121
+ type FluidSampler = (x: number, y: number, z: number) => FluidSample;
1122
+ /** Builds centered fluid faces with material groups 0 (still) and 1 (flowing). */
1123
+ declare function createFluidGeometry(kind: FluidKind, sample: FluidSampler): BufferGeometry;
1124
+
1102
1125
  declare class BlockObject extends SceneObject {
1103
1126
  readonly blockState: BlockState;
1104
1127
  readonly isBlockObject: true;
@@ -1113,6 +1136,8 @@ declare class BlockObject extends SceneObject {
1113
1136
  private _variants;
1114
1137
  private _models;
1115
1138
  private _cullMask;
1139
+ private _fluidKey?;
1140
+ private _fluidSampler?;
1116
1141
  constructor(blockState: BlockState, options?: Partial<BlockObjectOptions>);
1117
1142
  init(): Promise<void>;
1118
1143
  dispose(): void;
@@ -1126,6 +1151,9 @@ declare class BlockObject extends SceneObject {
1126
1151
  get state(): {
1127
1152
  [key: string]: string;
1128
1153
  };
1154
+ get fluidKind(): FluidKind | undefined;
1155
+ /** Refreshes fluid surfaces from relative neighbors; standalone previews use air around the block. */
1156
+ updateFluid(sample?: FluidSampler): Promise<void>;
1129
1157
  nextInstance(): InstanceReference<SceneObject>;
1130
1158
  protected mapStateToVariant(state: BlockStateProperties): Promise<BlockStateVariant[]>;
1131
1159
  recreateModels(): Promise<void>;
@@ -1149,6 +1177,21 @@ interface BlockObjectOptions extends ModelObjectOptions {
1149
1177
  }
1150
1178
  declare function isBlockObject(obj: any): obj is BlockObject;
1151
1179
 
1180
+ /** Saved fluid levels and solid neighbors determine the geometry shared by an instance pool. */
1181
+ declare function sampleFluid(kind: FluidKind, sample: FluidSampler): {
1182
+ key: string;
1183
+ sample: FluidSampler;
1184
+ };
1185
+ declare class FluidModelObject extends ModelObject {
1186
+ readonly kind: FluidKind;
1187
+ private readonly sample;
1188
+ private geometry?;
1189
+ constructor(kind: FluidKind, sample: FluidSampler, origin: AssetKey, options?: Partial<ModelObjectOptions>);
1190
+ protected createMeshes(): void;
1191
+ protected applyTextures(): void;
1192
+ disposeAndRemoveAllChildren(): void;
1193
+ }
1194
+
1152
1195
  interface MultiBlockStructure {
1153
1196
  readonly size: TripleArray;
1154
1197
  readonly blocks: MultiBlockBlock[];
@@ -1623,17 +1666,21 @@ declare class SceneInspector {
1623
1666
  protected readonly raycaster: Raycaster;
1624
1667
  private readonly mouse;
1625
1668
  private selectedObject?;
1669
+ private pointer?;
1670
+ private readonly listeners;
1626
1671
  constructor(renderer: Renderer);
1627
1672
  protected init(): void;
1673
+ dispose(): void;
1628
1674
  findMeshChildren(from: Object3D, out?: Mesh[]): Mesh<three.BufferGeometry<three.NormalBufferAttributes>, three.Material | three.Material[], three.Object3DEventMap>[];
1629
- onClick(event: any): void;
1675
+ onClick(event: MouseEvent): void;
1630
1676
  appendTo(el: HTMLElement): void;
1631
1677
  protected handleRaycasterObjects(intersections: Intersection[]): void;
1632
- selectObject(targetObject: Object3D, targetIntersection?: Intersection): void;
1633
- protected redraw(targetObject: Object3D, targetIntersection?: Intersection): void;
1634
- protected addControls(object: Object3D, intersection?: Intersection): void;
1678
+ private getIntersectionInstance;
1679
+ selectObject(targetObject: Object3D, targetIntersection?: Intersection, instance?: Maybe<InstanceReference<SceneObject>>): void;
1680
+ protected redraw(targetObject: Object3D, targetIntersection?: Intersection, instance?: InstanceReference<SceneObject>): void;
1681
+ protected addControls(object: Object3D, intersection?: Intersection, instance?: InstanceReference<SceneObject>): void;
1635
1682
  protected addInfoLine(name: string, id: string, value: any): HTMLElement;
1636
- protected addObjectControls(target: Object3D, intersection: Maybe<Intersection>, container: HTMLElement): void;
1683
+ protected addObjectControls(target: Object3D, intersection: Maybe<Intersection>, container: HTMLElement, instance?: InstanceReference<SceneObject>): void;
1637
1684
  protected buttonControl(name: string, id: string, click: () => void): HTMLElement;
1638
1685
  protected selectControl(name: string, id: string, options: string[], change: (v: string) => void): HTMLElement;
1639
1686
  protected toggleControl(name: string, id: string, val: boolean, change: (v: boolean) => void): HTMLElement;
@@ -1930,4 +1977,4 @@ declare class BrowserCache extends PersistentCache<LocalForage> {
1930
1977
  */
1931
1978
  declare function probeImageSize(data: Uint8Array): ImageSizeInfo;
1932
1979
 
1933
- export { AXES, type AnimationFrame, type AnimationMeta, type AnimatorFunction, type AnvilChunk, AnvilParser, type AnvilRegion, 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, BlockStateResolver, type BlockStateVariant, type BlockStateVariants, BlockStates, BlockTints, type BoxGeometryKey, BrowserArchiveProxy, BrowserCache, BrowserEnv, CUBE_FACES, CUBE_FACE_OFFSETS, type CacheKey, Caching, type CameraOptions, CanvasImage, type CapeLayout, Chunk, ChunkData, 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 MineRenderWorldOptions, type MinecraftAsset, MinecraftCubeTexture, MinecraftFaceUV, type MinecraftTextureMeta, type Model, ModelCulling, type ModelDisplay, type ModelElement, type ModelFaces, ModelGenerator, ModelMerger, ModelObject, type ModelObjectOptions, ModelTextures, Models, type MultiBlockBlock, type MultiBlockEntity, 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, SectionMesh, type SectionMeshEntry, type SectionMeshTemplate, SectionModels, 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 };
1980
+ export { AXES, type AnimationFrame, type AnimationMeta, type AnimatorFunction, type AnvilChunk, AnvilParser, type AnvilRegion, 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, BlockStateResolver, type BlockStateVariant, type BlockStateVariants, BlockStates, BlockTints, type BoxGeometryKey, BrowserArchiveProxy, BrowserCache, BrowserEnv, CUBE_FACES, CUBE_FACE_OFFSETS, type CacheKey, Caching, type CameraOptions, CanvasImage, type CapeLayout, Chunk, ChunkData, 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 FluidKind, FluidModelObject, type FluidSample, type FluidSampler, 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 MineRenderWorldOptions, type MinecraftAsset, MinecraftCubeTexture, MinecraftFaceUV, type MinecraftTextureMeta, type Model, ModelCulling, type ModelDisplay, type ModelElement, type ModelFaces, ModelGenerator, ModelMerger, ModelObject, type ModelObjectOptions, ModelTextures, Models, type MultiBlockBlock, type MultiBlockEntity, 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, SectionMesh, type SectionMeshEntry, type SectionMeshTemplate, SectionModels, 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, createFluidGeometry, createImage, estimateBytesUsed, getFluidKind, 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, sampleFluid, serializeBoxGeometryKey, serializeImageKey, serializeMaterialKey, serializeMeshKey, serializeTextureKey, sha1, sha256, sha512, shutdown, sleep, slimSkinGeometries, slimSkinTextureCoordinates, timingEnd, timingStart, toDegrees, toRadians, toTrianglesDrawMode };