提交 639fb260 编写于 作者: D Don McCurdy

Docs: Increase linewidth for Examples section.

上级 65788123
...@@ -10,39 +10,39 @@ ...@@ -10,39 +10,39 @@
<body> <body>
<h1>[name]</h1> <h1>[name]</h1>
<div class="desc"> <p class="desc">
A class containing utility functions for [page:BufferGeometry BufferGeometry] instances.<br /><br /> A class containing utility functions for [page:BufferGeometry BufferGeometry] instances.<br /><br />
</div> </p>
<h2>Methods</h2> <h2>Methods</h2>
<h3>[method:null computeTangents]( [param:BufferGeometry geometry] )</h3> <h3>[method:null computeTangents]( [param:BufferGeometry geometry] )</h3>
<div> <p>
geometry -- A [page:BufferGeometry BufferGeometry] instance, which must have index, position, normal, and uv attributes.<br /><br /> geometry -- A [page:BufferGeometry BufferGeometry] instance, which must have index, position, normal, and uv attributes.<br /><br />
Calculates and adds tangent attribute to a geometry.<br /><br /> Calculates and adds tangent attribute to a geometry.<br /><br />
</div> </p>
<h3>[method:BufferGeometry mergeBufferGeometries]( [param:Array geometries] )</h3> <h3>[method:BufferGeometry mergeBufferGeometries]( [param:Array geometries] )</h3>
<div> <p>
geometries -- Array of [page:BufferGeometry BufferGeometry] instances.<br /><br /> geometries -- Array of [page:BufferGeometry BufferGeometry] instances.<br /><br />
Merges a set of geometries into a single instance. All geometries must have compatible attributes. Merges a set of geometries into a single instance. All geometries must have compatible attributes.
If merge does not succeed, the method returns null.<br /><br /> If merge does not succeed, the method returns null.<br /><br />
</div> </p>
<h3>[method:BufferAttribute mergeBufferAttributes]( [param:Array attributes] )</h3> <h3>[method:BufferAttribute mergeBufferAttributes]( [param:Array attributes] )</h3>
<div> <p>
attributes -- Array of [page:BufferAttribute BufferAttribute] instances.<br /><br /> attributes -- Array of [page:BufferAttribute BufferAttribute] instances.<br /><br />
Merges a set of attributes into a single instance. All attributes must have compatible properties Merges a set of attributes into a single instance. All attributes must have compatible properties
and types, and [page:InterleavedBufferAttribute InterleavedBufferAttributes] are not supported. If merge does not succeed, the method and types, and [page:InterleavedBufferAttribute InterleavedBufferAttributes] are not supported. If merge does not succeed, the method
returns null. returns null.
</div> </p>
<h2>Source</h2> <h2>Source</h2>
......
...@@ -10,9 +10,9 @@ ...@@ -10,9 +10,9 @@
<body> <body>
<h1>[name]</h1> <h1>[name]</h1>
<div class="desc"> <p class="desc">
Represents a lookup table for colormaps. It is used to determine the color values from a range of data values. Represents a lookup table for colormaps. It is used to determine the color values from a range of data values.
</div> </p>
<h2>Example</h2> <h2>Example</h2>
...@@ -25,58 +25,58 @@ ...@@ -25,58 +25,58 @@
<h3>[name]( colormap, numberOfColors )</h3> <h3>[name]( colormap, numberOfColors )</h3>
<div> <p>
colormap - optional argument that sets a colormap from predefined colormaps. Available colormaps are : "rainbow", "cooltowarm", "blackbody". colormap - optional argument that sets a colormap from predefined colormaps. Available colormaps are : "rainbow", "cooltowarm", "blackbody".
numberOfColors - optional argument that sets the number of colors used to represent the data array. numberOfColors - optional argument that sets the number of colors used to represent the data array.
</div> </p>
<h2>Properties</h2> <h2>Properties</h2>
<h3>[property:Float minV]</h3> <h3>[property:Float minV]</h3>
<div> <p>
The minimum value to be represented with the lookup table. Default is 0. The minimum value to be represented with the lookup table. Default is 0.
</div> </p>
<h3>[property:Float maxV]</h3> <h3>[property:Float maxV]</h3>
<div> <p>
The maximum value to be represented with the lookup table. Default is 1. The maximum value to be represented with the lookup table. Default is 1.
</div> </p>
<h3>.[legend]</h3> <h3>.[legend]</h3>
<div> <p>
The legend of the lookup table. The legend of the lookup table.
</div> </p>
<h2>Methods</h2> <h2>Methods</h2>
<h3>[method:null copy]( [param:Lut lut] ) [param:Lut this]</h3> <h3>[method:null copy]( [param:Lut lut] ) [param:Lut this]</h3>
<div> <p>
color — Lut to copy. color — Lut to copy.
</div> </p>
<div> <p>
Copies given lut. Copies given lut.
</div> </p>
<h3>.setLegendOn [parameters]</h3> <h3>.setLegendOn [parameters]</h3>
<div> <p>
parameters - { layout: value, position: { x: value, y: value, z: value }, dimensions: { width: value, height: value } } parameters - { layout: value, position: { x: value, y: value, z: value }, dimensions: { width: value, height: value } }
layout — Horizontal or vertical layout. Default is vertical.<br /> layout — Horizontal or vertical layout. Default is vertical.<br />
position — The position x,y,z of the legend.<br /> position — The position x,y,z of the legend.<br />
dimensions — The dimensions (width and height) of the legend.<br /> dimensions — The dimensions (width and height) of the legend.<br />
</div> </p>
<div> <p>
Sets this Lut with the legend on. Sets this Lut with the legend on.
</div> </p>
<h3>.setLegendOff</h3> <h3>.setLegendOff</h3>
<div> <p>
</div> </p>
<div> <p>
Sets this Lut with the legend off. Sets this Lut with the legend off.
</div> </p>
<h3>.setLegendLabels [parameters, callback]</h3> <h3>.setLegendLabels [parameters, callback]</h3>
<div> <p>
parameters - { fontsize: value, fontface: value, title: value, um: value, ticks: value, decimal: value, notation: value } parameters - { fontsize: value, fontface: value, title: value, um: value, ticks: value, decimal: value, notation: value }
fontsize — Font size to be used for labels.<br /> fontsize — Font size to be used for labels.<br />
fontface — Font type to be used for labels.<br /> fontface — Font type to be used for labels.<br />
...@@ -86,55 +86,55 @@ ...@@ -86,55 +86,55 @@
decimal — The number of decimals to be used for legend values.<br /> decimal — The number of decimals to be used for legend values.<br />
notation — Legend notation: standard (default) or scientific.<br /> notation — Legend notation: standard (default) or scientific.<br />
callback — An optional callback to be used to format the legend labels.<br /> callback — An optional callback to be used to format the legend labels.<br />
</div> </p>
<div> <p>
Sets the labels of the legend of this Lut. Sets the labels of the legend of this Lut.
</div> </p>
<h3>[method:Lut setminV]( [param:Float minV] )</h3> <h3>[method:Lut setminV]( [param:Float minV] )</h3>
<div> <p>
minV — The minimum value to be represented with the lookup table.<br /> minV — The minimum value to be represented with the lookup table.<br />
</div> </p>
<div> <p>
Sets this Lut with the minimum value to be represented. Sets this Lut with the minimum value to be represented.
</div> </p>
<h3>[method:Lut setmaxV]( [param:Float maxV] )</h3> <h3>[method:Lut setmaxV]( [param:Float maxV] )</h3>
<div> <p>
maxV — The maximum value to be represented with the lookup table.<br /> maxV — The maximum value to be represented with the lookup table.<br />
</div> </p>
<div> <p>
Sets this Lut with the maximum value to be represented. Sets this Lut with the maximum value to be represented.
</div> </p>
<h3>[method:Lut changeNumberOfColors]( [param:Float numberOfColors] )</h3> <h3>[method:Lut changeNumberOfColors]( [param:Float numberOfColors] )</h3>
<div> <p>
numberOfColors — The number of colors to be used to represent the data array.<br /> numberOfColors — The number of colors to be used to represent the data array.<br />
</div> </p>
<div> <p>
Sets this Lut with the number of colors to be used. Sets this Lut with the number of colors to be used.
</div> </p>
<h3>[method:Lut changeColorMap]( [param:Float colorMap] )</h3> <h3>[method:Lut changeColorMap]( [param:Float colorMap] )</h3>
<div> <p>
colorMap — The name of the color map to be used to represent the data array.<br /> colorMap — The name of the color map to be used to represent the data array.<br />
</div> </p>
<div> <p>
Sets this Lut with the colormap to be used. Sets this Lut with the colormap to be used.
</div> </p>
<h3>[method:Lut addColorMap]( colorMapName, arrayOfColors )</h3> <h3>[method:Lut addColorMap]( colorMapName, arrayOfColors )</h3>
<div> <p>
Insert a new color map into the set of available color maps. Insert a new color map into the set of available color maps.
</div> </p>
<h3>[method:Lut getColor]( value ) [param:Lut this]</h3> <h3>[method:Lut getColor]( value ) [param:Lut this]</h3>
<div> <p>
value -- the data value to be displayed as a color. value -- the data value to be displayed as a color.
</div> </p>
<div> <p>
Returns a [page:Color]. Returns a [page:Color].
</div> </p>
<h2>Source</h2> <h2>Source</h2>
......
...@@ -12,20 +12,20 @@ ...@@ -12,20 +12,20 @@
<h1>[name]</h1> <h1>[name]</h1>
<div class="desc">Create a material that can draw custom sprites using a 2d canvas.</div> <p class="desc">Create a material that can draw custom sprites using a 2d canvas.</p>
<h2>Constructor</h2> <h2>Constructor</h2>
<h3>[name]( [param:Object parameters] )</h3> <h3>[name]( [param:Object parameters] )</h3>
<div> <p>
parameters is an object that can be used to set up the default properties parameters is an object that can be used to set up the default properties
</div> </p>
<div> <p>
color - the color of the sprite<br/> color - the color of the sprite<br/>
program - the program used to draw the sprite program - the program used to draw the sprite
</div> </p>
<h2>Properties</h2> <h2>Properties</h2>
...@@ -33,22 +33,22 @@ ...@@ -33,22 +33,22 @@
<h3>[property:Color color]</h3> <h3>[property:Color color]</h3>
<div> <p>
The color of the sprite. The material will set up the color for the context before calling the material's program. The color of the sprite. The material will set up the color for the context before calling the material's program.
</div> </p>
<h2>Methods</h2> <h2>Methods</h2>
<h3>[method:null program]([param:CanvasRenderingContext2D context], [param:Color color])</h3> <h3>[method:null program]([param:CanvasRenderingContext2D context], [param:Color color])</h3>
<div> <p>
context -- The canvas context <br /> context -- The canvas context <br />
color -- The color of the sprite color -- The color of the sprite
</div> </p>
<div> <p>
Define a program that will use the context to draw the sprite. Define a program that will use the context to draw the sprite.
</div> </p>
<h2>Source</h2> <h2>Source</h2>
......
...@@ -10,18 +10,18 @@ ...@@ -10,18 +10,18 @@
<body> <body>
<h1>[name]</h1> <h1>[name]</h1>
<div class="desc"> <p class="desc">
Orbit controls allow the camera to orbit around a target.<br> Orbit controls allow the camera to orbit around a target.<br>
To use this, as with all files in the /examples directory, you will have to To use this, as with all files in the /examples directory, you will have to
include the file seperately in your HTML. include the file seperately in your HTML.
</div> </p>
<h2>Example</h2> <h2>Example</h2>
<div>[example:misc_controls_orbit misc / controls / orbit ]</div> <p>[example:misc_controls_orbit misc / controls / orbit ]</p>
<code> <code>
var renderer = new THREE.WebGLRenderer(); var renderer = new THREE.WebGLRenderer();
...@@ -40,12 +40,12 @@ controls.update(); ...@@ -40,12 +40,12 @@ controls.update();
function animate() { function animate() {
requestAnimationFrame( animate ); requestAnimationFrame( animate );
// required if controls.enableDamping or controls.autoRotate are set to true // required if controls.enableDamping or controls.autoRotate are set to true
controls.update(); controls.update();
renderer.render( scene, camera ); renderer.render( scene, camera );
} }
</code> </code>
...@@ -53,231 +53,231 @@ function animate() { ...@@ -53,231 +53,231 @@ function animate() {
<h2>Constructor</h2> <h2>Constructor</h2>
<h3>[name]( [param:Camera object], [param:HTMLDOMElement domElement] )</h3> <h3>[name]( [param:Camera object], [param:HTMLDOMElement domElement] )</h3>
<div> <p>
[page:Camera object]: (required) The camera to be controlled.<br><br> [page:Camera object]: (required) The camera to be controlled.<br><br>
[page:HTMLDOMElement domElement]: (optional) The HTML element used for event listeners. By default this is the whole document, [page:HTMLDOMElement domElement]: (optional) The HTML element used for event listeners. By default this is the whole document,
however if you only want to the controls to work over a specific element (e.g. the canvas) you can specify that here. however if you only want to the controls to work over a specific element (e.g. the canvas) you can specify that here.
</div> </p>
<h2>Properties</h2> <h2>Properties</h2>
<h3>[property:Boolean autoRotate]</h3> <h3>[property:Boolean autoRotate]</h3>
<div> <p>
Set to true to automatically rotate around the target.<br> Note that if this is enabled, you must call [page:.update] Set to true to automatically rotate around the target.<br> Note that if this is enabled, you must call [page:.update]
() in your animation loop. () in your animation loop.
</div> </p>
<h3>[property:Float autoRotateSpeed]</h3> <h3>[property:Float autoRotateSpeed]</h3>
<div> <p>
How fast to rotate around the target if [property:Boolean autoRotate] is true. Default is 2.0, which equates to 30 seconds How fast to rotate around the target if [property:Boolean autoRotate] is true. Default is 2.0, which equates to 30 seconds
per rotation at 60fps.<br> Note that if [property:Boolean autoRotate] is enabled, you must call [page:.update] per rotation at 60fps.<br> Note that if [property:Boolean autoRotate] is enabled, you must call [page:.update]
() in your animation loop. () in your animation loop.
</div> </p>
<h3> <h3>
[property:Float dampingFactor]</h3> [property:Float dampingFactor]</h3>
<div> <p>
The damping inertia used if [property:Boolean enableDamping] is set to true.<br> Note that for this to work, you must The damping inertia used if [property:Boolean enableDamping] is set to true.<br> Note that for this to work, you must
call [page:.update] () in your animation loop. call [page:.update] () in your animation loop.
</div> </p>
<h3>[property:HTMLDOMElement domElement]</h3> <h3>[property:HTMLDOMElement domElement]</h3>
<div> <p>
The HTMLDOMElement used to listen for mouse / touch events. This must be passed in the constructor; changing it here will The HTMLDOMElement used to listen for mouse / touch events. This must be passed in the constructor; changing it here will
not set up new event listeners. Default is the whole document. not set up new event listeners. Default is the whole document.
</div> </p>
<h3>[property:Boolean enabled]</h3> <h3>[property:Boolean enabled]</h3>
<div> <p>
Whether or not the controls are enabled. Whether or not the controls are enabled.
</div> </p>
<h3>[property:Boolean enableDamping]</h3> <h3>[property:Boolean enableDamping]</h3>
<div> <p>
Set to true to enable damping (inertia), which can be used to give a sense of weight to the controls. Default is false.<br> Set to true to enable damping (inertia), which can be used to give a sense of weight to the controls. Default is false.<br>
Note that if this is enabled, you must call [page:.update] () in your animation loop. Note that if this is enabled, you must call [page:.update] () in your animation loop.
</div> </p>
<h3>[property:Boolean enableKeys]</h3> <h3>[property:Boolean enableKeys]</h3>
<div> <p>
Enable or disable the use of keyboard controls. Enable or disable the use of keyboard controls.
</div> </p>
<h3>[property:Boolean enablePan]</h3> <h3>[property:Boolean enablePan]</h3>
<div> <p>
Enable or disable camera panning. Default is true. Enable or disable camera panning. Default is true.
</div> </p>
<h3>[property:Boolean enableRotate]</h3> <h3>[property:Boolean enableRotate]</h3>
<div> <p>
Enable or disable horizontal and vertical rotation of the camera. Default is true.<br> Enable or disable horizontal and vertical rotation of the camera. Default is true.<br>
Note that it is possible to disable a single axis by setting the min and max of the Note that it is possible to disable a single axis by setting the min and max of the
[page:.minPolarAngle polar angle] or [page:.minAzimuthAngle azimuth angle] to the same value, [page:.minPolarAngle polar angle] or [page:.minAzimuthAngle azimuth angle] to the same value,
which will cause the vertical or horizontal rotation to be fixed at that value. which will cause the vertical or horizontal rotation to be fixed at that value.
</div> </p>
<h3>[property:Boolean enableZoom]</h3> <h3>[property:Boolean enableZoom]</h3>
<div> <p>
Enable or disable zooming (dollying) of the camera. Enable or disable zooming (dollying) of the camera.
</div> </p>
<h3>[property:Float keyPanSpeed]</h3> <h3>[property:Float keyPanSpeed]</h3>
<div> <p>
How fast to pan the camera when the keyboard is used. Default is 7.0 pixels per keypress. How fast to pan the camera when the keyboard is used. Default is 7.0 pixels per keypress.
</div> </p>
<h3>[property:Object keys]</h3> <h3>[property:Object keys]</h3>
<div> <p>
This object contains references to the keycodes for controlling camera panning. Default is the 4 arrow keys. This object contains references to the keycodes for controlling camera panning. Default is the 4 arrow keys.
<code> <code>
controls.keys = { controls.keys = {
LEFT: 37, //left arrow LEFT: 37, //left arrow
UP: 38, // up arrow UP: 38, // up arrow
RIGHT: 39, // right arrow RIGHT: 39, // right arrow
BOTTOM: 40 // down arrow BOTTOM: 40 // down arrow
} }
</code> See [link:https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/keyCode this page] for a full </code> See [link:https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/keyCode this page] for a full
list of keycodes. list of keycodes.
</div> </p>
<h3>[property:Float maxAzimuthAngle]</h3> <h3>[property:Float maxAzimuthAngle]</h3>
<div> <p>
How far you can orbit horizontally, upper limit. Range is - Math.PI to Math.PI ( or Infinity for no limit ) and default is How far you can orbit horizontally, upper limit. Range is - Math.PI to Math.PI ( or Infinity for no limit ) and default is
Infinity; Infinity;
</div> </p>
<h3>[property:Float maxDistance]</h3> <h3>[property:Float maxDistance]</h3>
<div> <p>
How far you can dolly out ( [page:PerspectiveCamera] only ). Default is Infinity. How far you can dolly out ( [page:PerspectiveCamera] only ). Default is Infinity.
</div> </p>
<h3>[property:Float maxPolarAngle]</h3> <h3>[property:Float maxPolarAngle]</h3>
<div> <p>
How far you can orbit vertically, upper limit. Range is 0 to Math.PI radians, and default is Math.PI. How far you can orbit vertically, upper limit. Range is 0 to Math.PI radians, and default is Math.PI.
</div> </p>
<h3>[property:Float maxZoom]</h3> <h3>[property:Float maxZoom]</h3>
<div> <p>
How far you can zoom out ( [page:OrthographicCamera] only ). Default is Infinity. How far you can zoom out ( [page:OrthographicCamera] only ). Default is Infinity.
</div> </p>
<h3>[property:Float minAzimuthAngle]</h3> <h3>[property:Float minAzimuthAngle]</h3>
<div> <p>
How far you can orbit horizontally, lower limit. Range is - Math.PI to Math.PI ( or - Infinity for no limit ) and default How far you can orbit horizontally, lower limit. Range is - Math.PI to Math.PI ( or - Infinity for no limit ) and default
is - Infinity; is - Infinity;
</div> </p>
<h3>[property:Float minDistance]</h3> <h3>[property:Float minDistance]</h3>
<div> <p>
How far you can dolly in ( [page:PerspectiveCamera] only ). Default is 0. How far you can dolly in ( [page:PerspectiveCamera] only ). Default is 0.
</div> </p>
<h3>[property:Float minPolarAngle]</h3> <h3>[property:Float minPolarAngle]</h3>
<div> <p>
How far you can orbit vertically, lower limit. Range is 0 to Math.PI radians, and default is 0. How far you can orbit vertically, lower limit. Range is 0 to Math.PI radians, and default is 0.
</div> </p>
<h3>[property:Float minZoom]</h3> <h3>[property:Float minZoom]</h3>
<div> <p>
How far you can zoom in ( [page:OrthographicCamera] only ). Default is 0. How far you can zoom in ( [page:OrthographicCamera] only ). Default is 0.
</div> </p>
<h3> <h3>
[property:Object mouseButtons]</h3> [property:Object mouseButtons]</h3>
<div> <p>
This object contains references to the mouse buttons used for the controls. This object contains references to the mouse buttons used for the controls.
<code> <code>
controls.mouseButtons = { controls.mouseButtons = {
ORBIT: THREE.MOUSE.LEFT, ORBIT: THREE.MOUSE.LEFT,
ZOOM: THREE.MOUSE.MIDDLE, ZOOM: THREE.MOUSE.MIDDLE,
PAN: THREE.MOUSE.RIGHT PAN: THREE.MOUSE.RIGHT
} }
</code> </code>
</div> </p>
<h3>[property:Camera object]</h3> <h3>[property:Camera object]</h3>
<div> <p>
The camera being controlled. The camera being controlled.
</div> </p>
<h3>[property:Float panSpeed]</h3> <h3>[property:Float panSpeed]</h3>
<div> <p>
Speed of panning. Default is 1. Speed of panning. Default is 1.
</div> </p>
<h3>[property:Vector3 position0]</h3> <h3>[property:Vector3 position0]</h3>
<div> <p>
Used internally by the [method:saveState] and [method:reset] methods. Used internally by the [method:saveState] and [method:reset] methods.
</div> </p>
<h3>[property:Float rotateSpeed]</h3> <h3>[property:Float rotateSpeed]</h3>
<div> <p>
Speed of rotation. Default is 1. Speed of rotation. Default is 1.
</div> </p>
<h3>[property:Boolean screenSpacePanning]</h3> <h3>[property:Boolean screenSpacePanning]</h3>
<div> <p>
Defines how the camera's position is translated when panning. If true, the camera pans in screen space. Defines how the camera's position is translated when panning. If true, the camera pans in screen space.
Otherwise, the camera pans in the plane orthogonal to the camera's up direction. Default is false. Otherwise, the camera pans in the plane orthogonal to the camera's up direction. Default is false.
</div> </p>
<h3>[property:Vector3 target0]</h3> <h3>[property:Vector3 target0]</h3>
<div> <p>
Used internally by the [method:saveState] and [method:reset] methods. Used internally by the [method:saveState] and [method:reset] methods.
</div> </p>
<h3>[property:Vector3 target]</h3> <h3>[property:Vector3 target]</h3>
<div> <p>
The focus point of the controls, the [page:.object] orbits around this. It can be updated manually at any point to change The focus point of the controls, the [page:.object] orbits around this. It can be updated manually at any point to change
the focus of the controls. the focus of the controls.
</div> </p>
<h3>[property:Float zoom0]</h3> <h3>[property:Float zoom0]</h3>
<div> <p>
Used internally by the [method:saveState] and [method:reset] methods. Used internally by the [method:saveState] and [method:reset] methods.
</div> </p>
<h3>[property:Float zoomSpeed]</h3> <h3>[property:Float zoomSpeed]</h3>
<div> <p>
Speed of zooming / dollying. Default is 1. Speed of zooming / dollying. Default is 1.
</div> </p>
<h2>Methods</h2> <h2>Methods</h2>
<h3>[method:null dispose] ()</h3> <h3>[method:null dispose] ()</h3>
<div> <p>
Remove all the event listeners. Remove all the event listeners.
</div> </p>
<h3>[method:radians getAzimuthalAngle] ()</h3> <h3>[method:radians getAzimuthalAngle] ()</h3>
<div> <p>
Get the current horizontal rotation, in radians. Get the current horizontal rotation, in radians.
</div> </p>
<h3>[method:radians getPolarAngle] ()</h3> <h3>[method:radians getPolarAngle] ()</h3>
<div> <p>
Get the current vertical rotation, in radians. Get the current vertical rotation, in radians.
</div> </p>
<h3>[method:null reset] ()</h3> <h3>[method:null reset] ()</h3>
<div> <p>
Reset the controls to their state from either the last time the [page:.saveState] was called, or the initial state. Reset the controls to their state from either the last time the [page:.saveState] was called, or the initial state.
</div> </p>
<h3>[method:null saveState] ()</h3> <h3>[method:null saveState] ()</h3>
<div> <p>
Save the current state of the controls. This can later be recovered with [page:.reset]. Save the current state of the controls. This can later be recovered with [page:.reset].
</div> </p>
<h3>[method:false update] ()</h3> <h3>[method:false update] ()</h3>
<div> <p>
Update the controls. Must be called after any manual changes to the camera's transform, Update the controls. Must be called after any manual changes to the camera's transform,
or in the update loop if [page:.autoRotate] or [page:.enableDamping] are set. or in the update loop if [page:.autoRotate] or [page:.enableDamping] are set.
</div> </p>
<h2>Source</h2> <h2>Source</h2>
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
<body> <body>
<h1>[name]</h1> <h1>[name]</h1>
<div class="desc"> <p class="desc">
An exporter for *glTF* 2.0. An exporter for *glTF* 2.0.
<br /><br /> <br /><br />
<a href="https://www.khronos.org/gltf">glTF</a> (GL Transmission Format) is an <a href="https://www.khronos.org/gltf">glTF</a> (GL Transmission Format) is an
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
or binary (.glb) format. External files store textures (.jpg, .png) and additional binary or binary (.glb) format. External files store textures (.jpg, .png) and additional binary
data (.bin). A glTF asset may deliver one or more scenes, including meshes, materials, data (.bin). A glTF asset may deliver one or more scenes, including meshes, materials,
textures, skins, skeletons, morph targets, animations, lights, and/or cameras. textures, skins, skeletons, morph targets, animations, lights, and/or cameras.
</div> </p>
<h2>Example</h2> <h2>Example</h2>
...@@ -39,16 +39,16 @@ ...@@ -39,16 +39,16 @@
<h2>Constructor</h2> <h2>Constructor</h2>
<h3>[name]()</h3> <h3>[name]()</h3>
<div> <p>
</div> </p>
<div> <p>
Creates a new [name]. Creates a new [name].
</div> </p>
<h2>Methods</h2> <h2>Methods</h2>
<h3>[method:null parse]( [param:Object3D input], [param:Function onCompleted], [param:Object options] )</h3> <h3>[method:null parse]( [param:Object3D input], [param:Function onCompleted], [param:Object options] )</h3>
<div> <p>
[page:Object input] — Scenes or objects to export. Valid options:<br /> [page:Object input] — Scenes or objects to export. Valid options:<br />
<ul> <ul>
<li> <li>
...@@ -85,10 +85,10 @@ ...@@ -85,10 +85,10 @@
<li>forceIndices - bool. Generate indices for non-index geometry and export with them. Default is false.</li> <li>forceIndices - bool. Generate indices for non-index geometry and export with them. Default is false.</li>
<li>forcePowerOfTwoTextures - bool. Export with images resized to POT size. This option works only if embedImages is true. Default is false.</li> <li>forcePowerOfTwoTextures - bool. Export with images resized to POT size. This option works only if embedImages is true. Default is false.</li>
</ul> </ul>
</div> </p>
<div> <p>
Generates a .gltf (JSON) or .glb (binary) output from the input (Scenes or Objects) Generates a .gltf (JSON) or .glb (binary) output from the input (Scenes or Objects)
</div> </p>
<h2>Source</h2> <h2>Source</h2>
......
...@@ -13,8 +13,8 @@ ...@@ -13,8 +13,8 @@
<h1>[name]</h1> <h1>[name]</h1>
<div class="desc">[name] can be used to generate a convex hull for a given array of 3D points. <p class="desc">[name] can be used to generate a convex hull for a given array of 3D points.
The average time complexity for this task is considered to be O(nlog(n)).</div> The average time complexity for this task is considered to be O(nlog(n)).</p>
<script> <script>
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
<h2>Example</h2> <h2>Example</h2>
<div>[example:webgl_geometry_convex geometry / convex ]</div> <p>[example:webgl_geometry_convex geometry / convex ]</p>
<code>var geometry = new THREE.ConvexBufferGeometry( points ); <code>var geometry = new THREE.ConvexBufferGeometry( points );
var material = new THREE.MeshBasicMaterial( {color: 0x00ff00} ); var material = new THREE.MeshBasicMaterial( {color: 0x00ff00} );
...@@ -45,9 +45,9 @@ ...@@ -45,9 +45,9 @@
<h2>Constructor</h2> <h2>Constructor</h2>
<h3>[name]( [param:Array points] )</h3> <h3>[name]( [param:Array points] )</h3>
<div> <p>
points — Array of [page:Vector3 Vector3s] that the resulting convex hull will contain. points — Array of [page:Vector3 Vector3s] that the resulting convex hull will contain.
</div> </p>
<h2>Source</h2> <h2>Source</h2>
......
...@@ -12,8 +12,8 @@ ...@@ -12,8 +12,8 @@
<h1>[name]</h1> <h1>[name]</h1>
<div class="desc">[name] can be used to generate a convex hull for a given array of 3D points. <p class="desc">[name] can be used to generate a convex hull for a given array of 3D points.
The average time complexity for this task is considered to be O(nlog(n)).</div> The average time complexity for this task is considered to be O(nlog(n)).</p>
<script> <script>
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
<h2>Example</h2> <h2>Example</h2>
<div>[example:webgl_geometry_convex geometry / convex ]</div> <p>[example:webgl_geometry_convex geometry / convex ]</p>
<code>var geometry = new THREE.ConvexGeometry( points ); <code>var geometry = new THREE.ConvexGeometry( points );
var material = new THREE.MeshBasicMaterial( {color: 0x00ff00} ); var material = new THREE.MeshBasicMaterial( {color: 0x00ff00} );
...@@ -44,9 +44,9 @@ ...@@ -44,9 +44,9 @@
<h2>Constructor</h2> <h2>Constructor</h2>
<h3>[name]( [param:Array points] )</h3> <h3>[name]( [param:Array points] )</h3>
<div> <p>
points — Array of [page:Vector3 Vector3s] that the resulting convex hull will contain. points — Array of [page:Vector3 Vector3s] that the resulting convex hull will contain.
</div> </p>
<h2>Source</h2> <h2>Source</h2>
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
<h1>[name]</h1> <h1>[name]</h1>
<div class="desc">[name] can be used to create a decal mesh that serves different kinds of purposes e.g. adding unique details to models, performing dynamic visual environmental changes or covering seams.</div> <p class="desc">[name] can be used to create a decal mesh that serves different kinds of purposes e.g. adding unique details to models, performing dynamic visual environmental changes or covering seams.</p>
<script> <script>
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
<h2>Example</h2> <h2>Example</h2>
<div>[example:webgl_decals decals ]</div> <p>[example:webgl_decals decals ]</p>
<code>var geometry = new THREE.DecalGeometry( mesh, position, orientation, size ); <code>var geometry = new THREE.DecalGeometry( mesh, position, orientation, size );
var material = new THREE.MeshBasicMaterial( { color: 0x00ff00 } ); var material = new THREE.MeshBasicMaterial( { color: 0x00ff00 } );
...@@ -43,12 +43,12 @@ ...@@ -43,12 +43,12 @@
<h2>Constructor</h2> <h2>Constructor</h2>
<h3>[name]( [param:Mesh mesh], [param:Vector3 position], [param:Euler orientation], [param:Vector3 size] )</h3> <h3>[name]( [param:Mesh mesh], [param:Vector3 position], [param:Euler orientation], [param:Vector3 size] )</h3>
<div> <p>
mesh — Any mesh object.<br /> mesh — Any mesh object.<br />
position — Position of the decal projector.<br /> position — Position of the decal projector.<br />
orientation — Orientation of the decal projector.<br /> orientation — Orientation of the decal projector.<br />
size — Size of the decal projector. size — Size of the decal projector.
</div> </p>
<h2>Source</h2> <h2>Source</h2>
......
...@@ -10,10 +10,10 @@ ...@@ -10,10 +10,10 @@
<body> <body>
<h1>[name]</h1> <h1>[name]</h1>
<div class="desc">A loader for loading a <em>.babylon</em> resource. <br /> <p class="desc">A loader for loading a <em>.babylon</em> resource. <br />
The <a href="https://doc.babylonjs.com/generals/file_format_map_(.babylon)"> .babylon </a> file format used by The <a href="https://doc.babylonjs.com/generals/file_format_map_(.babylon)"> .babylon </a> file format used by
<a href="https://www.babylonjs.com/">Babylon.js</a>. <a href="https://www.babylonjs.com/">Babylon.js</a>.
</div> </p>
<h2>Example</h2> <h2>Example</h2>
...@@ -51,12 +51,12 @@ ...@@ -51,12 +51,12 @@
<h2>Constructor</h2> <h2>Constructor</h2>
<h3>[name]( [param:LoadingManager manager] )</h3> <h3>[name]( [param:LoadingManager manager] )</h3>
<div> <p>
[page:LoadingManager manager] — The [page:LoadingManager loadingManager] for the loader to use. Default is [page:LoadingManager THREE.DefaultLoadingManager]. [page:LoadingManager manager] — The [page:LoadingManager loadingManager] for the loader to use. Default is [page:LoadingManager THREE.DefaultLoadingManager].
</div> </p>
<div> <p>
Creates a new [name]. Creates a new [name].
</div> </p>
<h2>Properties</h2> <h2>Properties</h2>
...@@ -64,25 +64,25 @@ ...@@ -64,25 +64,25 @@
<h2>Methods</h2> <h2>Methods</h2>
<h3>[method:null load]( [param:String url], [param:Function onLoad], [param:Function onProgress], [param:Function onError] )</h3> <h3>[method:null load]( [param:String url], [param:Function onLoad], [param:Function onProgress], [param:Function onError] )</h3>
<div> <p>
[page:String url] — A string containing the path/URL of the <em>.babylon</em> file.<br /> [page:String url] — A string containing the path/URL of the <em>.babylon</em> file.<br />
[page:function onLoad] — (optional) A function to be called after loading is successfully completed. The function receives the loaded [page:Object3D] as an argument.<br /> [page:function onLoad] — (optional) A function to be called after loading is successfully completed. The function receives the loaded [page:Object3D] as an argument.<br />
[page:function onProgress] — (optional) A function to be called while the loading is in progress. The argument will be the XMLHttpRequest instance, which contains [page:Integer total] and [page:Integer loaded] bytes.<br /> [page:function onProgress] — (optional) A function to be called while the loading is in progress. The argument will be the XMLHttpRequest instance, which contains [page:Integer total] and [page:Integer loaded] bytes.<br />
[page:function onError] — (optional) A function to be called if an error occurs during loading. The function receives the error as an argument.<br /> [page:function onError] — (optional) A function to be called if an error occurs during loading. The function receives the error as an argument.<br />
</div> </p>
<div> <p>
Begin loading from url and call onLoad with the parsed response content. Begin loading from url and call onLoad with the parsed response content.
</div> </p>
<h3>[method:Object3D parse]( [param:Object json] )</h3> <h3>[method:Object3D parse]( [param:Object json] )</h3>
<div> <p>
[page:Object json] — The <em>JSON</em> structure to parse. [page:Object json] — The <em>JSON</em> structure to parse.
</div> </p>
<div> <p>
Parse a <em>JSON</em> structure and return an [page:Object3D object] or a [page:Scene scene].<br /> Parse a <em>JSON</em> structure and return an [page:Object3D object] or a [page:Scene scene].<br />
Found objects are converted to [page:Mesh] with a [page:BufferGeometry] and a default [page:MeshPhongMaterial].<br /> Found objects are converted to [page:Mesh] with a [page:BufferGeometry] and a default [page:MeshPhongMaterial].<br />
Lights are parsed accordingly. Lights are parsed accordingly.
</div> </p>
<h2>Source</h2> <h2>Source</h2>
......
...@@ -11,21 +11,21 @@ ...@@ -11,21 +11,21 @@
[page:Loader] &rarr; [page:Loader] &rarr;
<h1>[name]</h1> <h1>[name]</h1>
<div class="desc"> A loader for loading <em>glTF 2.0</em> resource. <br /> <p class="desc"> A loader for <em>glTF 2.0</em> resources. <br /><br />
<a href="https://www.khronos.org/gltf">glTF</a> (GL Transmission Format) is an <a href="https://www.khronos.org/gltf">glTF</a> (GL Transmission Format) is an
<a href="https://github.com/KhronosGroup/glTF/tree/master/specification/2.0">open format specification</a> <a href="https://github.com/KhronosGroup/glTF/tree/master/specification/2.0">open format specification</a>
for efficient delivery and loading of 3D content. Assets may be provided either in JSON (.gltf) for efficient delivery and loading of 3D content. Assets may be provided either in JSON (.gltf)
or binary (.glb) format. External files store textures (.jpg, .png) and additional binary or binary (.glb) format. External files store textures (.jpg, .png) and additional binary
data (.bin). A glTF asset may deliver one or more scenes, including meshes, materials, data (.bin). A glTF asset may deliver one or more scenes, including meshes, materials,
textures, skins, skeletons, morph targets, animations, lights, and/or cameras. textures, skins, skeletons, morph targets, animations, lights, and/or cameras.
</div> </p>
<h2>Extensions</h2> <h2>Extensions</h2>
<div> <p>
GLTFLoader supports the following GLTFLoader supports the following
<a target="_blank" href="https://github.com/KhronosGroup/glTF/tree/master/extensions/">glTF 2.0 extensions</a>: <a target="_blank" href="https://github.com/KhronosGroup/glTF/tree/master/extensions/">glTF 2.0 extensions</a>:
</div> </p>
<ul> <ul>
<li>KHR_draco_mesh_compression</li> <li>KHR_draco_mesh_compression</li>
...@@ -90,12 +90,12 @@ ...@@ -90,12 +90,12 @@
<h2>Constructor</h2> <h2>Constructor</h2>
<h3>[name]( [param:LoadingManager manager] )</h3> <h3>[name]( [param:LoadingManager manager] )</h3>
<div> <p>
[page:LoadingManager manager] — The [page:LoadingManager loadingManager] for the loader to use. Default is [page:LoadingManager THREE.DefaultLoadingManager]. [page:LoadingManager manager] — The [page:LoadingManager loadingManager] for the loader to use. Default is [page:LoadingManager THREE.DefaultLoadingManager].
</div> </p>
<div> <p>
Creates a new [name]. Creates a new [name].
</div> </p>
<h2>Properties</h2> <h2>Properties</h2>
...@@ -103,47 +103,47 @@ ...@@ -103,47 +103,47 @@
<h2>Methods</h2> <h2>Methods</h2>
<h3>[method:null load]( [param:String url], [param:Function onLoad], [param:Function onProgress], [param:Function onError] )</h3> <h3>[method:null load]( [param:String url], [param:Function onLoad], [param:Function onProgress], [param:Function onError] )</h3>
<div> <p>
[page:String url] — A string containing the path/URL of the <em>.gltf</em> or <em>.glb</em> file.<br /> [page:String url] — A string containing the path/URL of the <em>.gltf</em> or <em>.glb</em> file.<br />
[page:Function onLoad] — A function to be called after the loading is successfully completed. The function receives the loaded JSON response returned from [page:Function parse].<br /> [page:Function onLoad] — A function to be called after the loading is successfully completed. The function receives the loaded JSON response returned from [page:Function parse].<br />
[page:Function onProgress] — (optional) A function to be called while the loading is in progress. The argument will be the XMLHttpRequest instance, that contains .[page:Integer total] and .[page:Integer loaded] bytes.<br /> [page:Function onProgress] — (optional) A function to be called while the loading is in progress. The argument will be the XMLHttpRequest instance, that contains .[page:Integer total] and .[page:Integer loaded] bytes.<br />
[page:Function onError] — (optional) A function to be called if an error occurs during loading. The function receives error as an argument.<br /> [page:Function onError] — (optional) A function to be called if an error occurs during loading. The function receives error as an argument.<br />
</div> </p>
<div> <p>
Begin loading from url and call the callback function with the parsed response content. Begin loading from url and call the callback function with the parsed response content.
</div> </p>
<h3>[method:null setPath]( [param:String path] )</h3> <h3>[method:null setPath]( [param:String path] )</h3>
<div> <p>
[page:String path] — Base path for loading additional resources e.g. textures and .bin data. [page:String path] — Base path for loading additional resources e.g. textures and .bin data.
</div> </p>
<div> <p>
Set the base path for additional resources. Set the base path for additional resources.
</div> </p>
<h3>[method:null setCrossOrigin]( [param:String value] )</h3> <h3>[method:null setCrossOrigin]( [param:String value] )</h3>
<div> <p>
[page:String value] — The crossOrigin string to implement CORS for loading the url from a different domain that allows CORS. [page:String value] — The crossOrigin string to implement CORS for loading the url from a different domain that allows CORS.
</div> </p>
<h3>[method:null setDRACOLoader]( [param:DRACOLoader dracoLoader] )</h3> <h3>[method:null setDRACOLoader]( [param:DRACOLoader dracoLoader] )</h3>
<div> <p>
[page:DRACOLoader dracoLoader] — Instance of THREE.DRACOLoader, to be used for decoding assets compressed with the KHR_draco_mesh_compression extension. [page:DRACOLoader dracoLoader] — Instance of THREE.DRACOLoader, to be used for decoding assets compressed with the KHR_draco_mesh_compression extension.
</div> </p>
<div> <p>
Refer to this [link:https://github.com/mrdoob/three.js/tree/dev/examples/js/libs/draco#readme readme] for the details of Draco and its decoder. Refer to this [link:https://github.com/mrdoob/three.js/tree/dev/examples/js/libs/draco#readme readme] for the details of Draco and its decoder.
</div> </p>
<h3>[method:null parse]( [param:ArrayBuffer data], [param:String path], [param:Function onLoad], [param:Function onError] )</h3> <h3>[method:null parse]( [param:ArrayBuffer data], [param:String path], [param:Function onLoad], [param:Function onError] )</h3>
<div> <p>
[page:ArrayBuffer data] — glTF asset to parse, as an ArrayBuffer or <em>JSON</em> string.<br /> [page:ArrayBuffer data] — glTF asset to parse, as an ArrayBuffer or <em>JSON</em> string.<br />
[page:String path] — The base path from which to find subsequent glTF resources such as textures and .bin data files.<br /> [page:String path] — The base path from which to find subsequent glTF resources such as textures and .bin data files.<br />
[page:Function onLoad] — A function to be called when parse completes.<br /> [page:Function onLoad] — A function to be called when parse completes.<br />
[page:Function onError] — (optional) A function to be called if an error occurs during parsing. The function receives error as an argument.<br /> [page:Function onError] — (optional) A function to be called if an error occurs during parsing. The function receives error as an argument.<br />
</div> </p>
<div> <p>
Parse a glTF-based ArrayBuffer or <em>JSON</em> String and fire [page:Function onLoad] callback when complete. The argument to [page:Function onLoad] will be an [page:object] that contains loaded parts: .[page:Scene scene], .[page:Array scenes], .[page:Array cameras], .[page:Array animations], and .[page:Object asset]. Parse a glTF-based ArrayBuffer or <em>JSON</em> String and fire [page:Function onLoad] callback when complete. The argument to [page:Function onLoad] will be an [page:object] that contains loaded parts: .[page:Scene scene], .[page:Array scenes], .[page:Array cameras], .[page:Array animations], and .[page:Object asset].
</div> </p>
<h2>Source</h2> <h2>Source</h2>
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
<h1>[name]</h1> <h1>[name]</h1>
<div class="desc">Supporting classes for file loaders and web worker based loaders.</div> <p class="desc">Supporting classes for file loaders and web worker based loaders.</p>
<h2>Sub-Classes</h2> <h2>Sub-Classes</h2>
[page:LoaderSupport.Builder]<br> [page:LoaderSupport.Builder]<br>
...@@ -36,76 +36,76 @@ ...@@ -36,76 +36,76 @@
<h2>Constructor</h2> <h2>Constructor</h2>
<h3>Builder()</h3> <h3>Builder()</h3>
<div> <p>
Builds one or many [page:Mesh] from one raw set of Arraybuffers, materialGroup descriptions and further parameters. Builds one or many [page:Mesh] from one raw set of Arraybuffers, materialGroup descriptions and further parameters.
Supports vertex, vertexColor, normal, uv and index buffers. Supports vertex, vertexColor, normal, uv and index buffers.
</div> </p>
<h2>Methods</h2> <h2>Methods</h2>
<h3>[method:null setLogging] ( [param:Boolean enabled], [param:Boolean debug] )</h3> <h3>[method:null setLogging] ( [param:Boolean enabled], [param:Boolean debug] )</h3>
<div> <p>
[page:Boolean enabled] True or false.<br> [page:Boolean enabled] True or false.<br>
[page:Boolean debug] True or false. [page:Boolean debug] True or false.
</div> </p>
<div> <p>
Enable or disable logging in general (except warn and error), plus enable or disable debug logging. Enable or disable logging in general (except warn and error), plus enable or disable debug logging.
</div> </p>
<h3>[method:null init] ()</h3> <h3>[method:null init] ()</h3>
<div> <p>
Initializes the Builder (currently only default material initialisation). Initializes the Builder (currently only default material initialisation).
</div> </p>
<h3>[method:null setMaterials] ( Array of [param:Material materials] )</h3> <h3>[method:null setMaterials] ( Array of [param:Material materials] )</h3>
<div> <p>
Array of [page:Material materials] - Array of [page:Material Materials] Array of [page:Material materials] - Array of [page:Material Materials]
</div> </p>
<div> <p>
Set materials loaded by any supplier of an Array of [page:Material Materials]. Set materials loaded by any supplier of an Array of [page:Material Materials].
</div> </p>
<h3>[method:Array processPayload] ( Object payload )</h3> <h3>[method:Array processPayload] ( Object payload )</h3>
<div> <p>
[page:Object payload] - Raw Mesh or Material descriptions. [page:Object payload] - Raw Mesh or Material descriptions.
</div> </p>
<div> <p>
Delegates processing of the payload (mesh building or material update) to the corresponding functions (BW-compatibility). Delegates processing of the payload (mesh building or material update) to the corresponding functions (BW-compatibility).
</div> </p>
<h3>[method:Array buildMeshes] ( Object meshPayload )</h3> <h3>[method:Array buildMeshes] ( Object meshPayload )</h3>
<div> <p>
[page:Object meshPayload] - Raw mesh description (buffers, params, materials) used to build one to many meshes. [page:Object meshPayload] - Raw mesh description (buffers, params, materials) used to build one to many meshes.
</div> </p>
<div> <p>
Builds one or multiple meshes from the data described in the payload (buffers, params, material info). Builds one or multiple meshes from the data described in the payload (buffers, params, material info).
</div> </p>
<h3>[method:null updateMaterials] ( Object materialPayload )</h3> <h3>[method:null updateMaterials] ( Object materialPayload )</h3>
<div> <p>
[page:Object materialPayload] - Material update instructions [page:Object materialPayload] - Material update instructions
</div> </p>
<div> <p>
Updates the materials with contained material objects (sync) or from alteration instructions (async). Updates the materials with contained material objects (sync) or from alteration instructions (async).
</div> </p>
<h3>[method:Object getMaterialsJSON] ()</h3> <h3>[method:Object getMaterialsJSON] ()</h3>
<div> <p>
Returns the mapping object of material name and corresponding jsonified material. Returns the mapping object of material name and corresponding jsonified material.
</div> </p>
<h3>[method:Object getMaterials] ()</h3> <h3>[method:Object getMaterials] ()</h3>
<div> <p>
Returns the mapping object of material name and corresponding material. Returns the mapping object of material name and corresponding material.
</div> </p>
<br> <br>
<br> <br>
...@@ -114,36 +114,36 @@ ...@@ -114,36 +114,36 @@
<h2>Constructor</h2> <h2>Constructor</h2>
<h3>LoadedMeshUserOverride( [param:Boolean disregardMesh], [param:BufferGeometry bufferGeometry] )</h3> <h3>LoadedMeshUserOverride( [param:Boolean disregardMesh], [param:BufferGeometry bufferGeometry] )</h3>
<div> <p>
[page:Boolean disregardMesh] - Tell implementation to completely disregard this mesh<br> [page:Boolean disregardMesh] - Tell implementation to completely disregard this mesh<br>
[page:Boolean alteredMesh] - Tell implementation that mesh(es) have been altered or added [page:Boolean alteredMesh] - Tell implementation that mesh(es) have been altered or added
</div> </p>
<div> <p>
Object to return by callback onMeshAlter. Used to disregard a certain mesh or to return one to many meshes. Object to return by callback onMeshAlter. Used to disregard a certain mesh or to return one to many meshes.
</div> </p>
<h2>Methods</h2> <h2>Methods</h2>
<h3>[method:null addMesh] ( [param:Mesh mesh] )</h3> <h3>[method:null addMesh] ( [param:Mesh mesh] )</h3>
<div> <p>
[page:Mesh mesh] - Mesh [page:Mesh mesh] - Mesh
</div> </p>
<div> <p>
Add a mesh created within callback. Add a mesh created within callback.
</div> </p>
<h3>[method:boolean isDisregardMesh] ()</h3> <h3>[method:boolean isDisregardMesh] ()</h3>
<div> <p>
Answers if mesh shall be disregarded completely. Answers if mesh shall be disregarded completely.
</div> </p>
<h3>[method:boolean providesAlteredMeshes] ()</h3> <h3>[method:boolean providesAlteredMeshes] ()</h3>
<div> <p>
Answers if new mesh(es) were created. Answers if new mesh(es) were created.
</div> </p>
<br> <br>
<br> <br>
...@@ -152,71 +152,71 @@ ...@@ -152,71 +152,71 @@
<h2>Constructor</h2> <h2>Constructor</h2>
<h3>WorkerSupport()</h3> <h3>WorkerSupport()</h3>
<div> <p>
This class provides means to transform existing parser code into a web worker. This class provides means to transform existing parser code into a web worker.
It defines a simple communication protocol which allows to configure the worker and receive raw mesh data during execution. It defines a simple communication protocol which allows to configure the worker and receive raw mesh data during execution.
</div> </p>
<h2>Methods</h2> <h2>Methods</h2>
<h3>[method:null setLogging]( [param:Boolean enabled], [param:Boolean debug] )</h3> <h3>[method:null setLogging]( [param:Boolean enabled], [param:Boolean debug] )</h3>
<div> <p>
[page:Boolean enabled] True or false.<br> [page:Boolean enabled] True or false.<br>
[page:Boolean debug] True or false. [page:Boolean debug] True or false.
</div> </p>
<div> <p>
Enable or disable logging in general (except warn and error), plus enable or disable debug logging. Enable or disable logging in general (except warn and error), plus enable or disable debug logging.
</div> </p>
<h3>[method:null setForceWorkerDataCopy]( [param:Boolean forceWorkerDataCopy] )</h3> <h3>[method:null setForceWorkerDataCopy]( [param:Boolean forceWorkerDataCopy] )</h3>
<div> <p>
[page:Boolean forceWorkerDataCopy] True or false. [page:Boolean forceWorkerDataCopy] True or false.
</div> </p>
<div> <p>
Forces all ArrayBuffers to be transferred to worker to be copied. Forces all ArrayBuffers to be transferred to worker to be copied.
</div> </p>
<h3>[method:null validate] ( [param:Function functionCodeBuilder], Array of [param:String libLocations], [param:String libPath], [param:LoaderSupport.WorkerRunnerRefImpl runnerImpl] )</h3> <h3>[method:null validate] ( [param:Function functionCodeBuilder], Array of [param:String libLocations], [param:String libPath], [param:LoaderSupport.WorkerRunnerRefImpl runnerImpl] )</h3>
<div> <p>
[page:Function functionCodeBuilder] - Function that is invoked with funcBuildObject and funcBuildSingleton that allows stringification of objects and singletons.<br> [page:Function functionCodeBuilder] - Function that is invoked with funcBuildObject and funcBuildSingleton that allows stringification of objects and singletons.<br>
Array of [page:String libLocations] - URL of libraries that shall be added to worker code relative to libPath.<br> Array of [page:String libLocations] - URL of libraries that shall be added to worker code relative to libPath.<br>
[page:String libPath] - Base path used for loading libraries.<br> [page:String libPath] - Base path used for loading libraries.<br>
[page:LoaderSupport.WorkerRunnerRefImpl runnerImpl] - The default worker parser wrapper implementation (communication and execution). An extended class could be passed here. [page:LoaderSupport.WorkerRunnerRefImpl runnerImpl] - The default worker parser wrapper implementation (communication and execution). An extended class could be passed here.
</div> </p>
<div> <p>
Validate the status of worker code and the derived worker. Validate the status of worker code and the derived worker.
</div> </p>
<h3>[method:null setTerminateRequested] ( [param:Boolean terminateRequested] )</h3> <h3>[method:null setTerminateRequested] ( [param:Boolean terminateRequested] )</h3>
<div> <p>
[page:Boolean terminateRequested] - True or false. [page:Boolean terminateRequested] - True or false.
</div> </p>
<div> <p>
Request termination of worker once parser is finished. Request termination of worker once parser is finished.
</div> </p>
<h3>[method:null setCallbacks] ( [param:Function builder], [param:Function onLoad] )</h3> <h3>[method:null setCallbacks] ( [param:Function builder], [param:Function onLoad] )</h3>
<div> <p>
[page:Function builder] - The builder function. Default is [page:LoaderSupport.Builder].<br> [page:Function builder] - The builder function. Default is [page:LoaderSupport.Builder].<br>
[page:Function onLoad] - The function that is called when parsing is complete. [page:Function onLoad] - The function that is called when parsing is complete.
</div> </p>
<div> <p>
Specify functions that should be build when new raw mesh data becomes available and when the parser is finished. Specify functions that should be build when new raw mesh data becomes available and when the parser is finished.
</div> </p>
<h3>[method:null run] ( [param:Object payload] )</h3> <h3>[method:null run] ( [param:Object payload] )</h3>
<div> <p>
[page:Object payload] - Raw mesh description (buffers, params, materials) used to build one to many meshes. [page:Object payload] - Raw mesh description (buffers, params, materials) used to build one to many meshes.
</div> </p>
<div> <p>
Runs the parser with the provided configuration. Runs the parser with the provided configuration.
</div> </p>
<br> <br>
<br> <br>
...@@ -225,30 +225,30 @@ ...@@ -225,30 +225,30 @@
<h2>Constructor</h2> <h2>Constructor</h2>
<h3>WorkerRunnerRefImpl()</h3> <h3>WorkerRunnerRefImpl()</h3>
<div> <p>
Default implementation of the WorkerRunner responsible for creation and configuration of the parser within the worker. Default implementation of the WorkerRunner responsible for creation and configuration of the parser within the worker.
</div> </p>
<h2>Methods</h2> <h2>Methods</h2>
<h3>[method:null applyProperties] ( [param:Object parser], [param:Object params] )</h3> <h3>[method:null applyProperties] ( [param:Object parser], [param:Object params] )</h3>
<div> <p>
[page:Object parser] - The parser instance<br> [page:Object parser] - The parser instance<br>
[page:Object params] - The parameter object [page:Object params] - The parameter object
</div> </p>
<div> <p>
Applies values from parameter object via set functions or via direct assignment. Applies values from parameter object via set functions or via direct assignment.
</div> </p>
<h3>[method:null run] ( [param:Object payload] )</h3> <h3>[method:null run] ( [param:Object payload] )</h3>
<div> <p>
[page:Object payload] - Raw mesh description (buffers, params, materials) used to build one to many meshes. [page:Object payload] - Raw mesh description (buffers, params, materials) used to build one to many meshes.
</div> </p>
<div> <p>
Configures the Parser implementation according the supplied configuration object. Configures the Parser implementation according the supplied configuration object.
</div> </p>
<br> <br>
<br> <br>
...@@ -257,99 +257,99 @@ ...@@ -257,99 +257,99 @@
<h2>Constructor</h2> <h2>Constructor</h2>
<h3>WorkerDirector( [param:String classDef] )</h3> <h3>WorkerDirector( [param:String classDef] )</h3>
<div> <p>
[page:String classDef] - Class definition to be used for construction [page:String classDef] - Class definition to be used for construction
</div> </p>
<div> <p>
Orchestrate loading of multiple OBJ files/data from an instruction queue with a configurable amount of workers (1-16).<br> Orchestrate loading of multiple OBJ files/data from an instruction queue with a configurable amount of workers (1-16).<br>
- Workflow:<br> - Workflow:<br>
- prepareWorkers<br> - prepareWorkers<br>
- enqueueForRun<br> - enqueueForRun<br>
- processQueue<br> - processQueue<br>
- tearDown - tearDown
</div> </p>
<h2>Methods</h2> <h2>Methods</h2>
<h3>[method:null setLogging]( [param:Boolean enabled], [param:Boolean debug] )</h3> <h3>[method:null setLogging]( [param:Boolean enabled], [param:Boolean debug] )</h3>
<div> <p>
[page:Boolean enabled] True or false.<br> [page:Boolean enabled] True or false.<br>
[page:Boolean debug] True or false. [page:Boolean debug] True or false.
</div> </p>
<div> <p>
Enable or disable logging in general (except warn and error), plus enable or disable debug logging. Enable or disable logging in general (except warn and error), plus enable or disable debug logging.
</div> </p>
<h3>[method:null setForceWorkerDataCopy]( [param:Boolean forceWorkerDataCopy] )</h3> <h3>[method:null setForceWorkerDataCopy]( [param:Boolean forceWorkerDataCopy] )</h3>
<div> <p>
[page:Boolean forceWorkerDataCopy] True or false. [page:Boolean forceWorkerDataCopy] True or false.
</div> </p>
<div> <p>
Forces all ArrayBuffers to be transferred to worker to be copied. Forces all ArrayBuffers to be transferred to worker to be copied.
</div> </p>
<h3>[method:null prepareWorkers]( [param:WWOBJLoader2.Callbacks globalCallbacks], [param:Number maxQueueSize], [param:Number maxWebWorkers] )</h3> <h3>[method:null prepareWorkers]( [param:WWOBJLoader2.Callbacks globalCallbacks], [param:Number maxQueueSize], [param:Number maxWebWorkers] )</h3>
<div> <p>
[page:LoaderSupport.Callbacks globalCallbacks] - Register global callbacks used by all web workers<br> [page:LoaderSupport.Callbacks globalCallbacks] - Register global callbacks used by all web workers<br>
[page:Number maxQueueSize] - Set the maximum size of the instruction queue (1-1024)<br> [page:Number maxQueueSize] - Set the maximum size of the instruction queue (1-1024)<br>
[page:Number maxWebWorkers] - Set the maximum amount of workers (1-16) [page:Number maxWebWorkers] - Set the maximum amount of workers (1-16)
</div> </p>
<div> <p>
Create or destroy workers according limits. Set the name and register callbacks for dynamically created web workers. Create or destroy workers according limits. Set the name and register callbacks for dynamically created web workers.
</div> </p>
<h3>[method:null enqueueForRun]( [param:LoaderSupport.PrepData runParams] )</h3> <h3>[method:null enqueueForRun]( [param:LoaderSupport.PrepData runParams] )</h3>
<div> <p>
[page:LoaderSupport.PrepData runParams] [page:LoaderSupport.PrepData runParams]
</div> </p>
<div> <p>
Store run instructions in internal instructionQueue. Store run instructions in internal instructionQueue.
</div> </p>
<h3>[method:null processQueue]()</h3> <h3>[method:null processQueue]()</h3>
<div> <p>
Process the instructionQueue until it is depleted. Process the instructionQueue until it is depleted.
</div> </p>
<h3>[method:null tearDown]( [param:Function callbackOnFinishedProcessing] )</h3> <h3>[method:null tearDown]( [param:Function callbackOnFinishedProcessing] )</h3>
<div> <p>
[page:Function callbackOnFinishedProcessing] - Function called once all workers finished processing. [page:Function callbackOnFinishedProcessing] - Function called once all workers finished processing.
</div> </p>
<div> <p>
Terminate all workers. Terminate all workers.
</div> </p>
<h3>[method:null getMaxQueueSize]()</h3> <h3>[method:null getMaxQueueSize]()</h3>
<div> <p>
Returns the maximum length of the instruction queue. Returns the maximum length of the instruction queue.
</div> </p>
<h3>[method:null getMaxWebWorkers]()</h3> <h3>[method:null getMaxWebWorkers]()</h3>
<div> <p>
Returns the maximum number of workers. Returns the maximum number of workers.
</div> </p>
<h3>[method:Boolean isRunning]()</h3> <h3>[method:Boolean isRunning]()</h3>
<div> <p>
Returns if any workers are running. Returns if any workers are running.
</div> </p>
<h3>[method:null setCrossOrigin]( [param:String crossOrigin] )</h3> <h3>[method:null setCrossOrigin]( [param:String crossOrigin] )</h3>
<div> <p>
[page:String crossOrigin] - CORS value [page:String crossOrigin] - CORS value
</div> </p>
<div> <p>
Sets the CORS string to be used. Sets the CORS string to be used.
</div> </p>
<br> <br>
<br> <br>
...@@ -358,23 +358,23 @@ ...@@ -358,23 +358,23 @@
<h2>Constructor</h2> <h2>Constructor</h2>
<h3>ResourceDescriptor( [param:String url], [param:String extension] )</h3> <h3>ResourceDescriptor( [param:String url], [param:String extension] )</h3>
<div> <p>
[page:String url] - URL to the file<br> [page:String url] - URL to the file<br>
[page:String extension] - The file extension (type) [page:String extension] - The file extension (type)
</div> </p>
<div> <p>
A resource description used by [page:LoaderSupport.PrepData] and others. A resource description used by [page:LoaderSupport.PrepData] and others.
</div> </p>
<h2>Methods</h2> <h2>Methods</h2>
<h3>[method:null setContent]( [param:Object content )</h3> <h3>[method:null setContent]( [param:Object content )</h3>
<div> <p>
[page:Object content] - The file content as ArrayBuffer or text [page:Object content] - The file content as ArrayBuffer or text
</div> </p>
<div> <p>
Set the content of this resource Set the content of this resource
</div> </p>
<br> <br>
<br> <br>
...@@ -383,56 +383,56 @@ ...@@ -383,56 +383,56 @@
<h2>Constructor</h2> <h2>Constructor</h2>
<h3>PrepData( [param:String modelName] )</h3> <h3>PrepData( [param:String modelName] )</h3>
<div> <p>
[page:String modelName] - Overall name of the model [page:String modelName] - Overall name of the model
</div> </p>
<div> <p>
Configuration instructions to be used by run method. Configuration instructions to be used by run method.
</div> </p>
<h2>Methods</h2> <h2>Methods</h2>
<h3>[method:null setLogging]( [param:Boolean enabled], [param:Boolean debug] )</h3> <h3>[method:null setLogging]( [param:Boolean enabled], [param:Boolean debug] )</h3>
<div> <p>
[page:Boolean enabled] True or false.<br> [page:Boolean enabled] True or false.<br>
[page:Boolean debug] True or false. [page:Boolean debug] True or false.
</div> </p>
<div> <p>
Enable or disable logging in general (except warn and error), plus enable or disable debug logging. Enable or disable logging in general (except warn and error), plus enable or disable debug logging.
</div> </p>
<h3>[method:Callbacks getCallbacks]()</h3> <h3>[method:Callbacks getCallbacks]()</h3>
<div> <p>
Returns all callbacks as [page:LoaderSupport.Callbacks]. Returns all callbacks as [page:LoaderSupport.Callbacks].
</div> </p>
<h3>[method:null addResource]( [param:LoaderSupport.ResourceDescriptor resource] )</h3> <h3>[method:null addResource]( [param:LoaderSupport.ResourceDescriptor resource] )</h3>
<div> <p>
[page:LoaderSupport.ResourceDescriptor resource] Adds a [page:LoaderSupport.ResourceDescriptor] [page:LoaderSupport.ResourceDescriptor resource] Adds a [page:LoaderSupport.ResourceDescriptor]
</div> </p>
<div> <p>
Add a resource description. Add a resource description.
</div> </p>
<h3>[method:null checkResourceDescriptorFiles] ( [param:LoaderSupport.ResourceDescriptor resources], [param:Object fileDesc] )</h3> <h3>[method:null checkResourceDescriptorFiles] ( [param:LoaderSupport.ResourceDescriptor resources], [param:Object fileDesc] )</h3>
<div> <p>
[page:LoaderSupport.ResourceDescriptor resources] - Array of [page:LoaderSupport.ResourceDescriptor]<br> [page:LoaderSupport.ResourceDescriptor resources] - Array of [page:LoaderSupport.ResourceDescriptor]<br>
[page:Object fileDesc] - Object describing which resources are of interest (ext, type (string or UInt8Array) and ignore (boolean)) [page:Object fileDesc] - Object describing which resources are of interest (ext, type (string or UInt8Array) and ignore (boolean))
</div> </p>
<div> <p>
Identify files or content of interest from an Array of [page:LoaderSupport.ResourceDescriptor]. Identify files or content of interest from an Array of [page:LoaderSupport.ResourceDescriptor].
Returns Object with each "ext" and the corresponding [page:LoaderSupport.ResourceDescriptor] Returns Object with each "ext" and the corresponding [page:LoaderSupport.ResourceDescriptor]
</div> </p>
<h3>[method:PrepData clone] ()</h3> <h3>[method:PrepData clone] ()</h3>
<div> <p>
Clones this object and returns it afterwards. Callbacks and resources are not cloned deep (references!). Clones this object and returns it afterwards. Callbacks and resources are not cloned deep (references!).
</div> </p>
<br> <br>
<br> <br>
...@@ -441,47 +441,47 @@ ...@@ -441,47 +441,47 @@
<h2>Constructor</h2> <h2>Constructor</h2>
<h3>Callbacks()</h3> <h3>Callbacks()</h3>
<div> <p>
Callbacks utilized by loaders and builder. Callbacks utilized by loaders and builder.
</div> </p>
<h2>Methods</h2> <h2>Methods</h2>
<h3>[method:null setCallbackOnProgress]( [param:Function callbackOnProgress] )</h3> <h3>[method:null setCallbackOnProgress]( [param:Function callbackOnProgress] )</h3>
<div> <p>
[page:Function callbackOnProgress] - Callback function for described functionality [page:Function callbackOnProgress] - Callback function for described functionality
</div> </p>
<div> <p>
Register callback function that is invoked by internal function "announceProgress" to print feedback. Register callback function that is invoked by internal function "announceProgress" to print feedback.
</div> </p>
<h3>[method:null setCallbackOnMeshAlter]( [param:Function callbackOnMeshAlter] )</h3> <h3>[method:null setCallbackOnMeshAlter]( [param:Function callbackOnMeshAlter] )</h3>
<div> <p>
[page:Function callbackOnMeshAlter] - Callback function for described functionality [page:Function callbackOnMeshAlter] - Callback function for described functionality
</div> </p>
<div> <p>
Register callback function that is called every time a mesh was loaded. Register callback function that is called every time a mesh was loaded.
Use [page:LoadedMeshUserOverride] for alteration instructions (geometry, material or disregard mesh). Use [page:LoadedMeshUserOverride] for alteration instructions (geometry, material or disregard mesh).
</div> </p>
<h3>[method:null setCallbackOnLoad]( [param:Function callbackOnLoad] )</h3> <h3>[method:null setCallbackOnLoad]( [param:Function callbackOnLoad] )</h3>
<div> <p>
[page:Function callbackOnLoad] - Callback function for described functionality [page:Function callbackOnLoad] - Callback function for described functionality
</div> </p>
<div> <p>
Register callback function that is called once loading of the complete OBJ file is completed. Register callback function that is called once loading of the complete OBJ file is completed.
</div> </p>
<h3>[method:null setCallbackOnLoadMaterials]( [param:Function callbackOnLoadMaterials] )</h3> <h3>[method:null setCallbackOnLoadMaterials]( [param:Function callbackOnLoadMaterials] )</h3>
<div> <p>
[page:Function callbackOnLoadMaterials] - Callback function for described functionality [page:Function callbackOnLoadMaterials] - Callback function for described functionality
</div> </p>
<div> <p>
Register callback function that is called when materials have been loaded. Register callback function that is called when materials have been loaded.
</div> </p>
<br> <br>
<br> <br>
...@@ -490,30 +490,30 @@ ...@@ -490,30 +490,30 @@
<h2>Constructor</h2> <h2>Constructor</h2>
<h3>Validator()</h3> <h3>Validator()</h3>
<div> <p>
Validation functions. Validation functions.
</div> </p>
<h2>Methods</h2> <h2>Methods</h2>
<h3>[method:Boolean isValid]( [param:Object input] )</h3> <h3>[method:Boolean isValid]( [param:Object input] )</h3>
<div> <p>
[page:Object input] - Can be anything [page:Object input] - Can be anything
</div> </p>
<div> <p>
If given input is null or undefined, false is returned otherwise true. If given input is null or undefined, false is returned otherwise true.
</div> </p>
<h3>[method:null verifyInput]( [param:Object input], [param:Object defaultValue] )</h3> <h3>[method:null verifyInput]( [param:Object input], [param:Object defaultValue] )</h3>
<div> <p>
[page:Object input] - Can be anything<br> [page:Object input] - Can be anything<br>
[page:Object defaultValue] - Can be anything [page:Object defaultValue] - Can be anything
</div> </p>
<div> <p>
If given input is null or undefined, the defaultValue is returned otherwise the given input. If given input is null or undefined, the defaultValue is returned otherwise the given input.
</div> </p>
<br> <br>
<br> <br>
......
...@@ -11,20 +11,20 @@ ...@@ -11,20 +11,20 @@
<h1>[name]</h1> <h1>[name]</h1>
<div class="desc">A loader for loading an <em>.mtl</em> resource, used internaly by [page:OBJLoader] and [page:UTF8Loader].<br /> <p class="desc">A loader for loading an <em>.mtl</em> resource, used internaly by [page:OBJLoader] and [page:UTF8Loader].<br />
The Material Template Library format (MTL) or .MTL File Format is a companion file format to .OBJ that describes surface shading The Material Template Library format (MTL) or .MTL File Format is a companion file format to .OBJ that describes surface shading
(material) properties of objects within one or more .OBJ files. (material) properties of objects within one or more .OBJ files.
</div> </p>
<h2>Constructor</h2> <h2>Constructor</h2>
<h3>[name]( [param:LoadingManager loadingManager] )</h3> <h3>[name]( [param:LoadingManager loadingManager] )</h3>
<div> <p>
[page:LoadingManager loadingManager] — LoadingManager to use. Defaults to [page:DefaultLoadingManager DefaultLoadingManager]<br /> [page:LoadingManager loadingManager] — LoadingManager to use. Defaults to [page:DefaultLoadingManager DefaultLoadingManager]<br />
</div> </p>
<div> <p>
Creates a new [name]. Creates a new [name].
</div> </p>
<h2>Properties</h2> <h2>Properties</h2>
...@@ -33,46 +33,46 @@ ...@@ -33,46 +33,46 @@
<h3>[method:null load]( [param:String url], [param:Function onLoad], [param:Function onProgress], [param:Function onError] )</h3> <h3>[method:null load]( [param:String url], [param:Function onLoad], [param:Function onProgress], [param:Function onError] )</h3>
<div> <p>
[page:String url] — A string containing the path/URL of the <em>.mtl</em> file.<br /> [page:String url] — A string containing the path/URL of the <em>.mtl</em> file.<br />
[page:Function onLoad] — (optional) A function to be called after the loading is successfully completed. The function receives the loaded [page:MTLLoaderMaterialCreator MTLLoader.MaterialCreator] instance.<br /> [page:Function onLoad] — (optional) A function to be called after the loading is successfully completed. The function receives the loaded [page:MTLLoaderMaterialCreator MTLLoader.MaterialCreator] instance.<br />
[page:Function onProgress] — (optional) A function to be called while the loading is in progress. The argument will be the XMLHttpRequest instance, which contains [page:Integer total] and [page:Integer loaded] bytes.<br /> [page:Function onProgress] — (optional) A function to be called while the loading is in progress. The argument will be the XMLHttpRequest instance, which contains [page:Integer total] and [page:Integer loaded] bytes.<br />
[page:Function onError] — (optional) A function to be called if an error occurs during loading. The function receives the error as an argument.<br /> [page:Function onError] — (optional) A function to be called if an error occurs during loading. The function receives the error as an argument.<br />
</div> </p>
<div> <p>
Begin loading from url and return the loaded material. Begin loading from url and return the loaded material.
</div> </p>
<h3>[method:null setPath]( [param:String path] )</h3> <h3>[method:null setPath]( [param:String path] )</h3>
<div> <p>
[page:String path] — required<br /> [page:String path] — required<br />
</div> </p>
<div> <p>
Set base path for resolving references. If set this path will be prepended to each loaded and found reference. Set base path for resolving references. If set this path will be prepended to each loaded and found reference.
</div> </p>
<h3>[method:null setTexturePath]( [param:String path] )</h3> <h3>[method:null setTexturePath]( [param:String path] )</h3>
<div> <p>
[page:String path] — required<br /> [page:String path] — required<br />
</div> </p>
<div> <p>
Set base path for resolving texture references. If set this path will be prepended found texture reference. If not set and setPath is, it will be used as texture base path. Set base path for resolving texture references. If set this path will be prepended found texture reference. If not set and setPath is, it will be used as texture base path.
</div> </p>
<h3>[method:null setCrossOrigin]( [param:boolean useCrossOrigin] )</h3> <h3>[method:null setCrossOrigin]( [param:boolean useCrossOrigin] )</h3>
<div> <p>
[page:boolean useCrossOrigin] — required<br /> [page:boolean useCrossOrigin] — required<br />
</div> </p>
<div> <p>
Set to true if you need to load textures from a different origin. Set to true if you need to load textures from a different origin.
</div> </p>
<h3>[method:null setMaterialOptions]( [param:Object options] )</h3> <h3>[method:null setMaterialOptions]( [param:Object options] )</h3>
<div> <p>
[page:Object options] — required [page:Object options] — required
<ul> <ul>
<li>side: Which side to apply the material. THREE.FrontSide (default), THREE.BackSide, THREE.DoubleSide</li> <li>side: Which side to apply the material. THREE.FrontSide (default), THREE.BackSide, THREE.DoubleSide</li>
...@@ -81,19 +81,19 @@ ...@@ -81,19 +81,19 @@
<li>ignoreZeroRGBs: Ignore values of RGBs (Ka,Kd,Ks) that are all 0's. Default: false</li> <li>ignoreZeroRGBs: Ignore values of RGBs (Ka,Kd,Ks) that are all 0's. Default: false</li>
<li>invertTrProperty: Use values 1 of Tr field for fully opaque. This option is useful for obj exported from 3ds MAX, vcglib or meshlab. Default: false</li> <li>invertTrProperty: Use values 1 of Tr field for fully opaque. This option is useful for obj exported from 3ds MAX, vcglib or meshlab. Default: false</li>
</ul> </ul>
</div> </p>
<div> <p>
Set of options on how to construct the materials Set of options on how to construct the materials
</div> </p>
<h3>[method:MTLLoaderMaterialCreator parse]( [param:String text] )</h3> <h3>[method:MTLLoaderMaterialCreator parse]( [param:String text] )</h3>
<div> <p>
[page:String text] — The textual <em>mtl</em> structure to parse. [page:String text] — The textual <em>mtl</em> structure to parse.
</div> </p>
<div> <p>
Parse a <em>mtl</em> text structure and return a [page:MTLLoaderMaterialCreator] instance.<br /> Parse a <em>mtl</em> text structure and return a [page:MTLLoaderMaterialCreator] instance.<br />
</div> </p>
<h2>Source</h2> <h2>Source</h2>
......
...@@ -11,12 +11,12 @@ ...@@ -11,12 +11,12 @@
<h1>[name]</h1> <h1>[name]</h1>
<div class="desc">A loader for loading a <em>.obj</em> resource.<br /> <p class="desc">A loader for loading a <em>.obj</em> resource.<br />
The <a href="https://en.wikipedia.org/wiki/Wavefront_.obj_file">OBJ file format</a> is a simple data-format The <a href="https://en.wikipedia.org/wiki/Wavefront_.obj_file">OBJ file format</a> is a simple data-format
that represents 3D geometry in a human readable format as the position of each vertex, the UV position of that represents 3D geometry in a human readable format as the position of each vertex, the UV position of
each texture coordinate vertex, vertex normals, and the faces that make each polygon defined as a list of each texture coordinate vertex, vertex normals, and the faces that make each polygon defined as a list of
vertices, and texture vertices. vertices, and texture vertices.
</div> </p>
<h2>Example</h2> <h2>Example</h2>
...@@ -56,12 +56,12 @@ ...@@ -56,12 +56,12 @@
<h2>Constructor</h2> <h2>Constructor</h2>
<h3>[name]( [param:LoadingManager manager] )</h3> <h3>[name]( [param:LoadingManager manager] )</h3>
<div> <p>
[page:LoadingManager manager] — The [page:LoadingManager loadingManager] for the loader to use. Default is [page:LoadingManager THREE.DefaultLoadingManager]. [page:LoadingManager manager] — The [page:LoadingManager loadingManager] for the loader to use. Default is [page:LoadingManager THREE.DefaultLoadingManager].
</div> </p>
<div> <p>
Creates a new [name]. Creates a new [name].
</div> </p>
<h2>Properties</h2> <h2>Properties</h2>
...@@ -69,25 +69,25 @@ ...@@ -69,25 +69,25 @@
<h2>Methods</h2> <h2>Methods</h2>
<h3>[method:null load]( [param:String url], [param:Function onLoad], [param:Function onProgress], [param:Function onError] )</h3> <h3>[method:null load]( [param:String url], [param:Function onLoad], [param:Function onProgress], [param:Function onError] )</h3>
<div> <p>
[page:String url] — A string containing the path/URL of the <em>.obj</em> file.<br /> [page:String url] — A string containing the path/URL of the <em>.obj</em> file.<br />
[page:Function onLoad] — (optional) A function to be called after the loading is successfully completed. The function receives the loaded [page:Object3D] as an argument.<br /> [page:Function onLoad] — (optional) A function to be called after the loading is successfully completed. The function receives the loaded [page:Object3D] as an argument.<br />
[page:Function onProgress] — (optional) A function to be called while the loading is in progress. The function receives a XMLHttpRequest instance, which contains [page:Integer total] and [page:Integer loaded] bytes.<br /> [page:Function onProgress] — (optional) A function to be called while the loading is in progress. The function receives a XMLHttpRequest instance, which contains [page:Integer total] and [page:Integer loaded] bytes.<br />
[page:Function onError] — (optional) A function to be called if an error occurs during loading. The function receives error as an argument.<br /> [page:Function onError] — (optional) A function to be called if an error occurs during loading. The function receives error as an argument.<br />
</div> </p>
<div> <p>
Begin loading from url and call onLoad with the parsed response content. Begin loading from url and call onLoad with the parsed response content.
</div> </p>
<h3>[method:Object3D parse]( [param:String text] )</h3> <h3>[method:Object3D parse]( [param:String text] )</h3>
<div> <p>
[page:String text] — The textual <em>obj</em> structure to parse. [page:String text] — The textual <em>obj</em> structure to parse.
</div> </p>
<div> <p>
Returns an [page:Object3D]. It contains the parsed meshes as [page:Mesh] and lines as [page:LineSegments].<br /> Returns an [page:Object3D]. It contains the parsed meshes as [page:Mesh] and lines as [page:LineSegments].<br />
All geometry is created as [page:BufferGeometry]. Default materials are created as [page:MeshPhongMaterial].<br /> All geometry is created as [page:BufferGeometry]. Default materials are created as [page:MeshPhongMaterial].<br />
If an <em>obj</em> object or group uses multiple materials while declaring faces, geometry groups and an array of materials are used. If an <em>obj</em> object or group uses multiple materials while declaring faces, geometry groups and an array of materials are used.
</div> </p>
<h2>Source</h2> <h2>Source</h2>
......
...@@ -11,12 +11,12 @@ ...@@ -11,12 +11,12 @@
<h1>[name]</h1> <h1>[name]</h1>
<div class="desc">A loader for loading a <em>.obj</em> resource.<br /> <p class="desc">A loader for loading a <em>.obj</em> resource.<br />
The <a href="https://en.wikipedia.org/wiki/Wavefront_.obj_file">OBJ file format</a> is a simple data-format The <a href="https://en.wikipedia.org/wiki/Wavefront_.obj_file">OBJ file format</a> is a simple data-format
that represents 3D geometry in a human redeable format as, the position of each vertex, the UV position of that represents 3D geometry in a human redeable format as, the position of each vertex, the UV position of
each texture coordinate vertex, vertex normals, and the faces that make each polygon defined as a list of each texture coordinate vertex, vertex normals, and the faces that make each polygon defined as a list of
vertices, and texture vertices. vertices, and texture vertices.
</div> </p>
<h2>Examples</h2> <h2>Examples</h2>
...@@ -41,155 +41,155 @@ ...@@ -41,155 +41,155 @@
<h2>Constructor</h2> <h2>Constructor</h2>
<h3>[name]( [param:LoadingManager manager], [param:LoaderSupport.ConsoleLogger logger] )</h3> <h3>[name]( [param:LoadingManager manager], [param:LoaderSupport.ConsoleLogger logger] )</h3>
<div> <p>
[page:LoadingManager manager] - The [page:LoadingManager loadingManager] for the loader to use. Default is [page:LoadingManager THREE.DefaultLoadingManager].<br> [page:LoadingManager manager] - The [page:LoadingManager loadingManager] for the loader to use. Default is [page:LoadingManager THREE.DefaultLoadingManager].<br>
[page:LoaderSupport.ConsoleLogger logger] - logger to be used [page:LoaderSupport.ConsoleLogger logger] - logger to be used
</div> </p>
<div> <p>
Use [name] to load OBJ data from files or to parse OBJ data from arraybuffer or text. Use [name] to load OBJ data from files or to parse OBJ data from arraybuffer or text.
</div> </p>
<h2>Methods</h2> <h2>Methods</h2>
<h3>[method:Object3D parse]( {[param:arraybuffer content]|[param:String content]] )</h3> <h3>[method:Object3D parse]( {[param:arraybuffer content]|[param:String content]] )</h3>
<div> <p>
[[page:arraybuffer content]|[page:String content]] OBJ data as Uint8Array or String [[page:arraybuffer content]|[page:String content]] OBJ data as Uint8Array or String
</div> </p>
<div> <p>
Parses OBJ data synchronously from arraybuffer or string and returns the [page:Object3D loaderRoorNode]. Parses OBJ data synchronously from arraybuffer or string and returns the [page:Object3D loaderRoorNode].
</div> </p>
<h3>[method:Object3D parseAsync]( [param:arraybuffer content], [param:Function onLoad] )</h3> <h3>[method:Object3D parseAsync]( [param:arraybuffer content], [param:Function onLoad] )</h3>
<div> <p>
[page:arraybuffer content] - OBJ data as Uint8Array<br> [page:arraybuffer content] - OBJ data as Uint8Array<br>
[page:Function onLoad] - Called after worker successfully completed loading<br> [page:Function onLoad] - Called after worker successfully completed loading<br>
</div> </p>
<div> <p>
Parses OBJ content asynchronously from arraybuffer. Parses OBJ content asynchronously from arraybuffer.
</div> </p>
<h3>[method:null load]( [param:String url], [param:Function onLoad], [param:Function onProgress], [param:Function onError], [param:Function onMeshAlter], [param:boolean useAsync] )</h3> <h3>[method:null load]( [param:String url], [param:Function onLoad], [param:Function onProgress], [param:Function onError], [param:Function onMeshAlter], [param:boolean useAsync] )</h3>
<div> <p>
[page:String url] - A string containing the path/URL of the file to be loaded.<br> [page:String url] - A string containing the path/URL of the file to be loaded.<br>
[page:Function onLoad] - A function to be called after loading is successfully completed. The function receives loaded [page:Object3D] as an argument.<br> [page:Function onLoad] - A function to be called after loading is successfully completed. The function receives loaded [page:Object3D] as an argument.<br>
[page:Function onProgress] - (optional) A function to be called while the loading is in progress. The argument will be the XMLHttpRequest instance, which contains [page:Integer total] and [page:Integer loaded] bytes.<br> [page:Function onProgress] - (optional) A function to be called while the loading is in progress. The argument will be the XMLHttpRequest instance, which contains [page:Integer total] and [page:Integer loaded] bytes.<br>
[page:Function onError] - (optional) A function to be called if an error occurs during loading. The function receives the error as an argument.<br> [page:Function onError] - (optional) A function to be called if an error occurs during loading. The function receives the error as an argument.<br>
[page:Function onMeshAlter] - (optional) A function to be called after a new mesh raw data becomes available for alteration.<br> [page:Function onMeshAlter] - (optional) A function to be called after a new mesh raw data becomes available for alteration.<br>
[page:boolean useAsync] - (optional) If true, uses async loading with worker, if false loads data synchronously. [page:boolean useAsync] - (optional) If true, uses async loading with worker, if false loads data synchronously.
</div> </p>
<div> <p>
Use this convenient method to load a file at the given URL. By default the fileLoader uses an ArrayBuffer. Use this convenient method to load a file at the given URL. By default the fileLoader uses an ArrayBuffer.
</div> </p>
<h3>[method:null run]( [param:LoaderSupport.PrepData params], [param:LoaderSupport.WorkerSupport workerSupportExternal] )</h3> <h3>[method:null run]( [param:LoaderSupport.PrepData params], [param:LoaderSupport.WorkerSupport workerSupportExternal] )</h3>
<div> <p>
[page:LoaderSupport.PrepData params] - prepData All parameters and resources required for execution<br> [page:LoaderSupport.PrepData params] - prepData All parameters and resources required for execution<br>
[page:LoaderSupport.WorkerSupport workerSupportExternal] - Use pre-existing WorkerSupport [page:LoaderSupport.WorkerSupport workerSupportExternal] - Use pre-existing WorkerSupport
</div> </p>
<div> <p>
Run the loader according the provided instructions. Run the loader according the provided instructions.
</div> </p>
<h3>[method:null setLogging]( [param:Boolean enabled], [param:Boolean debug] )</h3> <h3>[method:null setLogging]( [param:Boolean enabled], [param:Boolean debug] )</h3>
<div> <p>
[page:Boolean enabled] True or false.<br> [page:Boolean enabled] True or false.<br>
[page:Boolean debug] True or false. [page:Boolean debug] True or false.
</div> </p>
<div> <p>
Enable or disable logging in general (except warn and error), plus enable or disable debug logging. Enable or disable logging in general (except warn and error), plus enable or disable debug logging.
</div> </p>
<h3>[method:null setModelName] ( [param:String modelName] )</h3> <h3>[method:null setModelName] ( [param:String modelName] )</h3>
<div> <p>
[page:String modelName] [page:String modelName]
</div> </p>
<div> <p>
Set the name of the model. Set the name of the model.
</div> </p>
<h3>[method:null setPath] ( [param:String path] )</h3> <h3>[method:null setPath] ( [param:String path] )</h3>
<div> <p>
[page:String path] - URL [page:String path] - URL
</div> </p>
<div> <p>
The URL of the base path. The URL of the base path.
</div> </p>
<h3>[method:null setStreamMeshesTo] ( [param:Object3D streamMeshesTo] )</h3> <h3>[method:null setStreamMeshesTo] ( [param:Object3D streamMeshesTo] )</h3>
<div> <p>
[page:Object3D streamMeshesTo] - Object already attached to scenegraph where new meshes will be attached to [page:Object3D streamMeshesTo] - Object already attached to scenegraph where new meshes will be attached to
</div> </p>
<div> <p>
Set the node where the loaded objects will be attached directly. Set the node where the loaded objects will be attached directly.
</div> </p>
<h3>[method:null setMaterials] ( Array of [param:Material materials] )</h3> <h3>[method:null setMaterials] ( Array of [param:Material materials] )</h3>
<div> <p>
Array of [page:Material materials] - Array of [page:Material Materials] Array of [page:Material materials] - Array of [page:Material Materials]
</div> </p>
<div> <p>
Set materials loaded by MTLLoader or any other supplier of an Array of [page:Material Materials]. Set materials loaded by MTLLoader or any other supplier of an Array of [page:Material Materials].
</div> </p>
<h3>[method:null setUseIndices]( [param:Boolean useIndices] )</h3> <h3>[method:null setUseIndices]( [param:Boolean useIndices] )</h3>
<div> <p>
[page:Boolean useIndices] [page:Boolean useIndices]
</div> </p>
<div> <p>
Instructs loaders to create indexed [page:BufferGeometry]. Instructs loaders to create indexed [page:BufferGeometry].
</div> </p>
<h3>[method:null setDisregardNormals]( [param:Boolean disregardNormals] )</h3> <h3>[method:null setDisregardNormals]( [param:Boolean disregardNormals] )</h3>
<div> <p>
[page:Boolean disregardNormals] [page:Boolean disregardNormals]
</div> </p>
<div> <p>
Tells whether normals should be completely disregarded and regenerated. Tells whether normals should be completely disregarded and regenerated.
</div> </p>
<h3>[method:null setMaterialPerSmoothingGroup] ( [param:boolean materialPerSmoothingGroup] )</h3> <h3>[method:null setMaterialPerSmoothingGroup] ( [param:boolean materialPerSmoothingGroup] )</h3>
<div> <p>
[page:boolean materialPerSmoothingGroup] [page:boolean materialPerSmoothingGroup]
</div> </p>
<div> <p>
Tells whether a material shall be created per smoothing group. Tells whether a material shall be created per smoothing group.
</div> </p>
<h3>[method:null onProgress]( [param:String type], [param:String text], [param:Number numericalValue] )</h3> <h3>[method:null onProgress]( [param:String type], [param:String text], [param:Number numericalValue] )</h3>
<div> <p>
[page:String type] - The type of event<br> [page:String type] - The type of event<br>
[page:String text] - Textual description of the event<br> [page:String text] - Textual description of the event<br>
[page:Number numericalValue] - Numerical value describing the progress [page:Number numericalValue] - Numerical value describing the progress
</div> </p>
<div> <p>
Announce feedback which is give to the registered [page:LoaderSupport.Callbacks]. Announce feedback which is give to the registered [page:LoaderSupport.Callbacks].
</div> </p>
<h3>[method:null loadMtl]( [param:String url], [param:Object content], [param:Function callbackOnLoad], [param:String crossOrigin], [param:Object materialOptions]) </h3> <h3>[method:null loadMtl]( [param:String url], [param:Object content], [param:Function callbackOnLoad], [param:String crossOrigin], [param:Object materialOptions]) </h3>
<div> <p>
[page:String url] - URL to the file<br> [page:String url] - URL to the file<br>
[page:Object content] - The file content as arraybuffer or text<br> [page:Object content] - The file content as arraybuffer or text<br>
[page:Function callbackOnLoad] - Callback to be called after successful load<br> [page:Function callbackOnLoad] - Callback to be called after successful load<br>
[page:String crossOrigin] - (optional) CORS value<br> [page:String crossOrigin] - (optional) CORS value<br>
[page:Function materialOptions] - (optional) Set material loading options for MTLLoader [page:Function materialOptions] - (optional) Set material loading options for MTLLoader
</div> </p>
<div> <p>
Utility method for loading an mtl file according resource description. Provide url or content.. Utility method for loading an mtl file according resource description. Provide url or content..
</div> </p>
<h2>Source</h2> <h2>Source</h2>
......
...@@ -11,10 +11,10 @@ ...@@ -11,10 +11,10 @@
<h1>[name]</h1> <h1>[name]</h1>
<div class="desc">A loader for loading a <em>.pcd</em> resource. <br /> <p class="desc">A loader for loading a <em>.pcd</em> resource. <br />
Point Cloud Data is a file format for <a href="https://en.wikipedia.org/wiki/Point_Cloud_Library">Point Cloud Library</a>. <br /> Point Cloud Data is a file format for <a href="https://en.wikipedia.org/wiki/Point_Cloud_Library">Point Cloud Library</a>. <br />
Loader support ascii and binary. Compressed binary files are not supported. Loader support ascii and binary. Compressed binary files are not supported.
</div> </p>
<h2>Example</h2> <h2>Example</h2>
...@@ -54,44 +54,44 @@ ...@@ -54,44 +54,44 @@
<h2>Constructor</h2> <h2>Constructor</h2>
<h3>[name]( [param:LoadingManager manager] )</h3> <h3>[name]( [param:LoadingManager manager] )</h3>
<div> <p>
[page:LoadingManager manager] — The [page:LoadingManager loadingManager] for the loader to use. Default is [page:LoadingManager THREE.DefaultLoadingManager]. [page:LoadingManager manager] — The [page:LoadingManager loadingManager] for the loader to use. Default is [page:LoadingManager THREE.DefaultLoadingManager].
</div> </p>
<div> <p>
Creates a new [name]. Creates a new [name].
</div> </p>
<h2>Properties</h2> <h2>Properties</h2>
<h3>[page:Boolean littleEndian]</h3> <h3>[page:Boolean littleEndian]</h3>
<div> <p>
Default value is true. Default value is true.
</div> </p>
<h2>Methods</h2> <h2>Methods</h2>
<h3>[method:null load]( [param:String url], [param:Function onLoad], [param:Function onProgress], [param:Function onError] )</h3> <h3>[method:null load]( [param:String url], [param:Function onLoad], [param:Function onProgress], [param:Function onError] )</h3>
<div> <p>
[page:String url] — A string containing the path/URL of the <em>.pcd</em> file.<br /> [page:String url] — A string containing the path/URL of the <em>.pcd</em> file.<br />
[page:Function onLoad] — (optional) A function to be called after loading is successfully completed. The function receives loaded [page:Object3D] as an argument.<br /> [page:Function onLoad] — (optional) A function to be called after loading is successfully completed. The function receives loaded [page:Object3D] as an argument.<br />
[page:Function onProgress] — (optional) A function to be called while the loading is in progress. The argument will be the XMLHttpRequest instance, which contains [page:Integer total] and [page:Integer loaded] bytes.<br /> [page:Function onProgress] — (optional) A function to be called while the loading is in progress. The argument will be the XMLHttpRequest instance, which contains [page:Integer total] and [page:Integer loaded] bytes.<br />
[page:Function onError] — (optional) A function to be called if an error occurs during loading. The function receives the error as an argument.<br /> [page:Function onError] — (optional) A function to be called if an error occurs during loading. The function receives the error as an argument.<br />
</div> </p>
<div> <p>
Begin loading from url and call onLoad with the parsed response content. Begin loading from url and call onLoad with the parsed response content.
</div> </p>
<h3>[method:Object3D parse]( [param:Arraybuffer data],[param:String url] )</h3> <h3>[method:Object3D parse]( [param:Arraybuffer data],[param:String url] )</h3>
<div> <p>
[page:Arraybuffer data] — The binary structure to parse. [page:Arraybuffer data] — The binary structure to parse.
</div> </p>
<div> <p>
[page:String url] — The file name or file url. [page:String url] — The file name or file url.
</div> </p>
<div> <p>
Parse an <em>pcd</em> binary structure and return an [page:Object3D].<br /> Parse an <em>pcd</em> binary structure and return an [page:Object3D].<br />
The object is converted to [page:Points] with a [page:BufferGeometry] and a [page:PointsMaterial]. The object is converted to [page:Points] with a [page:BufferGeometry] and a [page:PointsMaterial].
</div> </p>
<h2>Source</h2> <h2>Source</h2>
......
...@@ -11,9 +11,9 @@ ...@@ -11,9 +11,9 @@
<h1>[name]</h1> <h1>[name]</h1>
<div class="desc">A loader for loading a <em>.pdb</em> resource.<br> <p class="desc">A loader for loading a <em>.pdb</em> resource.<br>
The <a href="http://en.wikipedia.org/wiki/Protein_Data_Bank_(file_format)">Protein Data Bank</a> file format is a textual file describing the three-dimensional structures of molecules. The <a href="http://en.wikipedia.org/wiki/Protein_Data_Bank_(file_format)">Protein Data Bank</a> file format is a textual file describing the three-dimensional structures of molecules.
</div> </p>
<h2>Example</h2> <h2>Example</h2>
...@@ -56,12 +56,12 @@ ...@@ -56,12 +56,12 @@
<h2>Constructor</h2> <h2>Constructor</h2>
<h3>[name]( [param:LoadingManager manager] )</h3> <h3>[name]( [param:LoadingManager manager] )</h3>
<div> <p>
[page:LoadingManager manager] — The [page:LoadingManager loadingManager] for the loader to use. Default is [page:LoadingManager THREE.DefaultLoadingManager]. [page:LoadingManager manager] — The [page:LoadingManager loadingManager] for the loader to use. Default is [page:LoadingManager THREE.DefaultLoadingManager].
</div> </p>
<div> <p>
Creates a new [name]. Creates a new [name].
</div> </p>
<h2>Properties</h2> <h2>Properties</h2>
...@@ -69,23 +69,23 @@ ...@@ -69,23 +69,23 @@
<h2>Methods</h2> <h2>Methods</h2>
<h3>[method:null load]( [param:String url], [param:Function onLoad], [param:Function onProgress], [param:Function onError] )</h3> <h3>[method:null load]( [param:String url], [param:Function onLoad], [param:Function onProgress], [param:Function onError] )</h3>
<div> <p>
[page:String url] — A string containing the path/URL of the <em>.pdb</em> file.<br /> [page:String url] — A string containing the path/URL of the <em>.pdb</em> file.<br />
[page:Function onLoad] — (optional) A function to be called after loading is successfully completed. The function receives the object having the following properties. [page:BufferGeometry geometryAtoms], [page:BufferGeometry geometryBonds] and the [page:Object JSON] structure.<br /> [page:Function onLoad] — (optional) A function to be called after loading is successfully completed. The function receives the object having the following properties. [page:BufferGeometry geometryAtoms], [page:BufferGeometry geometryBonds] and the [page:Object JSON] structure.<br />
[page:Function onProgress] — (optional) A function to be called while the loading is in progress. The argument will be the XMLHttpRequest instance, which contains [page:Integer total] and [page:Integer loaded] bytes.<br /> [page:Function onProgress] — (optional) A function to be called while the loading is in progress. The argument will be the XMLHttpRequest instance, which contains [page:Integer total] and [page:Integer loaded] bytes.<br />
[page:Function onError] — (optional) A function to be called if an error occurs during loading. The function receives the error as an argument.<br /> [page:Function onError] — (optional) A function to be called if an error occurs during loading. The function receives the error as an argument.<br />
</div> </p>
<div> <p>
Begin loading from url and call onLoad with the parsed response content. Begin loading from url and call onLoad with the parsed response content.
</div> </p>
<h3>[method:Object parse]( [param:String text] )</h3> <h3>[method:Object parse]( [param:String text] )</h3>
<div> <p>
[page:String text] — The textual <em>pdb</em> structure to parse. [page:String text] — The textual <em>pdb</em> structure to parse.
</div> </p>
<div> <p>
Parse a <em>pdb</em> text and return a <em>JSON</em> structure.<br /> Parse a <em>pdb</em> text and return a <em>JSON</em> structure.<br />
</div> </p>
<h2>Source</h2> <h2>Source</h2>
......
...@@ -11,13 +11,13 @@ ...@@ -11,13 +11,13 @@
<h1>[name]</h1> <h1>[name]</h1>
<div class="desc">A loader for loading a <em>.prwm</em> resource.<br /> <p class="desc">A loader for loading a <em>.prwm</em> resource.<br />
Packed Raw WebGL Model is an open-source binary file format for nD geometries specifically designed for Packed Raw WebGL Model is an open-source binary file format for nD geometries specifically designed for
JavaScript and WebGL with a strong focus on fast parsing (from 1ms to 0.1ms in Chrome 59 JavaScript and WebGL with a strong focus on fast parsing (from 1ms to 0.1ms in Chrome 59
on a MBP Late 2013). The parsing of PRWM file is especially fast when the endianness of the file is on a MBP Late 2013). The parsing of PRWM file is especially fast when the endianness of the file is
the same as the endianness of the client platform. More information the same as the endianness of the client platform. More information
on this <a href="https://github.com/kchapelier/PRWM">here</a>. on this <a href="https://github.com/kchapelier/PRWM">here</a>.
</div> </p>
<h2>Example</h2> <h2>Example</h2>
...@@ -57,12 +57,12 @@ ...@@ -57,12 +57,12 @@
<h2>Constructor</h2> <h2>Constructor</h2>
<h3>[name]( [param:LoadingManager manager] )</h3> <h3>[name]( [param:LoadingManager manager] )</h3>
<div> <p>
[page:LoadingManager manager] — The [page:LoadingManager loadingManager] for the loader to use. Default is [page:LoadingManager THREE.DefaultLoadingManager]. [page:LoadingManager manager] — The [page:LoadingManager loadingManager] for the loader to use. Default is [page:LoadingManager THREE.DefaultLoadingManager].
</div> </p>
<div> <p>
Creates a new [name]. Creates a new [name].
</div> </p>
<h2>Properties</h2> <h2>Properties</h2>
...@@ -70,29 +70,29 @@ ...@@ -70,29 +70,29 @@
<h2>Methods</h2> <h2>Methods</h2>
<h3>[method:null load]( [param:String url], [param:Function onLoad], [param:Function onProgress], [param:Function onError] )</h3> <h3>[method:null load]( [param:String url], [param:Function onLoad], [param:Function onProgress], [param:Function onError] )</h3>
<div> <p>
[page:String url] — A string containing the path/URL of the <em>.prwm</em> file. Any <em>*</em> character in the URL will be automatically replaced by <em>le</em> or <em>be</em> depending on the platform endianness.<br /> [page:String url] — A string containing the path/URL of the <em>.prwm</em> file. Any <em>*</em> character in the URL will be automatically replaced by <em>le</em> or <em>be</em> depending on the platform endianness.<br />
[page:Function onLoad] — (optional) A function to be called after the loading is successfully completed. The function receives the loaded [page:BufferGeometry] as an argument.<br /> [page:Function onLoad] — (optional) A function to be called after the loading is successfully completed. The function receives the loaded [page:BufferGeometry] as an argument.<br />
[page:Function onProgress] — (optional) A function to be called while the loading is in progress. The function receives a XMLHttpRequest instance, which contains [page:Integer total] and [page:Integer loaded] bytes.<br /> [page:Function onProgress] — (optional) A function to be called while the loading is in progress. The function receives a XMLHttpRequest instance, which contains [page:Integer total] and [page:Integer loaded] bytes.<br />
[page:Function onError] — (optional) A function to be called if an error occurs during loading. The function receives error as an argument.<br /> [page:Function onError] — (optional) A function to be called if an error occurs during loading. The function receives error as an argument.<br />
</div> </p>
<div> <p>
Begin loading from url and call onLoad with the parsed response content. Begin loading from url and call onLoad with the parsed response content.
</div> </p>
<h3>[method:BufferGeometry parse]( [param:ArrayBuffer arrayBuffer] )</h3> <h3>[method:BufferGeometry parse]( [param:ArrayBuffer arrayBuffer] )</h3>
<div> <p>
[page:ArrayBuffer arrayBuffer] — ArrayBuffer containing the <em>prwm</em> data. [page:ArrayBuffer arrayBuffer] — ArrayBuffer containing the <em>prwm</em> data.
</div> </p>
<div> <p>
Parse a <em>prwm</em> file passed as an ArrayBuffer and directly return an instance of [page:BufferGeometry]. Parse a <em>prwm</em> file passed as an ArrayBuffer and directly return an instance of [page:BufferGeometry].
</div> </p>
<h3>PRWMLoader.isBigEndianPlatform( )</h3> <h3>PRWMLoader.isBigEndianPlatform( )</h3>
<div> <p>
Return true if the endianness of the platform is Big Endian, false otherwise. Return true if the endianness of the platform is Big Endian, false otherwise.
</div> </p>
<h2>Source</h2> <h2>Source</h2>
...@@ -100,9 +100,9 @@ ...@@ -100,9 +100,9 @@
<h2>Additional notes</h2> <h2>Additional notes</h2>
<div> <p>
This loader is additionally available on npm as <a href="https://www.npmjs.com/package/three-prwm-loader">three-prwm-loader</a>. This loader is additionally available on npm as <a href="https://www.npmjs.com/package/three-prwm-loader">three-prwm-loader</a>.
</div> </p>
</body> </body>
</html> </html>
...@@ -11,9 +11,9 @@ ...@@ -11,9 +11,9 @@
<h1>[name]</h1> <h1>[name]</h1>
<div class="desc">A loader for loading a <em>.svg</em> resource.<br > <p class="desc">A loader for loading a <em>.svg</em> resource.<br >
<a href="https://en.wikipedia.org/wiki/Scalable_Vector_Graphics">Scalabe Vector Graphics</a> is an XML-based vector image format for two-dimensional graphics with support for interactivity and animation. <a href="https://en.wikipedia.org/wiki/Scalable_Vector_Graphics">Scalabe Vector Graphics</a> is an XML-based vector image format for two-dimensional graphics with support for interactivity and animation.
</div> </p>
<h2>Example</h2> <h2>Example</h2>
...@@ -51,12 +51,12 @@ ...@@ -51,12 +51,12 @@
<h2>Constructor</h2> <h2>Constructor</h2>
<h3>[name]( [param:LoadingManager manager] )</h3> <h3>[name]( [param:LoadingManager manager] )</h3>
<div> <p>
[page:LoadingManager manager] — The [page:LoadingManager loadingManager] for the loader to use. Default is [page:LoadingManager THREE.DefaultLoadingManager]. [page:LoadingManager manager] — The [page:LoadingManager loadingManager] for the loader to use. Default is [page:LoadingManager THREE.DefaultLoadingManager].
</div> </p>
<div> <p>
Creates a new [name]. Creates a new [name].
</div> </p>
<h2>Properties</h2> <h2>Properties</h2>
...@@ -64,15 +64,15 @@ ...@@ -64,15 +64,15 @@
<h2>Methods</h2> <h2>Methods</h2>
<h3>[method:null load]( [param:String url], [param:Function onLoad], [param:Function onProgress], [param:Function onError] )</h3> <h3>[method:null load]( [param:String url], [param:Function onLoad], [param:Function onProgress], [param:Function onError] )</h3>
<div> <p>
[page:String url] — A string containing the path/URL of the <em>.svg</em> file.<br /> [page:String url] — A string containing the path/URL of the <em>.svg</em> file.<br />
[page:Function onLoad] — (optional) A function to be called after loading is successfully completed. The function receives the loaded [page:SVGDocument] as an argument.<br /> [page:Function onLoad] — (optional) A function to be called after loading is successfully completed. The function receives the loaded [page:SVGDocument] as an argument.<br />
[page:Function onProgress] — (optional) A function to be called while the loading is in progress. The argument will be the XMLHttpRequest instance, which contains [page:Integer total] and [page:Integer loaded] bytes.<br /> [page:Function onProgress] — (optional) A function to be called while the loading is in progress. The argument will be the XMLHttpRequest instance, which contains [page:Integer total] and [page:Integer loaded] bytes.<br />
[page:Function onError] — (optional) A function to be called if an error occurs during loading. The function receives the error as an argument.<br /> [page:Function onError] — (optional) A function to be called if an error occurs during loading. The function receives the error as an argument.<br />
</div> </p>
<div> <p>
Begin loading from url and call onLoad with the response content. Begin loading from url and call onLoad with the response content.
</div> </p>
<h2>Source</h2> <h2>Source</h2>
......
...@@ -10,9 +10,9 @@ ...@@ -10,9 +10,9 @@
<body> <body>
<h1>[name]</h1> <h1>[name]</h1>
<div class="desc">A loader for loading a <em>.tga</em> resource. <br /> <p class="desc">A loader for loading a <em>.tga</em> resource. <br />
<a href="https://en.wikipedia.org/wiki/Truevision_TGA">TGA</a> is a raster graphics, image file format. <a href="https://en.wikipedia.org/wiki/Truevision_TGA">TGA</a> is a raster graphics, image file format.
</div> </p>
<h2>Example</h2> <h2>Example</h2>
...@@ -55,26 +55,26 @@ ...@@ -55,26 +55,26 @@
<h2>Constructor</h2> <h2>Constructor</h2>
<h3>[name]( [param:LoadingManager manager] )</h3> <h3>[name]( [param:LoadingManager manager] )</h3>
<div> <p>
[page:LoadingManager manager] — The [page:LoadingManager loadingManager] for the loader to use. Default is [page:LoadingManager THREE.DefaultLoadingManager]. [page:LoadingManager manager] — The [page:LoadingManager loadingManager] for the loader to use. Default is [page:LoadingManager THREE.DefaultLoadingManager].
</div> </p>
<div> <p>
Creates a new [name]. Creates a new [name].
</div> </p>
<h2>Methods</h2> <h2>Methods</h2>
<h3>[method:DataTexture load]( [param:String url], [param:Function onLoad], [param:Function onProgress], [param:Function onError] )</h3> <h3>[method:DataTexture load]( [param:String url], [param:Function onLoad], [param:Function onProgress], [param:Function onError] )</h3>
<div> <p>
[page:String url] — A string containing the path/URL of the <em>.tga</em> file. <br /> [page:String url] — A string containing the path/URL of the <em>.tga</em> file. <br />
[page:Function onLoad] — (optional) A function to be called after loading is successfully completed. The function receives loaded [page:DataTexture] as an argument.<br /> [page:Function onLoad] — (optional) A function to be called after loading is successfully completed. The function receives loaded [page:DataTexture] as an argument.<br />
[page:Function onProgress] — (optional) A function to be called while the loading is in progress. The argument will be the XMLHttpRequest instance, which contains .[page:Integer total] and .[page:Integer loaded] bytes.<br /> [page:Function onProgress] — (optional) A function to be called while the loading is in progress. The argument will be the XMLHttpRequest instance, which contains .[page:Integer total] and .[page:Integer loaded] bytes.<br />
[page:Function onError] — (optional) A function to be called if an error occurs during loading. The function receives the error as an argument.<br /> [page:Function onError] — (optional) A function to be called if an error occurs during loading. The function receives the error as an argument.<br />
</div> </p>
<div> <p>
Begin loading from url and pass the loaded [page:DataTexture texture] to onLoad. The [page:DataTexture texture] is also directly returned for immediate use (but may not be fully loaded). Begin loading from url and pass the loaded [page:DataTexture texture] to onLoad. The [page:DataTexture texture] is also directly returned for immediate use (but may not be fully loaded).
</div> </p>
<h2>Source</h2> <h2>Source</h2>
......
...@@ -12,13 +12,13 @@ ...@@ -12,13 +12,13 @@
<h1>[name]</h1> <h1>[name]</h1>
<div class="desc"> <p class="desc">
Creates a simulated lens flare that tracks a light.<br /><br /> Creates a simulated lens flare that tracks a light.<br /><br />
</div> </p>
<h2>Example</h2> <h2>Example</h2>
<div> <p>
[example:webgl_lensflares lensflares] [example:webgl_lensflares lensflares]
<code> <code>
...@@ -39,29 +39,29 @@ lensflare.addElement( new THREE.LensflareElement( textureFlare2, 60, 0.6 ) ); ...@@ -39,29 +39,29 @@ lensflare.addElement( new THREE.LensflareElement( textureFlare2, 60, 0.6 ) );
light.add( lensflare ); light.add( lensflare );
</code> </code>
</div> </p>
<h2>Constructor</h2> <h2>Constructor</h2>
<h3>LensflareElement( [param:Texture texture], [param:Float size], [param:Float distance], [param:Color color], [param:Materials blending] )</h3> <h3>LensflareElement( [param:Texture texture], [param:Float size], [param:Float distance], [param:Color color], [param:Materials blending] )</h3>
<div> <p>
[page:Texture texture] - THREE.Texture to use for the flare. <br /> [page:Texture texture] - THREE.Texture to use for the flare. <br />
[page:Float size] - (optional) size in pixels <br /> [page:Float size] - (optional) size in pixels <br />
[page:Float distance] - (optional) (0-1) from light source (0 = at light source) <br /> [page:Float distance] - (optional) (0-1) from light source (0 = at light source) <br />
[page:Color color] - (optional) the [page:Color] of the lens flare<br /> [page:Color color] - (optional) the [page:Color] of the lens flare<br />
[page:Materials blending] - (optional) [page:Materials Blending Mode] - Defaults to THREE.NormalBlending [page:Materials blending] - (optional) [page:Materials Blending Mode] - Defaults to THREE.NormalBlending
</div> </p>
<h2>Properties</h2> <h2>Properties</h2>
<div>See the base [page:Mesh] class for common properties.</div> <p>See the base [page:Mesh] class for common properties.</p>
<h3>[property:Boolean isLensflare]</h3> <h3>[property:Boolean isLensflare]</h3>
<div> <p>
Used to check whether this or derived classes are lensflares. Default is *true*.<br /><br /> Used to check whether this or derived classes are lensflares. Default is *true*.<br /><br />
You should not change this, as it used internally for optimisation. You should not change this, as it used internally for optimisation.
</div> </p>
<h2>Source</h2> <h2>Source</h2>
......
...@@ -10,54 +10,54 @@ ...@@ -10,54 +10,54 @@
<body> <body>
<h1>[name]</h1> <h1>[name]</h1>
<div class="desc"> <p class="desc">
Represents a section bounded by a specific amount of half-edges. The current implmentation assumes that a face always consist of three edges. Represents a section bounded by a specific amount of half-edges. The current implmentation assumes that a face always consist of three edges.
</div> </p>
<h2>Constructor</h2> <h2>Constructor</h2>
<h3>[name]()</h3> <h3>[name]()</h3>
<p>
</div> </p>
<h2>Properties</h2> <h2>Properties</h2>
<h3>[property:Vector3 normal]</h3> <h3>[property:Vector3 normal]</h3>
<div> <p>
The normal vector of the face. Default is a [page:Vector3] at (0, 0, 0). The normal vector of the face. Default is a [page:Vector3] at (0, 0, 0).
</div> </p>
<h3>[property:Vector3 midpoint]</h3> <h3>[property:Vector3 midpoint]</h3>
<div> <p>
The midpoint or centroid of the face. Default is a [page:Vector3] at (0, 0, 0). The midpoint or centroid of the face. Default is a [page:Vector3] at (0, 0, 0).
</div> </p>
<h3>[property:Float area]</h3> <h3>[property:Float area]</h3>
<div> <p>
The area of the face. Default is 0. The area of the face. Default is 0.
</div> </p>
<h3>[property:Float constant]</h3> <h3>[property:Float constant]</h3>
<div> <p>
Signed distance from face to the origin. Default is 0. Signed distance from face to the origin. Default is 0.
</div> </p>
<h3>[property:VertexNode outside]</h3> <h3>[property:VertexNode outside]</h3>
<div> <p>
Reference to a vertex in a vertex list this face can see. Default is null. Reference to a vertex in a vertex list this face can see. Default is null.
</div> </p>
<h3>[property:Integer mark]</h3> <h3>[property:Integer mark]</h3>
<div> <p>
Marks if a face is visible or deleted. Default is 'Visible'. Marks if a face is visible or deleted. Default is 'Visible'.
</div> </p>
<h3>[property:HalfEdge edge]</h3> <h3>[property:HalfEdge edge]</h3>
<div> <p>
Reference to the base edge of a face. To retrieve all edges, you can use the 'next' reference of the current edge. Default is null. Reference to the base edge of a face. To retrieve all edges, you can use the 'next' reference of the current edge. Default is null.
</div> </p>
<h2>Methods</h2> <h2>Methods</h2>
...@@ -66,21 +66,21 @@ ...@@ -66,21 +66,21 @@
[page:VertexNode b] - Second vertex of the face.<br /><br /> [page:VertexNode b] - Second vertex of the face.<br /><br />
[page:VertexNode c] - Third vertex of the face.<br /><br /> [page:VertexNode c] - Third vertex of the face.<br /><br />
<div>Creates a face.</div> <p>Creates a face.</p>
<h3>[method:HalfEdge getEdge]( [param:Integer i] )</h3> <h3>[method:HalfEdge getEdge]( [param:Integer i] )</h3>
[page:Integer i] - The index of the edge.<br /><br /> [page:Integer i] - The index of the edge.<br /><br />
<div>Returns an edge by the given index.</div> <p>Returns an edge by the given index.</p>
<h3>[method:Face compute] ()</h3> <h3>[method:Face compute] ()</h3>
<div>Computes all properties of the face.</div> <p>Computes all properties of the face.</p>
<h3>[method:Float distanceToPoint]( [param:Vector3 point] )</h3> <h3>[method:Float distanceToPoint]( [param:Vector3 point] )</h3>
[page:Vector3 point] - Any point in 3D space.<br /><br /> [page:Vector3 point] - Any point in 3D space.<br /><br />
<div>Returns the signed distance from a given point to the plane representation of this face.</div> <p>Returns the signed distance from a given point to the plane representation of this face.</p>
<h2>Source</h2> <h2>Source</h2>
......
...@@ -10,67 +10,67 @@ ...@@ -10,67 +10,67 @@
<body> <body>
<h1>[name]</h1> <h1>[name]</h1>
<div class="desc"> <p class="desc">
The basis for a half-edge data structure, also known as doubly connected edge list (DCEL).<br /> The basis for a half-edge data structure, also known as doubly connected edge list (DCEL).<br />
</div> </p>
<h2>Constructor</h2> <h2>Constructor</h2>
<h3>[name]( [param:VertexNode vertex], [param:Face face] )</h3> <h3>[name]( [param:VertexNode vertex], [param:Face face] )</h3>
<p>
[page:VertexNode vertex] - [page:VertexNode] A reference to its destination vertex.<br /><br /> [page:VertexNode vertex] - [page:VertexNode] A reference to its destination vertex.<br /><br />
[page:Face face] - [page:Face] A reference to its face.<br /> [page:Face face] - [page:Face] A reference to its face.<br />
</p>
</div>
<h2>Properties</h2> <h2>Properties</h2>
<h3>[property:VertexNode vertex]</h3> <h3>[property:VertexNode vertex]</h3>
<div> <p>
Reference to the destination vertex. The origin vertex can be obtained by querying the destination of its twin, or of the previous half-edge. Default is undefined. Reference to the destination vertex. The origin vertex can be obtained by querying the destination of its twin, or of the previous half-edge. Default is undefined.
</div> </p>
<h3>[property:HalfEdge prev]</h3> <h3>[property:HalfEdge prev]</h3>
<div> <p>
Reference to the previous half-edge of the same face. Default is null. Reference to the previous half-edge of the same face. Default is null.
</div> </p>
<h3>[property:HalfEdge next]</h3> <h3>[property:HalfEdge next]</h3>
<div> <p>
Reference to the next half-edge of the same face. Default is null. Reference to the next half-edge of the same face. Default is null.
</div> </p>
<h3>[property:HalfEdge twin]</h3> <h3>[property:HalfEdge twin]</h3>
<div> <p>
Reference to the twin half-edge to reach the opposite face. Default is null. Reference to the twin half-edge to reach the opposite face. Default is null.
</div> </p>
<h3>[property:Face face]</h3> <h3>[property:Face face]</h3>
<div> <p>
Each half-edge bounds a single face and thus has a reference to that face. Default is undefined. Each half-edge bounds a single face and thus has a reference to that face. Default is undefined.
</div> </p>
<h2>Methods</h2> <h2>Methods</h2>
<h3>[method:VertexNode head]()</h3> <h3>[method:VertexNode head]()</h3>
<div>Returns the destintation vertex.</div> <p>Returns the destintation vertex.</p>
<h3>[method:VertexNode tail]()</h3> <h3>[method:VertexNode tail]()</h3>
<div>Returns the origin vertex.</div> <p>Returns the origin vertex.</p>
<h3>[method:Float length]()</h3> <h3>[method:Float length]()</h3>
<div>Returns the [link:https://en.wikipedia.org/wiki/Euclidean_distance Euclidean length] <p>Returns the [link:https://en.wikipedia.org/wiki/Euclidean_distance Euclidean length]
(straight-line length) of the edge.</div> (straight-line length) of the edge.</p>
<h3>[method:Float lengthSquared]()</h3> <h3>[method:Float lengthSquared]()</h3>
<div>Returns the square of the [link:https://en.wikipedia.org/wiki/Euclidean_distance Euclidean length] <p>Returns the square of the [link:https://en.wikipedia.org/wiki/Euclidean_distance Euclidean length]
(straight-line length) of the edge.</div> (straight-line length) of the edge.</p>
<h3>[method:HalfEdge setTwin]( [param:HalfEdge edge] )</h3> <h3>[method:HalfEdge setTwin]( [param:HalfEdge edge] )</h3>
[page:HalfEdge edge] - Any half-edge.<br /><br /> [page:HalfEdge edge] - Any half-edge.<br /><br />
<div>Sets the twin edge of this half-edge. It also ensures that the twin reference of the given half-edge is correctly set.</div> <p>Sets the twin edge of this half-edge. It also ensures that the twin reference of the given half-edge is correctly set.</p>
<h2>Source</h2> <h2>Source</h2>
......
...@@ -10,122 +10,122 @@ ...@@ -10,122 +10,122 @@
<body> <body>
<h1>[name]</h1> <h1>[name]</h1>
<div class="desc"> <p class="desc">
General information about the Quickhull algorithm: Dirk Gregorius. March 2014, Game Developers Conference: [link:http://media.steampowered.com/apps/valve/2014/DirkGregorius_ImplementingQuickHull.pdf Implementing QuickHull]. General information about the Quickhull algorithm: Dirk Gregorius. March 2014, Game Developers Conference: [link:http://media.steampowered.com/apps/valve/2014/DirkGregorius_ImplementingQuickHull.pdf Implementing QuickHull].
</div> </p>
<h2>Constructor</h2> <h2>Constructor</h2>
<h3>[name]()</h3> <h3>[name]()</h3>
<p>
</div> </p>
<h2>Properties</h2> <h2>Properties</h2>
<h3>[property:Float tolerance]</h3> <h3>[property:Float tolerance]</h3>
<div> <p>
The epsilon value that is used for internal comparative operations. The calculation of this value depends on the size of the geometry. Default is -1. The epsilon value that is used for internal comparative operations. The calculation of this value depends on the size of the geometry. Default is -1.
</div> </p>
<h3>[property:Array faces]</h3> <h3>[property:Array faces]</h3>
<div> <p>
The generated faces of the convex hull. Default is an empty array. The generated faces of the convex hull. Default is an empty array.
</div> </p>
<h3>[property:Array newFaces]</h3> <h3>[property:Array newFaces]</h3>
<div> <p>
This array holds the faces that are generated within a single iteration. Default is an empty array. This array holds the faces that are generated within a single iteration. Default is an empty array.
</div> </p>
<h3>[property:VertexList assigned]</h3> <h3>[property:VertexList assigned]</h3>
<div> <p>
This [page:VertexList vertex list] holds all vertices that are assigned to a face. Default is an empty vertex list. This [page:VertexList vertex list] holds all vertices that are assigned to a face. Default is an empty vertex list.
</div> </p>
<h3>[property:VertexList unassigned]</h3> <h3>[property:VertexList unassigned]</h3>
<div> <p>
This [page:VertexList vertex list] holds all vertices that are not assigned to a face. Default is an empty vertex list. This [page:VertexList vertex list] holds all vertices that are not assigned to a face. Default is an empty vertex list.
</div> </p>
<h3>[property:Array vertices]</h3> <h3>[property:Array vertices]</h3>
<div> <p>
The internal representation of the given geometry data (an array of [page:VertexNode vertices]). The internal representation of the given geometry data (an array of [page:VertexNode vertices]).
</div> </p>
<h2>Methods</h2> <h2>Methods</h2>
<h3>[method:QuickHull setFromPoints]( [param:Array points] )</h3> <h3>[method:QuickHull setFromPoints]( [param:Array points] )</h3>
[page:Array points] - Array of [page:Vector3 Vector3s] that the resulting convex hull will contain.<br /><br /> [page:Array points] - Array of [page:Vector3 Vector3s] that the resulting convex hull will contain.<br /><br />
<div>Computes to convex hull for the given array of points.</div> <p>Computes to convex hull for the given array of points.</p>
<h3>[method:QuickHull setFromObject]( [param:Object3D object] )</h3> <h3>[method:QuickHull setFromObject]( [param:Object3D object] )</h3>
[page:Object3D object] - [page:Object3D] to compute the convex hull of.<br /><br /> [page:Object3D object] - [page:Object3D] to compute the convex hull of.<br /><br />
<div>Computes the convex hull of an [page:Object3D] (including its children), <p>Computes the convex hull of an [page:Object3D] (including its children),
accounting for the world transforms of both the object and its childrens.</div> accounting for the world transforms of both the object and its childrens.</p>
<h3>[method:QuickHull makeEmpty]()</h3> <h3>[method:QuickHull makeEmpty]()</h3>
<div>Makes this convex hull empty.</div> <p>Makes this convex hull empty.</p>
<h3>[method:QuickHull addVertexToFace]( [param:VertexNode vertex], [param:Face face] )</h3> <h3>[method:QuickHull addVertexToFace]( [param:VertexNode vertex], [param:Face face] )</h3>
[page:VertexNodeNode vertex] - The vetex to add.<br /><br /> [page:VertexNodeNode vertex] - The vetex to add.<br /><br />
[page:Face face] - The target face.<br /><br /> [page:Face face] - The target face.<br /><br />
<div>Adds a vertex to the 'assigned' list of vertices and assigns it to the given face.</div> <p>Adds a vertex to the 'assigned' list of vertices and assigns it to the given face.</p>
<h3>[method:QuickHull removeVertexFromFace]( [param:VertexNode vertex], [param:Face face] )</h3> <h3>[method:QuickHull removeVertexFromFace]( [param:VertexNode vertex], [param:Face face] )</h3>
[page:VertexNode vertex] - The vetex to remove.<br /><br /> [page:VertexNode vertex] - The vetex to remove.<br /><br />
[page:Face face] - The target face.<br /><br /> [page:Face face] - The target face.<br /><br />
<div>Removes a vertex from the 'assigned' list of vertices and from the given face. It also makes sure that the link from 'face' to the first vertex it sees in 'assigned' is linked correctly after the removal.</div> <p>Removes a vertex from the 'assigned' list of vertices and from the given face. It also makes sure that the link from 'face' to the first vertex it sees in 'assigned' is linked correctly after the removal.</p>
<h3>[method:VertexNode removeAllVerticesFromFace]( [param:Face face] )</h3> <h3>[method:VertexNode removeAllVerticesFromFace]( [param:Face face] )</h3>
[page:Face face] - The given face.<br /><br /> [page:Face face] - The given face.<br /><br />
<div>Removes all the visible vertices that a given face is able to see which are stored in the 'assigned' vertext list.</div> <p>Removes all the visible vertices that a given face is able to see which are stored in the 'assigned' vertext list.</p>
<h3>[method:QuickHull deleteFaceVertices]( [param:Face face], [param:Face absorbingFace] )</h3> <h3>[method:QuickHull deleteFaceVertices]( [param:Face face], [param:Face absorbingFace] )</h3>
[page:Face face] - The given face.<br /><br /> [page:Face face] - The given face.<br /><br />
[page:Face absorbingFace] - An optional face that tries to absorb the vertices of the first face.<br /><br /> [page:Face absorbingFace] - An optional face that tries to absorb the vertices of the first face.<br /><br />
<div>Removes all the visible vertices that 'face' is able to see. <p>Removes all the visible vertices that 'face' is able to see.
<ul> <ul>
<li>If 'absorbingFace' doesn't exist, then all the removed vertices will be added to the 'unassigned' vertex list.</li> <li>If 'absorbingFace' doesn't exist, then all the removed vertices will be added to the 'unassigned' vertex list.</li>
<li>If 'absorbingFace' exists, then this method will assign all the vertices of 'face' that can see 'absorbingFace'.</li> <li>If 'absorbingFace' exists, then this method will assign all the vertices of 'face' that can see 'absorbingFace'.</li>
<li>If a vertex cannot see 'absorbingFace', it's added to the 'unassigned' vertex list.</li> <li>If a vertex cannot see 'absorbingFace', it's added to the 'unassigned' vertex list.</li>
</ul> </ul>
</div> </p>
<h3>[method:QuickHull resolveUnassignedPoints]( [param:Array newFaces] )</h3> <h3>[method:QuickHull resolveUnassignedPoints]( [param:Array newFaces] )</h3>
[page:Face newFaces] - An array of new faces.<br /><br /> [page:Face newFaces] - An array of new faces.<br /><br />
<div>Reassigns as many vertices as possible from the unassigned list to the new faces.</div> <p>Reassigns as many vertices as possible from the unassigned list to the new faces.</p>
<h3>[method:Object computeExtremes]()</h3> <h3>[method:Object computeExtremes]()</h3>
<div>Computes the extremes values (min/max vectors) which will be used to compute the inital hull.</div> <p>Computes the extremes values (min/max vectors) which will be used to compute the inital hull.</p>
<h3>[method:QuickHull computeInitialHull]()</h3> <h3>[method:QuickHull computeInitialHull]()</h3>
<div>Computes the initial simplex assigning to its faces all the points that are candidates to form part of the hull.</div> <p>Computes the initial simplex assigning to its faces all the points that are candidates to form part of the hull.</p>
<h3>[method:QuickHull reindexFaces]()</h3> <h3>[method:QuickHull reindexFaces]()</h3>
<div>Removes inactive (e.g. deleted) faces from the internal face list.</div> <p>Removes inactive (e.g. deleted) faces from the internal face list.</p>
<h3>[method:VertexNode nextVertexToAdd]()</h3> <h3>[method:VertexNode nextVertexToAdd]()</h3>
<div>Finds the next vertex to create faces with the current hull. <p>Finds the next vertex to create faces with the current hull.
<ul> <ul>
<li>Let the initial face be the first face existing in the 'assigned' vertex list.</li> <li>Let the initial face be the first face existing in the 'assigned' vertex list.</li>
<li>If a face doesn't exist then return since there're no vertices left.</li> <li>If a face doesn't exist then return since there're no vertices left.</li>
<li>Otherwise for each vertex that face sees find the one furthest away from it.</li> <li>Otherwise for each vertex that face sees find the one furthest away from it.</li>
</ul> </ul>
</div> </p>
<h3>[method:QuickHull computeHorizon]( [param:Vector3 eyePoint], [param:HalfEdge crossEdge], [param:Face face], [param:Array horizon] )</h3> <h3>[method:QuickHull computeHorizon]( [param:Vector3 eyePoint], [param:HalfEdge crossEdge], [param:Face face], [param:Array horizon] )</h3>
[page:Vector3 eyePoint] - The 3D-coordinates of a point.<br /><br /> [page:Vector3 eyePoint] - The 3D-coordinates of a point.<br /><br />
...@@ -133,40 +133,40 @@ ...@@ -133,40 +133,40 @@
[page:Face face] - The current face being tested.<br /><br /> [page:Face face] - The current face being tested.<br /><br />
[page:Array horizon] - The edges that form part of the horizon in CCW order.<br /><br /> [page:Array horizon] - The edges that form part of the horizon in CCW order.<br /><br />
<div>Computes a chain of half edges in CCW order called the 'horizon'. For an edge to be part of the horizon it must join a face that can see 'eyePoint' and a face that cannot see 'eyePoint'.</div> <p>Computes a chain of half edges in CCW order called the 'horizon'. For an edge to be part of the horizon it must join a face that can see 'eyePoint' and a face that cannot see 'eyePoint'.</p>
<h3>[method:HalfEdge addAdjoiningFace]( [param:VertexNode eyeVertex], [param:HalfEdge horizonEdge] )</h3> <h3>[method:HalfEdge addAdjoiningFace]( [param:VertexNode eyeVertex], [param:HalfEdge horizonEdge] )</h3>
[page:VertexNode eyeVertex] - The vertex that is added to the hull.<br /><br /> [page:VertexNode eyeVertex] - The vertex that is added to the hull.<br /><br />
[page:HalfEdge horizonEdge] - A single edge of the horizon.<br /><br /> [page:HalfEdge horizonEdge] - A single edge of the horizon.<br /><br />
<div>Creates a face with the vertices 'eyeVertex.point', 'horizonEdge.tail' and 'horizonEdge.head' in CCW order. <p>Creates a face with the vertices 'eyeVertex.point', 'horizonEdge.tail' and 'horizonEdge.head' in CCW order.
All the half edges are created in CCW order thus the face is always pointing outside the hull</div> All the half edges are created in CCW order thus the face is always pointing outside the hull</p>
<h3>[method:QuickHull addNewFaces]( [param:VertexNode eyeVertex], [param:HalfEdge horizonEdge] )</h3> <h3>[method:QuickHull addNewFaces]( [param:VertexNode eyeVertex], [param:HalfEdge horizonEdge] )</h3>
[page:VertexNode eyeVertex] - The vertex that is added to the hull.<br /><br /> [page:VertexNode eyeVertex] - The vertex that is added to the hull.<br /><br />
[page:HalfEdge horizon] - An array of half-edges that form the horizon.<br /><br /> [page:HalfEdge horizon] - An array of half-edges that form the horizon.<br /><br />
<div>Adds 'horizon.length' faces to the hull, each face will be linked with the horizon opposite face and the face on the left/right.</div> <p>Adds 'horizon.length' faces to the hull, each face will be linked with the horizon opposite face and the face on the left/right.</p>
<h3>[method:QuickHull addVertexToHull]( [param:VertexNode eyeVertex] )</h3> <h3>[method:QuickHull addVertexToHull]( [param:VertexNode eyeVertex] )</h3>
[page:VertexNode eyeVertex] - The vertex that is added to the hull.<br /><br /> [page:VertexNode eyeVertex] - The vertex that is added to the hull.<br /><br />
<div>Adds a vertex to the hull with the following algorithm <p>Adds a vertex to the hull with the following algorithm
<ul> <ul>
<li>Compute the 'horizon' which is a chain of half edges. For an edge to belong to this group it must be the edge connecting a face that can see 'eyeVertex' and a face which cannot see 'eyeVertex'.</li> <li>Compute the 'horizon' which is a chain of half edges. For an edge to belong to this group it must be the edge connecting a face that can see 'eyeVertex' and a face which cannot see 'eyeVertex'.</li>
<li>All the faces that can see 'eyeVertex' have its visible vertices removed from the assigned vertex list.</li> <li>All the faces that can see 'eyeVertex' have its visible vertices removed from the assigned vertex list.</li>
<li>A new set of faces is created with each edge of the 'horizon' and 'eyeVertex'. Each face is connected with the opposite horizon face and the face on the left/right.</li> <li>A new set of faces is created with each edge of the 'horizon' and 'eyeVertex'. Each face is connected with the opposite horizon face and the face on the left/right.</li>
<li>The vertices removed from all the visible faces are assigned to the new faces if possible.</li> <li>The vertices removed from all the visible faces are assigned to the new faces if possible.</li>
</ul> </ul>
</div> </p>
<h3>[method:QuickHull cleanup]()</h3> <h3>[method:QuickHull cleanup]()</h3>
<div>Cleans up internal properties after computing the convex hull.</div> <p>Cleans up internal properties after computing the convex hull.</p>
<h3>[method:QuickHull compute]()</h3> <h3>[method:QuickHull compute]()</h3>
<div>Starts the execution of the quick hull algorithm.</div> <p>Starts the execution of the quick hull algorithm.</p>
<h2>Source</h2> <h2>Source</h2>
......
...@@ -10,77 +10,79 @@ ...@@ -10,77 +10,79 @@
<body> <body>
<h1>[name]</h1> <h1>[name]</h1>
<div class="desc"> <p class="desc">
A doubly linked list of vertices. A doubly linked list of vertices.
</div> </p>
<h2>Constructor</h2> <h2>Constructor</h2>
<h3>[name]()</h3> <h3>[name]()</h3>
<p>
</div> </p>
<h2>Properties</h2> <h2>Properties</h2>
<h3>[property:VertexNode head]</h3> <h3>[property:VertexNode head]</h3>
<div> <p>
Reference to the first vertex of the linked list. Default is null. Reference to the first vertex of the linked list. Default is null.
</div> </p>
<h3>[property:VertexNode tail]</h3> <h3>[property:VertexNode tail]</h3>
<div> <p>
Reference to the last vertex of the linked list. Default is null. Reference to the last vertex of the linked list. Default is null.
</div> </p>
<h2>Methods</h2> <h2>Methods</h2>
<h3>[method:VertexNode first]()</h3> <h3>[method:VertexNode first]()</h3>
<div>Returns the head reference.</div> <p>Returns the head reference.</p>
<h3>[method:VertexNode last]()</h3> <h3>[method:VertexNode last]()</h3>
<div>Returns the tail reference.</div> <p>Returns the tail reference.</p>
<h3>[method:VertexList clear]()</h3> <h3>[method:VertexList clear]()</h3>
<div>Clears the linked list.</div> <p>Clears the linked list.</p>
<h3>[method:VertexList insertBefore]( [param:Vertex target], [param:Vertex vertex] )</h3> <h3>[method:VertexList insertBefore]( [param:Vertex target], [param:Vertex vertex] )</h3>
<p>
[page:Vertex target] - The target vertex. It's assumed that this vertex belongs to the linked list.<br /><br /> [page:Vertex target] - The target vertex. It's assumed that this vertex belongs to the linked list.<br /><br />
[page:Vertex vertex] - The vertex to insert.<br /><br /> [page:Vertex vertex] - The vertex to insert.<br /><br />
</p>
<div>Inserts a vertex <strong>before</strong> a target vertex.</div> <p>Inserts a vertex <strong>before</strong> a target vertex.</p>
<h3>[method:VertexList insertAfter]( [param:Vertex target], [param:Vertex vertex] )</h3> <h3>[method:VertexList insertAfter]( [param:Vertex target], [param:Vertex vertex] )</h3>
[page:Vertex target] - The target vertex. It's assumed that this vertex belongs to the linked list.<br /><br /> [page:Vertex target] - The target vertex. It's assumed that this vertex belongs to the linked list.<br /><br />
[page:Vertex vertex] - The vertex to insert.<br /><br /> [page:Vertex vertex] - The vertex to insert.<br /><br />
<div>Inserts a vertex <strong>after</strong> a target vertex.</div> <p>Inserts a vertex <strong>after</strong> a target vertex.</p>
<h3>[method:VertexList append]( [param:Vertex vertex] )</h3> <h3>[method:VertexList append]( [param:Vertex vertex] )</h3>
[page:Vertex vertex] - The vertex to append.<br /><br /> [page:Vertex vertex] - The vertex to append.<br /><br />
<div>Appends a vertex to the end of the linked list.</div> <p>Appends a vertex to the end of the linked list.</p>
<h3>[method:VertexList appendChain]( [param:Vertex vertex] )</h3> <h3>[method:VertexList appendChain]( [param:Vertex vertex] )</h3>
[page:Vertex vertex] - The head vertex of a chain of vertices.<br /><br /> [page:Vertex vertex] - The head vertex of a chain of vertices.<br /><br />
<div>Appends a chain of vertices where the given vertex is the head.</div> <p>Appends a chain of vertices where the given vertex is the head.</p>
<h3>[method:VertexList remove]( [param:Vertex vertex] )</h3> <h3>[method:VertexList remove]( [param:Vertex vertex] )</h3>
[page:Vertex vertex] - The vertex to remove.<br /><br /> [page:Vertex vertex] - The vertex to remove.<br /><br />
<div>Removes a vertex from the linked list.</div> <p>Removes a vertex from the linked list.</p>
<h3>[method:VertexList removeSubList]( [param:Vertex a], [param:Vertex b] )</h3> <h3>[method:VertexList removeSubList]( [param:Vertex a], [param:Vertex b] )</h3>
[page:Vertex a] - The head of the sublist.<br /><br /> [page:Vertex a] - The head of the sublist.<br /><br />
[page:Vertex b] - The tail of the sublist.<br /><br /> [page:Vertex b] - The tail of the sublist.<br /><br />
<div>Removes a sublist of vertices from the linked list.</div> <p>Removes a sublist of vertices from the linked list.</p>
<h3>[method:Boolean isEmpty]()</h3> <h3>[method:Boolean isEmpty]()</h3>
<div>Returns true if the linked list is empty.</div> <p>Returns true if the linked list is empty.</p>
<h2>Source</h2> <h2>Source</h2>
......
...@@ -10,40 +10,40 @@ ...@@ -10,40 +10,40 @@
<body> <body>
<h1>[name]</h1> <h1>[name]</h1>
<div class="desc"> <p class="desc">
A vertex as a double linked list node. A vertex as a double linked list node.
</div> </p>
<h2>Constructor</h2> <h2>Constructor</h2>
<h3>[name]( [param:Vector3 point] )</h3> <h3>[name]( [param:Vector3 point] )</h3>
<p>
[page:Vector3 point] - [page:Vector3] A point (x, y, z) in 3D space.<br /><br /> [page:Vector3 point] - [page:Vector3] A point (x, y, z) in 3D space.<br /><br />
</p>
</div>
<h2>Properties</h2> <h2>Properties</h2>
<h3>[property:Vector3 point]</h3> <h3>[property:Vector3 point]</h3>
<div> <p>
A point (x, y, z) in 3D space. Default is undefined. A point (x, y, z) in 3D space. Default is undefined.
</div> </p>
<h3>[property:VertexNode prev]</h3> <h3>[property:VertexNode prev]</h3>
<div> <p>
Reference to the previous vertex in the double linked list. Default is null. Reference to the previous vertex in the double linked list. Default is null.
</div> </p>
<h3>[property:VertexNode next]</h3> <h3>[property:VertexNode next]</h3>
<div> <p>
Reference to the next vertex in the double linked list. Default is null. Reference to the next vertex in the double linked list. Default is null.
</div> </p>
<h3>[property:Face face]</h3> <h3>[property:Face face]</h3>
<div> <p>
Reference to the face that is able to see this vertex. Default is undefined. Reference to the face that is able to see this vertex. Default is undefined.
</div> </p>
<h2>Source</h2> <h2>Source</h2>
......
...@@ -10,10 +10,10 @@ ...@@ -10,10 +10,10 @@
<body> <body>
<h1>[name]</h1> <h1>[name]</h1>
<div class="desc">[name] is a simplified version of [page:CSS3DRenderer]. The only transformation that is supported is translation.<br /> <p class="desc">[name] is a simplified version of [page:CSS3DRenderer]. The only transformation that is supported is translation.<br /><br />
The renderer is very useful if you want to combine HTML based labels with 3D objects. Here too, the respective DOM elements are wrapped into an instance of *CSS2DObject* and added to the scene graph.<br /> The renderer is very useful if you want to combine HTML based labels with 3D objects. Here too, the respective DOM elements are wrapped into an instance of *CSS2DObject* and added to the scene graph.<br />
Unlike [page:CSS3DRenderer], orthographic cameras are supported. Unlike [page:CSS3DRenderer], orthographic cameras are supported.
</div> </p>
<script> <script>
...@@ -33,9 +33,9 @@ ...@@ -33,9 +33,9 @@
<h2>Examples</h2> <h2>Examples</h2>
<div> <p>
[example:webgl_loader_pdb molecules] [example:webgl_loader_pdb molecules]
</div> </p>
<h2>Constructor</h2> <h2>Constructor</h2>
...@@ -44,19 +44,19 @@ ...@@ -44,19 +44,19 @@
<h2>Methods</h2> <h2>Methods</h2>
<h3>[method:Object getSize]()</h3> <h3>[method:Object getSize]()</h3>
<div> <p>
Returns an object containing the width and height of the renderer. Returns an object containing the width and height of the renderer.
</div> </p>
<h3>[method:null render]( [param:Scene scene], [param:Camera camera] )</h3> <h3>[method:null render]( [param:Scene scene], [param:Camera camera] )</h3>
<div> <p>
Renders a [page:Scene scene] using a [page:Camera camera].<br /> Renders a [page:Scene scene] using a [page:Camera camera].<br />
</div> </p>
<h3>[method:null setSize]([param:Number width], [param:Number height])</h3> <h3>[method:null setSize]([param:Number width], [param:Number height])</h3>
<div> <p>
Resizes the renderer to (width, height). Resizes the renderer to (width, height).
</div> </p>
<h2>Source</h2> <h2>Source</h2>
......
...@@ -10,16 +10,21 @@ ...@@ -10,16 +10,21 @@
<body> <body>
<h1>[name]</h1> <h1>[name]</h1>
<div class="desc">[name] can be used to apply hierarchical 3D transformations to DOM elements via the CSS3 [link:https://www.w3schools.com/cssref/css3_pr_transform.asp transform] property.<br /> <p class="desc">[name] can be used to apply hierarchical 3D transformations to DOM elements
This renderer is particular interesting if you want to apply 3D effects to a website without canvas based rendering. It can also be used in order to combine DOM elements with WebGL content.<br /> via the CSS3 [link:https://www.w3schools.com/cssref/css3_pr_transform.asp transform] property.
This renderer is particular interesting if you want to apply 3D effects to a website without
canvas based rendering. It can also be used in order to combine DOM elements with WebGL
content.<br /><br />
There are, however, some important limitations: There are, however, some important limitations:
<ul> </p>
<li>It's not possible to use the material system of *three.js*.</li> <ul>
<li>It's also not possible to use geometries.</li> <li>It's not possible to use the material system of *three.js*.</li>
<li>Only [page:PerspectiveCamera] is supported right now.</li> <li>It's also not possible to use geometries.</li>
</ul> <li>Only [page:PerspectiveCamera] is supported right now.</li>
</ul>
<p>
So [name] is just focused on ordinary DOM elements. These elements are wrapped into special objects (*CSS3DObject* or *CSS3DSprite*) and then added to the scene graph. So [name] is just focused on ordinary DOM elements. These elements are wrapped into special objects (*CSS3DObject* or *CSS3DSprite*) and then added to the scene graph.
</div> </p>
<script> <script>
...@@ -39,12 +44,12 @@ ...@@ -39,12 +44,12 @@
<h2>Examples</h2> <h2>Examples</h2>
<div> <p>
[example:css3d_molecules molecules]<br /> [example:css3d_molecules molecules]<br />
[example:css3d_panorama panorama]<br /> [example:css3d_panorama panorama]<br />
[example:css3d_periodictable periodictable]<br /> [example:css3d_periodictable periodictable]<br />
[example:css3d_sprites sprites]<br /> [example:css3d_sprites sprites]<br />
</div> </p>
<h2>Constructor</h2> <h2>Constructor</h2>
...@@ -53,19 +58,19 @@ ...@@ -53,19 +58,19 @@
<h2>Methods</h2> <h2>Methods</h2>
<h3>[method:Object getSize]()</h3> <h3>[method:Object getSize]()</h3>
<div> <p>
Returns an object containing the width and height of the renderer. Returns an object containing the width and height of the renderer.
</div> </p>
<h3>[method:null render]( [param:Scene scene], [param:PerspectiveCamera camera] )</h3> <h3>[method:null render]( [param:Scene scene], [param:PerspectiveCamera camera] )</h3>
<div> <p>
Renders a [page:Scene scene] using a [page:PerspectiveCamera perspective camera].<br /> Renders a [page:Scene scene] using a [page:PerspectiveCamera perspective camera].<br />
</div> </p>
<h3>[method:null setSize]([param:Number width], [param:Number height])</h3> <h3>[method:null setSize]([param:Number width], [param:Number height])</h3>
<div> <p>
Resizes the renderer to (width, height). Resizes the renderer to (width, height).
</div> </p>
<h2>Source</h2> <h2>Source</h2>
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
<body> <body>
<h1>[name]</h1> <h1>[name]</h1>
<div class="desc"> <p class="desc">
The Canvas renderer displays your beautifully crafted scenes <em>not</em> using WebGL, The Canvas renderer displays your beautifully crafted scenes <em>not</em> using WebGL,
but draws it using the (slower) <a href="http://drafts.htmlwg.org/2dcontext/html5_canvas_CR/Overview.html">Canvas 2D Context</a> but draws it using the (slower) <a href="http://drafts.htmlwg.org/2dcontext/html5_canvas_CR/Overview.html">Canvas 2D Context</a>
API.<br /><br /> API.<br /><br />
...@@ -46,15 +46,15 @@ ...@@ -46,15 +46,15 @@
The "Canvas" in CanvasRenderer means it uses Canvas 2D instead of WebGL.<br /><br /> The "Canvas" in CanvasRenderer means it uses Canvas 2D instead of WebGL.<br /><br />
Don't confuse either CanvasRenderer with the SoftwareRenderer example, which simulates a screen buffer in a Javascript array. Don't confuse either CanvasRenderer with the SoftwareRenderer example, which simulates a screen buffer in a Javascript array.
</div> </p>
<h2>Constructor</h2> <h2>Constructor</h2>
<h3>[name]([param:object parameters])</h3> <h3>[name]([param:object parameters])</h3>
<div>parameters is an optional object with properties defining the renderer's behaviour. The constructor also accepts no parameters at all. In all cases, it will assume sane defaults when parameters are missing.</div> <p>parameters is an optional object with properties defining the renderer's behaviour. The constructor also accepts no parameters at all. In all cases, it will assume sane defaults when parameters are missing.</p>
<div> <p>
[page:DOMElement canvas] - A [link:https://developer.mozilla.org/en-US/docs/Web/HTML/Element/canvas canvas] [page:DOMElement canvas] - A [link:https://developer.mozilla.org/en-US/docs/Web/HTML/Element/canvas canvas]
where the renderer draws its output. where the renderer draws its output.
This corresponds to the [page:CanvasRenderer.domElement domElement] property below. This corresponds to the [page:CanvasRenderer.domElement domElement] property below.
...@@ -62,14 +62,14 @@ ...@@ -62,14 +62,14 @@
[page:Boolean alpha] - whether the canvas contains an alpha (transparency) buffer or not. [page:Boolean alpha] - whether the canvas contains an alpha (transparency) buffer or not.
Default is *false*. Default is *false*.
</div> </p>
<h2>Properties</h2> <h2>Properties</h2>
<h3>[property:Object info]</h3> <h3>[property:Object info]</h3>
<div> <p>
An object with a series of statistical information about the graphics board memory and the rendering process. Useful for debugging or just for the sake of curiosity. The object contains the following fields: An object with a series of statistical information about the graphics board memory and the rendering process. Useful for debugging or just for the sake of curiosity. The object contains the following fields:
<ul> <ul>
<li>render: <li>render:
...@@ -79,93 +79,93 @@ ...@@ -79,93 +79,93 @@
</ul> </ul>
</li> </li>
</ul> </ul>
</div> </p>
<h3>[property:DOMElement domElement]</h3> <h3>[property:DOMElement domElement]</h3>
<div> <p>
A [page:Canvas] where the renderer draws its output.<br /> A [page:Canvas] where the renderer draws its output.<br />
This is automatically created by the renderer in the constructor (if not provided already); you just need to add it to your page. This is automatically created by the renderer in the constructor (if not provided already); you just need to add it to your page.
</div> </p>
<h3>[property:Boolean autoClear]</h3> <h3>[property:Boolean autoClear]</h3>
<div> <p>
Defines whether the renderer should automatically clear its output before rendering. Defines whether the renderer should automatically clear its output before rendering.
</div> </p>
<h3>[property:Boolean sortObjects]</h3> <h3>[property:Boolean sortObjects]</h3>
<div> <p>
Defines whether the renderer should sort objects. Default is true.<br /> Defines whether the renderer should sort objects. Default is true.<br />
Note: Sorting is used to attempt to properly render objects that have some degree of transparency. By definition, sorting objects may not work in all cases. Depending on the needs of application, it may be neccessary to turn off sorting and use other methods to deal with transparency rendering e.g. manually determining the object rendering order. Note: Sorting is used to attempt to properly render objects that have some degree of transparency. By definition, sorting objects may not work in all cases. Depending on the needs of application, it may be neccessary to turn off sorting and use other methods to deal with transparency rendering e.g. manually determining the object rendering order.
</div> </p>
<h3>[property:boolean sortElements]</h3> <h3>[property:boolean sortElements]</h3>
<div> <p>
Defines whether the renderer should sort the face of each object. Default is true. Defines whether the renderer should sort the face of each object. Default is true.
</div> </p>
<h2>Methods</h2> <h2>Methods</h2>
<h3>[method:null render]([param:Scene scene], [param:Camera camera])</h3> <h3>[method:null render]([param:Scene scene], [param:Camera camera])</h3>
<div> <p>
scene -- The scene to render. <br /> scene -- The scene to render. <br />
camera -- the camera to view the scene. camera -- the camera to view the scene.
</div> </p>
<div> <p>
Render a scene using a camera. Render a scene using a camera.
</div> </p>
<h3>[method:null clear]()</h3> <h3>[method:null clear]()</h3>
<div> <p>
Tells the renderer to clear its color drawing buffer with the clearcolor. Tells the renderer to clear its color drawing buffer with the clearcolor.
</div> </p>
<h3>[method:null setClearColor]([param:Color color], [param:number alpha])</h3> <h3>[method:null setClearColor]([param:Color color], [param:number alpha])</h3>
<div> <p>
color -- The color to clear the canvas with. <br /> color -- The color to clear the canvas with. <br />
alpha -- The alpha channel to clear the canvas with. alpha -- The alpha channel to clear the canvas with.
</div> </p>
<div> <p>
This set the clearColor and the clearAlpha. This set the clearColor and the clearAlpha.
</div> </p>
<h3>[method:null setSize]([param:Number width], [param:Number height])</h3> <h3>[method:null setSize]([param:Number width], [param:Number height])</h3>
<div> <p>
width -- The width of the drawing canvas. <br /> width -- The width of the drawing canvas. <br />
height -- The height of the drawing canvas. height -- The height of the drawing canvas.
</div> </p>
<div> <p>
This set the size of the drawing canvas and if updateStyle is set, then the css of the canvas is updated too. This set the size of the drawing canvas and if updateStyle is set, then the css of the canvas is updated too.
</div> </p>
<h3>[method:null setClearColorHex]([param:number hex], [param:number alpha])</h3> <h3>[method:null setClearColorHex]([param:number hex], [param:number alpha])</h3>
<div> <p>
hex -- The the hexadecimal value of the color to clear the canvas with. <br /> hex -- The the hexadecimal value of the color to clear the canvas with. <br />
alpha -- The alpha channel to clear the canvas with. alpha -- The alpha channel to clear the canvas with.
</div> </p>
<div> <p>
This set the clearColor and the clearAlpha. This set the clearColor and the clearAlpha.
</div> </p>
<h3>[method:number getClearColorHex]()</h3> <h3>[method:number getClearColorHex]()</h3>
<div> <p>
Returns the [page:number hex] color. Returns the [page:number hex] color.
</div> </p>
<h3>[method:number getClearAlpha]()</h3> <h3>[method:number getClearAlpha]()</h3>
<div> <p>
Returns the alpha value. Returns the alpha value.
</div> </p>
<h2>Empty Methods to Maintain Compatibility with [page:WebglRenderer]</h2> <h2>Empty Methods to Maintain Compatibility with [page:WebglRenderer]</h2>
<div> <p>
[method:null clearColor]()<br/> [method:null clearColor]()<br/>
[method:null clearDepth]()<br/> [method:null clearDepth]()<br/>
[method:null clearStencil]()<br/> [method:null clearStencil]()<br/>
[method:number getMaxAnisotropy]() - returns 1 <br/> [method:number getMaxAnisotropy]() - returns 1 <br/>
</div> </p>
<h2>Source</h2> <h2>Source</h2>
......
...@@ -13,23 +13,25 @@ ...@@ -13,23 +13,25 @@
<div class="desc"> <div class="desc">
<p> <p>
[name] can be used to render geometric data using SVG. The produced vector graphics are particular useful in the following use cases: [name] can be used to render geometric data using SVG. The produced vector graphics are particular useful in the following use cases:
<ul> </p>
<li>Animated logos or icons</li> <ul>
<li>Interactive 2D/3D diagrams or graphs</li> <li>Animated logos or icons</li>
<li>Interactive maps</li> <li>Interactive 2D/3D diagrams or graphs</li>
<li>Complex or animated user interfaces</li> <li>Interactive maps</li>
</ul> <li>Complex or animated user interfaces</li>
</ul>
<p>
[name] has various advantages. It produces crystal-clear and sharp output which is independet of the actual viewport resolution.<br /> [name] has various advantages. It produces crystal-clear and sharp output which is independet of the actual viewport resolution.<br />
SVG elements can be styled via CSS. And they have good accessibility since it's possible to add metadata like title or description (useful for search engines or screen readers). SVG elements can be styled via CSS. And they have good accessibility since it's possible to add metadata like title or description (useful for search engines or screen readers).
</p> </p>
<p> <p>
There are, however, some important limitations: There are, however, some important limitations:
<ul>
<li>No advanced shading</li>
<li>No texture support</li>
<li>No shadow support</li>
</ul>
</p> </p>
<ul>
<li>No advanced shading</li>
<li>No texture support</li>
<li>No shadow support</li>
</ul>
</div> </div>
<script> <script>
...@@ -50,10 +52,10 @@ ...@@ -50,10 +52,10 @@
<h2>Examples</h2> <h2>Examples</h2>
<div> <p>
[example:svg_lines lines]<br /> [example:svg_lines lines]<br />
[example:svg_sandbox sandbox] [example:svg_sandbox sandbox]
</div> </p>
<h2>Constructor</h2> <h2>Constructor</h2>
...@@ -62,34 +64,34 @@ ...@@ -62,34 +64,34 @@
<h2>Methods</h2> <h2>Methods</h2>
<h3>[method:null clear]()</h3> <h3>[method:null clear]()</h3>
<div> <p>
Tells the renderer to clear its drawing surface. Tells the renderer to clear its drawing surface.
</div> </p>
<h3>[method:null render]( [param:Scene scene], [param:Camera camera] )</h3> <h3>[method:null render]( [param:Scene scene], [param:Camera camera] )</h3>
<div> <p>
Renders a [page:Scene scene] using a [page:Camera camera]. Renders a [page:Scene scene] using a [page:Camera camera].
</div> </p>
<h3>[method:null setClearColor]( [param:Color color], [param:number alpha] )</h3> <h3>[method:null setClearColor]( [param:Color color], [param:number alpha] )</h3>
<div> <p>
Sets the clearColor and the clearAlpha. Sets the clearColor and the clearAlpha.
</div> </p>
<h3>[method:null setPrecision]( [param:Number precision] )</h3> <h3>[method:null setPrecision]( [param:Number precision] )</h3>
<div> <p>
Sets the precision of the data used to create a path. Sets the precision of the data used to create a path.
</div> </p>
<h3>[method:null setQuality]()</h3> <h3>[method:null setQuality]()</h3>
<div> <p>
Sets the render quality. Possible values are *low* and *high* (default). Sets the render quality. Possible values are *low* and *high* (default).
</div> </p>
<h3>[method:null setSize]( [param:Number width], [param:Number height] )</h3> <h3>[method:null setSize]( [param:Number width], [param:Number height] )</h3>
<div> <p>
Resizes the renderer to (width, height). Resizes the renderer to (width, height).
</div> </p>
<h2>Source</h2> <h2>Source</h2>
......
...@@ -10,41 +10,41 @@ ...@@ -10,41 +10,41 @@
<body> <body>
<h1>[name]</h1> <h1>[name]</h1>
<div class="desc">A class containing useful utility functions for scene manipulation.</div> <p class="desc">A class containing useful utility functions for scene manipulation.</p>
<h2>Methods</h2> <h2>Methods</h2>
<h3>[method:Group createMultiMaterialObject]( [param:Geometry geometry], [param:Array materials] )</h3> <h3>[method:Group createMultiMaterialObject]( [param:Geometry geometry], [param:Array materials] )</h3>
<div> <p>
geometry -- The geometry for the set of materials. <br /> geometry -- The geometry for the set of materials. <br />
materials -- The materials for the object. materials -- The materials for the object.
</div> </p>
<div> <p>
Creates a new Group that contains a new mesh for each material defined in materials. Beware that this is not the same as an array of materials which defines multiple materials for 1 mesh.<br /> Creates a new Group that contains a new mesh for each material defined in materials. Beware that this is not the same as an array of materials which defines multiple materials for 1 mesh.<br />
This is mostly useful for objects that need both a material and a wireframe implementation. This is mostly useful for objects that need both a material and a wireframe implementation.
</div> </p>
<h3>[method:null attach]( [param:Object3D child], [param:Object3D scene], [param:Object3D parent] )</h3> <h3>[method:null attach]( [param:Object3D child], [param:Object3D scene], [param:Object3D parent] )</h3>
<div> <p>
child -- The object to add to the parent <br /> child -- The object to add to the parent <br />
scene -- The scene to detach the object on. <br /> scene -- The scene to detach the object on. <br />
parent -- The parent to attach the object from. parent -- The parent to attach the object from.
</div> </p>
<div> <p>
Attaches the object to the parent without the moving the object in the worldspace. Beware that to do this the matrixWorld needs to be updated, this can be done by calling the updateMatrixWorld method on the parent object. Attaches the object to the parent without the moving the object in the worldspace. Beware that to do this the matrixWorld needs to be updated, this can be done by calling the updateMatrixWorld method on the parent object.
</div> </p>
<h3>[method:null detach]( [param:Object3D child], [param:Object3D parent], [param:Object3D scene] )</h3> <h3>[method:null detach]( [param:Object3D child], [param:Object3D parent], [param:Object3D scene] )</h3>
<div> <p>
child -- The object to remove from the parent <br /> child -- The object to remove from the parent <br />
scene -- The scene to attach the object on. <br /> scene -- The scene to attach the object on. <br />
parent -- The parent to detach the object from. parent -- The parent to detach the object from.
</div> </p>
<div> <p>
Detaches the object from the parent and adds it back to the scene without moving in worldspace. Beware that to do this the matrixWorld needs to be updated, this can be done by calling the updateMatrixWorld method on the parent object. Detaches the object from the parent and adds it back to the scene without moving in worldspace. Beware that to do this the matrixWorld needs to be updated, this can be done by calling the updateMatrixWorld method on the parent object.
</div> </p>
<h2>Source</h2> <h2>Source</h2>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册