|
@@ -2674,7 +2674,7 @@
|
|
|
default: throw new Error( 'index is out of range: ' + index );
|
|
|
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
return this;
|
|
|
|
|
|
},
|
|
@@ -3280,6 +3280,16 @@
|
|
|
|
|
|
},
|
|
|
|
|
|
+ setFromCylindrical: function( c ) {
|
|
|
+
|
|
|
+ this.x = c.radius * Math.sin( c.theta );
|
|
|
+ this.y = c.y;
|
|
|
+ this.z = c.radius * Math.cos( c.theta );
|
|
|
+
|
|
|
+ return this;
|
|
|
+
|
|
|
+ },
|
|
|
+
|
|
|
setFromMatrixPosition: function ( m ) {
|
|
|
|
|
|
return this.setFromMatrixColumn( m, 3 );
|
|
@@ -10535,8 +10545,8 @@
|
|
|
|
|
|
this.userData = {};
|
|
|
|
|
|
- this.onBeforeRender = function(){};
|
|
|
- this.onAfterRender = function(){};
|
|
|
+ this.onBeforeRender = function () {};
|
|
|
+ this.onAfterRender = function () {};
|
|
|
|
|
|
}
|
|
|
|
|
@@ -10750,7 +10760,7 @@
|
|
|
|
|
|
}
|
|
|
|
|
|
- if ( (object && object.isObject3D) ) {
|
|
|
+ if ( ( object && object.isObject3D ) ) {
|
|
|
|
|
|
if ( object.parent !== null ) {
|
|
|
|
|
@@ -11144,6 +11154,7 @@
|
|
|
this.matrixAutoUpdate = source.matrixAutoUpdate;
|
|
|
this.matrixWorldNeedsUpdate = source.matrixWorldNeedsUpdate;
|
|
|
|
|
|
+ this.layers.mask = source.layers.mask;
|
|
|
this.visible = source.visible;
|
|
|
|
|
|
this.castShadow = source.castShadow;
|
|
@@ -25974,7 +25985,7 @@
|
|
|
* bevelSize: <float>, // how far from shape outline is bevel
|
|
|
* bevelSegments: <int>, // number of bevel layers
|
|
|
*
|
|
|
- * extrudePath: <THREE.CurvePath> // 3d spline path to extrude shape along. (creates Frames if .frames aren't defined)
|
|
|
+ * extrudePath: <THREE.Curve> // curve to extrude shape along
|
|
|
* frames: <Object> // containing arrays of tangents, normals, binormals
|
|
|
*
|
|
|
* uvGenerator: <Object> // object that provides UV generator functions
|
|
@@ -39426,6 +39437,65 @@
|
|
|
|
|
|
};
|
|
|
|
|
|
+ /**
|
|
|
+ * @author Mugen87 / https://github.com/Mugen87
|
|
|
+ *
|
|
|
+ * Ref: https://en.wikipedia.org/wiki/Cylindrical_coordinate_system
|
|
|
+ *
|
|
|
+ */
|
|
|
+
|
|
|
+ function Cylindrical( radius, theta, y ) {
|
|
|
+
|
|
|
+ this.radius = ( radius !== undefined ) ? radius : 1.0; // distance from the origin to a point in the x-z plane
|
|
|
+ this.theta = ( theta !== undefined ) ? theta : 0; // counterclockwise angle in the x-z plane measured in radians from the positive z-axis
|
|
|
+ this.y = ( y !== undefined ) ? y : 0; // height above the x-z plane
|
|
|
+
|
|
|
+ return this;
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ Cylindrical.prototype = {
|
|
|
+
|
|
|
+ constructor: Cylindrical,
|
|
|
+
|
|
|
+ set: function ( radius, theta, y ) {
|
|
|
+
|
|
|
+ this.radius = radius;
|
|
|
+ this.theta = theta;
|
|
|
+ this.y = y;
|
|
|
+
|
|
|
+ return this;
|
|
|
+
|
|
|
+ },
|
|
|
+
|
|
|
+ clone: function () {
|
|
|
+
|
|
|
+ return new this.constructor().copy( this );
|
|
|
+
|
|
|
+ },
|
|
|
+
|
|
|
+ copy: function ( other ) {
|
|
|
+
|
|
|
+ this.radius = other.radius;
|
|
|
+ this.theta = other.theta;
|
|
|
+ this.y = other.y;
|
|
|
+
|
|
|
+ return this;
|
|
|
+
|
|
|
+ },
|
|
|
+
|
|
|
+ setFromVector3: function( vec3 ) {
|
|
|
+
|
|
|
+ this.radius = Math.sqrt( vec3.x * vec3.x + vec3.z * vec3.z );
|
|
|
+ this.theta = Math.atan2( vec3.x, vec3.z );
|
|
|
+ this.y = vec3.y;
|
|
|
+
|
|
|
+ return this;
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ };
|
|
|
+
|
|
|
/**
|
|
|
* @author alteredq / http://alteredqualia.com/
|
|
|
*/
|
|
@@ -42906,6 +42976,7 @@
|
|
|
exports.Spline = Spline;
|
|
|
exports.Math = _Math;
|
|
|
exports.Spherical = Spherical;
|
|
|
+ exports.Cylindrical = Cylindrical;
|
|
|
exports.Plane = Plane;
|
|
|
exports.Frustum = Frustum;
|
|
|
exports.Sphere = Sphere;
|