Browse Source

Merge branch 'dev' of https://github.com/mrdoob/three.js.git into dev

ivankuzev 13 years ago
parent
commit
bb67cbe13a

+ 31 - 25
docs/api/core/Face3.rst

@@ -1,63 +1,69 @@
-Face3 - Three-sided face
+Face3 - Triangle face
 ------------------------
 
 .. rubric:: Constructor
 
-.. class:: Face3(( a, b, c, normal, color, materialIndex )
+.. class:: Face3( a, b, c, normal, color, materialIndex )
 
-    Three-sided face
+    Triangle face
 
-    :param ? a: //todo
-    :param ? b: //todo
-    :param ? c: //todo
-    :param Vector3 normal: //todo
-    :param Color color: //todo
-    :param ? materialIndex: //todo
+    (indices start from zero)
+
+    :param integer a: vertex A index
+    :param integer b: vertex B index
+    :param integer c: vertex C index
+    :param varying normal: face normal or array of vertex normals
+    :param varying color: face color or array of vertex colors
+    :param integer materialIndex: material index
 
 .. rubric:: Attributes
 
 .. attribute:: Face3.a
 
-    //todo:description
+    Vertex A index
 
 .. attribute:: Face3.b
 
-    //todo:description
+    Vertex B index
 
 .. attribute:: Face3.c
 
-    //todo:description
+    Vertex C index
 
 .. attribute:: Face3.normal
 
-    //todo:description
-
-.. attribute:: Face3.vertexNormals
+    Face normal
 
-    //todo:description
+    ``default (0,0,0)``
 
 .. attribute:: Face3.color
 
-    //todo:description
+    Face color
+
+    ``default white``
+
+.. attribute:: Face3.centroid
+
+    Face centroid
+
+.. attribute:: Face3.vertexNormals
+
+    Array of vertex normals
 
 .. attribute:: Face3.vertexColors
 
-    //todo:description
+    Array of vertex colors
 
 .. attribute:: Face3.vertexTangents
 
-    //todo:description
+    Array of vertex tangents
 
 .. attribute:: Face3.materialIndex
 
-    //todo:description
-
-.. attribute:: Face3.centroid
-
-    //todo:description
+    Material index (points to ``geometry.materials`` array)
 
 .. rubric:: Example
 
 ::
 
-//todo::example
+    var face = new THREE.Face3( 0, 1, 2, new THREE.Vector3( 0, 1, 0 ), new THREE.Color( 0xffaa00 ), 0 );

+ 33 - 27
docs/api/core/Face4.rst

@@ -1,68 +1,74 @@
-Face4 - Four-sided face
------------------------
+Face4 - Quad face
+------------------------
 
 .. rubric:: Constructor
 
 .. class:: Face4( a, b, c, d, normal, color, materialIndex )
 
-    Four-sided face
+    Quad face
 
-    :param ? a: //todo
-    :param ? b: //todo
-    :param ? c: //todo
-    :param ? d: //todo
-    :param Vector3 normal: //todo
-    :param Color color: //todo
-    :param ? materialIndex: //todo
+    (indices start from zero)
+
+    :param integer a: vertex index
+    :param integer b: vertex index
+    :param integer c: vertex index
+    :param integer d: vertex index
+    :param varying normal: face normal or array of vertex normals
+    :param varying color: face color or array of vertex colors
+    :param integer materialIndex: material index
 
 .. rubric:: Attributes
 
 .. attribute:: Face4.a
 
-    //todo:description
+    Vertex A index
 
 .. attribute:: Face4.b
 
-    //todo:description
+    Vertex B index
 
 .. attribute:: Face4.c
 
-    //todo:description
+    Vertex C index
 
 .. attribute:: Face4.d
 
-    //todo:description
+    Vertex D index
 
 .. attribute:: Face4.normal
 
-    //todo:description
-
-.. attribute:: Face4.vertexNormals
+    Face normal
 
-    //todo:description
+    ``default (0,0,0)``
 
 .. attribute:: Face4.color
 
-    //todo:description
+    Face color
+
+    ``default white``
+
+.. attribute:: Face4.centroid
+
+    Face centroid
+
+.. attribute:: Face4.vertexNormals
+
+    Array of vertex normals
 
 .. attribute:: Face4.vertexColors
 
-    //todo:description
+    Array of vertex colors
 
 .. attribute:: Face4.vertexTangents
 
-    //todo:description
+    Array of vertex tangents
 
 .. attribute:: Face4.materialIndex
 
-    //todo:description
-
-.. attribute:: Face4.centroid
-
-    //todo:description
+    Material index (points to ``geometry.materials`` array)
 
 .. rubric:: Example
 
 ::
 
-//todo::example
+    var face = new THREE.Face4( 0, 1, 2, 3, new THREE.Vector3( 0, 1, 0 ), new THREE.Color( 0xffaa00 ), 0 );

+ 1 - 1
docs/conf.py

@@ -122,7 +122,7 @@ html_theme = 'nature'
 # Add any paths that contain custom static files (such as style sheets) here,
 # relative to this directory. They are copied after the builtin static files,
 # so a file named "default.css" will overwrite the builtin "default.css".
-html_static_path = ['_static']
+html_static_path = ['static']
 
 # If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
 # using the given strftime format.

+ 397 - 0
docs/static/nature.css

@@ -0,0 +1,397 @@
+/*
+ * nature.css_t
+ * ~~~~~~~~~~~~
+ *
+ * Sphinx stylesheet -- nature theme.
+ *
+ * :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS.
+ * :license: BSD, see LICENSE for details.
+ *
+ */
+
+@import url("basic.css");
+
+/* -- page layout ----------------------------------------------------------- */
+
+body {
+    font-family: Arial, sans-serif;
+    font-size: 100%;
+    background-color: #111;
+    color: #555;
+    margin: 0;
+    padding: 0;
+}
+
+div.documentwrapper {
+    float: left;
+    width: 100%;
+}
+
+div.bodywrapper {
+    margin: 0 0 0 230px;
+}
+
+hr {
+    border: 1px solid #B1B4B6;
+}
+
+div.document {
+    background-color: #eee;
+}
+
+div.body {
+    background-color: #ffffff;
+    color: #3E4349;
+    padding: 0 30px 30px 30px;
+    font-size: 0.9em;
+}
+
+div.footer {
+    color: #555;
+    width: 100%;
+    padding: 13px 0;
+    text-align: center;
+    font-size: 75%;
+}
+
+div.footer a {
+    color: #444;
+    text-decoration: underline;
+}
+
+div.related {
+    background-color: #6BA81E;
+    line-height: 32px;
+    color: #fff;
+    text-shadow: 0px 1px 0 #444;
+    font-size: 0.9em;
+}
+
+div.related a {
+    color: #E2F3CC;
+}
+
+div.sphinxsidebar {
+    font-size: 0.75em;
+    line-height: 1.5em;
+}
+
+div.sphinxsidebarwrapper{
+    padding: 20px 0;
+}
+
+div.sphinxsidebar h3,
+div.sphinxsidebar h4 {
+    font-family: Arial, sans-serif;
+    color: #222;
+    font-size: 1.2em;
+    font-weight: normal;
+    margin: 0;
+    padding: 5px 10px;
+    background-color: #ddd;
+    text-shadow: 1px 1px 0 white
+}
+
+div.sphinxsidebar h4{
+    font-size: 1.1em;
+}
+
+div.sphinxsidebar h3 a {
+    color: #444;
+}
+
+
+div.sphinxsidebar p {
+    color: #888;
+    padding: 5px 20px;
+}
+
+div.sphinxsidebar p.topless {
+}
+
+div.sphinxsidebar ul {
+    margin: 10px 20px;
+    padding: 0;
+    color: #000;
+}
+
+div.sphinxsidebar a {
+    color: #444;
+}
+
+div.sphinxsidebar input {
+    border: 1px solid #ccc;
+    font-family: sans-serif;
+    font-size: 1em;
+}
+
+div.sphinxsidebar input[type=text]{
+    margin-left: 20px;
+}
+
+/* -- body styles ----------------------------------------------------------- */
+
+a {
+    color: #005B81;
+    text-decoration: none;
+}
+
+a:hover {
+    color: #E32E00;
+    text-decoration: underline;
+}
+
+div.body h1,
+div.body h2,
+div.body h3,
+div.body h4,
+div.body h5,
+div.body h6 {
+    font-family: Arial, sans-serif;
+    background-color: #BED4EB;
+    font-weight: normal;
+    color: #212224;
+    margin: 30px 0px 10px 0px;
+    padding: 5px 0 5px 10px;
+    text-shadow: 0px 1px 0 white
+}
+
+div.body h1 { border-top: 20px solid white; margin-top: 0; font-size: 200%; }
+div.body h2 { font-size: 150%; background-color: #C8D5E3; }
+div.body h3 { font-size: 120%; background-color: #D8DEE3; }
+div.body h4 { font-size: 110%; background-color: #D8DEE3; }
+div.body h5 { font-size: 100%; background-color: #D8DEE3; }
+div.body h6 { font-size: 100%; background-color: #D8DEE3; }
+
+a.headerlink {
+    color: #c60f0f;
+    font-size: 0.8em;
+    padding: 0 4px 0 4px;
+    text-decoration: none;
+}
+
+a.headerlink:hover {
+    background-color: #c60f0f;
+    color: white;
+}
+
+div.body p, div.body dd, div.body li {
+    line-height: 1.5em;
+}
+
+div.admonition p.admonition-title + p {
+    display: inline;
+}
+
+div.highlight{
+    background-color: white;
+}
+
+div.note {
+    background-color: #eee;
+    border: 1px solid #ccc;
+}
+
+div.seealso {
+    background-color: #ffc;
+    border: 1px solid #ff6;
+}
+
+div.topic {
+    background-color: #eee;
+}
+
+div.warning {
+    background-color: #ffe4e4;
+    border: 1px solid #f66;
+}
+
+p.admonition-title {
+    display: inline;
+}
+
+p.admonition-title:after {
+    content: ":";
+}
+
+pre {
+    padding: 10px;
+    background-color: White;
+    color: #222;
+    line-height: 1.2em;
+    border: 1px solid #C6C9CB;
+    font-size: 1.1em;
+    margin: 1.5em 0 1.5em 0;
+    -webkit-box-shadow: 1px 1px 1px #d8d8d8;
+    -moz-box-shadow: 1px 1px 1px #d8d8d8;
+}
+
+tt {
+    background-color: #ecf0f3;
+    color: #222;
+    /* padding: 1px 2px; */
+    font-size: 1.1em;
+    font-family: monospace;
+}
+
+.viewcode-back {
+    font-family: Arial, sans-serif;
+}
+
+div.viewcode-block:target {
+    background-color: #f4debf;
+    border-top: 1px solid #ac9;
+    border-bottom: 1px solid #ac9;
+}
+
+/* -- custom styles override --------------------------------------------------------- */
+
+/* turn off text shadows */
+
+div.body h1,
+div.body h2,
+div.body h3,
+div.body h4,
+div.body h5,
+div.body h6 {
+    text-shadow: 0px 0px 0 white;
+}
+
+div.related {
+	text-shadow: 0px 0px 0 #444;
+}
+
+div.sphinxsidebar h3,
+div.sphinxsidebar h4 {
+	text-shadow: 0px 0px 0 white;
+}
+
+/* set top header color */
+
+div.related {
+	background-color: #444;
+	color: #aaa;
+}
+
+div.related a {
+	color: #fff;
+}
+
+/* turn off italics for "class" and parameters */
+
+em {
+	font-style: normal;
+	color: #2194ce;
+	padding: 0 0.2em;
+}
+
+/* unify fonts for method signatures */
+
+tt.descname, tt.descclassname {
+	font-family: tahoma;
+	font-size: 1.5em;
+	font-weight: bold;
+}
+
+tt.descclassname {
+	color: #777;
+}
+
+tt.descname {
+	color: #000;
+}
+
+big, dt em {
+	font-size: 1.5em;
+}
+
+/* fix parameters parenthesis spacing */
+
+big {
+	padding: 0 0.2em;
+}
+
+/* use smaller padding */
+
+div.body {
+	padding: 2em;
+}
+
+/* restyle top header */
+
+div.body h1 {
+	border-top: 0;
+	font-weight: bold;
+	margin-bottom: 1em;
+	padding: 0;
+	background-color: transparent;
+}
+
+/* restyle sub headers */
+
+div.body h2 {
+	padding: 0;
+	background-color: transparent;
+}
+
+
+/* restyle constructor / attributes / methods headers */
+
+.rubric {
+	color: orange;
+	background-color: #fff;
+	font-size: 1.5em;
+}
+
+p.rubric {
+	padding: 0em 0em;
+	margin: 1em 0 0em;
+	margin-left: 0em;
+}
+
+/* use stronger black for body text */
+
+div.body {
+	color: #111;
+}
+
+/* Restyle fields */
+
+th.field-name {
+	font-weight: normal;
+	color: #666;
+}
+
+dl.function {
+	border-left: 0px solid #aaa;
+	border-top: 0px solid #aaa;
+	padding: 1em 0;
+}
+
+dl.function dt {
+}
+
+table.field-list {
+	padding: 1em;
+	background-color: #eee;
+	border: 5px solid #eee;
+	color: #000;
+	box-shadow: 1px 1px 4px #ccc;
+}
+
+/* fix arguments list styling */
+
+.field-body li {
+	list-style-type: none;
+	margin: 0;
+
+}
+
+.field-body ul {
+	padding: 0;
+}
+
+
+dd {
+	margin: 1em 0 0 0.25em;
+}

+ 2 - 2
examples/misc_lights_test.html

@@ -17,7 +17,7 @@
 			a { color:skyblue }
 			canvas { pointer-events:none; z-index:10; }
 
-			#d { text-align:center; margin:1em 0 -15.7em 0; z-index:0; position:relative; display:block }
+			#d { text-align:center; margin:1em 0 -11.4em 0; z-index:0; position:relative; display:block }
 			.button { background:#000; color:#fff; padding:0.2em 0.5em; cursor:pointer }
 			.inactive { background:#999; color:#eee }
 		</style>
@@ -137,7 +137,7 @@
 
 					try {
 
-						webglRenderer = new THREE.WebGLRenderer();
+						webglRenderer = new THREE.WebGLRenderer( { alpha: true } );
 						webglRenderer.setSize( SCREEN_WIDTH, SCREEN_HEIGHT );
 						webglRenderer.domElement.style.position = "relative";
 						container.appendChild( webglRenderer.domElement );

+ 1 - 1
examples/misc_ubiquity_test.html

@@ -152,7 +152,7 @@
 				svgRenderer.setQuality( 'low' );
 				container.appendChild( svgRenderer.domElement );
 
-				webglRenderer = new THREE.WebGLRenderer( { antialias: true } );
+				webglRenderer = new THREE.WebGLRenderer( { antialias: true, alpha: true } );
 				webglRenderer.setSize( SCREEN_WIDTH, SCREEN_HEIGHT );
 				// webglRenderer.setFaceCulling( 0 );
 				container.appendChild( webglRenderer.domElement );

+ 8 - 6
examples/webgl_geometry_colors.html

@@ -95,9 +95,11 @@
 
 				var color, f, f2, f3, p, n, vertexIndex,
 
-					geometry  = new THREE.IcosahedronGeometry( 200, 1 ),
-					geometry2 = new THREE.IcosahedronGeometry( 200, 1 ),
-					geometry3 = new THREE.IcosahedronGeometry( 200, 1 );
+					radius = 200,
+
+					geometry  = new THREE.IcosahedronGeometry( radius, 1 ),
+					geometry2 = new THREE.IcosahedronGeometry( radius, 1 ),
+					geometry3 = new THREE.IcosahedronGeometry( radius, 1 );
 
 				for ( var i = 0; i < geometry.faces.length; i ++ ) {
 
@@ -114,12 +116,12 @@
 						p = geometry.vertices[ vertexIndex ].position;
 
 						color = new THREE.Color( 0xffffff );
-						color.setHSV( ( p.y + 1 ) / 2, 1.0, 1.0 );
+						color.setHSV( ( p.y / radius + 1 ) / 2, 1.0, 1.0 );
 
 						f.vertexColors[ j ] = color;
 
 						color = new THREE.Color( 0xffffff );
-						color.setHSV( 0.0, ( p.y + 1 ) / 2, 1.0 );
+						color.setHSV( 0.0, ( p.y / radius + 1 ) / 2, 1.0 );
 
 						f2.vertexColors[ j ] = color;
 
@@ -155,7 +157,7 @@
 				group3.rotation.x = 0;
 				scene.add( group3 );
 
-				renderer = new THREE.WebGLRenderer( { antialias: true } );
+				renderer = new THREE.WebGLRenderer( { antialias: true, clearColor: 0xffffff } );
 				renderer.setSize( window.innerWidth, window.innerHeight );
 
 				container.appendChild( renderer.domElement );

+ 1 - 1
examples/webgl_geometry_large_mesh.html

@@ -132,7 +132,7 @@
 				if ( render_gl ) {
 					try {
 
-						webglRenderer = new THREE.WebGLRenderer( { antialias: true } );
+						webglRenderer = new THREE.WebGLRenderer( { antialias: true, alpha: true } );
 						webglRenderer.setSize( SCREEN_WIDTH, SCREEN_HEIGHT );
 						webglRenderer.domElement.style.position = "relative";
 						container.appendChild( webglRenderer.domElement );

+ 1 - 1
examples/webgl_geometry_minecraft.html

@@ -159,7 +159,7 @@
 				directionalLight.position.set( 1, 1, 0.5 ).normalize();
 				scene.add( directionalLight );
 
-				renderer = new THREE.WebGLRenderer();
+				renderer = new THREE.WebGLRenderer( { clearColor: 0xbfd1e5 } );
 				renderer.setSize( window.innerWidth, window.innerHeight );
 
 				container.innerHTML = "";

+ 1 - 1
examples/webgl_geometry_minecraft_ao.html

@@ -449,7 +449,7 @@
 				directionalLight.position.set( 1, 1, 0.5 ).normalize();
 				scene.add( directionalLight );
 
-				renderer = new THREE.WebGLRenderer();
+				renderer = new THREE.WebGLRenderer( { clearColor: 0xffffff } );
 				renderer.setSize( window.innerWidth, window.innerHeight );
 
 				container.innerHTML = "";

+ 1 - 1
examples/webgl_geometry_shapes.html

@@ -369,7 +369,7 @@
 
 				//
 
-				renderer = new THREE.WebGLRenderer( { antialias: true } );
+				renderer = new THREE.WebGLRenderer( { antialias: true, clearColor: 0xf0f0f0 } );
                 renderer.setSize( window.innerWidth, window.innerHeight );
 
 				container.appendChild( renderer.domElement );

+ 1 - 1
examples/webgl_geometry_subdivison.html

@@ -359,7 +359,7 @@
 
 				addStuff();
 
-				renderer = new THREE.WebGLRenderer( { antialias: true } ); // WebGLRenderer CanvasRenderer
+				renderer = new THREE.WebGLRenderer( { antialias: true, clearColor: 0xf0f0f0 } ); // WebGLRenderer CanvasRenderer
 				renderer.setSize( window.innerWidth, window.innerHeight );
 
 				container.appendChild( renderer.domElement );

+ 3 - 3
examples/webgl_hdr.html

@@ -6,19 +6,19 @@
 		<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
 		<style>
 		    body {
-			color: #000;
+			color: #fff;
 			font-family:Monospace;
 			font-size:13px;
 			text-align:center;
 			font-weight: bold;
 
-			background-color: #fff;
+			background-color: #000;
 			margin: 0px;
 			overflow: hidden;
 		    }
 
 		    #info {
-					color:#000;
+			color:#fff;
 			position: absolute;
 			top: 0px; width: 100%;
 			padding: 5px;

+ 1 - 1
examples/webgl_lensflares.html

@@ -167,7 +167,7 @@
 
 				// renderer
 
-				renderer = new THREE.WebGLRenderer( { antialias: true, maxLights: 8 } );
+				renderer = new THREE.WebGLRenderer( { antialias: true, maxLights: 8, alpha: true } );
 				renderer.setSize( window.innerWidth, window.innerHeight );
 				renderer.setClearColor( scene.fog.color, 1 );
 

+ 6 - 4
examples/webgl_multiple_canvases_circle.html

@@ -239,7 +239,8 @@
 
 					var color, f1, p, n, vertexIndex,
 
-					geometry1 = new THREE.IcosahedronGeometry( 200, 1 );
+					radius = 200,
+					geometry1 = new THREE.IcosahedronGeometry( radius, 1 );
 
 					for ( var i = 0; i < geometry1.faces.length; i ++ ) {
 
@@ -254,12 +255,13 @@
 							p = geometry1.vertices[ vertexIndex ].position;
 
 							color = new THREE.Color( 0xffffff );
-							color.setHSV( ( p.y + 1 ) / 2, 1.0, 1.0 );
+							color.setHSV( ( p.y / radius + 1 ) / 2, 1.0, 1.0 );
 
 							f1.vertexColors[ j ] = color;
 
 							color = new THREE.Color( 0xffffff );
-							color.setHSV( 0.0, ( p.y + 1 ) / 2, 1.0 );
+							color.setHSV( 0.0, ( p.y / radius + 1 ) / 2, 1.0 );
+
 						}
 
 					}
@@ -282,7 +284,7 @@
 
 					}
 
-					renderer = new THREE.WebGLRenderer( { antialias: true } );
+					renderer = new THREE.WebGLRenderer( { antialias: true, clearColor: 0xffffff } );
 					renderer.setSize( container.clientWidth, container.clientHeight );
 
 					container.appendChild( renderer.domElement );

+ 8 - 6
examples/webgl_multiple_canvases_complex.html

@@ -155,9 +155,11 @@
 
 					var color, f1, f2, f3, p, n, vertexIndex,
 
-						geometry1 = new THREE.IcosahedronGeometry( 200, 1 ),
-						geometry2 = new THREE.IcosahedronGeometry( 200, 1 ),
-						geometry3 = new THREE.IcosahedronGeometry( 200, 1 );
+						radius = 200,
+
+						geometry1 = new THREE.IcosahedronGeometry( radius, 1 ),
+						geometry2 = new THREE.IcosahedronGeometry( radius, 1 ),
+						geometry3 = new THREE.IcosahedronGeometry( radius, 1 );
 
 					for ( var i = 0; i < geometry1.faces.length; i ++ ) {
 
@@ -174,12 +176,12 @@
 							p = geometry1.vertices[ vertexIndex ].position;
 
 							color = new THREE.Color( 0xffffff );
-							color.setHSV( ( p.y + 1 ) / 2, 1.0, 1.0 );
+							color.setHSV( ( p.y / radius + 1 ) / 2, 1.0, 1.0 );
 
 							f1.vertexColors[ j ] = color;
 
 							color = new THREE.Color( 0xffffff );
-							color.setHSV( 0.0, ( p.y + 1 ) / 2, 1.0 );
+							color.setHSV( 0.0, ( p.y/ radius + 1 ) / 2, 1.0 );
 
 							f2.vertexColors[ j ] = color;
 
@@ -215,7 +217,7 @@
 					group3.rotation.x = 0;
 					scene.add( group3 );
 
-					renderer = new THREE.WebGLRenderer( { antialias: true } );
+					renderer = new THREE.WebGLRenderer( { antialias: true, clearColor: 0xffffff } );
 					renderer.setSize( container.clientWidth, container.clientHeight );
 
 					container.appendChild( renderer.domElement );

+ 8 - 6
examples/webgl_multiple_canvases_grid.html

@@ -171,9 +171,11 @@
 
 					var color, f1, f2, f3, p, n, vertexIndex,
 
-						geometry1 = new THREE.IcosahedronGeometry( 200, 1 ),
-						geometry2 = new THREE.IcosahedronGeometry( 200, 1 ),
-						geometry3 = new THREE.IcosahedronGeometry( 200, 1 );
+						radius = 200,
+
+						geometry1 = new THREE.IcosahedronGeometry( radius, 1 ),
+						geometry2 = new THREE.IcosahedronGeometry( radius, 1 ),
+						geometry3 = new THREE.IcosahedronGeometry( radius, 1 );
 
 					for ( var i = 0; i < geometry1.faces.length; i ++ ) {
 
@@ -190,12 +192,12 @@
 							p = geometry1.vertices[ vertexIndex ].position;
 
 							color = new THREE.Color( 0xffffff );
-							color.setHSV( ( p.y + 1 ) / 2, 1.0, 1.0 );
+							color.setHSV( ( p.y / radius + 1 ) / 2, 1.0, 1.0 );
 
 							f1.vertexColors[ j ] = color;
 
 							color = new THREE.Color( 0xffffff );
-							color.setHSV( 0.0, ( p.y + 1 ) / 2, 1.0 );
+							color.setHSV( 0.0, ( p.y / radius + 1 ) / 2, 1.0 );
 
 							f2.vertexColors[ j ] = color;
 
@@ -231,7 +233,7 @@
 					group3.rotation.x = 0;
 					scene.add( group3 );
 
-					renderer = new THREE.WebGLRenderer( { antialias: true } );
+					renderer = new THREE.WebGLRenderer( { antialias: true, clearColor: 0xffffff } );
 					renderer.setSize( container.clientWidth, container.clientHeight );
 
 					container.appendChild( renderer.domElement );

+ 1 - 1
examples/webgl_performance.html

@@ -77,7 +77,7 @@
 
 				} );
 
-				renderer = new THREE.WebGLRenderer();
+				renderer = new THREE.WebGLRenderer( { clearColor: 0xffffff } );
 				renderer.setSize( window.innerWidth, window.innerHeight );
 				renderer.sortObjects = false;
 				container.appendChild( renderer.domElement );