var renderer = new THREE.WebGLRenderer({
antialias : true
});
renderer.setClearColor( 0x070912 );
renderer.setSize( window.innerWidth, window.innerHeight );
document.body.appendChild( renderer.domElement );
var container, stats;
var camera, scene, renderer, particles, geometry, geometry2, material, i, h, color, sprite, size;
var mouseX = 0, mouseY = 0;
var p = [];
var vl = 10;
var vt;
var vertices = [];
var vertices2 = [];
var vertices_tmp = [];
var animVertices = [];
var geom = [];
var delta = 0.001;
var windowHalfX = window.innerWidth / 2;
var windowHalfY = window.innerHeight / 2;
var onRenderFcts= [];
var scene = new THREE.Scene();
//scene.fog = new THREE.FogExp2( 0x000000, 0.01 );
var camera = new THREE.PerspectiveCamera(45, window.innerWidth / window.innerHeight, 2, 1000);
camera.position.z = 140;
//camera.position.x = 40;
camera.position.y = 30;
window.addEventListener( 'resize', function() {
var w = window.innerWidth,
h = window.innerHeight;
camera.aspect = w / h;
camera.updateProjectionMatrix();
renderer.setSize( w, h );
}, false );
THREE.DefaultLoadingManager.onProgress = function ( item, loaded, total ) {
console.log( item, loaded, total );
};
//////////////////////////////////////////////////////////////////////////////////
// set 3 point lighting //
//////////////////////////////////////////////////////////////////////////////////
;(function(){
// add a ambient light
var light = new THREE.AmbientLight( 0xffffff )
scene.add( light )
// add a light in front
var light = new THREE.DirectionalLight('white', 1)
light.position.set(-50, 50, 50)
scene.add( light )
// add a light behind
var light = new THREE.DirectionalLight('white', 0.75)
light.position.set(-0.5, -0.5, -2)
scene.add( light )
})()
//////////////////////////////////////////////////////////////////////////////////
// Comment //
//////////////////////////////////////////////////////////////////////////////////
var urls = []
//var urls =...
Please Whitelist JSFiddle in your content blocker.
Help keep JSFiddle free for always by one of two ways:
Whitelist JSFiddle in your content blocker (two clicks)
Go PRO and get access to additional PRO features →
Join the 4+ million users, and keep the JSFiddle dream alive.
Ad-free
All ads in the editor and listing pages are turned completely off.
Use pre-released features
You get to try and use features (like the Palette Color Generator) months before everyone else.
Fiddle collections
Sort and categorize your Fiddles into multiple collections.
Private collections and fiddles
You can make as many Private Fiddles, and Private Collections as you wish!
Console
Debug your Fiddle with a minimal built-in JavaScript console.