From c7a488cdb794c5e2d59446aab2afdebd9d934a7c Mon Sep 17 00:00:00 2001
From: "Mr.doob" BoxGeometry is a geometry class for a [link:https://en.wikipedia.org/wiki/Cuboid rectangular cuboid] with a given 'width', 'height', and 'depth'. On creation, the cuboid is centred on the origin, with each edge parallel to one of the axes.
- width — Width; that is, the length of the edges parallel to the X axis. Optional; defaults to 1. See the base [page:Geometry] class for common properties.
- An object with a property for each of the constructor parameters. Any modification after instantiation does not change the geometry.
-
- Using the above example:
- See the base [page:Geometry] class for common methods.
- [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
- CircleGeometry is a simple shape of Euclidean geometry. It is contructed from a number of triangular segments that are oriented around a central point and extend as far out as a given radius. It is built counter-clockwise from a start angle and a given central angle. It can also be used to create regular polygons, where the number of segments determines the number of sides.
-
- radius — Radius of the circle, default = 1. See the base [page:Geometry] class for common properties.
- An object with a property for each of the constructor parameters. Any modification after instantiation does not change the geometry.
- See the base [page:Geometry] class for common methods.
- [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
- A class for generating cone geometries
- radius — Radius of the cone at the base. Default is 1. See the base [page:CylinderGeometry] class for common properties.
- An object with a property for each of the constructor parameters. Any modification after instantiation does not change the geometry.
- See the base [page:CylinderGeometry] class for common methods.
- [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
- A class for generating cylinder geometries
- radiusTop — Radius of the cylinder at the top. Default is 1. See the base [page:Geometry] class for common properties.
- An object with a property for each of the constructor parameters. Any modification after instantiation does not change the geometry.
- See the base [page:Geometry] class for common methods.
- [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
- A class for generating a dodecahedron geometries.
- radius — Radius of the dodecahedron. Default is 1. See the base [page:Geometry] class for common properties.
- An object with a property for each of the constructor parameters. Any modification after instantiation does not change the geometry.
- See the base [page:Geometry] class for common methods.
- [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
- Creates extruded geometry from a path shape.
- shapes — Shape or an array of shapes. [name]
-
- Code Example
-
- const geometry = new THREE.BoxGeometry( 1, 1, 1 );
- const material = new THREE.MeshBasicMaterial( {color: 0x00ff00} );
- const cube = new THREE.Mesh( geometry, material );
- scene.add( cube );
-
-
- Constructor
-
- [name]([param:Float width], [param:Float height], [param:Float depth], [param:Integer widthSegments], [param:Integer heightSegments], [param:Integer depthSegments])
-
- height — Height; that is, the length of the edges parallel to the Y axis. Optional; defaults to 1.
- depth — Depth; that is, the length of the edges parallel to the Z axis. Optional; defaults to 1.
- widthSegments — Number of segmented rectangular faces along the width of the sides. Optional; defaults to 1.
- heightSegments — Number of segmented rectangular faces along the height of the sides. Optional; defaults to 1.
- depthSegments — Number of segmented rectangular faces along the depth of the sides. Optional; defaults to 1.
- Properties
- [property:Object parameters]
-
- geometry.parameters; // {width: 1, height: 1, depth: 1, widthSegments: undefined, heightSegments: undefined, depthSegments: undefined}
- cube.geometry.parameters; // as above
- cube.geometry.parameters.width; // === 1
- cube.geometry.parameters.widthSegments; // === undefined.
-
- Methods
- Source
-
- [name]
-
- Code Example
-
-
- const geometry = new THREE.CircleGeometry( 5, 32 );
- const material = new THREE.MeshBasicMaterial( { color: 0xffff00 } );
- const circle = new THREE.Mesh( geometry, material );
- scene.add( circle );
-
-
- Constructor
-
- [name]([param:Float radius], [param:Integer segments], [param:Float thetaStart], [param:Float thetaLength])
-
- segments — Number of segments (triangles), minimum = 3, default = 8.
- thetaStart — Start angle for first segment, default = 0 (three o'clock position).
- thetaLength — The central angle, often called theta, of the circular sector. The default is 2*Pi, which makes for a complete circle.
- Properties
- [property:Object parameters]
- Methods
- Source
-
- [name]
-
- Code Example
-
- const geometry = new THREE.ConeGeometry( 5, 20, 32 );
- const material = new THREE.MeshBasicMaterial( {color: 0xffff00} );
- const cone = new THREE.Mesh( geometry, material );
- scene.add( cone );
-
-
- Constructor
-
- [name]([param:Float radius], [param:Float height], [param:Integer radialSegments], [param:Integer heightSegments], [param:Boolean openEnded], [param:Float thetaStart], [param:Float thetaLength])
-
- height — Height of the cone. Default is 1.
- radialSegments — Number of segmented faces around the circumference of the cone. Default is 8
- heightSegments — Number of rows of faces along the height of the cone. Default is 1.
- openEnded — A Boolean indicating whether the base of the cone is open or capped. Default is false, meaning capped.
- thetaStart — Start angle for first segment, default = 0 (three o'clock position).
- thetaLength — The central angle, often called theta, of the circular sector. The default is 2*Pi, which makes for a complete cone.
- Properties
- [property:Object parameters]
- Methods
- Source
-
- [name]
-
- Code Example
-
- const geometry = new THREE.CylinderGeometry( 5, 5, 20, 32 );
- const material = new THREE.MeshBasicMaterial( {color: 0xffff00} );
- const cylinder = new THREE.Mesh( geometry, material );
- scene.add( cylinder );
-
-
- Constructor
-
- [name]([param:Float radiusTop], [param:Float radiusBottom], [param:Float height], [param:Integer radialSegments], [param:Integer heightSegments], [param:Boolean openEnded], [param:Float thetaStart], [param:Float thetaLength])
-
- radiusBottom — Radius of the cylinder at the bottom. Default is 1.
- height — Height of the cylinder. Default is 1.
- radialSegments — Number of segmented faces around the circumference of the cylinder. Default is 8
- heightSegments — Number of rows of faces along the height of the cylinder. Default is 1.
- openEnded — A Boolean indicating whether the ends of the cylinder are open or capped. Default is false, meaning capped.
- thetaStart — Start angle for first segment, default = 0 (three o'clock position).
- thetaLength — The central angle, often called theta, of the circular sector. The default is 2*Pi, which makes for a complete cylinder.
- Properties
- [property:Object parameters]
- Methods
- Source
-
- [name]
-
- Constructor
-
- [name]([param:Float radius], [param:Integer detail])
-
- detail — Default is 0. Setting this to a value greater than 0 adds vertices making it no longer a dodecahedron.
- Properties
- [property:Object parameters]
- Methods
- Source
-
- [name]
-
- Code Example
-
-
-
- const length = 12, width = 8;
-
- const shape = new THREE.Shape();
- shape.moveTo( 0,0 );
- shape.lineTo( 0, width );
- shape.lineTo( length, width );
- shape.lineTo( length, 0 );
- shape.lineTo( 0, 0 );
-
- const extrudeSettings = {
- steps: 2,
- depth: 16,
- bevelEnabled: true,
- bevelThickness: 1,
- bevelSize: 1,
- bevelOffset: 0,
- bevelSegments: 1
- };
-
- const geometry = new THREE.ExtrudeGeometry( shape, extrudeSettings );
- const material = new THREE.MeshBasicMaterial( { color: 0x00ff00 } );
- const mesh = new THREE.Mesh( geometry, material ) ;
- scene.add( mesh );
-
-
-
- Constructor
-
-
- [name]([param:Array shapes], [param:Object options])
-
- options — Object that can contain the following parameters.
-
-
-
-
-
- This object extrudes a 2D shape to a 3D geometry. -
- -- When creating a Mesh with this geometry, if you'd like to have a separate material used for its face - and its extruded sides, you can use an array of materials. The first material will be - applied to the face; the second material will be applied to the sides. -
- -See the base [page:Geometry] class for common properties.
- -- An object with a property for each of the constructor parameters. Any modification after instantiation does not change the geometry. -
- -See the base [page:Geometry] class for common methods.
- -- [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js] -
- - diff --git a/docs/api/en/geometries/IcosahedronGeometry.html b/docs/api/en/geometries/IcosahedronGeometry.html deleted file mode 100644 index e6604574a20547..00000000000000 --- a/docs/api/en/geometries/IcosahedronGeometry.html +++ /dev/null @@ -1,59 +0,0 @@ - - - - -A class for generating an icosahedron geometry.
- - - - - -
- radius — Default is 1.
- detail — Default is 0. Setting this to a value greater than 0 adds more vertices making it no longer an icosahedron. When detail is greater than 1, it's effectively a sphere.
-
See the base [page:Geometry] class for common properties.
- -- An object with a property for each of the constructor parameters. Any modification after instantiation does not change the geometry. -
- -See the base [page:Geometry] class for common methods.
- -- [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js] -
- - diff --git a/docs/api/en/geometries/LatheGeometry.html b/docs/api/en/geometries/LatheGeometry.html deleted file mode 100644 index 22700cf9fdda17..00000000000000 --- a/docs/api/en/geometries/LatheGeometry.html +++ /dev/null @@ -1,77 +0,0 @@ - - - - -Creates meshes with axial symmetry like vases. The lathe rotates around the Y axis.
- - - - - -
- const points = [];
- for ( let i = 0; i < 10; i ++ ) {
- points.push( new THREE.Vector2( Math.sin( i * 0.2 ) * 10 + 5, ( i - 5 ) * 2 ) );
- }
- const geometry = new THREE.LatheGeometry( points );
- const material = new THREE.MeshBasicMaterial( { color: 0xffff00 } );
- const lathe = new THREE.Mesh( geometry, material );
- scene.add( lathe );
-
-
-
- points — Array of Vector2s. The x-coordinate of each point must be greater than zero.
- segments — the number of circumference segments to generate. Default is 12.
- phiStart — the starting angle in radians. Default is 0.
- phiLength — the radian (0 to 2PI) range of the lathed section 2PI is a closed lathe, less than 2PI is a portion. Default is 2PI.
-
- This creates a LatheGeometry based on the parameters. -
- -See the base [page:Geometry] class for common properties.
- -- An object with a property for each of the constructor parameters. Any modification after instantiation does not change the geometry. -
- -See the base [page:Geometry] class for common methods.
- -- [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js] -
- - diff --git a/docs/api/en/geometries/OctahedronGeometry.html b/docs/api/en/geometries/OctahedronGeometry.html deleted file mode 100644 index 6d4088c75a4290..00000000000000 --- a/docs/api/en/geometries/OctahedronGeometry.html +++ /dev/null @@ -1,59 +0,0 @@ - - - - -A class for generating an octahedron geometry.
- - - - - -
- radius — Radius of the octahedron. Default is 1.
- detail — Default is 0. Setting this to a value greater than zero add vertices making it no longer an octahedron.
-
See the base [page:Geometry] class for common properties.
- -- An object with a property for each of the constructor parameters. Any modification after instantiation does not change the geometry. -
- -See the base [page:Geometry] class for common methods.
- -- [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js] -
- - diff --git a/docs/api/en/geometries/ParametricGeometry.html b/docs/api/en/geometries/ParametricGeometry.html deleted file mode 100644 index 5a125e91e2da23..00000000000000 --- a/docs/api/en/geometries/ParametricGeometry.html +++ /dev/null @@ -1,72 +0,0 @@ - - - - -Generate geometry representing a parametric surface.
- - - - - -
- const geometry = new THREE.ParametricGeometry( THREE.ParametricGeometries.klein, 25, 25 );
- const material = new THREE.MeshBasicMaterial( { color: 0x00ff00 } );
- const klein = new THREE.Mesh( geometry, material );
- scene.add( klein );
-
-
-
-
- func — A function that takes in a [page:Float u] and [page:Float v] value each between 0 and 1 and modifies a third [page:Vector3] argument
- slices — The count of slices to use for the parametric function
- stacks — The count of stacks to use for the parametric function
-
See the base [page:Geometry] class for common properties.
- -- An object with a property for each of the constructor parameters. Any modification after instantiation does not change the geometry. -
- -See the base [page:Geometry] class for common methods.
- -- [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js] -
- - diff --git a/docs/api/en/geometries/PlaneGeometry.html b/docs/api/en/geometries/PlaneGeometry.html deleted file mode 100644 index 38399b5e3e9094..00000000000000 --- a/docs/api/en/geometries/PlaneGeometry.html +++ /dev/null @@ -1,69 +0,0 @@ - - - - -A class for generating plane geometries
- - - - - -const geometry = new THREE.PlaneGeometry( 5, 20, 32 );
- const material = new THREE.MeshBasicMaterial( {color: 0xffff00, side: THREE.DoubleSide} );
- const plane = new THREE.Mesh( geometry, material );
- scene.add( plane );
-
-
-
- width — Width along the X axis. Default is 1.
- height — Height along the Y axis. Default is 1.
- widthSegments — Optional. Default is 1.
- heightSegments — Optional. Default is 1.
-
See the base [page:Geometry] class for common properties.
- -- An object with a property for each of the constructor parameters. Any modification after instantiation does not change the geometry. -
- -See the base [page:Geometry] class for common methods.
- -- [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js] -
- - diff --git a/docs/api/en/geometries/PolyhedronGeometry.html b/docs/api/en/geometries/PolyhedronGeometry.html deleted file mode 100644 index 2719469d35e171..00000000000000 --- a/docs/api/en/geometries/PolyhedronGeometry.html +++ /dev/null @@ -1,66 +0,0 @@ - - - - -- A polyhedron is a solid in three dimensions with flat faces. This class will take an array of vertices, - project them onto a sphere, and then divide them up to the desired level of detail. -
- -
-const verticesOfCube = [
- -1,-1,-1, 1,-1,-1, 1, 1,-1, -1, 1,-1,
- -1,-1, 1, 1,-1, 1, 1, 1, 1, -1, 1, 1,
-];
-
-const indicesOfFaces = [
- 2,1,0, 0,3,2,
- 0,4,7, 7,3,0,
- 0,1,5, 5,4,0,
- 1,2,6, 6,5,1,
- 2,3,7, 7,6,2,
- 4,5,6, 6,7,4
-];
-
-const geometry = new THREE.PolyhedronGeometry( verticesOfCube, indicesOfFaces, 6, 2 );
-
-
-
- vertices — [page:Array] of points of the form [1,1,1, -1,-1,-1, ... ]
- indices — [page:Array] of indices that make up the faces of the form [0,1,2, 2,3,0, ... ]
- radius — [page:Float] - The radius of the final shape
- detail — [page:Integer] - How many levels to subdivide the geometry. The more detail, the smoother the shape.
-
See the base [page:Geometry] class for common properties.
- -- An object with a property for each of the constructor parameters. Any modification after instantiation does not change the geometry. -
- -See the base [page:Geometry] class for common methods.
- -- [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js] -
- - diff --git a/docs/api/en/geometries/RingGeometry.html b/docs/api/en/geometries/RingGeometry.html deleted file mode 100644 index 88f903b67158aa..00000000000000 --- a/docs/api/en/geometries/RingGeometry.html +++ /dev/null @@ -1,71 +0,0 @@ - - - - -A class for generating a two-dimensional ring geometry.
- - - - - -const geometry = new THREE.RingGeometry( 1, 5, 32 );
- const material = new THREE.MeshBasicMaterial( { color: 0xffff00, side: THREE.DoubleSide } );
- const mesh = new THREE.Mesh( geometry, material );
- scene.add( mesh );
-
-
-
- innerRadius — Default is 0.5.
- outerRadius — Default is 1.
- thetaSegments — Number of segments. A higher number means the ring will be more round. Minimum is 3. Default is 8.
- phiSegments — Minimum is 1. Default is 8.
- thetaStart — Starting angle. Default is 0.
- thetaLength — Central angle. Default is Math.PI * 2.
-
See the base [page:Geometry] class for common properties.
- -- An object with a property for each of the constructor parameters. Any modification after instantiation does not change the geometry. -
- -See the base [page:Geometry] class for common methods.
- -- [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js] -
- - diff --git a/docs/api/en/geometries/ShapeGeometry.html b/docs/api/en/geometries/ShapeGeometry.html deleted file mode 100644 index 54ef0a26449d00..00000000000000 --- a/docs/api/en/geometries/ShapeGeometry.html +++ /dev/null @@ -1,83 +0,0 @@ - - - - -Creates an one-sided polygonal geometry from one or more path shapes.
- - - - - - -
- const x = 0, y = 0;
-
- const heartShape = new THREE.Shape();
-
- heartShape.moveTo( x + 5, y + 5 );
- heartShape.bezierCurveTo( x + 5, y + 5, x + 4, y, x, y );
- heartShape.bezierCurveTo( x - 6, y, x - 6, y + 7,x - 6, y + 7 );
- heartShape.bezierCurveTo( x - 6, y + 11, x - 3, y + 15.4, x + 5, y + 19 );
- heartShape.bezierCurveTo( x + 12, y + 15.4, x + 16, y + 11, x + 16, y + 7 );
- heartShape.bezierCurveTo( x + 16, y + 7, x + 16, y, x + 10, y );
- heartShape.bezierCurveTo( x + 7, y, x + 5, y + 5, x + 5, y + 5 );
-
- const geometry = new THREE.ShapeGeometry( heartShape );
- const material = new THREE.MeshBasicMaterial( { color: 0x00ff00 } );
- const mesh = new THREE.Mesh( geometry, material ) ;
- scene.add( mesh );
-
-
-
- shapes — [page:Array] of shapes or a single [page:Shape shape].
- curveSegments - [page:Integer] - Number of segments per shape. Default is 12.
-
See the base [page:Geometry] class for common properties.
- -- An object with a property for each of the constructor parameters. Any modification after instantiation does not change the geometry. -
- -See the base [page:Geometry] class for common methods.
- -- [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js] -
- - diff --git a/docs/api/en/geometries/SphereGeometry.html b/docs/api/en/geometries/SphereGeometry.html deleted file mode 100644 index 6fc0ca91c2ab60..00000000000000 --- a/docs/api/en/geometries/SphereGeometry.html +++ /dev/null @@ -1,77 +0,0 @@ - - - - -A class for generating sphere geometries
- - - - - -const geometry = new THREE.SphereGeometry( 5, 32, 32 );
- const material = new THREE.MeshBasicMaterial( {color: 0xffff00} );
- const sphere = new THREE.Mesh( geometry, material );
- scene.add( sphere );
-
-
-
- radius — sphere radius. Default is 1.
- widthSegments — number of horizontal segments. Minimum value is 3, and the default is 8.
- heightSegments — number of vertical segments. Minimum value is 2, and the default is 6.
- phiStart — specify horizontal starting angle. Default is 0.
- phiLength — specify horizontal sweep angle size. Default is Math.PI * 2.
- thetaStart — specify vertical starting angle. Default is 0.
- thetaLength — specify vertical sweep angle size. Default is Math.PI.
-
- The geometry is created by sweeping and calculating vertexes around the Y axis (horizontal sweep) and the Z axis (vertical sweep). Thus, incomplete spheres (akin to 'sphere slices') can be created through the use of different values of phiStart, phiLength, thetaStart and thetaLength, in order to define the points in which we start (or end) calculating those vertices. -
- -See the base [page:Geometry] class for common properties.
- -- An object with a property for each of the constructor parameters. Any modification after instantiation does not change the geometry. -
- -See the base [page:Geometry] class for common methods.
- -- [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js] -
- - diff --git a/docs/api/en/geometries/TetrahedronGeometry.html b/docs/api/en/geometries/TetrahedronGeometry.html deleted file mode 100644 index b407425f42c915..00000000000000 --- a/docs/api/en/geometries/TetrahedronGeometry.html +++ /dev/null @@ -1,59 +0,0 @@ - - - - -A class for generating a tetrahedron geometries.
- - - - - -
- radius — Radius of the tetrahedron. Default is 1.
- detail — Default is 0. Setting this to a value greater than 0 adds vertices making it no longer a tetrahedron.
-
See the base [page:Geometry] class for common properties.
- -- An object with a property for each of the constructor parameters. Any modification after instantiation does not change the geometry. -
- -See the base [page:Geometry] class for common methods.
- -- [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js] -
- - diff --git a/docs/api/en/geometries/TextGeometry.html b/docs/api/en/geometries/TextGeometry.html deleted file mode 100644 index b2f1eb09aee5f6..00000000000000 --- a/docs/api/en/geometries/TextGeometry.html +++ /dev/null @@ -1,176 +0,0 @@ - - - - -- A class for generating text as a single geometry. It is constructed by providing a string of text, and a hash of - parameters consisting of a loaded [page:Font] and settings for the geometry's parent [page:ExtrudeGeometry]. - See the [page:Font], [page:FontLoader] and [page:Creating-Text] pages for additional details. -
- - - - - -
- const loader = new THREE.FontLoader();
-
- loader.load( 'fonts/helvetiker_regular.typeface.json', function ( font ) {
-
- const geometry = new THREE.TextGeometry( 'Hello three.js!', {
- font: font,
- size: 80,
- height: 5,
- curveSegments: 12,
- bevelEnabled: true,
- bevelThickness: 10,
- bevelSize: 8,
- bevelOffset: 0,
- bevelSegments: 5
- } );
- } );
-
-
- - [example:webgl_geometry_text geometry / text ] -
- -
- text — The text that needs to be shown.
- parameters — Object that can contains the following parameters.
-
- TextGeometry uses typeface.json generated fonts. - Some existing fonts can be found located in /examples/fonts and must be included in the page. -
-Font | -Weight | -Style | -File Path | -
---|---|---|---|
helvetiker | -normal | -normal | -/examples/fonts/helvetiker_regular.typeface.json | -
helvetiker | -bold | -normal | -/examples/fonts/helvetiker_bold.typeface.json | -
optimer | -normal | -normal | -/examples/fonts/optimer_regular.typeface.json | -
optimer | -bold | -normal | -/examples/fonts/optimer_bold.typeface.json | -
gentilis | -normal | -normal | -/examples/fonts/gentilis_regular.typeface.json | -
gentilis | -bold | -normal | -/examples/fonts/gentilis_bold.typeface.json | -
droid sans | -normal | -normal | -/examples/fonts/droid/droid_sans_regular.typeface.json | -
droid sans | -bold | -normal | -/examples/fonts/droid/droid_sans_bold.typeface.json | -
droid serif | -normal | -normal | -/examples/fonts/droid/droid_serif_regular.typeface.json | -
droid serif | -bold | -normal | -/examples/fonts/droid/droid_serif_bold.typeface.json | -
See the base [page:ExtrudeGeometry] class for common properties.
- -- An object with a property for each of the constructor parameters. Any modification after instantiation does not change the geometry. -
- -See the base [page:ExtrudeGeometry] class for common methods.
- -- [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js] -
- - diff --git a/docs/api/en/geometries/TorusGeometry.html b/docs/api/en/geometries/TorusGeometry.html deleted file mode 100644 index 6ea39cff015b6c..00000000000000 --- a/docs/api/en/geometries/TorusGeometry.html +++ /dev/null @@ -1,70 +0,0 @@ - - - - -A class for generating torus geometries
- - - - - -const geometry = new THREE.TorusGeometry( 10, 3, 16, 100 );
- const material = new THREE.MeshBasicMaterial( { color: 0xffff00 } );
- const torus = new THREE.Mesh( geometry, material );
- scene.add( torus );
-
-
-
- radius - Radius of the torus, from the center of the torus to the center of the tube. Default is 1.
- tube — Radius of the tube. Default is 0.4.
- radialSegments — Default is 8
- tubularSegments — Default is 6.
- arc — Central angle. Default is Math.PI * 2.
-
See the base [page:Geometry] class for common properties.
- -- An object with a property for each of the constructor parameters. Any modification after instantiation does not change the geometry. -
- -See the base [page:Geometry] class for common methods.
- -- [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js] -
- - diff --git a/docs/api/en/geometries/TorusKnotGeometry.html b/docs/api/en/geometries/TorusKnotGeometry.html deleted file mode 100644 index 5bf223c2f52eae..00000000000000 --- a/docs/api/en/geometries/TorusKnotGeometry.html +++ /dev/null @@ -1,74 +0,0 @@ - - - - -Creates a torus knot, the particular shape of which is defined by a pair of coprime integers, p and q. If p and q are not coprime, the result will be a torus link.
- - - - - -const geometry = new THREE.TorusKnotGeometry( 10, 3, 100, 16 );
- const material = new THREE.MeshBasicMaterial( { color: 0xffff00 } );
- const torusKnot = new THREE.Mesh( geometry, material );
- scene.add( torusKnot );
-
-
- -
See the base [page:Geometry] class for common properties.
- -- An object with a property for each of the constructor parameters. Any modification after instantiation does not change the geometry. -
- -See the base [page:Geometry] class for common methods.
- - -- [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js] -
- - diff --git a/docs/api/en/geometries/TubeGeometry.html b/docs/api/en/geometries/TubeGeometry.html deleted file mode 100644 index 18e96aa7817db8..00000000000000 --- a/docs/api/en/geometries/TubeGeometry.html +++ /dev/null @@ -1,111 +0,0 @@ - - - - -Creates a tube that extrudes along a 3d curve.
- - - - - -
- class CustomSinCurve extends THREE.Curve {
-
- constructor( scale = 1 ) {
-
- super();
-
- this.scale = scale;
-
- }
-
- getPoint( t, optionalTarget = new THREE.Vector3() ) {
-
- const tx = t * 3 - 1.5;
- const ty = Math.sin( 2 * Math.PI * t );
- const tz = 0;
-
- return optionalTarget.set( tx, ty, tz ).multiplyScalar( this.scale );
-
- }
-
- }
-
- const path = new CustomSinCurve( 10 );
- const geometry = new THREE.TubeGeometry( path, 20, 2, 8, false );
- const material = new THREE.MeshBasicMaterial( { color: 0x00ff00 } );
- const mesh = new THREE.Mesh( geometry, material );
- scene.add( mesh );
-
-
-
- path — [page:Curve] - A 3D path that inherits from the [page:Curve] base class
- tubularSegments — [page:Integer] - The number of segments that make up the tube, default is 64
- radius — [page:Float] - The radius of the tube, default is 1
- radialSegments — [page:Integer] - The number of segments that make up the cross-section, default is 8
- closed — [page:Boolean] Is the tube open or closed, default is false
-
See the base [page:Geometry] class for common properties.
- -- An object with a property for each of the constructor parameters. Any modification after instantiation does not change the geometry. -
- -- An array of [page:Vector3] tangents -
- -- An array of [page:Vector3] normals -
- -- An array of [page:Vector3] binormals -
- -See the base [page:Geometry] class for common methods.
- -- [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js] -
- - diff --git a/docs/api/zh/geometries/BoxGeometry.html b/docs/api/zh/geometries/BoxGeometry.html deleted file mode 100644 index 1f8e4ae67bc1e8..00000000000000 --- a/docs/api/zh/geometries/BoxGeometry.html +++ /dev/null @@ -1,81 +0,0 @@ - - - - -- BoxGeometry是四边形的原始几何类,它通常使用构造函数所提供的“width”、“height”、“depth”参数来创建立方体或者不规则四边形。
- - - - - -const geometry = new THREE.BoxGeometry( 1, 1, 1 );
- const material = new THREE.MeshBasicMaterial( {color: 0x00ff00} );
- const cube = new THREE.Mesh( geometry, material );
- scene.add( cube );
-
-
-
- width — X轴上面的宽度,默认值为1。
- height — Y轴上面的高度,默认值为1。
- depth — Z轴上面的深度,默认值为1。
- widthSegments — (可选)宽度的分段数,默认值是1。
- heightSegments — (可选)宽度的分段数,默认值是1。
- depthSegments — (可选)宽度的分段数,默认值是1。
-
共有属性请参见其基类[page:Geometry]。
- -- 一个包含着构造函数中每个参数的对象。在对象实例化之后,对该属性的任何修改都不会改变这个几何体。 -
-
- 使用上面的示例代码来作为基础:
-
- geometry.parameters; // outputs an object {width: 1, height: 1, depth: 1, widthSegments: undefined, heightSegments: undefined}
- cube.geometry.parameters; // as above
- cube.geometry.parameters.width; // === 1
- cube.geometry.parameters.widthSegments // === undefined.
-
-
共有方法请参见其基类[page:Geometry]。
- -- [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js] -
- - diff --git a/docs/api/zh/geometries/CircleGeometry.html b/docs/api/zh/geometries/CircleGeometry.html deleted file mode 100644 index 890ff83551c287..00000000000000 --- a/docs/api/zh/geometries/CircleGeometry.html +++ /dev/null @@ -1,72 +0,0 @@ - - - - -CircleGeometry是欧式几何的一个简单形状,它由围绕着一个中心点的三角分段的数量所构造,由给定的半径来延展。 - 同时它也可以用于创建规则多边形,其分段数量取决于该规则多边形的边数。 -
- - - - - -
- const geometry = new THREE.CircleGeometry( 5, 32 );
- const material = new THREE.MeshBasicMaterial( { color: 0xffff00 } );
- const circle = new THREE.Mesh( geometry, material );
- scene.add( circle );
-
-
-
- radius — 圆形的半径,默认值为1
- segments — 分段(三角面)的数量,最小值为3,默认值为8。
- thetaStart — 第一个分段的起始角度,默认为0。(three o'clock position)
- thetaLength — 圆形扇区的中心角,通常被称为“θ”(西塔)。默认值是2*Pi,这使其成为一个完整的圆。
-
共有属性请参见其基类[page:Geometry]。
- -- 一个包含着构造函数中每个参数的对象。在对象实例化之后,对该属性的任何修改都不会改变这个几何体。 -
- -共有方法请参见其基类[page:Geometry]。
- -- [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js] -
- - diff --git a/docs/api/zh/geometries/ConeGeometry.html b/docs/api/zh/geometries/ConeGeometry.html deleted file mode 100644 index 1d25607bb5a019..00000000000000 --- a/docs/api/zh/geometries/ConeGeometry.html +++ /dev/null @@ -1,72 +0,0 @@ - - - - -一个用于生成圆锥几何体的类。
- - - - - -const geometry = new THREE.ConeGeometry( 5, 20, 32 );
- const material = new THREE.MeshBasicMaterial( {color: 0xffff00} );
- const cone = new THREE.Mesh( geometry, material );
- scene.add( cone );
-
-
-
- radius — 圆锥底部的半径,默认值为1。
- height — 圆锥的高度,默认值为1。
- radialSegments — 圆锥侧面周围的分段数,默认为8。
- heightSegments — 圆锥侧面沿着其高度的分段数,默认值为1。
- openEnded — 一个Boolean值,指明该圆锥的底面是开放的还是封顶的。默认值为false,即其底面默认是封顶的。
- thetaStart — 第一个分段的起始角度,默认为0。(three o'clock position)
- thetaLength — 圆锥底面圆扇区的中心角,通常被称为“θ”(西塔)。默认值是2*Pi,这使其成为一个完整的圆锥。
-
共有属性请参见其基类[page:CylinderGeometry]。
- -- 一个包含着构造函数中每个参数的对象。在对象实例化之后,对该属性的任何修改都不会改变这个几何体。 -
- -共有方法请参见其基类[page:Geometry]。
- -- [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js] -
- - diff --git a/docs/api/zh/geometries/CylinderGeometry.html b/docs/api/zh/geometries/CylinderGeometry.html deleted file mode 100644 index c4096d63509655..00000000000000 --- a/docs/api/zh/geometries/CylinderGeometry.html +++ /dev/null @@ -1,73 +0,0 @@ - - - - -一个用于生成圆柱几何体的类
- - - - - -const geometry = new THREE.CylinderGeometry( 5, 5, 20, 32 );
- const material = new THREE.MeshBasicMaterial( {color: 0xffff00} );
- const cylinder = new THREE.Mesh( geometry, material );
- scene.add( cylinder );
-
-
-
- radiusTop — 圆柱的顶部半径,默认值是1。
- radiusBottom — 圆柱的底部半径,默认值是1。
- height — 圆柱的高度,默认值是1。
- radialSegments — 圆柱侧面周围的分段数,默认为8。
- heightSegments — 圆柱侧面沿着其高度的分段数,默认值为1。
- openEnded — 一个Boolean值,指明该圆锥的底面是开放的还是封顶的。默认值为false,即其底面默认是封顶的。
- thetaStart — 第一个分段的起始角度,默认为0。(three o'clock position)
- thetaLength — 圆柱底面圆扇区的中心角,通常被称为“θ”(西塔)。默认值是2*Pi,这使其成为一个完整的圆柱。
-
共有属性请参见其基类[page:Geometry]。
- -- 一个包含着构造函数中每个参数的对象。在对象实例化之后,对该属性的任何修改都不会改变这个几何体。 -
- -共有方法请参见其基类[page:Geometry]。
- -- [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js] -
- - diff --git a/docs/api/zh/geometries/DodecahedronGeometry.html b/docs/api/zh/geometries/DodecahedronGeometry.html deleted file mode 100644 index eca819a35f2071..00000000000000 --- a/docs/api/zh/geometries/DodecahedronGeometry.html +++ /dev/null @@ -1,59 +0,0 @@ - - - - - -A class for generating a dodecahedron geometries.
- - - - -
- radius — 十二面体的半径,默认值为1。
- detail — 默认值为0。将这个值设为一个大于0的数将会为它增加一些顶点,使其不再是一个十二面体。
-
共有属性请参见其基类[page:Geometry]。
- -- 一个包含着构造函数中每个参数的对象。在对象实例化之后,对该属性的任何修改都不会改变这个几何体。 -
- -共有方法请参见其基类[page:Geometry]。
- -从一条形状路径中,挤压出一个Geometry。
- - - - - -
- const length = 12, width = 8;
-
- const shape = new THREE.Shape();
- shape.moveTo( 0,0 );
- shape.lineTo( 0, width );
- shape.lineTo( length, width );
- shape.lineTo( length, 0 );
- shape.lineTo( 0, 0 );
-
- const extrudeSettings = {
- steps: 2,
- depth: 16,
- bevelEnabled: true,
- bevelThickness: 1,
- bevelSize: 1,
- bevelOffset: 0,
- bevelSegments: 1
- };
-
- const geometry = new THREE.ExtrudeGeometry( shape, extrudeSettings );
- const material = new THREE.MeshBasicMaterial( { color: 0x00ff00 } );
- const mesh = new THREE.Mesh( geometry, material ) ;
- scene.add( mesh );
-
-
-
- shapes — 形状或者一个包含形状的数组。
- options — 一个包含有下列参数的对象:
-
-
- 该对象将一个二维形状挤出为一个三维几何体。 -
- -- 当使用这个几何体创建Mesh的时候,如果你希望分别对它的表面和它挤出的侧面使用单独的材质,你可以使用一个材质数组。 - 第一个材质将用于其表面;第二个材质则将用于其挤压出的侧面。 -
- -共有属性请参见其基类[page:Geometry]。
- -- 一个包含着构造函数中每个参数的对象。在对象实例化之后,对该属性的任何修改都不会改变这个几何体。 -
- -共有方法请参见其基类[page:Geometry]。
- -- [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js] -
- - diff --git a/docs/api/zh/geometries/IcosahedronGeometry.html b/docs/api/zh/geometries/IcosahedronGeometry.html deleted file mode 100644 index 517b6ccc5d2d67..00000000000000 --- a/docs/api/zh/geometries/IcosahedronGeometry.html +++ /dev/null @@ -1,59 +0,0 @@ - - - - -一个用于生成二十面体的类。
- - - - - -
- radius — 二十面体的半径,默认为1。
- detail — 默认值为0。将这个值设为一个大于0的数将会为它增加一些顶点,使其不再是一个二十面体。当这个值大于1的时候,实际上它将变成一个球体。
-
共有属性请参见其基类[page:Geometry]。
- -- 一个包含着构造函数中每个参数的对象。在对象实例化之后,对该属性的任何修改都不会改变这个几何体。 -
- -共有方法请参见其基类[page:Geometry]。
- -- [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js] -
- - diff --git a/docs/api/zh/geometries/LatheGeometry.html b/docs/api/zh/geometries/LatheGeometry.html deleted file mode 100644 index 5fcb99f5e8209f..00000000000000 --- a/docs/api/zh/geometries/LatheGeometry.html +++ /dev/null @@ -1,77 +0,0 @@ - - - - -创建具有轴对称性的网格,比如花瓶。车削绕着Y轴来进行旋转。
- - - - - -
- const points = [];
- for ( let i = 0; i < 10; i ++ ) {
- points.push( new THREE.Vector2( Math.sin( i * 0.2 ) * 10 + 5, ( i - 5 ) * 2 ) );
- }
- const geometry = new THREE.LatheGeometry( points );
- const material = new THREE.MeshBasicMaterial( { color: 0xffff00 } );
- const lathe = new THREE.Mesh( geometry, material );
- scene.add( lathe );
-
-
-
- points — 一个Vector2对象数组。每个点的X坐标必须大于0。
- segments — 要生成的车削几何体圆周分段的数量,默认值是12。
- phiStart — 以弧度表示的起始角度,默认值为0。
- phiLength — 车削部分的弧度(0-2PI)范围,2PI将是一个完全闭合的、完整的车削几何体,小于2PI是部分车削。默认值是2PI。
-
- 基于参数创建一个LatheGeometry。 -
- -共有属性请参见其基类[page:Geometry]。
- -- 一个包含着构造函数中每个参数的对象。在对象实例化之后,对该属性的任何修改都不会改变这个几何体。 -
- -共有方法请参见其基类[page:Geometry]。
- -- [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js] -
- - diff --git a/docs/api/zh/geometries/OctahedronGeometry.html b/docs/api/zh/geometries/OctahedronGeometry.html deleted file mode 100644 index 35b7c7aba2f4e2..00000000000000 --- a/docs/api/zh/geometries/OctahedronGeometry.html +++ /dev/null @@ -1,62 +0,0 @@ - - - - - -一个用于创建八面体的类。
- - - - - -
- radius — 八面体的半径,默认值为1。
- detail — 默认值为0,将这个值设为一个大于0的数将会为它增加一些顶点,使其不再是一个八面体。
-
共有属性请参见其基类[page:Geometry]。
- -- 一个包含着构造函数中每个参数的对象。在对象实例化之后,对该属性的任何修改都不会改变这个几何体。 -
- -共有方法请参见其基类[page:Geometry]。
- -- [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js] -
- - - diff --git a/docs/api/zh/geometries/ParametricGeometry.html b/docs/api/zh/geometries/ParametricGeometry.html deleted file mode 100644 index 23ef612f3d3762..00000000000000 --- a/docs/api/zh/geometries/ParametricGeometry.html +++ /dev/null @@ -1,72 +0,0 @@ - - - - -生成由参数表示其表面的几何体。
- - - - - -
- const geometry = new THREE.ParametricGeometry( THREE.ParametricGeometries.klein, 25, 25 );
- const material = new THREE.MeshBasicMaterial( { color: 0x00ff00 } );
- const klein = new THREE.Mesh( geometry, material );
- scene.add( klein );
-
-
-
-
- func — A function that takes in a [page:Float u] and [page:Float v] value each between 0 and 1 and modifies a third [page:Vector3] argument
- slices — The count of slices to use for the parametric function
- stacks — The count of stacks to use for the parametric function
-
共有属性请参见其基类[page:Geometry]。
- -- 一个包含着构造函数中每个参数的对象。在对象实例化之后,对该属性的任何修改都不会改变这个几何体。 -
- -共有方法请参见其基类[page:Geometry]。
- -- [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js] -
- - diff --git a/docs/api/zh/geometries/PlaneGeometry.html b/docs/api/zh/geometries/PlaneGeometry.html deleted file mode 100644 index 193d412395814f..00000000000000 --- a/docs/api/zh/geometries/PlaneGeometry.html +++ /dev/null @@ -1,69 +0,0 @@ - - - - -一个用于生成平面几何体的类。
- - - - - -const geometry = new THREE.PlaneGeometry( 5, 20, 32 );
- const material = new THREE.MeshBasicMaterial( {color: 0xffff00, side: THREE.DoubleSide} );
- const plane = new THREE.Mesh( geometry, material );
- scene.add( plane );
-
-
-
- width — 平面沿着X轴的宽度。默认值是1。
- height — 平面沿着Y轴的高度。默认值是1。
- widthSegments — (可选)平面的宽度分段数,默认值是1。
- heightSegments — (可选)平面的高度分段数,默认值是1。
-
共有属性请参见其基类[page:Geometry]。
- -- 一个包含着构造函数中每个参数的对象。在对象实例化之后,对该属性的任何修改都不会改变这个几何体。 -
- -共有方法请参见其基类[page:Geometry]。
- -- [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js] -
- - diff --git a/docs/api/zh/geometries/PolyhedronGeometry.html b/docs/api/zh/geometries/PolyhedronGeometry.html deleted file mode 100644 index 66bbecf709ae15..00000000000000 --- a/docs/api/zh/geometries/PolyhedronGeometry.html +++ /dev/null @@ -1,65 +0,0 @@ - - - - -- 多面体是在三维空间中具有一些平面的立体图形。这个类将一个顶点数组投射到一个球面上,之后将它们细分为所需的细节级别。 -
- -
-const verticesOfCube = [
- -1,-1,-1, 1,-1,-1, 1, 1,-1, -1, 1,-1,
- -1,-1, 1, 1,-1, 1, 1, 1, 1, -1, 1, 1,
-];
-
-const indicesOfFaces = [
- 2,1,0, 0,3,2,
- 0,4,7, 7,3,0,
- 0,1,5, 5,4,0,
- 1,2,6, 6,5,1,
- 2,3,7, 7,6,2,
- 4,5,6, 6,7,4
-];
-
-const geometry = new THREE.PolyhedronGeometry( verticesOfCube, indicesOfFaces, 6, 2 );
-
-
-
- vertices — 一个顶点[page:Array](数组):[1,1,1, -1,-1,-1, ... ]。
- indices — 一个构成面的索引[page:Array](数组), [0,1,2, 2,3,0, ... ]。
- radius — [page:Float] - 最终形状的半径。
- detail — [page:Integer] - 将对这个几何体细分多少个级别。细节越多,形状就越平滑。
-
共有属性请参见其基类[page:Geometry]。
- -- 一个包含着构造函数中每个参数的对象。在对象实例化之后,对该属性的任何修改都不会改变这个几何体。 -
- -共有方法请参见其基类[page:Geometry]。
- -- [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js] -
- - diff --git a/docs/api/zh/geometries/RingGeometry.html b/docs/api/zh/geometries/RingGeometry.html deleted file mode 100644 index b97389e81a28a7..00000000000000 --- a/docs/api/zh/geometries/RingGeometry.html +++ /dev/null @@ -1,71 +0,0 @@ - - - - -一个用于生成二维圆环几何体的类。
- - - - - -const geometry = new THREE.RingGeometry( 1, 5, 32 );
- const material = new THREE.MeshBasicMaterial( { color: 0xffff00, side: THREE.DoubleSide } );
- const mesh = new THREE.Mesh( geometry, material );
- scene.add( mesh );
-
-
-
- innerRadius — 内部半径,默认值为0.5。
- outerRadius — 外部半径,默认值为1。
- thetaSegments — 圆环的分段数。这个值越大,圆环就越圆。最小值为3,默认值为8。
- phiSegments — 最小值为1,默认值为8。
- thetaStart — 起始角度,默认值为0。
- thetaLength — 圆心角,默认值为Math.PI * 2。
-
共有属性请参见其基类[page:Geometry]。
- -- 一个包含着构造函数中每个参数的对象。在对象实例化之后,对该属性的任何修改都不会改变这个几何体。 -
- -共有方法请参见其基类[page:Geometry]。
- -- [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js] -
- - diff --git a/docs/api/zh/geometries/ShapeGeometry.html b/docs/api/zh/geometries/ShapeGeometry.html deleted file mode 100644 index e423aa41ad621e..00000000000000 --- a/docs/api/zh/geometries/ShapeGeometry.html +++ /dev/null @@ -1,83 +0,0 @@ - - - - -从一个或多个路径形状中创建一个单面多边形几何体。
- - - - - - -
- const x = 0, y = 0;
-
- const heartShape = new THREE.Shape();
-
- heartShape.moveTo( x + 5, y + 5 );
- heartShape.bezierCurveTo( x + 5, y + 5, x + 4, y, x, y );
- heartShape.bezierCurveTo( x - 6, y, x - 6, y + 7,x - 6, y + 7 );
- heartShape.bezierCurveTo( x - 6, y + 11, x - 3, y + 15.4, x + 5, y + 19 );
- heartShape.bezierCurveTo( x + 12, y + 15.4, x + 16, y + 11, x + 16, y + 7 );
- heartShape.bezierCurveTo( x + 16, y + 7, x + 16, y, x + 10, y );
- heartShape.bezierCurveTo( x + 7, y, x + 5, y + 5, x + 5, y + 5 );
-
- const geometry = new THREE.ShapeGeometry( heartShape );
- const material = new THREE.MeshBasicMaterial( { color: 0x00ff00 } );
- const mesh = new THREE.Mesh( geometry, material ) ;
- scene.add( mesh );
-
-
-
- shapes — 一个单独的[page:Shape shape],或者一个包含形状的[page:Array]。
- curveSegments - [page:Integer] - 每一个形状的分段数,默认值为12。
-
共有属性请参见其基类[page:Geometry]。
- -- 一个包含着构造函数中每个参数的对象。在对象实例化之后,对该属性的任何修改都不会改变这个几何体。 -
- -共有方法请参见其基类[page:Geometry]。
- -- [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js] -
- - diff --git a/docs/api/zh/geometries/SphereGeometry.html b/docs/api/zh/geometries/SphereGeometry.html deleted file mode 100644 index 8e3bb27ac03d66..00000000000000 --- a/docs/api/zh/geometries/SphereGeometry.html +++ /dev/null @@ -1,79 +0,0 @@ - - - - -一个用于生成球体的类。
- - - - - -const geometry = new THREE.SphereGeometry( 5, 32, 32 );
- const material = new THREE.MeshBasicMaterial( {color: 0xffff00} );
- const sphere = new THREE.Mesh( geometry, material );
- scene.add( sphere );
-
-
-
- radius — 球体半径,默认为1。
- widthSegments — 水平分段数(沿着经线分段),最小值为3,默认值为8。
- heightSegments — 垂直分段数(沿着纬线分段),最小值为2,默认值为6。
- phiStart — 指定水平(经线)起始角度,默认值为0。。
- phiLength — 指定水平(经线)扫描角度的大小,默认值为 Math.PI * 2。
- thetaStart — 指定垂直(纬线)起始角度,默认值为0。
- thetaLength — 指定垂直(纬线)扫描角度大小,默认值为 Math.PI。
-
- 该几何体是通过扫描并计算围绕着Y轴(水平扫描)和X轴(垂直扫描)的顶点来创建的。 - 因此,不完整的球体(类似球形切片)可以通过为phiStart,phiLength,thetaStart和thetaLength设置不同的值来创建, - 以定义我们开始(或结束)计算这些顶点的起点(或终点)。 -
- -共有属性请参见其基类[page:Geometry]。
- -- 一个包含着构造函数中每个参数的对象。在对象实例化之后,对该属性的任何修改都不会改变这个几何体。 -
- -共有方法请参见其基类[page:Geometry]。
- -- [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js] -
- - diff --git a/docs/api/zh/geometries/TetrahedronGeometry.html b/docs/api/zh/geometries/TetrahedronGeometry.html deleted file mode 100644 index 09debf0bb5763b..00000000000000 --- a/docs/api/zh/geometries/TetrahedronGeometry.html +++ /dev/null @@ -1,59 +0,0 @@ - - - - -一个用于生成四面几何体的类。
- - - - - -
- radius — 四面体的半径,默认值为1。
- detail — 默认值为0。将这个值设为一个大于0的数将会为它增加一些顶点,使其不再是一个四面体。
-
共有属性请参见其基类[page:Geometry]。
- -- 一个包含着构造函数中每个参数的对象。在对象实例化之后,对该属性的任何修改都不会改变这个几何体。 -
- -共有方法请参见其基类[page:Geometry]。
- -- [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js] -
- - diff --git a/docs/api/zh/geometries/TextGeometry.html b/docs/api/zh/geometries/TextGeometry.html deleted file mode 100644 index 6723e03a05de9f..00000000000000 --- a/docs/api/zh/geometries/TextGeometry.html +++ /dev/null @@ -1,174 +0,0 @@ - - - - -- 一个用于将文本生成为单一的几何体的类。 - 它是由一串给定的文本,以及由加载的[page:Font](字体)和该几何体[page:ExtrudeGeometry]父类中的设置所组成的参数来构造的。 - 请参阅[page:Font]、[page:FontLoader]和[page:Creating_Text]页面来查看更多详细信息。 -
- - - - - -
- const loader = new THREE.FontLoader();
-
- loader.load( 'fonts/helvetiker_regular.typeface.json', function ( font ) {
-
- const geometry = new THREE.TextGeometry( 'Hello three.js!', {
- font: font,
- size: 80,
- height: 5,
- curveSegments: 12,
- bevelEnabled: true,
- bevelThickness: 10,
- bevelSize: 8,
- bevelSegments: 5
- } );
- } );
-
-
- - [example:webgl_geometry_text geometry / text ] -
- -
- text — 将要显示的文本。
- parameters — 包含有下列参数的对象:
-
- 文本几何体使用 typeface.json所生成的字体。 - 一些已有的字体可以在/examples/fonts中找到,且必须在页面中引入。 -
-字体 | -字重 | -风格 | -文件路径 | -
---|---|---|---|
helvetiker | -normal | -normal | -/examples/fonts/helvetiker_regular.typeface.json | -
helvetiker | -bold | -normal | -/examples/fonts/helvetiker_bold.typeface.json | -
optimer | -normal | -normal | -/examples/fonts/optimer_regular.typeface.json | -
optimer | -bold | -normal | -/examples/fonts/optimer_bold.typeface.json | -
gentilis | -normal | -normal | -/examples/fonts/gentilis_regular.typeface.json | -
gentilis | -bold | -normal | -/examples/fonts/gentilis_bold.typeface.json | -
droid sans | -normal | -normal | -/examples/fonts/droid/droid_sans_regular.typeface.json | -
droid sans | -bold | -normal | -/examples/fonts/droid/droid_sans_bold.typeface.json | -
droid serif | -normal | -normal | -/examples/fonts/droid/droid_serif_regular.typeface.json | -
droid serif | -bold | -normal | -/examples/fonts/droid/droid_serif_bold.typeface.json | -
共有属性请参见其基类[page:ExtrudeGeometry]。
- -- 一个包含着构造函数中每个参数的对象。在对象实例化之后,对该属性的任何修改都不会改变这个几何体。 -
- -共有方法请参见其基类[page:ExtrudeGeometry]。
- -- [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js] -
- - diff --git a/docs/api/zh/geometries/TorusGeometry.html b/docs/api/zh/geometries/TorusGeometry.html deleted file mode 100644 index 0a958371a0c138..00000000000000 --- a/docs/api/zh/geometries/TorusGeometry.html +++ /dev/null @@ -1,70 +0,0 @@ - - - - -一个用于生成圆环几何体的类。
- - - - - -const geometry = new THREE.TorusGeometry( 10, 3, 16, 100 );
- const material = new THREE.MeshBasicMaterial( { color: 0xffff00 } );
- const torus = new THREE.Mesh( geometry, material );
- scene.add( torus );
-
-
-
- radius - 圆环的半径,从圆环的中心到管道(横截面)的中心。默认值是1。
- tube — 管道的半径,默认值为0.4。
- radialSegments — 圆环的分段数,默认值为8。
- tubularSegments — 管道的分段数,默认值为6。
- arc — 圆环的中心角(单位是弧度),默认值为Math.PI * 2。
-
共有属性请参见其基类[page:Geometry]。
- -- 一个包含着构造函数中每个参数的对象。在对象实例化之后,对该属性的任何修改都不会改变这个几何体。 -
- -共有方法请参见其基类[page:Geometry]。
- -- [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js] -
- - diff --git a/docs/api/zh/geometries/TorusKnotGeometry.html b/docs/api/zh/geometries/TorusKnotGeometry.html deleted file mode 100644 index 0f2339ad5de9db..00000000000000 --- a/docs/api/zh/geometries/TorusKnotGeometry.html +++ /dev/null @@ -1,74 +0,0 @@ - - - - -- 创建一个圆环扭结,其特殊形状由一对互质的整数,p和q所定义。如果p和q不互质,创建出来的几何体将是一个环面链接。
- - - - - -const geometry = new THREE.TorusKnotGeometry( 10, 3, 100, 16 );
- const material = new THREE.MeshBasicMaterial( { color: 0xffff00 } );
- const torusKnot = new THREE.Mesh( geometry, material );
- scene.add( torusKnot );
-
-
- -
共有属性请参见其基类[page:Geometry]。
- -- 一个包含着构造函数中每个参数的对象。在对象实例化之后,对该属性的任何修改都不会改变这个几何体。 -
- -共有方法请参见其基类[page:Geometry]。
- -- [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js] -
- - diff --git a/docs/api/zh/geometries/TubeGeometry.html b/docs/api/zh/geometries/TubeGeometry.html deleted file mode 100644 index a27bcb6892c76e..00000000000000 --- a/docs/api/zh/geometries/TubeGeometry.html +++ /dev/null @@ -1,111 +0,0 @@ - - - - -创建一个沿着三维曲线延伸的管道。
- - - - - -
- class CustomSinCurve extends THREE.Curve {
-
- constructor( scale = 1 ) {
-
- super();
-
- this.scale = scale;
-
- }
-
- getPoint( t, optionalTarget = new THREE.Vector3() ) {
-
- const tx = t * 3 - 1.5;
- const ty = Math.sin( 2 * Math.PI * t );
- const tz = 0;
-
- return optionalTarget.set( tx, ty, tz ).multiplyScalar( this.scale );
-
- }
-
- }
-
- const path = new CustomSinCurve( 10 );
- const geometry = new THREE.TubeGeometry( path, 20, 2, 8, false );
- const material = new THREE.MeshBasicMaterial( { color: 0x00ff00 } );
- const mesh = new THREE.Mesh( geometry, material );
- scene.add( mesh );
-
-
-
- path — [page:Curve] - 一个由基类[page:Curve]继承而来的3D路径。
- tubularSegments — [page:Integer] - 组成这一管道的分段数,默认值为64。
- radius — [page:Float] - 管道的半径,默认值为1。
- radialSegments — [page:Integer] - 管道横截面的分段数目,默认值为8。
- closed — [page:Boolean] 管道的两端是否闭合,默认值为false。
-
共有属性请参见其基类[page:Geometry]。
- -- 一个包含着构造函数中每个参数的对象。在对象实例化之后,对该属性的任何修改都不会改变这个几何体。 -
- -- 一个[page:Vector3]切线数组。 -
- -- 一个[page:Vector3]法线数组。 -
- -- 一个[page:Vector3]次法线数组。 -
- -共有方法请参见其基类[page:Geometry]。
- -- [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js] -
- - diff --git a/docs/list.json b/docs/list.json index 165acedbc58eff..385076fa9830a4 100644 --- a/docs/list.json +++ b/docs/list.json @@ -142,46 +142,26 @@ "Geometries": { "BoxBufferGeometry": "api/en/geometries/BoxBufferGeometry", - "BoxGeometry": "api/en/geometries/BoxGeometry", "CircleBufferGeometry": "api/en/geometries/CircleBufferGeometry", - "CircleGeometry": "api/en/geometries/CircleGeometry", "ConeBufferGeometry": "api/en/geometries/ConeBufferGeometry", - "ConeGeometry": "api/en/geometries/ConeGeometry", "CylinderBufferGeometry": "api/en/geometries/CylinderBufferGeometry", - "CylinderGeometry": "api/en/geometries/CylinderGeometry", "DodecahedronBufferGeometry": "api/en/geometries/DodecahedronBufferGeometry", - "DodecahedronGeometry": "api/en/geometries/DodecahedronGeometry", "EdgesGeometry": "api/en/geometries/EdgesGeometry", "ExtrudeBufferGeometry": "api/en/geometries/ExtrudeBufferGeometry", - "ExtrudeGeometry": "api/en/geometries/ExtrudeGeometry", "IcosahedronBufferGeometry": "api/en/geometries/IcosahedronBufferGeometry", - "IcosahedronGeometry": "api/en/geometries/IcosahedronGeometry", "LatheBufferGeometry": "api/en/geometries/LatheBufferGeometry", - "LatheGeometry": "api/en/geometries/LatheGeometry", "OctahedronBufferGeometry": "api/en/geometries/OctahedronBufferGeometry", - "OctahedronGeometry": "api/en/geometries/OctahedronGeometry", "ParametricBufferGeometry": "api/en/geometries/ParametricBufferGeometry", - "ParametricGeometry": "api/en/geometries/ParametricGeometry", "PlaneBufferGeometry": "api/en/geometries/PlaneBufferGeometry", - "PlaneGeometry": "api/en/geometries/PlaneGeometry", "PolyhedronBufferGeometry": "api/en/geometries/PolyhedronBufferGeometry", - "PolyhedronGeometry": "api/en/geometries/PolyhedronGeometry", "RingBufferGeometry": "api/en/geometries/RingBufferGeometry", - "RingGeometry": "api/en/geometries/RingGeometry", "ShapeBufferGeometry": "api/en/geometries/ShapeBufferGeometry", - "ShapeGeometry": "api/en/geometries/ShapeGeometry", "SphereBufferGeometry": "api/en/geometries/SphereBufferGeometry", - "SphereGeometry": "api/en/geometries/SphereGeometry", "TetrahedronBufferGeometry": "api/en/geometries/TetrahedronBufferGeometry", - "TetrahedronGeometry": "api/en/geometries/TetrahedronGeometry", "TextBufferGeometry": "api/en/geometries/TextBufferGeometry", - "TextGeometry": "api/en/geometries/TextGeometry", "TorusBufferGeometry": "api/en/geometries/TorusBufferGeometry", - "TorusGeometry": "api/en/geometries/TorusGeometry", "TorusKnotBufferGeometry": "api/en/geometries/TorusKnotBufferGeometry", - "TorusKnotGeometry": "api/en/geometries/TorusKnotGeometry", "TubeBufferGeometry": "api/en/geometries/TubeBufferGeometry", - "TubeGeometry": "api/en/geometries/TubeGeometry", "WireframeGeometry": "api/en/geometries/WireframeGeometry" }, @@ -676,46 +656,26 @@ "几何体": { "BoxBufferGeometry": "api/zh/geometries/BoxBufferGeometry", - "BoxGeometry": "api/zh/geometries/BoxGeometry", "CircleBufferGeometry": "api/zh/geometries/CircleBufferGeometry", - "CircleGeometry": "api/zh/geometries/CircleGeometry", "ConeBufferGeometry": "api/zh/geometries/ConeBufferGeometry", - "ConeGeometry": "api/zh/geometries/ConeGeometry", "CylinderBufferGeometry": "api/zh/geometries/CylinderBufferGeometry", - "CylinderGeometry": "api/zh/geometries/CylinderGeometry", "DodecahedronBufferGeometry": "api/zh/geometries/DodecahedronBufferGeometry", - "DodecahedronGeometry": "api/zh/geometries/DodecahedronGeometry", "EdgesGeometry": "api/zh/geometries/EdgesGeometry", "ExtrudeBufferGeometry": "api/zh/geometries/ExtrudeBufferGeometry", - "ExtrudeGeometry": "api/zh/geometries/ExtrudeGeometry", "IcosahedronBufferGeometry": "api/zh/geometries/IcosahedronBufferGeometry", - "IcosahedronGeometry": "api/zh/geometries/IcosahedronGeometry", "LatheBufferGeometry": "api/zh/geometries/LatheBufferGeometry", - "LatheGeometry": "api/zh/geometries/LatheGeometry", "OctahedronBufferGeometry": "api/zh/geometries/OctahedronBufferGeometry", - "OctahedronGeometry": "api/zh/geometries/OctahedronGeometry", "ParametricBufferGeometry": "api/zh/geometries/ParametricBufferGeometry", - "ParametricGeometry": "api/zh/geometries/ParametricGeometry", "PlaneBufferGeometry": "api/zh/geometries/PlaneBufferGeometry", - "PlaneGeometry": "api/zh/geometries/PlaneGeometry", "PolyhedronBufferGeometry": "api/zh/geometries/PolyhedronBufferGeometry", - "PolyhedronGeometry": "api/zh/geometries/PolyhedronGeometry", "RingBufferGeometry": "api/zh/geometries/RingBufferGeometry", - "RingGeometry": "api/zh/geometries/RingGeometry", "ShapeBufferGeometry": "api/zh/geometries/ShapeBufferGeometry", - "ShapeGeometry": "api/zh/geometries/ShapeGeometry", "SphereBufferGeometry": "api/zh/geometries/SphereBufferGeometry", - "SphereGeometry": "api/zh/geometries/SphereGeometry", "TetrahedronBufferGeometry": "api/zh/geometries/TetrahedronBufferGeometry", - "TetrahedronGeometry": "api/zh/geometries/TetrahedronGeometry", "TextBufferGeometry": "api/zh/geometries/TextBufferGeometry", - "TextGeometry": "api/zh/geometries/TextGeometry", "TorusBufferGeometry": "api/zh/geometries/TorusBufferGeometry", - "TorusGeometry": "api/zh/geometries/TorusGeometry", "TorusKnotBufferGeometry": "api/zh/geometries/TorusKnotBufferGeometry", - "TorusKnotGeometry": "api/zh/geometries/TorusKnotGeometry", "TubeBufferGeometry": "api/zh/geometries/TubeBufferGeometry", - "TubeGeometry": "api/zh/geometries/TubeGeometry", "WireframeGeometry": "api/zh/geometries/WireframeGeometry" }, diff --git a/src/Three.Legacy.js b/src/Three.Legacy.js index de313b94aa4124..e2de12042e4ed1 100644 --- a/src/Three.Legacy.js +++ b/src/Three.Legacy.js @@ -37,11 +37,27 @@ import { AxesHelper } from './helpers/AxesHelper.js'; import { BoxHelper } from './helpers/BoxHelper.js'; import { GridHelper } from './helpers/GridHelper.js'; import { SkeletonHelper } from './helpers/SkeletonHelper.js'; -import { BoxGeometry } from './geometries/BoxGeometry.js'; +import { BoxBufferGeometry } from './geometries/BoxBufferGeometry.js'; +import { CircleBufferGeometry } from './geometries/CircleBufferGeometry.js'; +import { ConeBufferGeometry } from './geometries/ConeBufferGeometry.js'; +import { CylinderBufferGeometry } from './geometries/CylinderBufferGeometry.js'; +import { DodecahedronBufferGeometry } from './geometries/DodecahedronBufferGeometry.js'; import { EdgesGeometry } from './geometries/EdgesGeometry.js'; -import { ExtrudeGeometry } from './geometries/ExtrudeGeometry.js'; import { ExtrudeBufferGeometry } from './geometries/ExtrudeBufferGeometry.js'; -import { ShapeGeometry } from './geometries/ShapeGeometry.js'; +import { IcosahedronBufferGeometry } from './geometries/IcosahedronBufferGeometry.js'; +import { LatheBufferGeometry } from './geometries/LatheBufferGeometry.js'; +import { OctahedronBufferGeometry } from './geometries/OctahedronBufferGeometry.js'; +import { ParametricBufferGeometry } from './geometries/ParametricBufferGeometry.js'; +import { PlaneBufferGeometry } from './geometries/PlaneBufferGeometry.js'; +import { PolyhedronBufferGeometry } from './geometries/PolyhedronBufferGeometry.js'; +import { RingBufferGeometry } from './geometries/RingBufferGeometry.js'; +import { ShapeBufferGeometry } from './geometries/ShapeBufferGeometry.js'; +import { SphereBufferGeometry } from './geometries/SphereBufferGeometry.js'; +import { TetrahedronBufferGeometry } from './geometries/TetrahedronBufferGeometry.js'; +import { TextBufferGeometry } from './geometries/TextBufferGeometry.js'; +import { TorusBufferGeometry } from './geometries/TorusBufferGeometry.js'; +import { TorusKnotBufferGeometry } from './geometries/TorusKnotBufferGeometry.js'; +import { TubeBufferGeometry } from './geometries/TubeBufferGeometry.js'; import { WireframeGeometry } from './geometries/WireframeGeometry.js'; import { Light } from './lights/Light.js'; import { Loader } from './loaders/Loader.js'; @@ -89,7 +105,6 @@ import { Shape } from './extras/core/Shape.js'; import { CubeCamera } from './cameras/CubeCamera.js'; import { Scene } from './scenes/Scene.js'; -export { BoxGeometry as CubeGeometry }; export { MathUtils as Math }; export function Face4( a, b, c, d, normal, color, materialIndex ) { @@ -838,14 +853,14 @@ Object.assign( Shape.prototype, { }, extrude: function ( options ) { - console.warn( 'THREE.Shape: .extrude() has been removed. Use ExtrudeGeometry() instead.' ); - return new ExtrudeGeometry( this, options ); + console.warn( 'THREE.Shape: .extrude() has been removed. Use ExtrudeBufferGeometry() instead.' ); + return new ExtrudeBufferGeometry( this, options ); }, makeGeometry: function ( options ) { - console.warn( 'THREE.Shape: .makeGeometry() has been removed. Use ShapeGeometry() instead.' ); - return new ShapeGeometry( this, options ); + console.warn( 'THREE.Shape: .makeGeometry() has been removed. Use ShapeBufferGeometry() instead.' ); + return new ShapeBufferGeometry( this, options ); } @@ -971,6 +986,148 @@ Object.assign( Geometry.prototype, { } ); +export function BoxGeometry( width, height, depth, widthSegments, heightSegments, depthSegments ) { + + console.warn( 'THREE.BoxGeometry has been removed. Use THREE.BoxBufferGeometry instead.' ); + return new BoxBufferGeometry( width, height, depth, widthSegments, heightSegments, depthSegments ); + +} + +export function CircleGeometry( radius, segments, thetaStart, thetaLength ) { + + console.warn( 'THREE.CircleGeometry has been removed. Use THREE.CircleBufferGeometry instead.' ); + return new CircleBufferGeometry( radius, segments, thetaStart, thetaLength ); + +} + +export function ConeGeometry( radius, height, radialSegments, heightSegments, openEnded, thetaStart, thetaLength ) { + + console.warn( 'THREE.CircleGeometry has been removed. Use THREE.ConeBufferGeometry instead.' ); + return new ConeBufferGeometry( radius, height, radialSegments, heightSegments, openEnded, thetaStart, thetaLength ); + +} + +export function CylinderGeometry( radiusTop, radiusBottom, height, radialSegments, heightSegments, openEnded, thetaStart, thetaLength ) { + + console.warn( 'THREE.CylinderGeometry has been removed. Use THREE.CylinderBufferGeometry instead.' ); + return new CylinderBufferGeometry( radiusTop, radiusBottom, height, radialSegments, heightSegments, openEnded, thetaStart, thetaLength ); + +} + +export function DodecahedronGeometry( radius, detail ) { + + console.warn( 'THREE.DodecahedronGeometry has been removed. Use THREE.DodecahedronBufferGeometry instead.' ); + return new DodecahedronBufferGeometry( radius, detail ); + +} + +export function ExtrudeGeometry( shapes, options ) { + + console.warn( 'THREE.ExtrudeGeometry has been removed. Use THREE.ExtrudeBufferGeometry instead.' ); + return new ExtrudeBufferGeometry( shapes, options ); + +} + +export function IcosahedronGeometry( radius, detail ) { + + console.warn( 'THREE.IcosahedronGeometry has been removed. Use THREE.IcosahedronBufferGeometry instead.' ); + return new IcosahedronBufferGeometry( radius, detail ); + +} + +export function LatheGeometry( points, segments, phiStart, phiLength ) { + + console.warn( 'THREE.LatheGeometry has been removed. Use THREE.LatheBufferGeometry instead.' ); + return new LatheBufferGeometry( points, segments, phiStart, phiLength ); + +} + +export function OctahedronGeometry( radius, detail ) { + + console.warn( 'THREE.OctahedronGeometry has been removed. Use THREE.OctahedronBufferGeometry instead.' ); + return new OctahedronBufferGeometry( radius, detail ); + +} + +export function ParametricGeometry( func, slices, stacks ) { + + console.warn( 'THREE.ParametricGeometry has been removed. Use THREE.ParametricBufferGeometry instead.' ); + return new ParametricBufferGeometry( func, slices, stacks ); + +} + +export function PlaneGeometry( width, height, widthSegments, heightSegments ) { + + console.warn( 'THREE.PlaneGeometry has been removed. Use THREE.PlaneBufferGeometry instead.' ); + return new PlaneBufferGeometry( width, height, widthSegments, heightSegments ); + +} + +export function PolyhedronGeometry( vertices, indices, radius, detail ) { + + console.warn( 'THREE.PolyhedronGeometry has been removed. Use THREE.PolyhedronBufferGeometry instead.' ); + return new PolyhedronBufferGeometry( vertices, indices, radius, detail ); + +} + +export function RingGeometry( innerRadius, outerRadius, thetaSegments, phiSegments, thetaStart, thetaLength ) { + + console.warn( 'THREE.RingGeometry has been removed. Use THREE.RingBufferGeometry instead.' ); + return new RingBufferGeometry( innerRadius, outerRadius, thetaSegments, phiSegments, thetaStart, thetaLength ); + +} + +export function ShapeGeometry( shapes, curveSegments ) { + + console.warn( 'THREE.ShapeGeometry has been removed. Use THREE.ShapeBufferGeometry instead.' ); + return new ShapeBufferGeometry( shapes, curveSegments ); + +} + +export function SphereGeometry( radius, widthSegments, heightSegments, phiStart, phiLength, thetaStart, thetaLength ) { + + console.warn( 'THREE.SphereGeometry has been removed. Use THREE.SphereBufferGeometry instead.' ); + return new SphereBufferGeometry( radius, widthSegments, heightSegments, phiStart, phiLength, thetaStart, thetaLength ); + +} + +export function TetrahedronGeometry( radius, detail ) { + + console.warn( 'THREE.TetrahedronGeometry has been removed. Use THREE.TetrahedronBufferGeometry instead.' ); + return new TetrahedronBufferGeometry( radius, detail ); + +} + +export function TextGeometry( text, parameters ) { + + console.warn( 'THREE.TextGeometry has been removed. Use THREE.TextBufferGeometry instead.' ); + return new TextBufferGeometry( text, parameters ); + +} + +export function TorusGeometry( radius, tube, radialSegments, tubularSegments, arc ) { + + console.warn( 'THREE.TorusGeometry has been removed. Use THREE.TorusBufferGeometry instead.' ); + return new TorusBufferGeometry( radius, tube, radialSegments, tubularSegments, arc ); + +} + +export function TorusKnotGeometry( radius, tube, tubularSegments, radialSegments, p, q, heightScale ) { + + console.warn( 'THREE.TorusKnotGeometry has been removed. Use THREE.TorusKnotBufferGeometry instead.' ); + return new TorusKnotBufferGeometry( radius, tube, tubularSegments, radialSegments, p, q, heightScale ); + +} + +export function TubeGeometry( path, tubularSegments, radius, radialSegments, closed, taper ) { + + console.warn( 'THREE.TubeGeometry has been removed. Use THREE.TubeBufferGeometry instead.' ); + return new TubeBufferGeometry( path, tubularSegments, radius, radialSegments, closed, taper ); + +} + +// + Object.assign( Object3D.prototype, { getChildByName: function ( name ) { diff --git a/src/geometries/BoxGeometry.d.ts b/src/geometries/BoxGeometry.d.ts deleted file mode 100644 index c4c6b47c912628..00000000000000 --- a/src/geometries/BoxGeometry.d.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { Geometry } from './../core/Geometry'; - -export class BoxGeometry extends Geometry { - - /** - * @param [width=1] — Width of the sides on the X axis. - * @param [height=1] — Height of the sides on the Y axis. - * @param [depth=1] — Depth of the sides on the Z axis. - * @param [widthSegments=1] — Number of segmented faces along the width of the sides. - * @param [heightSegments=1] — Number of segmented faces along the height of the sides. - * @param [depthSegments=1] — Number of segmented faces along the depth of the sides. - */ - constructor( - width?: number, - height?: number, - depth?: number, - widthSegments?: number, - heightSegments?: number, - depthSegments?: number - ); - - /** - * @default 'BoxGeometry' - */ - type: string; - - parameters: { - width: number; - height: number; - depth: number; - widthSegments: number; - heightSegments: number; - depthSegments: number; - }; - -} diff --git a/src/geometries/BoxGeometry.js b/src/geometries/BoxGeometry.js deleted file mode 100644 index 0f854c00040e8d..00000000000000 --- a/src/geometries/BoxGeometry.js +++ /dev/null @@ -1,28 +0,0 @@ -import { Geometry } from '../core/Geometry.js'; -import { BoxBufferGeometry } from './BoxBufferGeometry.js'; - -class BoxGeometry extends Geometry { - - constructor( width, height, depth, widthSegments, heightSegments, depthSegments ) { - - super(); - - this.type = 'BoxGeometry'; - - this.parameters = { - width: width, - height: height, - depth: depth, - widthSegments: widthSegments, - heightSegments: heightSegments, - depthSegments: depthSegments - }; - - this.fromBufferGeometry( new BoxBufferGeometry( width, height, depth, widthSegments, heightSegments, depthSegments ) ); - this.mergeVertices(); - - } - -} - -export { BoxGeometry }; diff --git a/src/geometries/CircleGeometry.d.ts b/src/geometries/CircleGeometry.d.ts deleted file mode 100644 index fefc364c1cdd3e..00000000000000 --- a/src/geometries/CircleGeometry.d.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { Geometry } from './../core/Geometry'; - -export class CircleGeometry extends Geometry { - - /** - * @param [radius=1] - * @param [segments=8] - * @param [thetaStart=0] - * @param [thetaLength=Math.PI * 2] - */ - constructor( - radius?: number, - segments?: number, - thetaStart?: number, - thetaLength?: number - ); - - /** - * @default 'CircleGeometry' - */ - type: string; - - parameters: { - radius: number; - segments: number; - thetaStart: number; - thetaLength: number; - }; - -} diff --git a/src/geometries/CircleGeometry.js b/src/geometries/CircleGeometry.js deleted file mode 100644 index 111db858afa1e6..00000000000000 --- a/src/geometries/CircleGeometry.js +++ /dev/null @@ -1,25 +0,0 @@ -import { Geometry } from '../core/Geometry.js'; -import { CircleBufferGeometry } from './CircleBufferGeometry.js'; - -class CircleGeometry extends Geometry { - - constructor( radius, segments, thetaStart, thetaLength ) { - - super(); - this.type = 'CircleGeometry'; - - this.parameters = { - radius: radius, - segments: segments, - thetaStart: thetaStart, - thetaLength: thetaLength - }; - - this.fromBufferGeometry( new CircleBufferGeometry( radius, segments, thetaStart, thetaLength ) ); - this.mergeVertices(); - - } - -} - -export { CircleGeometry }; diff --git a/src/geometries/ConeGeometry.d.ts b/src/geometries/ConeGeometry.d.ts deleted file mode 100644 index 48f277818d7660..00000000000000 --- a/src/geometries/ConeGeometry.d.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { CylinderGeometry } from './CylinderGeometry'; - -export class ConeGeometry extends CylinderGeometry { - - /** - * @param [radius=1] — Radius of the cone base. - * @param [height=1] — Height of the cone. - * @param [radialSegments=8] — Number of segmented faces around the circumference of the cone. - * @param [heightSegments=1] — Number of rows of faces along the height of the cone. - * @param [openEnded=false] — A Boolean indicating whether the base of the cone is open or capped. - * @param [thetaStart=0] - * @param [thetaLength=Math.PI * 2] - */ - constructor( - radius?: number, - height?: number, - radialSegments?: number, - heightSegments?: number, - openEnded?: boolean, - thetaStart?: number, - thetaLength?: number - ); - - /** - * @default 'ConeGeometry' - */ - type: string; - -} diff --git a/src/geometries/ConeGeometry.js b/src/geometries/ConeGeometry.js deleted file mode 100644 index d5e3dd7a0f1186..00000000000000 --- a/src/geometries/ConeGeometry.js +++ /dev/null @@ -1,24 +0,0 @@ -import { CylinderGeometry } from './CylinderGeometry.js'; - -class ConeGeometry extends CylinderGeometry { - - constructor( radius, height, radialSegments, heightSegments, openEnded, thetaStart, thetaLength ) { - - super( 0, radius, height, radialSegments, heightSegments, openEnded, thetaStart, thetaLength ); - this.type = 'ConeGeometry'; - - this.parameters = { - radius: radius, - height: height, - radialSegments: radialSegments, - heightSegments: heightSegments, - openEnded: openEnded, - thetaStart: thetaStart, - thetaLength: thetaLength - }; - - } - -} - -export { ConeGeometry }; diff --git a/src/geometries/CylinderGeometry.d.ts b/src/geometries/CylinderGeometry.d.ts deleted file mode 100644 index c4bbbf752ef0a3..00000000000000 --- a/src/geometries/CylinderGeometry.d.ts +++ /dev/null @@ -1,42 +0,0 @@ -import { Geometry } from './../core/Geometry'; - -export class CylinderGeometry extends Geometry { - - /** - * @param [radiusTop=1] — Radius of the cylinder at the top. - * @param [radiusBottom=1] — Radius of the cylinder at the bottom. - * @param [height=1] — Height of the cylinder. - * @param [radialSegments=8] — Number of segmented faces around the circumference of the cylinder. - * @param [heightSegments=1] — Number of rows of faces along the height of the cylinder. - * @param [openEnded=false] - A Boolean indicating whether or not to cap the ends of the cylinder. - * @param [thetaStart=0] - * @param [thetaLength=Math.PI * 2] - */ - constructor( - radiusTop?: number, - radiusBottom?: number, - height?: number, - radialSegments?: number, - heightSegments?: number, - openEnded?: boolean, - thetaStart?: number, - thetaLength?: number - ); - - /** - * @default 'CylinderGeometry' - */ - type: string; - - parameters: { - radiusTop: number; - radiusBottom: number; - height: number; - radialSegments: number; - heightSegments: number; - openEnded: boolean; - thetaStart: number; - thetaLength: number; - }; - -} diff --git a/src/geometries/CylinderGeometry.js b/src/geometries/CylinderGeometry.js deleted file mode 100644 index 81af303faf7c24..00000000000000 --- a/src/geometries/CylinderGeometry.js +++ /dev/null @@ -1,29 +0,0 @@ -import { Geometry } from '../core/Geometry.js'; -import { CylinderBufferGeometry } from './CylinderBufferGeometry.js'; - -class CylinderGeometry extends Geometry { - - constructor( radiusTop, radiusBottom, height, radialSegments, heightSegments, openEnded, thetaStart, thetaLength ) { - - super(); - this.type = 'CylinderGeometry'; - - this.parameters = { - radiusTop: radiusTop, - radiusBottom: radiusBottom, - height: height, - radialSegments: radialSegments, - heightSegments: heightSegments, - openEnded: openEnded, - thetaStart: thetaStart, - thetaLength: thetaLength - }; - - this.fromBufferGeometry( new CylinderBufferGeometry( radiusTop, radiusBottom, height, radialSegments, heightSegments, openEnded, thetaStart, thetaLength ) ); - this.mergeVertices(); - - } - -} - -export { CylinderGeometry }; diff --git a/src/geometries/DodecahedronGeometry.d.ts b/src/geometries/DodecahedronGeometry.d.ts deleted file mode 100644 index 69552e6b7e6cb6..00000000000000 --- a/src/geometries/DodecahedronGeometry.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { Geometry } from './../core/Geometry'; - -export class DodecahedronGeometry extends Geometry { - - /** - * @param [radius=1] - * @param [detail=0] - */ - constructor( radius?: number, detail?: number ); - - /** - * @default 'DodecahedronGeometry' - */ - type: string; - - parameters: { - radius: number; - detail: number; - }; - -} diff --git a/src/geometries/DodecahedronGeometry.js b/src/geometries/DodecahedronGeometry.js deleted file mode 100644 index 72ca521a0bd0a9..00000000000000 --- a/src/geometries/DodecahedronGeometry.js +++ /dev/null @@ -1,23 +0,0 @@ -import { Geometry } from '../core/Geometry.js'; -import { DodecahedronBufferGeometry } from './DodecahedronBufferGeometry.js'; - -class DodecahedronGeometry extends Geometry { - - constructor( radius, detail ) { - - super(); - this.type = 'DodecahedronGeometry'; - - this.parameters = { - radius: radius, - detail: detail - }; - - this.fromBufferGeometry( new DodecahedronBufferGeometry( radius, detail ) ); - this.mergeVertices(); - - } - -} - -export { DodecahedronGeometry }; diff --git a/src/geometries/ExtrudeGeometry.d.ts b/src/geometries/ExtrudeGeometry.d.ts deleted file mode 100644 index 1641cd7eb363cb..00000000000000 --- a/src/geometries/ExtrudeGeometry.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { Shape } from './../extras/core/Shape'; -import { Geometry } from './../core/Geometry'; -import { ExtrudeGeometryOptions } from './ExtrudeBufferGeometry'; - -export class ExtrudeGeometry extends Geometry { - - constructor( shapes: Shape | Shape[], options?: ExtrudeGeometryOptions ); - - /** - * @default 'ExtrudeGeometry' - */ - type: string; - - addShapeList( shapes: Shape[], options?: any ): void; - addShape( shape: Shape, options?: any ): void; - -} diff --git a/src/geometries/ExtrudeGeometry.js b/src/geometries/ExtrudeGeometry.js deleted file mode 100644 index 90a6ce8642cf6a..00000000000000 --- a/src/geometries/ExtrudeGeometry.js +++ /dev/null @@ -1,83 +0,0 @@ -/** - * Creates extruded geometry from a path shape. - * - * parameters = { - * - * curveSegments: