Skip to content
🐱 X-ray CT scan of a voxel cat. An entry for the JS1k 2019 JavaScript code golfing competition.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
gradle/wrapper
resources
.gitattributes
.gitignore
.project
LICENSE
README.md
build.gradle
gradlew
gradlew.bat
index.html
voxel-cat.js
voxel-cat.min.js
voxel-cat.min.js.b64
voxel-cat.png

README.md

voxel-cat

Overview

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.

voxel-cat

Demo Description

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.

Data

Demo data is based on Wioletta Orłowska's voxel cat image with small modifications.

Voxel data has been created with Goxel voxel editor.

Optimizations

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.

You can’t perform that action at this time.