]> git.lizzy.rs Git - dragonblocks.git/blobdiff - engine/map_interaction.js
Make dragonblocks.getTexture() return value contain background-size: cover
[dragonblocks.git] / engine / map_interaction.js
index 6220a4e9e5ee747d55fd5d85191f4db79bea7c86..2345f6664b4987db5099613b251ee75837009ba4 100644 (file)
@@ -27,7 +27,6 @@ dragonblocks.MapInteraction = {
                this.tmp.crackDisplay = this.map.entityContainer.appendChild(document.createElement("div"));
                this.tmp.crackDisplay.style.position = "absolute";
                this.tmp.crackDisplay.style.visibility = "hidden";
-               this.tmp.crackDisplay.style.backgroundSize = "cover";
                this.tmp.crackDisplay.style.height = dragonblocks.settings.mapDisplay.scale + "px";
                this.tmp.crackDisplay.style.width = dragonblocks.settings.mapDisplay.scale + "px";
                this.tmp.crackDisplay.style.boxShadow = "0 0 0 1px black inset";
@@ -115,7 +114,6 @@ dragonblocks.MapInteraction = {
                        nodeDef.playSound("dig");
 
                        this.tmp.crackDisplay.style.background = dragonblocks.getTexture("crack" + Math.floor(node.meta.causedDamage / nodeDef.hardness * 5) + ".png");
-                       this.tmp.crackDisplay.style.backgroundSize = "cover";
                        this.tmp.crackDisplay.style.zIndex = nodeDef.zIndex || "1";
 
                        this.tmp.digTimeout = setTimeout(_ => {