Browse Source

Removed AsteriskGeometry.

Mr.doob 12 years ago
parent
commit
40b53adb48

+ 0 - 37
docs/api/extras/geometries/AsteriskGeometry.html

@@ -1,37 +0,0 @@
-<!DOCTYPE html>
-<html lang="en">
-	<head>
-		<meta charset="utf-8">
-		<script src="../../../list.js"></script>
-		<script src="../../../page.js"></script>
-		<link type="text/css" rel="stylesheet" href="../../../page.css" />
-	</head>
-	<body>
-		<h1>[name]</h1>
-
-		<div class="desc">todo</div>
-
-
-		<h2>Constructor</h2>
-
-		<h3>[name]( radius, detail )</h3>
-
-
-		<h2>Properties</h2>
-
-		<h3>.[page:Vector3 todo]</h3>
-
-
-		<h2>Methods</h2>
-
-		<h3>.todo( [page:Vector3 todo] )</h3>
-		<div>
-		todo — todo<br />
-		</div>
-
-
-		<h2>Source</h2>
-
-		[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
-	</body>
-</html>

+ 0 - 1
docs/list.js

@@ -155,7 +155,6 @@ var list = {
 		],
 
 		"Extras / Geometries": [
-			[ "AsteriskGeometry", "api/extras/geometries/AsteriskGeometry" ],
 			[ "CircleGeometry", "api/extras/geometries/CircleGeometry" ],
 			[ "ConvexGeometry", "api/extras/geometries/ConvexGeometry" ],
 			[ "CubeGeometry", "api/extras/geometries/CubeGeometry" ],

+ 0 - 40
src/extras/geometries/AsteriskGeometry.js

@@ -1,40 +0,0 @@
-/**
- * @author alteredq / http://alteredqualia.com/
- *
- *	- 3d asterisk shape (for line pieces THREE.Line)
- */
-
-THREE.AsteriskGeometry = function ( innerRadius, outerRadius ) {
-
-	THREE.Geometry.call( this );
-
-	var sd = innerRadius;
-	var ed = outerRadius;
-
-	var sd2 = 0.707 * sd;
-	var ed2 = 0.707 * ed;
-
-	var rays = [ [ sd, 0, 0 ], [ ed, 0, 0 ], [ -sd, 0, 0 ], [ -ed, 0, 0 ],
-				 [ 0, sd, 0 ], [ 0, ed, 0 ], [ 0, -sd, 0 ], [ 0, -ed, 0 ],
-				 [ 0, 0, sd ], [ 0, 0, ed ], [ 0, 0, -sd ], [ 0, 0, -ed ],
-				 [ sd2, sd2, 0 ], [ ed2, ed2, 0 ], [ -sd2, -sd2, 0 ], [ -ed2, -ed2, 0 ],
-				 [ sd2, -sd2, 0 ], [ ed2, -ed2, 0 ], [ -sd2, sd2, 0 ], [ -ed2, ed2, 0 ],
-				 [ sd2, 0, sd2 ], [ ed2, 0, ed2 ], [ -sd2, 0, -sd2 ], [ -ed2, 0, -ed2 ],
-				 [ sd2, 0, -sd2 ], [ ed2, 0, -ed2 ], [ -sd2, 0, sd2 ], [ -ed2, 0, ed2 ],
-				 [ 0, sd2, sd2 ], [ 0, ed2, ed2 ], [ 0, -sd2, -sd2 ], [ 0, -ed2, -ed2 ],
-				 [ 0, sd2, -sd2 ], [ 0, ed2, -ed2 ], [ 0, -sd2, sd2 ], [ 0, -ed2, ed2 ]
-	];
-
-	for ( var i = 0, il = rays.length; i < il; i ++ ) {
-
-		var x = rays[ i ][ 0 ];
-		var y = rays[ i ][ 1 ];
-		var z = rays[ i ][ 2 ];
-
-		this.vertices.push( new THREE.Vector3( x, y, z ) );
-
-	}
-
-};
-
-THREE.AsteriskGeometry.prototype = Object.create( THREE.Geometry.prototype );

+ 1 - 8
src/extras/helpers/DirectionalLightHelper.js

@@ -31,17 +31,11 @@ THREE.DirectionalLightHelper = function ( light, sphereSize ) {
 	// light helper
 
 	var bulbGeometry = new THREE.SphereGeometry( sphereSize, 16, 8 );
-	var raysGeometry = new THREE.AsteriskGeometry( sphereSize * 1.25, sphereSize * 2.25 );
-
 	var bulbMaterial = new THREE.MeshBasicMaterial( { color: hexColor, fog: false } );
-	var raysMaterial = new THREE.LineBasicMaterial( { color: hexColor, fog: false } );
 
 	this.lightSphere = new THREE.Mesh( bulbGeometry, bulbMaterial );
 
-	this.lightRays = new THREE.Line( raysGeometry, raysMaterial, THREE.LinePieces );
-
 	this.add( this.lightSphere );
-	this.add( this.lightRays );
 
 	this.lightSphere.userData.isGizmo = true;
 	this.lightSphere.userData.gizmoSubject = light;
@@ -89,7 +83,7 @@ THREE.DirectionalLightHelper.prototype.update = function () {
 
 	this.direction.subVectors( this.light.target.position, this.light.position );
 
-	// update arrow, spheres, rays and line colors to light color * light intensity
+	// update arrow, spheres and line colors to light color * light intensity
 
 	var intensity = THREE.Math.clamp( this.light.intensity, 0, 1 );
 
@@ -97,7 +91,6 @@ THREE.DirectionalLightHelper.prototype.update = function () {
 	this.color.multiplyScalar( intensity );
 
 	this.lightSphere.material.color.copy( this.color );
-	this.lightRays.material.color.copy( this.color );
 
 	// Only update targetSphere and targetLine if available
 	if ( this.targetSphere !== null ) {

+ 1 - 7
src/extras/helpers/SpotLightHelper.js

@@ -31,7 +31,6 @@ THREE.SpotLightHelper = function ( light, sphereSize ) {
 	// light helper
 
 	var bulbGeometry = new THREE.SphereGeometry( sphereSize, 16, 8 );
-	var raysGeometry = new THREE.AsteriskGeometry( sphereSize * 1.25, sphereSize * 2.25 );
 	var coneGeometry = new THREE.CylinderGeometry( 0.0001, 1, 1, 8, 1, true );
 
 	var coneMatrix = new THREE.Matrix4();
@@ -40,7 +39,6 @@ THREE.SpotLightHelper = function ( light, sphereSize ) {
 	coneGeometry.applyMatrix( coneMatrix );
 
 	var bulbMaterial = new THREE.MeshBasicMaterial( { color: hexColor, fog: false } );
-	var raysMaterial = new THREE.LineBasicMaterial( { color: hexColor, fog: false } );
 	var coneMaterial = new THREE.MeshBasicMaterial( { color: hexColor, fog: false, wireframe: true, opacity: 0.3, transparent: true } );
 
 	this.lightSphere = new THREE.Mesh( bulbGeometry, bulbMaterial );
@@ -50,12 +48,9 @@ THREE.SpotLightHelper = function ( light, sphereSize ) {
 	var coneWidth = coneLength * Math.tan( light.angle * 0.5 ) * 2;
 	this.lightCone.scale.set( coneWidth, coneWidth, coneLength );
 
-	this.lightRays = new THREE.Line( raysGeometry, raysMaterial, THREE.LinePieces );
-
 	this.gyroscope = new THREE.Gyroscope();
 
 	this.gyroscope.add( this.lightSphere );
-	this.gyroscope.add( this.lightRays );
 
 	this.add( this.gyroscope );
 	this.add( this.lightCone );
@@ -116,7 +111,7 @@ THREE.SpotLightHelper.prototype.update = function () {
 	var coneWidth = coneLength * Math.tan( this.light.angle * 0.5 ) * 2;
 	this.lightCone.scale.set( coneWidth, coneWidth, coneLength );
 
-	// update arrow, spheres, rays and line colors to light color * light intensity
+	// update arrow, spheres and line colors to light color * light intensity
 
 	var intensity = THREE.Math.clamp( this.light.intensity, 0, 1 );
 
@@ -124,7 +119,6 @@ THREE.SpotLightHelper.prototype.update = function () {
 	this.color.multiplyScalar( intensity );
 
 	this.lightSphere.material.color.copy( this.color );
-	this.lightRays.material.color.copy( this.color );
 	this.lightCone.material.color.copy( this.color );
 
 	// Only update targetSphere and targetLine if available

+ 0 - 1
utils/build/includes/extras.json

@@ -13,7 +13,6 @@
 	"src/extras/animation/KeyFrameAnimation.js",
 	"src/extras/cameras/CubeCamera.js",
 	"src/extras/cameras/CombinedCamera.js",
-	"src/extras/geometries/AsteriskGeometry.js",
 	"src/extras/geometries/CircleGeometry.js",
 	"src/extras/geometries/CubeGeometry.js",
 	"src/extras/geometries/CylinderGeometry.js",