
/*/////////////////////////////////////////////////////////////////////
// Voxy mini JS
// Copyright (c) 2024 Neatro
/////////////////////////////////////////////////////////////////////*/

voxy {
  --scale: 64;
  display: block;
  height: 0px;
  width: 0px;
  position: relative;
  transform: translate3d( var( --x, 0px ), var( --y, 0px ), var( --z, 0px ) ) rotate( var( --r, 0deg ) );
  /*filter: drop-shadow(1px 1px 0px #0000002F)
          drop-shadow(2px 2px 0px #0000002F)
          drop-shadow(3px 3px 0px #0000002F)
          drop-shadow(4px 4px 0px #0000002F)
          drop-shadow(5px 5px 0px #0000002F)
          drop-shadow(6px 6px 0px #0000002F)
          drop-shadow(7px 7px 0px #0000002F)
          drop-shadow(8px 8px 0px #0000002F)*/;
  /*filter: drop-shadow(0px 0px 32px #000000FF) drop-shadow(0px 0px 4px #0000003F);*/
  user-select: none;
  touch-action: manipulation;
  cursor: crosshair;
  transform-style: preserve-3d;
}

voxy vx {
  display: block;
  position: absolute;
  background: url('/content/img/voxymini/BlockCSS2_front.png'); /*Source: Minecraft wiki*/
  background-size: 2400%;
  image-rendering: pixelated;
  height: calc( 1px * var( --scale, 64px ) );
  width: calc( 1px * var( --scale, 64px ) );
  transform: translate3d( calc( 64px * var( --x, 0 ) ), calc( -64px * var( --y, 0 ) ), 0px );
  background-position: calc( -64px * var( --u, 0 ) ) calc( -64px * var( --v, 0 ) );
  transform-style: preserve-3d;
  touch-action: manipulation
}
voxy vx::after {
  content: '';
  background: url('/content/img/voxymini/BlockCSS2_side_sl.png');
  background-size: 2400%;
  background-position: inherit;
  height: 64px;
  width: 64px;
  display: block;
  position: absolute;
  transform: translate3d( -31.8px, 0px, -31.8px ) rotate3d( 0, 1, 0, -90deg );
  backface-visibility: hidden;
}
voxy vx::before {
  content: '';
  background: url('/content/img/voxymini/BlockCSS2_side_sr.png');
  background-size: 2400%;
  background-position: inherit;
  height: 64px;
  width: 64px;
  display: block;
  position: absolute;
  transform: translate3d( 31.8px, 0px, -31.8px ) rotate3d( 0, 1, 0, 90deg );
  backface-visibility: hidden;
}

voxy vx:not( [data-shape="cross"] ) render {
  background-position: inherit;
  height: 0px;
  width: 0px;
  display: block;
  position: absolute;
  transform-style: preserve-3d;
}
voxy vx:not( [data-shape="cross"] ) render::after {
  content: '';
  background: url('/content/img/voxymini/BlockCSS2_top_s.png');
  background-size: 2400%;
  background-position: inherit;
  height: 64px;
  width: 64px;
  display: block;
  position: absolute;
  transform: translate3d( 0px, -31.8px, -31.8px ) rotate3d( 1, 0, 0, 90deg );
  backface-visibility: hidden;
}
voxy vx:not( [data-shape="cross"] ) render::before {
  content: '';
  background: url('/content/img//voxymini/BlockCSS2_bottom_s.png');
  background-size: 2400%;
  background-position: inherit;
  height: 64px;
  width: 64px;
  display: block;
  position: absolute;
  transform: translate3d( 0px, 31.8px, -31.8px ) rotate3d( 1, 0, 0, -90deg );
  backface-visibility: hidden;
}

voxy vx:not( [data-shape="cross"] ) shadow {
  display: block;
  position: absolute;
  background: url('/content/img/voxymini/ambientocclusion_milder.png');
  image-rendering: pixelated;
  height: 192px;
  width: 192px;
  transform: translate3d( -64px, -64px, -63.8px );
  pointer-events: none;
}

/*cross shape*/


voxy vx[data-shape="cross"] {
  display: block;
  position: absolute;
  background: url('/content/img/voxymini/BlockCSS2_front.png'); /*Source: Minecraft wiki*/
  background-size: 2400%;
  image-rendering: pixelated;
  height: 0px;
  width: 0px;
  transform: translate3d( calc( 64px * var( --x, 0 ) ), calc( -64px * var( --y, 0 ) ), 0px );
  background-position: calc( -64px * var( --u, 0 ) ) calc( -64px * var( --v, 0 ) );
  transform-style: preserve-3d;
}
voxy vx[data-shape="cross"]::after {
  content: '';
  background: url('/content/img/voxymini/BlockCSS2_top.png');
  background-size: 2400%;
  background-position: inherit;
  height: 64px;
  width: 64px;
  display: block;
  position: absolute;
  transform: scale( 1.4, 1 ) translate3d( 0px, 0px, -31.8px ) rotate3d( 0, 1, 0, -45deg );
  backface-visibility: hidden;
}
voxy vx[data-shape="cross"]::before {
  content: '';
  background: url('/content/img/voxymini/BlockCSS2_top.png');
  background-size: 2400%;
  background-position: inherit;
  height: 64px;
  width: 64px;
  display: block;
  position: absolute;
  transform: scale( 1.4, 1 ) translate3d( 0px, 0px, -31.8px ) rotate3d( 0, 1, 0, 45deg );
  backface-visibility: hidden;
}


/*
voxy vx.breaking::after {
  content: '';
  display: block;
  position: absolute;
  background: url('/content/img/BlockCSS2.png'); /*Source: Minecraft wiki
  background-size: 2400%;
  image-rendering: pixelated;
  mix-blend-mode: multiply;
  height: 100%;
  width: 100%;
  background-position: calc( -64px * var( --progress, 0 ) ) calc( -64px * 15 );
  filter: multiply;
}
voxy vx:hover::before {
  content: '';
  display: block;
  position: absolute;
  height: calc( 100% + 2px );
  width: calc( 100% + 2px );
  top: -2px;
  left: -2px;
  border: 1px solid black;
  z-index: 1;
  pointer-events: none;
}*/

voxy vx hitbox{
  display: none;
}
voxy.active vx hitbox{
  content: '';
  display: block;
  position: absolute;
  background: #00FF0000;
  z-index: -2;
  height: 280%;
  width: 280%;
  left: -90%;
  top: -90%;
  border-radius: 25%;
}

voxy align {
  display: block;
  position: absolute;
  height: 0px;
  width: 0px;
  top: 0px;
  left: 0px;
}

voxy align.satellite {
  left: 512px;
}

cursor {
  display: none;
  position: absolute;
  height: calc( 64px + 4px );
  width: calc( 64px + 4px );
  top: -2px;
  left: -2px;
  border: 1px solid white;
  z-index: 1;
  pointer-events: none;
  /*mix-blend-mode: difference;*/
}
cursor.breaking::after {
  content: '';
  display: block;
  position: absolute;
  background: url('/content/img/voxymini/BlockCSS2_break.png'); /*Source: Minecraft wiki*/
  background-size: 2400%;
  image-rendering: pixelated;
  mix-blend-mode: multiply;
  height: 64px;
  width: 64px;
  top: 2px;
  left: 2px;
  background-position: calc( -64px * var( --progress, 0 ) ) calc( -64px * 15 );
  filter: multiply;
}

