|
@@ -180,6 +180,8 @@
|
|
|
|
|
|
var scene = new THREE.Scene();
|
|
|
|
|
|
+ scene.add( new THREE.AmbientLight( 0x222222 ) );
|
|
|
+
|
|
|
var light = new THREE.DirectionalLight(0xffffff, 1);
|
|
|
light.position.set(100,100,100);
|
|
|
scene.add(light);
|
|
@@ -193,9 +195,6 @@
|
|
|
};
|
|
|
|
|
|
var meshes = [];
|
|
|
- var coloroffset = 0;
|
|
|
- var colorskip = ['black', 'antiquewhite', 'bisque', 'beige', 'blanchedalmond', 'darkblue', 'darkcyan'];
|
|
|
- var colorkeys = Object.keys( THREE.ColorKeywords );
|
|
|
|
|
|
var geometry = new THREE.SphereBufferGeometry(0.5, 24, 12);
|
|
|
|
|
@@ -214,11 +213,7 @@
|
|
|
// center text
|
|
|
labelgeo.translate( - labelgeo.boundingSphere.radius, 0, 0 );
|
|
|
|
|
|
- // Pick a color at "random". Exclude black, because it looks bad.
|
|
|
- while ( colorskip.indexOf( colorkeys[ i + coloroffset ] ) != -1 ) {
|
|
|
- coloroffset++;
|
|
|
- }
|
|
|
- materialargs.color = THREE.ColorKeywords[ colorkeys[ i + coloroffset ] ];
|
|
|
+ materialargs.color = new THREE.Color().setHSL( Math.random(), 0.5, 0.5 );
|
|
|
|
|
|
var material = new THREE.MeshPhongMaterial( materialargs );
|
|
|
|