This post has been moved to my blog, under Color Management in three.js.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| INFINIZOOM | |
| Build infinizoom: a procedural infinite-zoom world. The deliverable is a self-contained BunJS project. Running `bun run server` must build and serve it (wire up the corresponding "server" script in package.json). Three local assets exist in this directory and must be used: ./macbook_interior.png (a real MacBook Pro teardown photo), ./apple_m4_scheme.png (Apple's M4 die floorplan diagram), and ./wallpaper.jpg (a 1920×1200 desktop wallpaper photo). Load the wallpaper from this local file — never fetch content from external servers (the sole exception: three.js itself may be imported from a CDN by URL). | |
| The world | |
| A single 3D world is traveled indefinitely along a fixed camera track that zooms through these levels: | |
| Main route: a room → a desk → a MacBook Pro → inside the chassis → the logic board → the Apple M4 package → the M4 die → a performance core → an integer ALU block → a standard logic cell → a FinFET transistor → a material cross-section inside the fin → the silicon crystal lattice → one u |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env node | |
| const fs = require('fs'); | |
| const path = require('path'); | |
| const THREE = require('three'); | |
| const program = require('commander'); | |
| const Canvas = require('canvas'); | |
| const { Blob, FileReader } = require('vblob'); | |
| // Patch global scope to imitate browser environment. |
- http://absulit.com/portfolio/demo/webvr/001/
- https://www.clicktorelease.com/code/polygon-shredder/vr/ #positional
- https://www.clicktorelease.com/tmp/threejs/webvr-physics/ #positional #input #haptic
- https://janusweb.metacade.com/ https://github.com/jbaicoianu/janusweb/
- https://jzitelli.github.io/poolvr/
- https://kuva.io/block-background/ #positional #input
- https://www.shadertoy.com/results?filter=vr
- https://vr-batted-ball-vis.herokuapp.com/index.html
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| TarGZ = function(){}; | |
| // Load and parse archive, calls onload after loading all files. | |
| TarGZ.load = function(url, onload, onstream, onerror) { | |
| var o = new TarGZ(); | |
| o.onload = onload; | |
| o.onerror = onerror; | |
| o.onstream = onstream; | |
| o.load(url); | |
| return o; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/ruby | |
| USAGE = "dataurize filename [mimetype] > filename.dataURI" | |
| require 'base64' | |
| mime = ARGV[1] || `file -ib '#{ARGV[0].gsub(/'/, "'\\\\''")}'`.strip | |
| STDOUT.write("data:#{mime};base64,") | |
| File.open(ARGV[0], 'rb') {|f| | |
| STDOUT.write(Base64.encode64(f.read(4500))) until f.eof? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* MultiFile - A JavaScript library to load multiple files from | |
| tar archives and json_packed files (see http://gist.github.com/407595) | |
| Example: Loading multiple images from a tarball. | |
| MultiFile.load('images.tar', function(xhr) { | |
| this.files.forEach(function(f) { | |
| var e = document.createElement('div'); | |
| document.body.appendChild(e); | |
| var p = document.createElement('p'); |