voxel-cat is an entry for the JS1k 2019 "X" JavaScript code golfing competition.
The goal of the competition is to create a fancy JavaScript demo up to 1024 bytes.
This entry is a demonstration of CT scan, also known as computed tomography scan, and formerly known as CAT scan, which makes use of computer-processed combinations of many X-ray measurements taken from different angles to produce cross-sectional images of a scanned object, allowing the user to see inside the object without cutting.
Demo data is based on Wioletta Orłowska's voxel cat image with small modifications.
Voxel data has been created with Goxel voxel editor.
Voxel data has been compressed with a fixed-length pattern substitution compression algorithm implemented in Ruby with a small decompressor in JavaScript.
Among various code golfing tricks, for further optimizations the JavaScript code has been minified with Closure Compiler with minor manual tweaks baked into a Gradle script.