+ radiusTop — Radius of the cylinder at the top. Default is 20.<br />
+ radiusBottom — Radius of the cylinder at the bottom. Default is 20.<br />
+ height — Height of the cylinder. Default is 100.<br />
+ radiusSegments — Number of segmented faces around the circumference of the cylinder. Default is 8<br />
+ heightSegments — Number of rows of faces along the height of the cylinder. Default is 1.<br />
+ openEnded — A Boolean indicating whether the ends of the cylinder are open or capped. Default is false, meaning capped.<br />
+ thetaStart — Start angle for first segment, default = 0 (three o'clock position).<br />
+ thetaLength — The central angle, often called theta, of the circular sector. The default is 2*Pi, which makes for a complete cylinder.
+ </div>
+
+
+ <h2>Properties</h2>
+
+ <div>
+ Each of the constructor parameters is accessible as a property of the same name. Any modification of these properties after instantiation does not change the geometry.
+ Each of the contructor parameters is accessible as a property of the same name. Any modification of these properties after instantiation does not change the geometry.
+ 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 <em>'sphere slices'</em>) 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.
+ </div>
+
+
+ <h2>Properties</h2>
+
+ <div>
+ Each of the contructor parameters is accessible as a property of the same name. Any modification of these properties after instantiation does not change the geometry.
+ tube — Diameter of the tube. Default is 40. <br />
+ radialSegments — Default is 8 <br />
+ tubularSegments — Default is 6. <br />
+ arc — Central angle. Default is Math.PI * 2.
+ </div>
+
+
+ <h2>Properties</h2>
+
+ <div>
+ Each of the contructor parameters is accessible as a property of the same name. Any modification of these properties after instantiation does not change the geometry.
+ <li>tube — Diameter of the tube. Default is 40.</li>
+ <li>tubularSegments — Default is 64.</li>
+ <li>radialSegments — Default is 8.</li>
+ <li>p — This value determines, how many times the geometry winds around its axis of rotational symmetry. Default is 2.</li>
+ <li>q — This value determines, how many times the geometry winds around a circle in the interior of the torus. Default is 3.</li>
+ </ul>
+ </div>
+
+
+ <h2>Properties</h2>
+
+
+ <div>
+ Each of the contructor parameters is accessible as a property of the same name. Any modification of these properties after instantiation does not change the geometry.
+ <div>See the base [page:Material] class for common properties.</div>
+
+ <h3>[property:Color color]</h3>
+ <div>
+ Diffuse color of the material. Default is white.<br />
+ </div>
+
+ <h3>[property:Float roughness]</h3>
+ <div>
+ TODO.<br />
+ </div>
+
+ <h3>[property:Float metalness]</h3>
+ <div>
+ TODO<br />
+ </div>
+
+ <h3>[property:Texture map]</h3>
+ <div>Set color texture map. Default is null. The texture map color is modulated by the diffuse color.</div>
+
+ <h3>[property:Texture lightMap]</h3>
+ <div>Set light map. Default is null. The lightMap requires a second set of UVs.</div>
+
+ <h3>[property:Float lightMapIntensity]</h3>
+ <div>TODO</div>
+
+ <h3>[property:Texture aoMap]</h3>
+ <div>Set ambient occlusion map. Default is null. The aoMap requires a second set of UVs.</div>
+
+ <h3>[property:Float aoMapIntensity]</h3>
+ <div>TODO</div>
+
+ <h3>[property:Color emissive]</h3>
+ <div>
+ Emissive (light) color of the material, essentially a solid color unaffected by other lighting. Default is black.<br />
+ </div>
+
+ <h3>[property:Texture emissiveMap]</h3>
+ <div>Set emisssive (glow) map. Default is null. The emissive map color is modulated by the emissive color and the emissive intensity. If you have an emissive map, be sure to set the emissive color to something other than black.</div>
+
+ <h3>[property:Float emissiveIntensity]</h3>
+ <div>Intensity of the emissive light. Modulates the emissive color. Default is 1.</div>
+
+ <h3>[property:Texture bumpMap]</h3>
+ <div>
+ The texture to create a bump map. The black and white values map to the perceived depth in relation to the lights.
+ Bump doesn't actually affect the geometry of the object, only the lighting. If a normal map is defined this will
+ be ignored.
+ </div>
+
+ <h3>[property:Float bumpScale]</h3>
+ <div>
+ How much the bump map affects the material. Typical ranges are 0-1. Default is 1.
+ </div>
+
+ <h3>[property:Texture normalMap]</h3>
+ <div>
+ The texture to create a normal map. The RGB values affect the surface normal for each pixel fragment and change
+ the way the color is lit. Normal maps do not change the actual shape of the surface, only the lighting.
+ </div>
+
+ <h3>[property:Vector2 normalScale]</h3>
+ <div>
+ How much the normal map affects the material. Typical ranges are 0-1. Default is (1, 1).
+ </div>
+
+ <h3>[property:Texture displacementMap]</h3>
+ <div>
+ The displacement map affects the position of the mesh's vertices. Unlike other maps which only affect the light and shade of the material the displaced vertices can cast shadows, block other objects, and otherwise act as real geometry.
+ The displacement texture is an image where the value of each pixel (white being the highest) is mapped against, and repositions, the vertices of the mesh.
+ </div>
+
+ <h3>[property:Float displacementScale]</h3>
+ <div>
+ How much the displacement map affects the mesh (where black is no displacement, and white is maximum displacement). Without a displacement map set, this value is not applied. Default is 1.
+ </div>
+
+ <h3>[property:Float displacementBias]</h3>
+ <div>
+ The offset of the displacement map's values on the mesh's vertices. Without a displacement map set, this value is not applied. Default is 0.
+ </div>
+
+ <h3>[property:Texture roughnessMap]</h3>
+ <div>
+ TODO.
+ </div>
+
+ <h3>[property:Texture metalnessMap]</h3>
+ <div>
+ TODO.
+ </div>
+
+ <h3>[property:Texture alphaMap]</h3>
+ <div>The alpha map is a grayscale texture that controls the opacity across the surface (black: fully transparent; white: fully opaque). Default is null.</div>
+ <div>Only the color of the texture is used, ignoring the alpha channel if one exists. For RGB and RGBA textures, the [page:WebGLRenderer WebGL] renderer will use the green channel when sampling this texture due to the extra bit of precision provided for green in DXT-compressed and uncompressed RGB 565 formats. Luminance-only and luminance/alpha textures will also still work as expected.</div>
+
+ <h3>[property:TextureCube envMap]</h3>
+ <div>Set env map. Default is null.</div>
+
+ <h3>[property:Float envMapIntensity]</h3>
+ <div>TODO</div>
+
+ <h3>[property:Float refractionRatio]</h3>
+ <div>The index of refraction for an environment map using [page:Textures THREE.CubeRefractionMapping]. Default is *0.98*.</div>
+
+ <h3>[property:Boolean fog]</h3>
+ <div>Define whether the material color is affected by global fog settings. Default is *true*.</div>
+ <div>This setting might not have any effect when used with certain renderers. For example, it is ignored with the [page:CanvasRenderer Canvas] renderer, but does work with the [page:WebGLRenderer WebGL] renderer.</div>
+
+ <h3>[property:Integer shading]</h3>
+ <div>How the triangles of a curved surface are rendered: as a smooth surface, as flat separate facets, or no shading at all.</div>
+
+ <div>Options are [page:Materials THREE.SmoothShading] (default), [page:Materials THREE.FlatShading].</div>
+
+ <h3>[property:Boolean wireframe]</h3>
+ <div>Whether the triangles' edges are displayed instead of surfaces. Default is *false*.</div>
+
+ <h3>[property:Float wireframeLinewidth]</h3>
+ <div>Line thickness for wireframe mode. Default is *1.0*.</div>
+ <div>Due to limitations in the <a href="https://code.google.com/p/angleproject/" target="_blank">ANGLE layer</a>, on Windows platforms linewidth will always be 1 regardless of the set value.</div>
+
+ <h3>[property:String wireframeLinecap]</h3>
+ <div>Define appearance of line ends. Possible values are "butt", "round" and "square". Default is 'round'.</div>
+ <div>This setting might not have any effect when used with certain renderers. For example, it is ignored with the [page:WebGLRenderer WebGL] renderer, but does work with the [page:CanvasRenderer Canvas] renderer.</div>
+
+ <h3>[property:String wireframeLinejoin]</h3>
+ <div>Define appearance of line joints. Possible values are "round", "bevel" and "miter". Default is 'round'.</div>
+ <div>This setting might not have any effect when used with certain renderers. For example, it is ignored with the [page:WebGLRenderer WebGL] renderer, but does work with the [page:CanvasRenderer Canvas] renderer.</div>
+
+ <h3>[property:Integer vertexColors]</h3>
+ <div>Define how the vertices gets colored. Possible values are THREE.NoColors, THREE.FaceColors and THREE.VertexColors. Default is THREE.NoColors.</div>
+ <div>This setting might not have any effect when used with certain renderers. For example, it is ignored with the [page:CanvasRenderer Canvas] renderer, but does work with the [page:WebGLRenderer WebGL] renderer.</div>
+
+ <h3>[property:Boolean skinning]</h3>
+ <div>Define whether the material uses skinning. Default is *false*.</div>
+
+ <h3>[property:Boolean morphTargets]</h3>
+ <div>Define whether the material uses morphTargets. Default is *false*.</div>
+
+ <h3>[property:boolean morphNormals]</h3>
+ <div>
+ Defines whether the material uses morphNormals. Set as true to pass morphNormal attributes from the [page:Geometry]
- "gl_FragColor = vec4( outgoingLight, diffuseColor.a );", // TODO, this should be pre-multiplied to allow for bright highlights on very transparent objects
+ "gl_FragColor = linearToOutputTexel( vec4( outgoingLight, diffuseColor.a ) );", // TODO, this should be pre-multiplied to allow for bright highlights on very transparent objects
+ THREE.ShaderChunk[ "fog_fragment" ],
"}"
"}"
@@ -311,7 +307,6 @@ THREE.ShaderSkin = {
uniforms: THREE.UniformsUtils.merge( [
uniforms: THREE.UniformsUtils.merge( [
THREE.UniformsLib[ "fog" ],
THREE.UniformsLib[ "fog" ],
- THREE.UniformsLib[ "ambient" ],
THREE.UniformsLib[ "lights" ],
THREE.UniformsLib[ "lights" ],
{
{
@@ -370,7 +365,6 @@ THREE.ShaderSkin = {
"varying vec3 vViewPosition;",
"varying vec3 vViewPosition;",
THREE.ShaderChunk[ "common" ],
THREE.ShaderChunk[ "common" ],
- THREE.ShaderChunk[ "ambient_pars" ],
THREE.ShaderChunk[ "lights_pars" ],
THREE.ShaderChunk[ "lights_pars" ],
THREE.ShaderChunk[ "fog_pars_fragment" ],
THREE.ShaderChunk[ "fog_pars_fragment" ],
@@ -550,10 +544,10 @@ THREE.ShaderSkin = {
"}",
"}",
- THREE.ShaderChunk[ "fog_fragment" ],
-
"gl_FragColor = vec4( outgoingLight, diffuseColor.a );", // TODO, this should be pre-multiplied to allow for bright highlights on very transparent objects
"gl_FragColor = vec4( outgoingLight, diffuseColor.a );", // TODO, this should be pre-multiplied to allow for bright highlights on very transparent objects
+ * @member {Function} reverseAccess Retrieve the IJK coordinates of the voxel corresponding of the given index in the data
+ * @memberof THREE.Volume
+ * @param {number} index index of the voxel
+ * @returns {Array} [x,y,z]
+ */
+ reverseAccess : function( index ) {
+
+ var z = Math.floor( index / ( this.yLength * this.xLength ) );
+ var y = Math.floor( ( index - z * this.yLength * this.xLength ) / this.xLength );
+ var x = index - z * this.yLength * this.xLength - y * this.xLength;
+ return [ x, y, z ];
+
+ },
+
+ /**
+ * @member {Function} map Apply a function to all the voxels, be careful, the value will be replaced
+ * @memberof THREE.Volume
+ * @param {Function} functionToMap A function to apply to every voxel, will be called with the following parameters :
+ * value of the voxel
+ * index of the voxel
+ * the data (TypedArray)
+ * @param {Object} context You can specify a context in which call the function, default if this Volume
+ * @returns {THREE.Volume} this
+ */
+ map : function( functionToMap, context ) {
+
+ var length = this.data.length;
+ context = context || this;
+
+ for ( var i = 0; i < length; i ++ ) {
+
+ this.data[ i ] = functionToMap.call( context, this.data[ i ], i, this.data );
+
+ }
+
+ return this;
+
+ },
+
+ /**
+ * @member {Function} extractPerpendicularPlane Compute the orientation of the slice and returns all the information relative to the geometry such as sliceAccess, the plane matrix (orientation and position in RAS coordinate) and the dimensions of the plane in both coordinate system.
+ * @memberof THREE.Volume
+ * @param {string} axis the normal axis to the slice 'x' 'y' or 'z'
+ * @param {number} index the index of the slice
+ * @returns {Object} an object containing all the usefull information on the geometry of the slice
// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
/*
/*
-The Abstract Loader has two modes:
-#1: [static] load all the JSON at once [as of now]
-#2: [stream] stream and parse JSON progressively [not yet supported]
+The Abstract Loader has two modes:
+#1: [static] load all the JSON at once [as of now]
+#2: [stream] stream and parse JSON progressively [not yet supported]
-Whatever is the mechanism used to parse the JSON (#1 or #2),
-The loader starts by resolving the paths to binaries and referenced json files (by replace the value of the path property with an absolute path if it was relative).
+Whatever is the mechanism used to parse the JSON (#1 or #2),
+The loader starts by resolving the paths to binaries and referenced json files (by replace the value of the path property with an absolute path if it was relative).
-In case #1: it is guaranteed to call the concrete loader implementation methods in a order that solves the dependencies between the entries.
-only the nodes requires an extra pass to set up the hirerarchy.
-In case #2: the concrete implementation will have to solve the dependencies. no order is guaranteed.
+In case #1: it is guaranteed to call the concrete loader implementation methods in a order that solves the dependencies between the entries.
+only the nodes requires an extra pass to set up the hirerarchy.
+In case #2: the concrete implementation will have to solve the dependencies. no order is guaranteed.
-When case #1 is used the followed dependency order is:
+When case #1 is used the followed dependency order is:
+ * When there is no motion in the scene, the TAA render pass accumulates jittered camera samples across frames to create a high quality anti-aliased result.
+ *
+ * References:
+ *
+ * TODO: Add support for motion vector pas so that accumulation of samples across frames can occur on dynamics scenes.
+ *
+ */
+
+THREE.TAARenderPass = function ( scene, camera, params ) {
+
+ if ( THREE.ManualMSAARenderPass === undefined ) {
+
+ console.error( "THREE.TAARenderPass relies on THREE.ManualMSAARenderPass" );
+Donated by Cesium for glTF testing. Please follow the Cesium Trademark Terms and Conditions: https://github.com/AnalyticalGraphicsInc/cesium/wiki/CesiumTrademark.pdf
+Donated by Cesium for glTF testing. Please follow the Cesium Trademark Terms and Conditions: https://github.com/AnalyticalGraphicsInc/cesium/wiki/CesiumTrademark.pdf
-Scaled down the duck to a more reasonable size, removed physics scene, removed extra "dummy" transforms and pivot points, added camera and light.
----
-
-This model is a typical bathtub rubber duck. It uses a single texture.
-
-One version uses a polylist the other is triangles only.
-
-The model has been stripped of all <extra> tags and should be COLLADA 1.4.1 compliant.
-
-For additional information post messages on www.collada.org or mail [email protected]
-
-These models are Copyright 2006 Sony Computer Entertainment Inc. and are distributed under the terms of the SCEA Shared Source License, available at http://research.scea.com/scea_shared_source_license.html
+Copyright 2006 Sony Computer Entertainment Inc.
+
+Licensed under the SCEA Shared Source License, Version 1.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at:
+Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.