Skip to content

API name migration ​

The renderer replaces ambiguous factories, lookups, conversions, and updates with names that describe their operation. Update imports and calls below. These are breaking API renames; the argument types and runtime behavior are unchanged. Serialized block ids, transforms, worlds, and templates remain compatible.

Previous nameReplacement
BlockTextures.ofBlockTextures.fromBlock
BlockTextureLayout.ofBlockTextureLayout.fromShape
ShapeOccupancy.ofShapeOccupancy.fromShape
VoxelFootprint.ofVoxelFootprint.fromObject
BlockRegistry.indexOfBlockRegistry.findIndex
BlockRegistry.propertiesOfBlockRegistry.copyProperties
BlockComplements.occupancyOfBlockComplements.resolveOccupancy
VoxelLayer.positionsOfVoxelLayer.positionsUsingBlocks
VoxelBlockInspector.usageOfVoxelBlockInspector.inspectUsage
VoxelBlockInspector.blocksetUsageOfVoxelBlockInspector.inspectBlocksetUsage
BlockPieces.pieceOfBlockPieces.resolvePiece
BlockPieces.geometryOfBlockPieces.buildGeometry
BlockPieces.textureOfBlockPieces.resolveTexture
BlockPieces.emptySlotsOfBlockPieces.findEmptySlots
blocksetSlotOfdecodeBlocksetSlot
localBlockIdOfdecodeLocalBlockId
voxelCellOffloorVoxelPosition
voxelPositionOfresolveSurfaceCell
tileRectOfresolveTileRect
slotNameOffaceSlotName
slotKeyOfnormalizeSlotKey
baseSlotOfbaseSlotName
occlusionMaskOfcomputeOcclusionMask
sideCoverageOfcomputeSideCoverage
BlockTextures.forSlotBlockTextures.resolveSlotTexture
BlockTextures.spanForBlockTextures.resolveSlotSpan
BlockTextures.withSizeBlockTextures.withTileSize
BlockTextures.staysOnGridBlockTextures.canRescaleOnGrid
BlockTextures.withBlocksetBlockTextures.withDefaultBlockset
BlockTextures.applyToBlockTextures.createTexturedBlock
VoxelTemplate.placedPositionForVoxelTemplate.placementPositionFromMinCorner
BlocksetList.bySlotBlocksetList.findBySlot
BlocksetList.freeSlotBlocksetList.findAvailableSlot
BlocksetList.applyBlocksetList.applyCommand
MaterialGroup.applyToMaterialGroup.applyMaterialFinish
BlockRegistry.moveToBlockRegistry.moveBlockToIndex
BlockRegistry.applyBlockRegistry.applyCommand
MaterialGroupList.applyMaterialGroupList.applyCommand
BlendGroupList.applyBlendGroupList.applyCommand
BlockTextureLayout.slotsInBlockTextureLayout.slotsUsingBlockset
BlockTextureLayout.drawnRectsInBlockTextureLayout.collectDrawnTileRects
BlockTextureLayout.footprintsInBlockTextureLayout.collectTileFootprintRects
BlocksetSlot.ownsBlocksetSlot.ownsBlockId
BlocksetSlot.blockIdBlocksetSlot.composeBlockId
BlocksetSlot.localBlockIdBlocksetSlot.decodeLocalBlockId
BlocksetSlot.groupIdBlocksetSlot.qualifyGroupId
BlocksetSlot.localGroupIdBlocksetSlot.decodeLocalGroupId
BlocksetSlot.projectBlocksetSlot.projectBlock
BlocksetSlot.projectAllBlocksetSlot.projectBlocks
BlocksetSlot.localBlocksetSlot.localizeBlock
BlocksetSlot.localMaterialGroupBlocksetSlot.localizeMaterialGroup
BlocksetAtlas.uvForBlocksetAtlas.computeTileUvRegion
BlocksetAtlas.disposeReplacedByBlocksetAtlas.disposeUnsharedTextures
BlocksetAtlases.resolveBlocksetAtlases.resolveAtlas
BlocksetAtlases.atlasBlocksetAtlases.requireLoadedAtlas
VoxelView.canMergeAtVoxelView.canMergeVoxelPart
VoxelView.partAtVoxelView.pickVoxelPart
BlockDocument.applyBlockDocument.applyCommand
VoxelDocument.applyVoxelDocument.applyCommand
VoxelWorld.applyVoxelWorld.applyCommand
VoxelTemplates.applyVoxelTemplates.applyCommand
VoxelObjectLayers.applyVoxelObjectLayers.applyCommand
BlockDocument.fold (protected)BlockDocument.applyCommandToState

BlocksetDocument also inherits applyCommand(). Subclasses of BlockDocument must rename their protected fold() override to applyCommandToState(); it applies the command without emitting an event.

For example, a transformed block preview now uses pieces.resolvePiece(block, transform). It still returns a cached piece whose geometry belongs to the cache. Use pieces.buildGeometry(block, transform) when the caller needs to own and dispose the geometry.

BlockTextures.createTexturedBlock(block) returns a block with the textures; when they are unchanged it returns the original block. MaterialGroup.applyMaterialFinish(material) updates the supplied Three.js material in place. BlocksetAtlases.requireLoadedAtlas(id) throws if the atlas is unavailable; resolveAtlas(id) supplies the missing-texture atlas for an undeclared id, and returns undefined for a declared but unloaded atlas.