fix: update spritesheet and data

This commit is contained in:
trafficlunar 2024-12-21 16:53:52 +00:00
parent 01bb44965d
commit 94e560a60d
7 changed files with 7 additions and 731 deletions

View file

@ -10,6 +10,9 @@ function SelectedBlock() {
const { selectedBlock } = useContext(ToolContext);
const convertToDataUrl = (textureName: string): string => {
// Show missing texture if fail
if (!textures["stone"])
return "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAGUlEQVR42mPABX4w/MCKaKJhVMPgcOuoBgDZRfgBVl5QdQAAAABJRU5ErkJggg==";
const texture = textures[textureName];
const canvas = document.createElement("canvas");