gaborbata / voxel-cat

:cat: X-ray CT scan of a voxel cat. An entry for the JS1k 2019 JavaScript code golfing competition.

Home Page:https://js1k.com/4065

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

voxel-cat Optimize

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.

About

:cat: X-ray CT scan of a voxel cat. An entry for the JS1k 2019 JavaScript code golfing competition.

https://js1k.com/4065

License:MIT License


Languages

Language:JavaScript 58.7%Language:HTML 41.3%