Skip to content

Instantly share code, notes, and snippets.

@Xanmia
Xanmia / index.html
Created May 29, 2013 20:04
A CodePen by Xanmia. Website mockup - Really simple personal website mock up using the twitter bootstap css, jquery and jquery UI.
<div class="navbar navbar-inverse navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
<a class="brand" href="#">Holy Crap My Name Is Long</a>
</div>
</div>
</div>
<div class="container">
<div class="row">
<div class="block a-block span12"><h1>Twitter</h1><div class="text-center lead" id="twitter"></div><p class="text-right"><button type="button" onclick="http://www.twitter.com/Xanmia" class="btn btn-primary btn-large">Follow Me</button></p></div>
@Xanmia
Xanmia / index.html
Created July 25, 2013 13:34
A CodePen by Xanmia. 3D Particle Star Field - Star field with 40000 objects, rotates in space before reaching the end, click to zoom.
<div id="dir">
Click to Zoom </div>
@Xanmia
Xanmia / script.js
Created July 25, 2013 13:34
A CodePen by Xanmia. Learning Particle system - Learning the threejs particle system, this is a threejs demo can be found on the threejs.org site. Don't use Internet Explorer if you want it to work...
//threejs - demo - http://threejs.org/examples/webgl_particles_random.html
var container = document.createElement('div');
document.body.appendChild( container );
var camera = new THREE.PerspectiveCamera(75, window.innerWidth / window.innerHeight,1, 3000)
camera.position.z = 1000; //pull this back to 2000 to see what is actually going on
var scene = new THREE.Scene();
scene.fog = new THREE.FogExp2( 0x0000F0, 0.0009 ); //color of fog - objects are all white
var geometry = new THREE.Geometry();
@Xanmia
Xanmia / script.js
Created July 25, 2013 13:34
A CodePen by Xanmia. Dynamic Plane Adjusting in threejs - Random adjusting the heights on the plane object. Refresh page for new plane layout.
var vertexHeight = 500;
var planeDefinition = 20;
var planeSize = 15000;
var container = document.createElement('div');
document.body.appendChild( container );
var camera = new THREE.PerspectiveCamera(45, window.innerWidth / window.innerHeight,1, 20000)
camera.position.z = 6000;
@Xanmia
Xanmia / index.html
Created July 25, 2013 13:35
A CodePen by Xanmia. 2d Easy Star Field - Animated rotating star field using the canvas element only. Random locations, opacity and speed of stars. As well as a shooting star from time to time.
<canvas id="field"></canvas>

Dynamic Plane Adjusting in threejs

Random adjusting the heights on the plane object. Refresh page for new plane layout.

A Pen by Xanmia on CodePen.

License.

@Xanmia
Xanmia / Space-Hack.markdown
Created December 19, 2013 17:22
A Pen by Xanmia.

Space Hack

A rough first attempt at a threejs game. Only works in Chrome and Firefox. Concept from Buck Rogers: Planet of Zoom.

A Pen by Xanmia on CodePen.

License.

Three.js Level Layout

Enjoy! - only shows correctly in full screen.... needs work.

A Pen by Xanmia on CodePen.

License.

Random material generator with bump map

Generates a random material with a matching bump map. Refresh for new material

A Pen by Xanmia on CodePen.

License.

@Xanmia
Xanmia / Shader-Fun....markdown
Created September 17, 2014 12:34
A Pen by Xanmia.