Simulation of random distribution of objects in 3D space after a (big) bang. Rendered in VR using 3d-force-graph-vr. Move around using arrow/wasd keys or a gamepad.
Last active
September 18, 2019 01:21
-
-
Save vasturiano/b7c667a15e7e5a72067e12fc99ceaaec to your computer and use it in GitHub Desktop.
VR Hyperspace
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
<head> | |
<script src="//unpkg.com/3d-force-graph-vr@1"></script> | |
<script src="//cdnjs.cloudflare.com/ajax/libs/d3/4.11.0/d3.min.js"></script> | |
<style> | |
body { | |
margin: 0; | |
font-family: Sans-serif; | |
} | |
</style> | |
</head> | |
<body> | |
<script> | |
const NUM_NODES = 3000; | |
const nodeScale = d3.scaleLinear().range([0.03, 0.06]); | |
const nodes = d3.range(NUM_NODES).map(d => ({ id: d, val: nodeScale(Math.random())})); | |
ForceGraphVR() | |
.graphData({ nodes, links: [] }) | |
.warmupTicks(50) | |
.cooldownTicks(0) // Don't animate-in, jump to final state | |
(document.body); | |
</script> | |
</body> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment