minerender 2.1.0-alpha.95 → 2.1.0-alpha.96
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 +14 -1
- package/dist/browser/index.d.ts +14 -1
- package/dist/browser/index.js +105 -13
- package/dist/browser/index.js.map +1 -1
- package/dist/browser/index.mjs +105 -13
- package/dist/browser/index.mjs.map +1 -1
- package/dist/bundle.js +108 -13
- package/dist/bundle.js.map +1 -1
- package/dist/node/index.d.mts +14 -1
- package/dist/node/index.d.ts +14 -1
- package/dist/node/index.js +107 -13
- package/dist/node/index.js.map +1 -1
- package/dist/node/index.mjs +105 -13
- package/dist/node/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/node/index.d.mts
CHANGED
|
@@ -223,6 +223,7 @@ declare class AssetKey extends BasicAssetKey {
|
|
|
223
223
|
/** Returns a cache identifier that includes the explicit root or {@link AssetLoader.ROOT}. */
|
|
224
224
|
serialize(): string;
|
|
225
225
|
}
|
|
226
|
+
declare function isResourceLocation(value: unknown): value is string;
|
|
226
227
|
declare function isBasicAssetKey(obj: any): obj is BasicAssetKey;
|
|
227
228
|
declare function isAssetKey(obj: any): obj is AssetKey;
|
|
228
229
|
|
|
@@ -599,6 +600,8 @@ type SpecialItemRenderer = {
|
|
|
599
600
|
color: DyeColor;
|
|
600
601
|
} | {
|
|
601
602
|
type: "shield" | "minecraft:shield";
|
|
603
|
+
} | {
|
|
604
|
+
type: "decorated_pot" | "minecraft:decorated_pot";
|
|
602
605
|
} | {
|
|
603
606
|
type: "trident" | "minecraft:trident" | "conduit" | "minecraft:conduit";
|
|
604
607
|
} | {
|
|
@@ -1140,6 +1143,13 @@ declare class DefaultBlockStates implements MinecraftAsset {
|
|
|
1140
1143
|
[k: string]: BlockStatePropertyDefaults;
|
|
1141
1144
|
}
|
|
1142
1145
|
|
|
1146
|
+
type DecoratedPotSide = "back" | "left" | "right" | "front";
|
|
1147
|
+
/** Resolves Minecraft 1.21.11 pot decorations to the four side textures. */
|
|
1148
|
+
declare class DecoratedPots {
|
|
1149
|
+
/** Reads up to four item IDs in back, left, right, front order; missing and unmapped items use plain sides. */
|
|
1150
|
+
static getSideTextures(value: unknown, root?: string): Record<DecoratedPotSide, AssetKey>;
|
|
1151
|
+
}
|
|
1152
|
+
|
|
1143
1153
|
/** `entity-models/animations/<namespace>/<model id>.json`: native and sampled vanilla animation clips. */
|
|
1144
1154
|
interface EntityAnimationFile extends MinecraftAsset {
|
|
1145
1155
|
id: string;
|
|
@@ -1350,6 +1360,7 @@ interface SpecialItemPart {
|
|
|
1350
1360
|
positions?: Record<string, TripleArray>;
|
|
1351
1361
|
/** Colors for the entity model's named texture passes. */
|
|
1352
1362
|
tints?: Record<string, number>;
|
|
1363
|
+
faces?: Record<string, CubeFace[]>;
|
|
1353
1364
|
}
|
|
1354
1365
|
/** Loads entity geometry and texture passes for supported special item previews. */
|
|
1355
1366
|
declare class SpecialItems {
|
|
@@ -1664,6 +1675,8 @@ interface EntityObjectOptions extends SceneObjectOptions {
|
|
|
1664
1675
|
flip?: boolean;
|
|
1665
1676
|
/** Colours for the dataset's tint labels, e.g. `{ wool_color: 0xf9801d }`; a pass whose label is absent stays untinted. */
|
|
1666
1677
|
tints?: Record<string, ColorRepresentation>;
|
|
1678
|
+
/** Cube faces by layer key; omitted layers draw all six faces. */
|
|
1679
|
+
faces?: Record<string, CubeFace[]>;
|
|
1667
1680
|
}
|
|
1668
1681
|
declare function isEntityObject(obj: any): obj is EntityObject;
|
|
1669
1682
|
|
|
@@ -3614,4 +3627,4 @@ declare class NodeCache extends PersistentCache<LocalStorage> {
|
|
|
3614
3627
|
forEach<T>(callback: (v: T, k: string) => void): Promise<void>;
|
|
3615
3628
|
}
|
|
3616
3629
|
|
|
3617
|
-
export { AXES, type AnimationFrame, type AnimationMeta, type AnimatorFunction, type AnvilChunk, type AnvilExternalChunkReader, type AnvilParseOptions, AnvilParser, type AnvilRegion, type AnvilRegionReader, AnvilWorldSource, type AnvilWorldSourceOptions, ArchiveAssetSource, type ArchiveAssetSourceOptions, type ArchiveEntry, type ArchiveProxy, AssetKey, AssetLoadError, AssetLoader, AssetParser, AssetSource, type AssetType, Assets, Axis, BUILTIN_ENTITY, BUILTIN_GENERATED, type BannerPattern, type BannerPatternDraw, BannerPatterns, BasicAssetKey, type BasicMinecraftAsset, BatchedExecutor, type BedrockBone, type BedrockCube, type BedrockEntityDescription, type BedrockEntityFile, type BedrockGeometry, type BedrockGeometryFile, type BitmapFont, type BitmapGlyph, type Block, BlockEntities, type BlockEntityEntry, type BlockEntityIndex, type BlockEntityPart, type BlockEntityRotation, type BlockFluidState, 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, CUBE_FACES, CUBE_FACE_OFFSETS, type CacheKey, Caching, type CameraOptions, CanvasImage, type CapeLayout, Chunk, ChunkData, Colormaps, type CompatCanvas, type CompatImage, type ComposerOptions, type ControlsOptions, CubeFace, CubeFaceIndex, DEFAULT_ELEMENTS, DEFAULT_NAMESPACE, DEFAULT_ROOT, DEFAULT_UV, DISPLAY_POSITIONS, DYE_COLORS, type DebugOptions, type DeepPartial, DefaultBlockStates, DisplayPosition, DisplayTransforms, type Disposable, type DoubleArray, type DyeColor, ENTITY_ANIMATION_CHANNELS, type ElementFace, type ElementRotation, Entities, type EntityAnimation, type EntityAnimationBone, type EntityAnimationChannel, type EntityAnimationFile, type EntityAnimationKeyframe, type EntityAnimationOptions, EntityAnimationPlayer, type EntityAnimationPose, type EntityLayer, type EntityModel, type EntityModelCube, type EntityModelFile, type EntityModelLayer, type EntityModelOptions, type EntityModelPart, type EntityModelPass, EntityObject, type EntityObjectOptions, type EntityRenderMode, type EntityTransformOp, Env, type EnvProvider, type ExtractableImageData, type FluidKind, FluidModelObject, type FluidSample, type FluidSampler, Fonts, type FrameCallback, type FromTo, GUI_CONTAINER_LAYOUTS, Geometries, type GuiBookButtonState, type GuiBookOptions, type GuiBossBarColor, type GuiBossBarOptions, type GuiContainerType, GuiHelper, type GuiItemLayer, type GuiLayer, GuiLight, GuiObject, type GuiObjectOptions, type GuiRecipe, type GuiRecipeIngredient, type GuiRecipeOptions, type GuiSpriteScaling, type GuiText, type GuiTextLayer, type GuiTextLayout, type GuiTextOptions, type GuiTextRun, type GuiTextStyle, type GuiTextureLayer, type GuiTooltipOptions, HostedAssetSource, type IModelTextures, ITEM_GENERATED, type ImageInfo, ImageLoader, type ImageSizeInfo, InstanceManager, InstanceReference, type Instanceable, type ItemModel, type ItemModelContext, type ItemModelTextures, type ItemTintColor, type ItemTintSource, ItemTints, type ListAsset, LitematicaParser, type LitematicaRegion, type LitematicaStructure, type LoadedSceneDocument, type LoadedSceneObject, 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, NodeCache, NodeEnv, OrbitControls, type PackFormat, PackFormats, PackMetadata, PersistentCache, type PositionedGuiGlyph, type QuadArray, type RawImageKey, type RenderOptions, Renderer, type RendererFrame, type RendererOptions, type RequestConfig, RequestError, type RequestResponse, Requests, type ResolvedBlockEntity, type ResponseParser, SKIN_PARTS, type SceneBlockDefinition, type SceneDocument, SceneDocumentLoader, type SceneEntityDefinition, SceneExporter, type SceneGLTFExportOptions, type SceneGuiDefinition, type SceneGuiLayer, SceneInspector, type SceneModelDefinition, SceneObject, type SceneObjectDefinition, type SceneObjectDefinitionBase, type SceneObjectOptions, type SceneSkinDefinition, type SceneSkinPosePart, SceneStats, SceneStatsDisplay, SchematicParser, type SchematicParserOptions, type SectionAtlasSize, type SectionGeometryInput, type SectionGeometryPage, SectionMesh, type SectionMeshEntry, type SectionMeshTemplate, SectionModels, type SectionTemplateData, SectionWorker, type Serializable, type SkinGeometries, SkinImage, SkinObject, type SkinObjectOptions, SkinPart, type SkinTexture, type SkinTextureCoordinates, SkinTextures, Skins, type SpecialItemPart, type SpecialItemRenderer, SpecialItems, SpongeSchematicParser, type StructureNBT, StructureParser, type TextureAsset, TextureAtlas, type TextureKey, TextureLoader, Textures, Ticker, type TickerFunction, TintColors, type Transformable, type TripleArray, UVMapper, type VideoExportOptions, VideoExporter, type WorldChunkSource, WorldStreamer, type WorldStreamerOptions, WrappedImage, addBox3WireframeToObject, addWireframeToMesh, addWireframeToObject, applyElementRotation, applyGenericRotation, axisToVec3, base64decode, base64encode, buildSectionGeometry, capeTextureSizes, captureException, changeEvent, clampRotationDegrees, classicSkinGeometries, classicSkinTextureCoordinates, computeMorphedAttributes, createCanvas, createFluidGeometry, createGuiTextGeometry, createGuiTextureGeometry, createImage, entityAnimationTime, estimateBytesUsed, getBlockFluidState, getFluidKind, interleaveAttributes, isAssetKey, isBasicAssetKey, isBlockObject, isDisposable, isDoubleArray, isEntityObject, isGuiObject, isInstanceManager, isInstanceReference, isInstanceable, isInstancedMesh, isMesh, isMineRenderScene, isModelObject, isObject3D, isOrthographicCamera, isPerspectiveCamera, isQuadArray, isSceneObject, isTransformable, isTripleArray, isVector3, layoutGuiText, md5, mergeBufferAttributes, mergeBufferGeometries, mergeVertices, parseSceneDocument, prefix, registerNodeEnv, resolveLegacyBlock, sampleEntityAnimation, sampleEntityKeyframes, sampleFluid, sectionGeometryTransferables, serializeBoxGeometryKey, serializeImageKey, serializeMaterialKey, serializeMeshKey, serializeTextureKey, sha1, sha256, sha512, shutdown, sleep, slimSkinGeometries, slimSkinTextureCoordinates, timingEnd, timingStart, toDegrees, toRadians, toTrianglesDrawMode, trimCanvas, yieldToEventLoop };
|
|
3630
|
+
export { AXES, type AnimationFrame, type AnimationMeta, type AnimatorFunction, type AnvilChunk, type AnvilExternalChunkReader, type AnvilParseOptions, AnvilParser, type AnvilRegion, type AnvilRegionReader, AnvilWorldSource, type AnvilWorldSourceOptions, ArchiveAssetSource, type ArchiveAssetSourceOptions, type ArchiveEntry, type ArchiveProxy, AssetKey, AssetLoadError, AssetLoader, AssetParser, AssetSource, type AssetType, Assets, Axis, BUILTIN_ENTITY, BUILTIN_GENERATED, type BannerPattern, type BannerPatternDraw, BannerPatterns, BasicAssetKey, type BasicMinecraftAsset, BatchedExecutor, type BedrockBone, type BedrockCube, type BedrockEntityDescription, type BedrockEntityFile, type BedrockGeometry, type BedrockGeometryFile, type BitmapFont, type BitmapGlyph, type Block, BlockEntities, type BlockEntityEntry, type BlockEntityIndex, type BlockEntityPart, type BlockEntityRotation, type BlockFluidState, 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, CUBE_FACES, CUBE_FACE_OFFSETS, type CacheKey, Caching, type CameraOptions, CanvasImage, type CapeLayout, Chunk, ChunkData, Colormaps, type CompatCanvas, type CompatImage, type ComposerOptions, type ControlsOptions, CubeFace, CubeFaceIndex, DEFAULT_ELEMENTS, DEFAULT_NAMESPACE, DEFAULT_ROOT, DEFAULT_UV, DISPLAY_POSITIONS, DYE_COLORS, type DebugOptions, type DecoratedPotSide, DecoratedPots, type DeepPartial, DefaultBlockStates, DisplayPosition, DisplayTransforms, type Disposable, type DoubleArray, type DyeColor, ENTITY_ANIMATION_CHANNELS, type ElementFace, type ElementRotation, Entities, type EntityAnimation, type EntityAnimationBone, type EntityAnimationChannel, type EntityAnimationFile, type EntityAnimationKeyframe, type EntityAnimationOptions, EntityAnimationPlayer, type EntityAnimationPose, type EntityLayer, type EntityModel, type EntityModelCube, type EntityModelFile, type EntityModelLayer, type EntityModelOptions, type EntityModelPart, type EntityModelPass, EntityObject, type EntityObjectOptions, type EntityRenderMode, type EntityTransformOp, Env, type EnvProvider, type ExtractableImageData, type FluidKind, FluidModelObject, type FluidSample, type FluidSampler, Fonts, type FrameCallback, type FromTo, GUI_CONTAINER_LAYOUTS, Geometries, type GuiBookButtonState, type GuiBookOptions, type GuiBossBarColor, type GuiBossBarOptions, type GuiContainerType, GuiHelper, type GuiItemLayer, type GuiLayer, GuiLight, GuiObject, type GuiObjectOptions, type GuiRecipe, type GuiRecipeIngredient, type GuiRecipeOptions, type GuiSpriteScaling, type GuiText, type GuiTextLayer, type GuiTextLayout, type GuiTextOptions, type GuiTextRun, type GuiTextStyle, type GuiTextureLayer, type GuiTooltipOptions, HostedAssetSource, type IModelTextures, ITEM_GENERATED, type ImageInfo, ImageLoader, type ImageSizeInfo, InstanceManager, InstanceReference, type Instanceable, type ItemModel, type ItemModelContext, type ItemModelTextures, type ItemTintColor, type ItemTintSource, ItemTints, type ListAsset, LitematicaParser, type LitematicaRegion, type LitematicaStructure, type LoadedSceneDocument, type LoadedSceneObject, 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, NodeCache, NodeEnv, OrbitControls, type PackFormat, PackFormats, PackMetadata, PersistentCache, type PositionedGuiGlyph, type QuadArray, type RawImageKey, type RenderOptions, Renderer, type RendererFrame, type RendererOptions, type RequestConfig, RequestError, type RequestResponse, Requests, type ResolvedBlockEntity, type ResponseParser, SKIN_PARTS, type SceneBlockDefinition, type SceneDocument, SceneDocumentLoader, type SceneEntityDefinition, SceneExporter, type SceneGLTFExportOptions, type SceneGuiDefinition, type SceneGuiLayer, SceneInspector, type SceneModelDefinition, SceneObject, type SceneObjectDefinition, type SceneObjectDefinitionBase, type SceneObjectOptions, type SceneSkinDefinition, type SceneSkinPosePart, SceneStats, SceneStatsDisplay, SchematicParser, type SchematicParserOptions, type SectionAtlasSize, type SectionGeometryInput, type SectionGeometryPage, SectionMesh, type SectionMeshEntry, type SectionMeshTemplate, SectionModels, type SectionTemplateData, SectionWorker, type Serializable, type SkinGeometries, SkinImage, SkinObject, type SkinObjectOptions, SkinPart, type SkinTexture, type SkinTextureCoordinates, SkinTextures, Skins, type SpecialItemPart, type SpecialItemRenderer, SpecialItems, SpongeSchematicParser, type StructureNBT, StructureParser, type TextureAsset, TextureAtlas, type TextureKey, TextureLoader, Textures, Ticker, type TickerFunction, TintColors, type Transformable, type TripleArray, UVMapper, type VideoExportOptions, VideoExporter, type WorldChunkSource, WorldStreamer, type WorldStreamerOptions, WrappedImage, addBox3WireframeToObject, addWireframeToMesh, addWireframeToObject, applyElementRotation, applyGenericRotation, axisToVec3, base64decode, base64encode, buildSectionGeometry, capeTextureSizes, captureException, changeEvent, clampRotationDegrees, classicSkinGeometries, classicSkinTextureCoordinates, computeMorphedAttributes, createCanvas, createFluidGeometry, createGuiTextGeometry, createGuiTextureGeometry, createImage, entityAnimationTime, estimateBytesUsed, getBlockFluidState, getFluidKind, interleaveAttributes, isAssetKey, isBasicAssetKey, isBlockObject, isDisposable, isDoubleArray, isEntityObject, isGuiObject, isInstanceManager, isInstanceReference, isInstanceable, isInstancedMesh, isMesh, isMineRenderScene, isModelObject, isObject3D, isOrthographicCamera, isPerspectiveCamera, isQuadArray, isResourceLocation, isSceneObject, isTransformable, isTripleArray, isVector3, layoutGuiText, md5, mergeBufferAttributes, mergeBufferGeometries, mergeVertices, parseSceneDocument, prefix, registerNodeEnv, resolveLegacyBlock, sampleEntityAnimation, sampleEntityKeyframes, sampleFluid, sectionGeometryTransferables, serializeBoxGeometryKey, serializeImageKey, serializeMaterialKey, serializeMeshKey, serializeTextureKey, sha1, sha256, sha512, shutdown, sleep, slimSkinGeometries, slimSkinTextureCoordinates, timingEnd, timingStart, toDegrees, toRadians, toTrianglesDrawMode, trimCanvas, yieldToEventLoop };
|
package/dist/node/index.d.ts
CHANGED
|
@@ -223,6 +223,7 @@ declare class AssetKey extends BasicAssetKey {
|
|
|
223
223
|
/** Returns a cache identifier that includes the explicit root or {@link AssetLoader.ROOT}. */
|
|
224
224
|
serialize(): string;
|
|
225
225
|
}
|
|
226
|
+
declare function isResourceLocation(value: unknown): value is string;
|
|
226
227
|
declare function isBasicAssetKey(obj: any): obj is BasicAssetKey;
|
|
227
228
|
declare function isAssetKey(obj: any): obj is AssetKey;
|
|
228
229
|
|
|
@@ -599,6 +600,8 @@ type SpecialItemRenderer = {
|
|
|
599
600
|
color: DyeColor;
|
|
600
601
|
} | {
|
|
601
602
|
type: "shield" | "minecraft:shield";
|
|
603
|
+
} | {
|
|
604
|
+
type: "decorated_pot" | "minecraft:decorated_pot";
|
|
602
605
|
} | {
|
|
603
606
|
type: "trident" | "minecraft:trident" | "conduit" | "minecraft:conduit";
|
|
604
607
|
} | {
|
|
@@ -1140,6 +1143,13 @@ declare class DefaultBlockStates implements MinecraftAsset {
|
|
|
1140
1143
|
[k: string]: BlockStatePropertyDefaults;
|
|
1141
1144
|
}
|
|
1142
1145
|
|
|
1146
|
+
type DecoratedPotSide = "back" | "left" | "right" | "front";
|
|
1147
|
+
/** Resolves Minecraft 1.21.11 pot decorations to the four side textures. */
|
|
1148
|
+
declare class DecoratedPots {
|
|
1149
|
+
/** Reads up to four item IDs in back, left, right, front order; missing and unmapped items use plain sides. */
|
|
1150
|
+
static getSideTextures(value: unknown, root?: string): Record<DecoratedPotSide, AssetKey>;
|
|
1151
|
+
}
|
|
1152
|
+
|
|
1143
1153
|
/** `entity-models/animations/<namespace>/<model id>.json`: native and sampled vanilla animation clips. */
|
|
1144
1154
|
interface EntityAnimationFile extends MinecraftAsset {
|
|
1145
1155
|
id: string;
|
|
@@ -1350,6 +1360,7 @@ interface SpecialItemPart {
|
|
|
1350
1360
|
positions?: Record<string, TripleArray>;
|
|
1351
1361
|
/** Colors for the entity model's named texture passes. */
|
|
1352
1362
|
tints?: Record<string, number>;
|
|
1363
|
+
faces?: Record<string, CubeFace[]>;
|
|
1353
1364
|
}
|
|
1354
1365
|
/** Loads entity geometry and texture passes for supported special item previews. */
|
|
1355
1366
|
declare class SpecialItems {
|
|
@@ -1664,6 +1675,8 @@ interface EntityObjectOptions extends SceneObjectOptions {
|
|
|
1664
1675
|
flip?: boolean;
|
|
1665
1676
|
/** Colours for the dataset's tint labels, e.g. `{ wool_color: 0xf9801d }`; a pass whose label is absent stays untinted. */
|
|
1666
1677
|
tints?: Record<string, ColorRepresentation>;
|
|
1678
|
+
/** Cube faces by layer key; omitted layers draw all six faces. */
|
|
1679
|
+
faces?: Record<string, CubeFace[]>;
|
|
1667
1680
|
}
|
|
1668
1681
|
declare function isEntityObject(obj: any): obj is EntityObject;
|
|
1669
1682
|
|
|
@@ -3614,4 +3627,4 @@ declare class NodeCache extends PersistentCache<LocalStorage> {
|
|
|
3614
3627
|
forEach<T>(callback: (v: T, k: string) => void): Promise<void>;
|
|
3615
3628
|
}
|
|
3616
3629
|
|
|
3617
|
-
export { AXES, type AnimationFrame, type AnimationMeta, type AnimatorFunction, type AnvilChunk, type AnvilExternalChunkReader, type AnvilParseOptions, AnvilParser, type AnvilRegion, type AnvilRegionReader, AnvilWorldSource, type AnvilWorldSourceOptions, ArchiveAssetSource, type ArchiveAssetSourceOptions, type ArchiveEntry, type ArchiveProxy, AssetKey, AssetLoadError, AssetLoader, AssetParser, AssetSource, type AssetType, Assets, Axis, BUILTIN_ENTITY, BUILTIN_GENERATED, type BannerPattern, type BannerPatternDraw, BannerPatterns, BasicAssetKey, type BasicMinecraftAsset, BatchedExecutor, type BedrockBone, type BedrockCube, type BedrockEntityDescription, type BedrockEntityFile, type BedrockGeometry, type BedrockGeometryFile, type BitmapFont, type BitmapGlyph, type Block, BlockEntities, type BlockEntityEntry, type BlockEntityIndex, type BlockEntityPart, type BlockEntityRotation, type BlockFluidState, 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, CUBE_FACES, CUBE_FACE_OFFSETS, type CacheKey, Caching, type CameraOptions, CanvasImage, type CapeLayout, Chunk, ChunkData, Colormaps, type CompatCanvas, type CompatImage, type ComposerOptions, type ControlsOptions, CubeFace, CubeFaceIndex, DEFAULT_ELEMENTS, DEFAULT_NAMESPACE, DEFAULT_ROOT, DEFAULT_UV, DISPLAY_POSITIONS, DYE_COLORS, type DebugOptions, type DeepPartial, DefaultBlockStates, DisplayPosition, DisplayTransforms, type Disposable, type DoubleArray, type DyeColor, ENTITY_ANIMATION_CHANNELS, type ElementFace, type ElementRotation, Entities, type EntityAnimation, type EntityAnimationBone, type EntityAnimationChannel, type EntityAnimationFile, type EntityAnimationKeyframe, type EntityAnimationOptions, EntityAnimationPlayer, type EntityAnimationPose, type EntityLayer, type EntityModel, type EntityModelCube, type EntityModelFile, type EntityModelLayer, type EntityModelOptions, type EntityModelPart, type EntityModelPass, EntityObject, type EntityObjectOptions, type EntityRenderMode, type EntityTransformOp, Env, type EnvProvider, type ExtractableImageData, type FluidKind, FluidModelObject, type FluidSample, type FluidSampler, Fonts, type FrameCallback, type FromTo, GUI_CONTAINER_LAYOUTS, Geometries, type GuiBookButtonState, type GuiBookOptions, type GuiBossBarColor, type GuiBossBarOptions, type GuiContainerType, GuiHelper, type GuiItemLayer, type GuiLayer, GuiLight, GuiObject, type GuiObjectOptions, type GuiRecipe, type GuiRecipeIngredient, type GuiRecipeOptions, type GuiSpriteScaling, type GuiText, type GuiTextLayer, type GuiTextLayout, type GuiTextOptions, type GuiTextRun, type GuiTextStyle, type GuiTextureLayer, type GuiTooltipOptions, HostedAssetSource, type IModelTextures, ITEM_GENERATED, type ImageInfo, ImageLoader, type ImageSizeInfo, InstanceManager, InstanceReference, type Instanceable, type ItemModel, type ItemModelContext, type ItemModelTextures, type ItemTintColor, type ItemTintSource, ItemTints, type ListAsset, LitematicaParser, type LitematicaRegion, type LitematicaStructure, type LoadedSceneDocument, type LoadedSceneObject, 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, NodeCache, NodeEnv, OrbitControls, type PackFormat, PackFormats, PackMetadata, PersistentCache, type PositionedGuiGlyph, type QuadArray, type RawImageKey, type RenderOptions, Renderer, type RendererFrame, type RendererOptions, type RequestConfig, RequestError, type RequestResponse, Requests, type ResolvedBlockEntity, type ResponseParser, SKIN_PARTS, type SceneBlockDefinition, type SceneDocument, SceneDocumentLoader, type SceneEntityDefinition, SceneExporter, type SceneGLTFExportOptions, type SceneGuiDefinition, type SceneGuiLayer, SceneInspector, type SceneModelDefinition, SceneObject, type SceneObjectDefinition, type SceneObjectDefinitionBase, type SceneObjectOptions, type SceneSkinDefinition, type SceneSkinPosePart, SceneStats, SceneStatsDisplay, SchematicParser, type SchematicParserOptions, type SectionAtlasSize, type SectionGeometryInput, type SectionGeometryPage, SectionMesh, type SectionMeshEntry, type SectionMeshTemplate, SectionModels, type SectionTemplateData, SectionWorker, type Serializable, type SkinGeometries, SkinImage, SkinObject, type SkinObjectOptions, SkinPart, type SkinTexture, type SkinTextureCoordinates, SkinTextures, Skins, type SpecialItemPart, type SpecialItemRenderer, SpecialItems, SpongeSchematicParser, type StructureNBT, StructureParser, type TextureAsset, TextureAtlas, type TextureKey, TextureLoader, Textures, Ticker, type TickerFunction, TintColors, type Transformable, type TripleArray, UVMapper, type VideoExportOptions, VideoExporter, type WorldChunkSource, WorldStreamer, type WorldStreamerOptions, WrappedImage, addBox3WireframeToObject, addWireframeToMesh, addWireframeToObject, applyElementRotation, applyGenericRotation, axisToVec3, base64decode, base64encode, buildSectionGeometry, capeTextureSizes, captureException, changeEvent, clampRotationDegrees, classicSkinGeometries, classicSkinTextureCoordinates, computeMorphedAttributes, createCanvas, createFluidGeometry, createGuiTextGeometry, createGuiTextureGeometry, createImage, entityAnimationTime, estimateBytesUsed, getBlockFluidState, getFluidKind, interleaveAttributes, isAssetKey, isBasicAssetKey, isBlockObject, isDisposable, isDoubleArray, isEntityObject, isGuiObject, isInstanceManager, isInstanceReference, isInstanceable, isInstancedMesh, isMesh, isMineRenderScene, isModelObject, isObject3D, isOrthographicCamera, isPerspectiveCamera, isQuadArray, isSceneObject, isTransformable, isTripleArray, isVector3, layoutGuiText, md5, mergeBufferAttributes, mergeBufferGeometries, mergeVertices, parseSceneDocument, prefix, registerNodeEnv, resolveLegacyBlock, sampleEntityAnimation, sampleEntityKeyframes, sampleFluid, sectionGeometryTransferables, serializeBoxGeometryKey, serializeImageKey, serializeMaterialKey, serializeMeshKey, serializeTextureKey, sha1, sha256, sha512, shutdown, sleep, slimSkinGeometries, slimSkinTextureCoordinates, timingEnd, timingStart, toDegrees, toRadians, toTrianglesDrawMode, trimCanvas, yieldToEventLoop };
|
|
3630
|
+
export { AXES, type AnimationFrame, type AnimationMeta, type AnimatorFunction, type AnvilChunk, type AnvilExternalChunkReader, type AnvilParseOptions, AnvilParser, type AnvilRegion, type AnvilRegionReader, AnvilWorldSource, type AnvilWorldSourceOptions, ArchiveAssetSource, type ArchiveAssetSourceOptions, type ArchiveEntry, type ArchiveProxy, AssetKey, AssetLoadError, AssetLoader, AssetParser, AssetSource, type AssetType, Assets, Axis, BUILTIN_ENTITY, BUILTIN_GENERATED, type BannerPattern, type BannerPatternDraw, BannerPatterns, BasicAssetKey, type BasicMinecraftAsset, BatchedExecutor, type BedrockBone, type BedrockCube, type BedrockEntityDescription, type BedrockEntityFile, type BedrockGeometry, type BedrockGeometryFile, type BitmapFont, type BitmapGlyph, type Block, BlockEntities, type BlockEntityEntry, type BlockEntityIndex, type BlockEntityPart, type BlockEntityRotation, type BlockFluidState, 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, CUBE_FACES, CUBE_FACE_OFFSETS, type CacheKey, Caching, type CameraOptions, CanvasImage, type CapeLayout, Chunk, ChunkData, Colormaps, type CompatCanvas, type CompatImage, type ComposerOptions, type ControlsOptions, CubeFace, CubeFaceIndex, DEFAULT_ELEMENTS, DEFAULT_NAMESPACE, DEFAULT_ROOT, DEFAULT_UV, DISPLAY_POSITIONS, DYE_COLORS, type DebugOptions, type DecoratedPotSide, DecoratedPots, type DeepPartial, DefaultBlockStates, DisplayPosition, DisplayTransforms, type Disposable, type DoubleArray, type DyeColor, ENTITY_ANIMATION_CHANNELS, type ElementFace, type ElementRotation, Entities, type EntityAnimation, type EntityAnimationBone, type EntityAnimationChannel, type EntityAnimationFile, type EntityAnimationKeyframe, type EntityAnimationOptions, EntityAnimationPlayer, type EntityAnimationPose, type EntityLayer, type EntityModel, type EntityModelCube, type EntityModelFile, type EntityModelLayer, type EntityModelOptions, type EntityModelPart, type EntityModelPass, EntityObject, type EntityObjectOptions, type EntityRenderMode, type EntityTransformOp, Env, type EnvProvider, type ExtractableImageData, type FluidKind, FluidModelObject, type FluidSample, type FluidSampler, Fonts, type FrameCallback, type FromTo, GUI_CONTAINER_LAYOUTS, Geometries, type GuiBookButtonState, type GuiBookOptions, type GuiBossBarColor, type GuiBossBarOptions, type GuiContainerType, GuiHelper, type GuiItemLayer, type GuiLayer, GuiLight, GuiObject, type GuiObjectOptions, type GuiRecipe, type GuiRecipeIngredient, type GuiRecipeOptions, type GuiSpriteScaling, type GuiText, type GuiTextLayer, type GuiTextLayout, type GuiTextOptions, type GuiTextRun, type GuiTextStyle, type GuiTextureLayer, type GuiTooltipOptions, HostedAssetSource, type IModelTextures, ITEM_GENERATED, type ImageInfo, ImageLoader, type ImageSizeInfo, InstanceManager, InstanceReference, type Instanceable, type ItemModel, type ItemModelContext, type ItemModelTextures, type ItemTintColor, type ItemTintSource, ItemTints, type ListAsset, LitematicaParser, type LitematicaRegion, type LitematicaStructure, type LoadedSceneDocument, type LoadedSceneObject, 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, NodeCache, NodeEnv, OrbitControls, type PackFormat, PackFormats, PackMetadata, PersistentCache, type PositionedGuiGlyph, type QuadArray, type RawImageKey, type RenderOptions, Renderer, type RendererFrame, type RendererOptions, type RequestConfig, RequestError, type RequestResponse, Requests, type ResolvedBlockEntity, type ResponseParser, SKIN_PARTS, type SceneBlockDefinition, type SceneDocument, SceneDocumentLoader, type SceneEntityDefinition, SceneExporter, type SceneGLTFExportOptions, type SceneGuiDefinition, type SceneGuiLayer, SceneInspector, type SceneModelDefinition, SceneObject, type SceneObjectDefinition, type SceneObjectDefinitionBase, type SceneObjectOptions, type SceneSkinDefinition, type SceneSkinPosePart, SceneStats, SceneStatsDisplay, SchematicParser, type SchematicParserOptions, type SectionAtlasSize, type SectionGeometryInput, type SectionGeometryPage, SectionMesh, type SectionMeshEntry, type SectionMeshTemplate, SectionModels, type SectionTemplateData, SectionWorker, type Serializable, type SkinGeometries, SkinImage, SkinObject, type SkinObjectOptions, SkinPart, type SkinTexture, type SkinTextureCoordinates, SkinTextures, Skins, type SpecialItemPart, type SpecialItemRenderer, SpecialItems, SpongeSchematicParser, type StructureNBT, StructureParser, type TextureAsset, TextureAtlas, type TextureKey, TextureLoader, Textures, Ticker, type TickerFunction, TintColors, type Transformable, type TripleArray, UVMapper, type VideoExportOptions, VideoExporter, type WorldChunkSource, WorldStreamer, type WorldStreamerOptions, WrappedImage, addBox3WireframeToObject, addWireframeToMesh, addWireframeToObject, applyElementRotation, applyGenericRotation, axisToVec3, base64decode, base64encode, buildSectionGeometry, capeTextureSizes, captureException, changeEvent, clampRotationDegrees, classicSkinGeometries, classicSkinTextureCoordinates, computeMorphedAttributes, createCanvas, createFluidGeometry, createGuiTextGeometry, createGuiTextureGeometry, createImage, entityAnimationTime, estimateBytesUsed, getBlockFluidState, getFluidKind, interleaveAttributes, isAssetKey, isBasicAssetKey, isBlockObject, isDisposable, isDoubleArray, isEntityObject, isGuiObject, isInstanceManager, isInstanceReference, isInstanceable, isInstancedMesh, isMesh, isMineRenderScene, isModelObject, isObject3D, isOrthographicCamera, isPerspectiveCamera, isQuadArray, isResourceLocation, isSceneObject, isTransformable, isTripleArray, isVector3, layoutGuiText, md5, mergeBufferAttributes, mergeBufferGeometries, mergeVertices, parseSceneDocument, prefix, registerNodeEnv, resolveLegacyBlock, sampleEntityAnimation, sampleEntityKeyframes, sampleFluid, sectionGeometryTransferables, serializeBoxGeometryKey, serializeImageKey, serializeMaterialKey, serializeMeshKey, serializeTextureKey, sha1, sha256, sha512, shutdown, sleep, slimSkinGeometries, slimSkinTextureCoordinates, timingEnd, timingStart, toDegrees, toRadians, toTrianglesDrawMode, trimCanvas, yieldToEventLoop };
|
package/dist/node/index.js
CHANGED
|
@@ -117,14 +117,14 @@ var init_Axis = __esm({
|
|
|
117
117
|
var CubeFace, CubeFaceIndex, CUBE_FACES, CUBE_FACE_OFFSETS;
|
|
118
118
|
var init_CubeFace = __esm({
|
|
119
119
|
"src/CubeFace.ts"() {
|
|
120
|
-
CubeFace = /* @__PURE__ */ ((
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
return
|
|
120
|
+
CubeFace = /* @__PURE__ */ ((CubeFace3) => {
|
|
121
|
+
CubeFace3["EAST"] = "east";
|
|
122
|
+
CubeFace3["WEST"] = "west";
|
|
123
|
+
CubeFace3["UP"] = "up";
|
|
124
|
+
CubeFace3["DOWN"] = "down";
|
|
125
|
+
CubeFace3["SOUTH"] = "south";
|
|
126
|
+
CubeFace3["NORTH"] = "north";
|
|
127
|
+
return CubeFace3;
|
|
128
128
|
})(CubeFace || {});
|
|
129
129
|
CubeFaceIndex = /* @__PURE__ */ ((CubeFaceIndex2) => {
|
|
130
130
|
CubeFaceIndex2[CubeFaceIndex2["EAST"] = 0] = "EAST";
|
|
@@ -1366,6 +1366,9 @@ var require_dist = __commonJS({
|
|
|
1366
1366
|
});
|
|
1367
1367
|
|
|
1368
1368
|
// src/assets/AssetKey.ts
|
|
1369
|
+
function isResourceLocation(value) {
|
|
1370
|
+
return typeof value === "string" && /^(?:[a-z0-9_.-]+:)?[a-z0-9_./-]+$/.test(value);
|
|
1371
|
+
}
|
|
1369
1372
|
function isBasicAssetKey(obj) {
|
|
1370
1373
|
return obj !== null && typeof obj === "object" && typeof obj.namespace === "string" && typeof obj.path === "string";
|
|
1371
1374
|
}
|
|
@@ -1752,7 +1755,7 @@ var init_Models = __esm({
|
|
|
1752
1755
|
return model ? restore(model) : void 0;
|
|
1753
1756
|
}
|
|
1754
1757
|
static contextIdentifier(id) {
|
|
1755
|
-
if (
|
|
1758
|
+
if (!isResourceLocation(id)) {
|
|
1756
1759
|
throw new Error(`Invalid item-preview identifier: ${id}`);
|
|
1757
1760
|
}
|
|
1758
1761
|
return id.includes(":") ? id : `minecraft:${id}`;
|
|
@@ -1897,6 +1900,8 @@ var init_Models = __esm({
|
|
|
1897
1900
|
case "minecraft:trident":
|
|
1898
1901
|
case "conduit":
|
|
1899
1902
|
case "minecraft:conduit":
|
|
1903
|
+
case "decorated_pot":
|
|
1904
|
+
case "minecraft:decorated_pot":
|
|
1900
1905
|
return { model: node.base, special };
|
|
1901
1906
|
case "shulker_box":
|
|
1902
1907
|
case "minecraft:shulker_box":
|
|
@@ -16290,6 +16295,55 @@ var init_MinecraftCubeTexture = __esm({
|
|
|
16290
16295
|
}
|
|
16291
16296
|
});
|
|
16292
16297
|
|
|
16298
|
+
// src/assets/DecoratedPots.ts
|
|
16299
|
+
var POTTERY_SHERDS, DecoratedPots;
|
|
16300
|
+
var init_DecoratedPots = __esm({
|
|
16301
|
+
"src/assets/DecoratedPots.ts"() {
|
|
16302
|
+
init_AssetKey();
|
|
16303
|
+
POTTERY_SHERDS = Object.freeze([
|
|
16304
|
+
"angler",
|
|
16305
|
+
"archer",
|
|
16306
|
+
"arms_up",
|
|
16307
|
+
"blade",
|
|
16308
|
+
"brewer",
|
|
16309
|
+
"burn",
|
|
16310
|
+
"danger",
|
|
16311
|
+
"explorer",
|
|
16312
|
+
"flow",
|
|
16313
|
+
"friend",
|
|
16314
|
+
"guster",
|
|
16315
|
+
"heart",
|
|
16316
|
+
"heartbreak",
|
|
16317
|
+
"howl",
|
|
16318
|
+
"miner",
|
|
16319
|
+
"mourner",
|
|
16320
|
+
"plenty",
|
|
16321
|
+
"prize",
|
|
16322
|
+
"scrape",
|
|
16323
|
+
"sheaf",
|
|
16324
|
+
"shelter",
|
|
16325
|
+
"skull",
|
|
16326
|
+
"snort"
|
|
16327
|
+
].map((pattern2) => `minecraft:${pattern2}_pottery_sherd`));
|
|
16328
|
+
DecoratedPots = class {
|
|
16329
|
+
/** Reads up to four item IDs in back, left, right, front order; missing and unmapped items use plain sides. */
|
|
16330
|
+
static getSideTextures(value, root) {
|
|
16331
|
+
const items = value === void 0 ? [] : value;
|
|
16332
|
+
if (!Array.isArray(items) || items.length > 4) throw new Error("pot_decorations must be an array of at most four item IDs");
|
|
16333
|
+
const textures = items.map((item) => {
|
|
16334
|
+
if (!isResourceLocation(item)) throw new Error("Pot decorations must be item identifiers");
|
|
16335
|
+
const id = item.includes(":") ? item : `minecraft:${item}`;
|
|
16336
|
+
return POTTERY_SHERDS.includes(id) ? id.slice("minecraft:".length).replace(/_sherd$/, "_pattern") : "decorated_pot_side";
|
|
16337
|
+
});
|
|
16338
|
+
return Object.fromEntries(["back", "left", "right", "front"].map((side, index) => [
|
|
16339
|
+
side,
|
|
16340
|
+
new AssetKey("minecraft", `decorated_pot/${textures[index] ?? "decorated_pot_side"}`, "textures", "entity", "assets", ".png", root)
|
|
16341
|
+
]));
|
|
16342
|
+
}
|
|
16343
|
+
};
|
|
16344
|
+
}
|
|
16345
|
+
});
|
|
16346
|
+
|
|
16293
16347
|
// src/error/MineRenderError.ts
|
|
16294
16348
|
var MineRenderError;
|
|
16295
16349
|
var init_MineRenderError = __esm({
|
|
@@ -17147,6 +17201,7 @@ var init_EntityObject = __esm({
|
|
|
17147
17201
|
init_AssetKey();
|
|
17148
17202
|
init_Materials();
|
|
17149
17203
|
init_MinecraftCubeTexture();
|
|
17204
|
+
init_CubeFace();
|
|
17150
17205
|
init_three();
|
|
17151
17206
|
init_EntityAnimationPlayer();
|
|
17152
17207
|
EntityObject = class _EntityObject extends SceneObject {
|
|
@@ -17324,11 +17379,11 @@ var init_EntityObject = __esm({
|
|
|
17324
17379
|
const group = this.createGroup(`layer:${name}`);
|
|
17325
17380
|
modelRoot.add(group);
|
|
17326
17381
|
const inward = !Materials.entityModeCulls(layer.render ?? layer.layer.render);
|
|
17327
|
-
this.createPart("root", layer.layer.root, group, layer.layer.texture, Materials.MISSING_TEXTURE, index, inward);
|
|
17382
|
+
this.createPart("root", layer.layer.root, group, layer.layer.texture, Materials.MISSING_TEXTURE, index, inward, this.options.faces?.[name]);
|
|
17328
17383
|
});
|
|
17329
17384
|
this.meshesCreated = true;
|
|
17330
17385
|
}
|
|
17331
|
-
createPart(name, part, parent, textureSize, material, renderOrder, inward = true) {
|
|
17386
|
+
createPart(name, part, parent, textureSize, material, renderOrder, inward = true, faces) {
|
|
17332
17387
|
const anchor = this.createGroup(name);
|
|
17333
17388
|
anchor.position.fromArray(part.pose.offset);
|
|
17334
17389
|
anchor.rotation.set(...part.pose.rotation, "ZYX");
|
|
@@ -17349,6 +17404,10 @@ var init_EntityObject = __esm({
|
|
|
17349
17404
|
).clone();
|
|
17350
17405
|
this.geometries.add(geometry);
|
|
17351
17406
|
geometry.translate(cube.origin[0] + width / 2, cube.origin[1] + height / 2, cube.origin[2] + depth / 2);
|
|
17407
|
+
if (faces) {
|
|
17408
|
+
geometry.setIndex(Array.from(geometry.getIndex().array).filter((_, index) => faces.includes(CUBE_FACES[Math.floor(index / 6)])));
|
|
17409
|
+
geometry.clearGroups();
|
|
17410
|
+
}
|
|
17352
17411
|
if (inward && Math.min(width + growX * 2, height + growY * 2, depth + growZ * 2) > 0) {
|
|
17353
17412
|
const index = Array.from(geometry.getIndex().array);
|
|
17354
17413
|
geometry.setIndex(index.concat(index.slice().reverse()));
|
|
@@ -17359,7 +17418,7 @@ var init_EntityObject = __esm({
|
|
|
17359
17418
|
if (this.options.wireframe) this.disposeWireframes.push(addWireframeToMesh(geometry, mesh));
|
|
17360
17419
|
}
|
|
17361
17420
|
for (const [childName, child] of Object.entries(part.children)) {
|
|
17362
|
-
this.createPart(childName, child, anchor, size, material, renderOrder, inward);
|
|
17421
|
+
this.createPart(childName, child, anchor, size, material, renderOrder, inward, faces);
|
|
17363
17422
|
}
|
|
17364
17423
|
}
|
|
17365
17424
|
async applyTextures() {
|
|
@@ -17987,7 +18046,9 @@ var init_SpecialItems = __esm({
|
|
|
17987
18046
|
init_AssetKey();
|
|
17988
18047
|
init_Entities();
|
|
17989
18048
|
init_BannerPatterns();
|
|
18049
|
+
init_DecoratedPots();
|
|
17990
18050
|
init_ModelTextures();
|
|
18051
|
+
init_CubeFace();
|
|
17991
18052
|
SpecialItems = class {
|
|
17992
18053
|
/** Resolves the static entity parts drawn by a special item renderer, in model units. */
|
|
17993
18054
|
static async getParts(special, root, components = {}) {
|
|
@@ -18013,6 +18074,34 @@ var init_SpecialItems = __esm({
|
|
|
18013
18074
|
return { model, transform, rotations };
|
|
18014
18075
|
};
|
|
18015
18076
|
switch (special.type) {
|
|
18077
|
+
case "minecraft:decorated_pot":
|
|
18078
|
+
case "decorated_pot": {
|
|
18079
|
+
const sideTextures = DecoratedPots.getSideTextures(components["minecraft:pot_decorations"], root);
|
|
18080
|
+
const baseTexture = texture("decorated_pot_base", "decorated_pot");
|
|
18081
|
+
const [base, sides] = await Promise.all([
|
|
18082
|
+
load("decorated_pot_base", baseTexture, new import_three24.Matrix4()),
|
|
18083
|
+
load("decorated_pot_sides", texture("decorated_pot_side", "decorated_pot"), new import_three24.Matrix4())
|
|
18084
|
+
]);
|
|
18085
|
+
const layers = {
|
|
18086
|
+
base: { key: base.model.key, texture: baseTexture, layer: base.model.layer, render: "solid" }
|
|
18087
|
+
};
|
|
18088
|
+
for (const side of ["front", "back", "left", "right"]) {
|
|
18089
|
+
const part = sides.model.layer.root.children[side];
|
|
18090
|
+
if (!part) throw new Error(`Decorated-pot entity model is missing its ${side} side`);
|
|
18091
|
+
layers[side] = { key: sides.model.key, texture: sideTextures[side], render: "solid", layer: {
|
|
18092
|
+
...sides.model.layer,
|
|
18093
|
+
root: { ...sides.model.layer.root, cubes: [], children: {
|
|
18094
|
+
[side]: part
|
|
18095
|
+
} }
|
|
18096
|
+
} };
|
|
18097
|
+
}
|
|
18098
|
+
await Promise.all([...new Map(Object.values(layers).map((layer) => [layer.texture.serialize(), layer.texture])).values()].map(async (key) => {
|
|
18099
|
+
if (!await ModelTextures.preload(key)) throw new Error(`Missing special item texture ${key.toNamespacedString()}`);
|
|
18100
|
+
}));
|
|
18101
|
+
base.model = { ...base.model, ...layers.base, layers };
|
|
18102
|
+
base.faces = { front: ["north" /* NORTH */], back: ["north" /* NORTH */], left: ["north" /* NORTH */], right: ["north" /* NORTH */] };
|
|
18103
|
+
return [base];
|
|
18104
|
+
}
|
|
18016
18105
|
case "minecraft:trident":
|
|
18017
18106
|
case "trident":
|
|
18018
18107
|
case "minecraft:conduit":
|
|
@@ -18376,7 +18465,7 @@ var init_ModelObject = __esm({
|
|
|
18376
18465
|
transform.multiply(new import_three25.Matrix4().makeTranslation(-8, -8, -8));
|
|
18377
18466
|
try {
|
|
18378
18467
|
for (const part of parts2) {
|
|
18379
|
-
const object3 = new EntityObject(part.model, { flip: false, wireframe: this.options.wireframe, tints: part.tints });
|
|
18468
|
+
const object3 = new EntityObject(part.model, { flip: false, wireframe: this.options.wireframe, tints: part.tints, faces: part.faces });
|
|
18380
18469
|
object3.matrix.copy(transform).multiply(part.transform);
|
|
18381
18470
|
object3.matrixWorldNeedsUpdate = true;
|
|
18382
18471
|
object3.matrixAutoUpdate = false;
|
|
@@ -18853,6 +18942,7 @@ __export(index_node_exports, {
|
|
|
18853
18942
|
DEFAULT_UV: () => DEFAULT_UV,
|
|
18854
18943
|
DISPLAY_POSITIONS: () => DISPLAY_POSITIONS,
|
|
18855
18944
|
DYE_COLORS: () => DYE_COLORS,
|
|
18945
|
+
DecoratedPots: () => DecoratedPots,
|
|
18856
18946
|
DefaultBlockStates: () => DefaultBlockStates,
|
|
18857
18947
|
DisplayPosition: () => DisplayPosition,
|
|
18858
18948
|
DisplayTransforms: () => DisplayTransforms,
|
|
@@ -18972,6 +19062,7 @@ __export(index_node_exports, {
|
|
|
18972
19062
|
isOrthographicCamera: () => isOrthographicCamera,
|
|
18973
19063
|
isPerspectiveCamera: () => isPerspectiveCamera,
|
|
18974
19064
|
isQuadArray: () => isQuadArray,
|
|
19065
|
+
isResourceLocation: () => isResourceLocation,
|
|
18975
19066
|
isSceneObject: () => isSceneObject,
|
|
18976
19067
|
isTransformable: () => isTransformable,
|
|
18977
19068
|
isTripleArray: () => isTripleArray,
|
|
@@ -19214,6 +19305,7 @@ var BlockEntities = class {
|
|
|
19214
19305
|
|
|
19215
19306
|
// src/assets/index.ts
|
|
19216
19307
|
init_BlockStates();
|
|
19308
|
+
init_DecoratedPots();
|
|
19217
19309
|
init_Entities();
|
|
19218
19310
|
|
|
19219
19311
|
// src/assets/Fonts.ts
|
|
@@ -30893,6 +30985,7 @@ var WorldStreamer = class {
|
|
|
30893
30985
|
DEFAULT_UV,
|
|
30894
30986
|
DISPLAY_POSITIONS,
|
|
30895
30987
|
DYE_COLORS,
|
|
30988
|
+
DecoratedPots,
|
|
30896
30989
|
DefaultBlockStates,
|
|
30897
30990
|
DisplayPosition,
|
|
30898
30991
|
DisplayTransforms,
|
|
@@ -31012,6 +31105,7 @@ var WorldStreamer = class {
|
|
|
31012
31105
|
isOrthographicCamera,
|
|
31013
31106
|
isPerspectiveCamera,
|
|
31014
31107
|
isQuadArray,
|
|
31108
|
+
isResourceLocation,
|
|
31015
31109
|
isSceneObject,
|
|
31016
31110
|
isTransformable,
|
|
31017
31111
|
isTripleArray,
|