mirror of
https://github.com/Doodle3D/Doodle3D-Slicer.git
synced 2024-11-22 13:37:58 +01:00
added three js editor + slicer
This commit is contained in:
parent
14c5d85318
commit
99b2b24d88
@ -24,24 +24,29 @@ $(document).ready(function () {
|
||||
|
||||
var listSliceTest = $("#printers-slicetest");
|
||||
var listSliceWebworker = $("#printers-webworker");
|
||||
var listEditor = $("#printers-editor");
|
||||
|
||||
function addPrinter (name, localip) {
|
||||
known.push(localip);
|
||||
|
||||
var slice = $("<li class='hidden'><a href='slice_test.html#" + localip + "'>" + name + "</a></li>");
|
||||
var webworker = $("<li class='hidden'><a href='webworker_test.html#" + localip + "'>" + name + "</a></li>");
|
||||
var editor = $("<li class='hidden'><a href='three.js-master/editor_viewer#" + localip + "'>" + name + "</a></li>");
|
||||
|
||||
listSliceTest.append(slice);
|
||||
listSliceWebworker.append(webworker);
|
||||
listEditor.append(editor);
|
||||
|
||||
var box = new D3D.Box(localip).init();
|
||||
box.onconnect = function () {
|
||||
slice.removeClass('hidden');
|
||||
webworker.removeClass('hidden');
|
||||
editor.removeClass('hidden');
|
||||
};
|
||||
box.ondisconnect = function () {
|
||||
slice.addClass('hidden');
|
||||
webworker.addClass('hidden');
|
||||
editor.addClass('hidden');
|
||||
};
|
||||
}
|
||||
|
||||
@ -76,5 +81,8 @@ $(document).ready(function () {
|
||||
<p>Webworkers</p>
|
||||
<ul id="printers-webworker"></ul>
|
||||
|
||||
<p>Editor</p>
|
||||
<ul id="printers-editor"></ul>
|
||||
|
||||
</body>
|
||||
</html>
|
@ -27,7 +27,7 @@
|
||||
"heatupEnabled": true,
|
||||
"heatupTemperature": 180,
|
||||
"nozzleDiameter": 0.4,
|
||||
"startCode": ";Generated with Doodle3D (ultimaker2)\nM109 S{printingTemp} ;set target temperature \n{if heatedBed}M190 S{printingBedTemp} ;set target bed temperature\nG21 ;metric values\nG90 ;absolute positioning\nM107 ;start with the fan off\nG28 ; home to endstops\nG1 Z15 F9000 ;move the platform down 15mm\nG92 E0 ;zero the extruded length\nG1 F200 E10 ;extrude 10mm of feed stock\nG92 E0 ;zero the extruded length again\nG1 F9000\nM117 Printing Doodle... ;display message (20 characters to clear whole screen)\n",
|
||||
"startCode": ";Generated with Doodle3D (ultimaker2)\nM109 S{printingTemp} ;set target temperature \n{if heatedBed}M190 S{printingBedTemp} ;set target bed temperature\nG21 ;metric values\nG90 ;absolute positioning\nM107 ;start with the fan off\nG28 ; home to endstops\nG1 Z15 F9000 ;move the platform down 15mm\nG92 E0 ;zero the extruded length\nG1 F200 E10 ;extrude 10mm of feed stock\nG92 E0 ;zero the extruded length again\nG0 X0 Y0 F{travelSpeed} ;home position is not X0 Y0\nM117 Printing Doodle... ;display message (20 characters to clear whole screen)\n",
|
||||
"temperature": 210.0,
|
||||
"type": "ultimaker2"
|
||||
},
|
||||
@ -43,7 +43,7 @@
|
||||
"heatupEnabled": true,
|
||||
"heatupTemperature": 20,
|
||||
"nozzleDiameter": 0.4,
|
||||
"startCode": ";Generated with Doodle3D (ultimaker2)\nM109 S{printingTemp} ;set target temperature \n{if heatedBed}M190 S{printingBedTemp} ;set target bed temperature\nG21 ;metric values\nG90 ;absolute positioning\nM107 ;start with the fan off\nG28 ; home to endstops\nG1 Z15 F9000 ;move the platform down 15mm\nG92 E0 ;zero the extruded length\nG1 F200 E10 ;extrude 10mm of feed stock\nG92 E0 ;zero the extruded length again\nG1 F9000\nM117 Printing Doodle... ;display message (20 characters to clear whole screen)\n",
|
||||
"startCode": ";Generated with Doodle3D (ultimaker2go)\nM109 S{printingTemp} ;set target temperature \n{if heatedBed}M190 S{printingBedTemp} ;set target bed temperature\nG21 ;metric values\nG90 ;absolute positioning\nM107 ;start with the fan off\nG28 ; home to endstops\nG1 Z15 F9000 ;move the platform down 15mm\nG92 E0 ;zero the extruded length\nG1 F200 E10 ;extrude 10mm of feed stock\nG92 E0 ;zero the extruded length again\nG0 X0 Y0 F{travelSpeed} ;home position is not X0 Y0\nM117 Printing Doodle... ;display message (20 characters to clear whole screen)\n",
|
||||
"temperature": 210.0,
|
||||
"type": "ultimaker2g0"
|
||||
}
|
||||
|
@ -9,7 +9,7 @@
|
||||
"retractionAmount": 3.0,
|
||||
"retractionEnabled": true,
|
||||
"retractionSpeed": 50.0,
|
||||
"retractionMinDistance": 5.0,
|
||||
"retractionMinDistance": 0.0,
|
||||
"supportAccaptanceMargin": 1.5,
|
||||
"supportDistanceY": 0.4,
|
||||
"supportUse": true,
|
||||
@ -33,7 +33,7 @@
|
||||
"speed": 50.0
|
||||
},
|
||||
"support": {
|
||||
"flowRate": 0.2,
|
||||
"flowRate": 0.8,
|
||||
"speed": 100.0
|
||||
},
|
||||
"bottom": {
|
||||
|
@ -37,7 +37,7 @@ function init () {
|
||||
var printer = new D3D.Printer().updateConfig(USER_SETTINGS).updateConfig(PRINTER_SETTINGS["ultimaker"]);
|
||||
|
||||
var loader = new THREE.STLLoader();
|
||||
loader.load('models/support_test.stl', function (geometry) {
|
||||
loader.load('models/pokemon/pikachu.stl', function (geometry) {
|
||||
//var geometry = new THREE.BoxGeometry(10, 10, 10, 1, 1, 1);
|
||||
//var geometry = new THREE.SphereGeometry(10, 20, 10);
|
||||
//var geometry = new THREE.TorusGeometry(20, 10, 30, 30);
|
||||
@ -71,7 +71,6 @@ function init () {
|
||||
|
||||
mesh.rotation.x = -Math.PI/2;
|
||||
mesh.scale.x = mesh.scale.y = mesh.scale.z = 1;
|
||||
mesh.position.y = -0.1;
|
||||
mesh.position.x = 60;
|
||||
mesh.position.z = 60;
|
||||
|
||||
|
@ -210,6 +210,11 @@ D3D.Paths.prototype.bounds = function () {
|
||||
|
||||
return ClipperLib.Clipper.GetBounds(this);
|
||||
};
|
||||
D3D.Paths.prototype.clean = function (cleanDelta) {
|
||||
'use strict';
|
||||
|
||||
return new D3D.Paths(ClipperLib.Clipper.CleanPolygons(this, cleanDelta), this.closed);
|
||||
}
|
||||
D3D.Paths.prototype.boundSize = function () {
|
||||
'use strict';
|
||||
|
||||
|
@ -43,6 +43,7 @@ D3D.Printer.prototype.subsituteVariables = function (gcode) {
|
||||
var bedTemperature = this.config["bedTemperature"];
|
||||
var preheatTemperature = this.config["heatupTemperature"];
|
||||
var preheatBedTemperature = this.config["heatupBedTemperature"];
|
||||
var travelSpeed = this.config["travelSpeed"] * 60;
|
||||
var printerType = this.config["type"];
|
||||
var heatedbed = this.config["heatedbed"];
|
||||
|
||||
@ -60,6 +61,7 @@ D3D.Printer.prototype.subsituteVariables = function (gcode) {
|
||||
gcode = gcode.replace(/{preheatTemp}/gi, preheatTemperature);
|
||||
gcode = gcode.replace(/{preheatBedTemp}/gi, preheatBedTemperature);
|
||||
gcode = gcode.replace(/{printerType}/gi, printerType);
|
||||
gcode = gcode.replace(/{travelSpeed}/gi, travelSpeed);
|
||||
gcode = gcode.replace(/{if heatedBed}/gi, heatedBedReplacement);
|
||||
|
||||
return gcode;
|
||||
|
37
src/slice.js
37
src/slice.js
@ -17,9 +17,32 @@ D3D.Slice.prototype.optimizePaths = function (start) {
|
||||
start = this.brim.lastPoint();
|
||||
}
|
||||
|
||||
//instead of for loop pick the closest shape to start;
|
||||
for (var i = 0; i < this.parts.length; i ++) {
|
||||
var part = this.parts[i];
|
||||
var parts = [];
|
||||
|
||||
while (this.parts.length > 0) {
|
||||
|
||||
var closestDistance = Infinity;
|
||||
var closestPart;
|
||||
|
||||
for (var i = 0; i < this.parts.length; i ++) {
|
||||
var part = this.parts[i];
|
||||
var bounds = part.outerLine.bounds();
|
||||
|
||||
var top = bounds.top - start.y;
|
||||
var bottom = start.y - bounds.bottom;
|
||||
var left = bounds.left - start.x;
|
||||
var right = start.x - bounds.right;
|
||||
|
||||
var distance = Math.max(top, bottom, left, right);
|
||||
|
||||
if (distance < closestDistance) {
|
||||
closestDistance = distance;
|
||||
closestPart = i;
|
||||
}
|
||||
}
|
||||
|
||||
var part = this.parts.splice(closestPart, 1)[0];
|
||||
parts.push(part);
|
||||
|
||||
if (part.outerLine.length > 0) {
|
||||
part.outerLine = part.outerLine.optimizePath(start);
|
||||
@ -30,7 +53,7 @@ D3D.Slice.prototype.optimizePaths = function (start) {
|
||||
var innerLine = part.innerLines[j];
|
||||
if (innerLine.length > 0) {
|
||||
part.innerLines[j] = innerLine.optimizePath(start);
|
||||
//start = part.innerLines[j].lastPoint();
|
||||
start = part.innerLines[j].lastPoint();
|
||||
}
|
||||
}
|
||||
|
||||
@ -38,11 +61,15 @@ D3D.Slice.prototype.optimizePaths = function (start) {
|
||||
part.fill = part.fill.optimizePath(start);
|
||||
start = part.fill.lastPoint();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
this.parts = parts;
|
||||
|
||||
|
||||
if (this.support !== undefined && this.support.length > 0) {
|
||||
this.support = this.support.optimizePath(start);
|
||||
//start = this.support.lastPoint();
|
||||
start = this.support.lastPoint();
|
||||
}
|
||||
|
||||
return start;
|
||||
|
@ -24,25 +24,11 @@ D3D.Slicer.prototype.setMesh = function (geometry, matrix) {
|
||||
geometry = new THREE.Geometry().fromBufferGeometry(geometry);
|
||||
}
|
||||
|
||||
/*
|
||||
geometry.computeFaceNormals();
|
||||
for (var i = 0; i < geometry.faces.length; i ++) {
|
||||
var face = geometry.faces[i];
|
||||
var normal = face.normal;
|
||||
|
||||
if (normal.x === 0 && normal.y === 0 && normal.z === 0) {
|
||||
geometry.faces.splice(i, 1);
|
||||
console.log("Tets");
|
||||
i --;
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
//apply mesh matrix on geometry;
|
||||
geometry.applyMatrix(matrix);
|
||||
geometry.mergeVertices();
|
||||
geometry.computeFaceNormals();
|
||||
geometry.applyMatrix(matrix);
|
||||
geometry.computeBoundingBox();
|
||||
geometry.computeFaceNormals();
|
||||
|
||||
this.geometry = geometry;
|
||||
|
||||
@ -124,6 +110,9 @@ D3D.Slicer.prototype.slice = function (layerHeight, height) {
|
||||
var numLayers = height / layerHeight;
|
||||
|
||||
var layersIntersections = [];
|
||||
for (var layer = 0; layer < numLayers; layer ++) {
|
||||
layersIntersections[layer] = [];
|
||||
}
|
||||
|
||||
for (var lineIndex = 0; lineIndex < this.lines.length; lineIndex ++) {
|
||||
var line = this.lines[lineIndex].line;
|
||||
@ -133,9 +122,6 @@ D3D.Slicer.prototype.slice = function (layerHeight, height) {
|
||||
|
||||
for (var layerIndex = min; layerIndex <= max; layerIndex ++) {
|
||||
if (layerIndex >= 0 && layerIndex < numLayers) {
|
||||
if (layersIntersections[layerIndex] === undefined) {
|
||||
layersIntersections[layerIndex] = [];
|
||||
}
|
||||
layersIntersections[layerIndex].push(lineIndex);
|
||||
}
|
||||
}
|
||||
@ -147,6 +133,7 @@ D3D.Slicer.prototype.slice = function (layerHeight, height) {
|
||||
//see https://github.com/Doodle3D/Doodle3D-Slicer/issues/1
|
||||
for (var layer = 0; layer < layersIntersections.length; layer ++) {
|
||||
var layerIntersections = layersIntersections[layer];
|
||||
|
||||
var y = layer * layerHeight;
|
||||
|
||||
var intersections = [];
|
||||
@ -163,8 +150,8 @@ D3D.Slicer.prototype.slice = function (layerHeight, height) {
|
||||
var x = line.end.x * alpha + line.start.x * (1 - alpha);
|
||||
var z = line.end.z * alpha + line.start.z * (1 - alpha);
|
||||
}
|
||||
|
||||
intersections[index] = new THREE.Vector2(z, x);
|
||||
|
||||
}
|
||||
|
||||
var done = [];
|
||||
@ -215,31 +202,10 @@ D3D.Slicer.prototype.slice = function (layerHeight, height) {
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
for (var i = 0; i < shape.length; i ++) {
|
||||
var point = shape[i];
|
||||
var previousPoint = shape[(i + shape.length - 1) % shape.length];
|
||||
var nextPoint = shape[(i + 1) % shape.length];
|
||||
|
||||
var point = new THREE.Vector2(point.X, point.Y);
|
||||
var previousPoint = new THREE.Vector2(previousPoint.X, previousPoint.Y);
|
||||
var nextPoint = new THREE.Vector2(nextPoint.X, nextPoint.Y);
|
||||
//var lineLength = nextPoint.sub(previousPoint).length();
|
||||
|
||||
var normal = nextPoint.sub(previousPoint).normal().normalize();
|
||||
var distance = Math.abs(normal.dot(point.sub(previousPoint)));
|
||||
|
||||
//something better for offset check
|
||||
if (distance <= 0.01) {
|
||||
shape.splice(i, 1);
|
||||
i --;
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
//think this check is not nescesary, always higher as 0
|
||||
if (shape.length > 0) {
|
||||
sliceParts.push(new D3D.Paths([shape], true));
|
||||
var part = new D3D.Paths([shape]).clean(0.01);
|
||||
sliceParts.push(part);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -289,7 +255,6 @@ D3D.Slicer.prototype.slicesToData = function (slices, printer) {
|
||||
var supportMargin = printer.config["supportMargin"] * scale;
|
||||
var plateSize = printer.config["supportPlateSize"] * scale;
|
||||
var supportDistanceY = printer.config["supportDistanceY"];
|
||||
var brimOffset = printer.config["brimOffset"] * scale;
|
||||
|
||||
var supportDistanceLayers = Math.ceil(supportDistanceY / layerHeight);
|
||||
var bottomSkinCount = Math.ceil(bottomThickness/layerHeight);
|
||||
@ -484,6 +449,7 @@ D3D.Slicer.prototype.dataToGCode = function (data, printer) {
|
||||
var gcode = new D3D.GCode().setSettings(printer);
|
||||
|
||||
function sliceToGCode (path, retract, unRetract, type) {
|
||||
|
||||
for (var i = 0; i < path.length; i ++) {
|
||||
var shape = path[i];
|
||||
|
||||
@ -526,10 +492,12 @@ D3D.Slicer.prototype.dataToGCode = function (data, printer) {
|
||||
var part = slice.parts[i];
|
||||
|
||||
sliceToGCode(part.outerLine, false, true, "outerLine");
|
||||
|
||||
for (var j = 0; j < part.innerLines.length; j ++) {
|
||||
var innerLine = part.innerLines[j];
|
||||
sliceToGCode(innerLine, false, false, "innerLine");
|
||||
}
|
||||
|
||||
sliceToGCode(part.fill, true, false, "fill");
|
||||
}
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
D3D.SlicerWorker = function () {
|
||||
'use strict';
|
||||
|
||||
this.worker = new Worker('webworker/worker.js');
|
||||
this.worker = new Worker('../../webworker/worker.js');
|
||||
|
||||
var scope = this;
|
||||
this.worker.addEventListener('message', function (event) {
|
||||
@ -27,6 +27,10 @@ D3D.SlicerWorker = function () {
|
||||
break;
|
||||
}
|
||||
}, false);
|
||||
|
||||
this.worker.onerror = function (error) {
|
||||
console.warn("Error in webworker", error);
|
||||
};
|
||||
}
|
||||
D3D.SlicerWorker.prototype.setSettings = function (USER_SETTINGS, PRINTER_SETTINGS) {
|
||||
'use strict';
|
||||
|
4
three.js-master/.gitignore
vendored
Executable file
4
three.js-master/.gitignore
vendored
Executable file
@ -0,0 +1,4 @@
|
||||
.DS_Store
|
||||
*.swp
|
||||
.project
|
||||
node_modules
|
27
three.js-master/CONTRIBUTING.md
Executable file
27
three.js-master/CONTRIBUTING.md
Executable file
@ -0,0 +1,27 @@
|
||||
### The issues section is for bug reports and feature requests only. If you need help, please use [stackoverflow](http://stackoverflow.com/questions/tagged/three.js).
|
||||
|
||||
|
||||
Before reporting a bug
|
||||
---
|
||||
1. Search issue tracker for similar issues.
|
||||
2. Try the latest dev branch version of three.js.
|
||||
3. Refer to the [Migration Guide](https://github.com/mrdoob/three.js/wiki/Migration) when upgrading to the dev version.
|
||||
|
||||
|
||||
How to report a bug
|
||||
---
|
||||
1. Specify the revision number of the three.js library where the bug occurred.
|
||||
2. Specify your browser version, operating system, and graphics card. (for example, Chrome 23.0.1271.95, Windows 7, Nvidia Quadro 2000M)
|
||||
3. Describe the problem in detail. Explain what happened, and what you expected would happen.
|
||||
4. Provide a small test-case (http://jsfiddle.net). If a test-case is not possible, provide a link to a live version of your application.
|
||||
5. If helpful, include a screenshot. Annotate the screenshot for clarity.
|
||||
|
||||
|
||||
How to contribute to three.js
|
||||
---
|
||||
1. Make sure you have a GitHub account.
|
||||
2. Fork the repository on GitHub.
|
||||
3. Check the [Contribution Guidelines](https://github.com/mrdoob/three.js/wiki/How-to-contribute-to-three.js).
|
||||
4. Make changes to your clone of the repository.
|
||||
5. Submit a pull request.
|
||||
|
21
three.js-master/LICENSE
Executable file
21
three.js-master/LICENSE
Executable file
@ -0,0 +1,21 @@
|
||||
The MIT License
|
||||
|
||||
Copyright © 2010-2015 three.js authors
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
68
three.js-master/README.md
Executable file
68
three.js-master/README.md
Executable file
@ -0,0 +1,68 @@
|
||||
three.js
|
||||
========
|
||||
|
||||
#### JavaScript 3D library ####
|
||||
|
||||
The aim of the project is to create a lightweight 3D library with a very low level of complexity — in other words, for dummies. The library provides <canvas>, <svg>, CSS3D and WebGL renderers.
|
||||
|
||||
[Examples](http://threejs.org/examples/) — [Documentation](http://threejs.org/docs/) — [Migrating](https://github.com/mrdoob/three.js/wiki/Migration) — [Help](http://stackoverflow.com/questions/tagged/three.js)
|
||||
|
||||
|
||||
### Usage ###
|
||||
|
||||
Download the [minified library](http://threejs.org/build/three.min.js) and include it in your html.
|
||||
Alternatively see [how to build the library yourself](https://github.com/mrdoob/three.js/wiki/build.py,-or-how-to-generate-a-compressed-Three.js-file).
|
||||
|
||||
```html
|
||||
<script src="js/three.min.js"></script>
|
||||
```
|
||||
|
||||
This code creates a scene, a camera, and a geometric cube, and it adds the cube to the scene. It then creates a <canvas> renderer for the scene and camera, and it adds that viewport to the document.body element. Finally it animates the cube within the scene for the camera.
|
||||
|
||||
```html
|
||||
<script>
|
||||
|
||||
var scene, camera, renderer;
|
||||
var geometry, material, mesh;
|
||||
|
||||
init();
|
||||
animate();
|
||||
|
||||
function init() {
|
||||
|
||||
scene = new THREE.Scene();
|
||||
|
||||
camera = new THREE.PerspectiveCamera( 75, window.innerWidth / window.innerHeight, 1, 10000 );
|
||||
camera.position.z = 1000;
|
||||
|
||||
geometry = new THREE.BoxGeometry( 200, 200, 200 );
|
||||
material = new THREE.MeshBasicMaterial( { color: 0xff0000, wireframe: true } );
|
||||
|
||||
mesh = new THREE.Mesh( geometry, material );
|
||||
scene.add( mesh );
|
||||
|
||||
renderer = new THREE.WebGLRenderer();
|
||||
renderer.setSize( window.innerWidth, window.innerHeight );
|
||||
|
||||
document.body.appendChild( renderer.domElement );
|
||||
|
||||
}
|
||||
|
||||
function animate() {
|
||||
|
||||
requestAnimationFrame( animate );
|
||||
|
||||
mesh.rotation.x += 0.01;
|
||||
mesh.rotation.y += 0.02;
|
||||
|
||||
renderer.render( scene, camera );
|
||||
|
||||
}
|
||||
|
||||
</script>
|
||||
```
|
||||
If everything went well you should see [this](http://jsfiddle.net/f17Lz5ux/).
|
||||
|
||||
### Change log ###
|
||||
|
||||
[releases](https://github.com/mrdoob/three.js/releases)
|
26
three.js-master/bower.json
Executable file
26
three.js-master/bower.json
Executable file
@ -0,0 +1,26 @@
|
||||
{
|
||||
"name": "three.js",
|
||||
"homepage": "http://threejs.org/",
|
||||
"description": "JavaScript 3D library",
|
||||
"main": "build/three.js",
|
||||
"keywords": [
|
||||
"three",
|
||||
"threejs",
|
||||
"three.js",
|
||||
"3D",
|
||||
"webgl"
|
||||
],
|
||||
"license": "MIT",
|
||||
"ignore": [
|
||||
"**/.*",
|
||||
"*.md",
|
||||
"docs",
|
||||
"editor",
|
||||
"examples/*",
|
||||
"!examples/js",
|
||||
"src",
|
||||
"test",
|
||||
"utils",
|
||||
"LICENSE"
|
||||
]
|
||||
}
|
35133
three.js-master/build/three.js
Executable file
35133
three.js-master/build/three.js
Executable file
File diff suppressed because one or more lines are too long
835
three.js-master/build/three.min.js
vendored
Executable file
835
three.js-master/build/three.min.js
vendored
Executable file
File diff suppressed because one or more lines are too long
7
three.js-master/docs/api/CONTRIBUTING.md
Executable file
7
three.js-master/docs/api/CONTRIBUTING.md
Executable file
@ -0,0 +1,7 @@
|
||||
Contributing to the documentation
|
||||
=================================
|
||||
|
||||
- To link to the page for `ClassName`, use `[page:ClassName link title]` (or just `[page:ClassName]`). Use `[page:ClassName.memberName]` to link to a class member (a property or method) called `memberName` on the page for `ClassName`. You can write `[page:.memberName]` to link to a property or method called `memberName` on the same page.
|
||||
- Use `[example:exampleName title]` (ot just `[example:exampleName]`) to link to the example `threejs.org/examples/#exampleName`.
|
||||
- Document a property by writing `<h3>[property:TypeName propertyName]</h3>`.
|
||||
- Document a method using `<h3>[method:ReturnType methodName]</h3>`.
|
48
three.js-master/docs/api/Original.html
Executable file
48
three.js-master/docs/api/Original.html
Executable file
@ -0,0 +1,48 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<script src="../../list.js"></script>
|
||||
<script src="../../page.js"></script>
|
||||
<link type="text/css" rel="stylesheet" href="../../page.css" />
|
||||
</head>
|
||||
<body>
|
||||
[page:Geometry] →
|
||||
|
||||
<h1>[name]</h1>
|
||||
|
||||
<div class="desc">todo</div>
|
||||
|
||||
<h2>Example</h2>
|
||||
|
||||
<code>todo</code>
|
||||
|
||||
<h2>Constructor</h2>
|
||||
|
||||
|
||||
<h3>todo</h3>
|
||||
<div></div>
|
||||
|
||||
|
||||
<h2>Properties</h2>
|
||||
|
||||
<h3>todo</h3>
|
||||
<div>
|
||||
todo
|
||||
</div>
|
||||
|
||||
|
||||
<h2>Methods</h2>
|
||||
|
||||
|
||||
<h3>todo</h3>
|
||||
<div>todo</div>
|
||||
<div>
|
||||
todo
|
||||
</div>
|
||||
|
||||
<h2>Source</h2>
|
||||
|
||||
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
|
||||
</body>
|
||||
</html>
|
50
three.js-master/docs/api/cameras/Camera.html
Executable file
50
three.js-master/docs/api/cameras/Camera.html
Executable file
@ -0,0 +1,50 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<script src="../../list.js"></script>
|
||||
<script src="../../page.js"></script>
|
||||
<link type="text/css" rel="stylesheet" href="../../page.css" />
|
||||
</head>
|
||||
<body>
|
||||
[page:Object3D] →
|
||||
|
||||
<h1>[name]</h1>
|
||||
|
||||
<div class="desc">Abstract base class for cameras. This class should always be inherited when you build a new camera.</div>
|
||||
|
||||
|
||||
<h2>Constructor</h2>
|
||||
|
||||
|
||||
<h3>[name]()</h3>
|
||||
<div>
|
||||
This constructor sets the following properties to the correct type: matrixWorldInverse and projectionMatrix.
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<h2>Properties</h2>
|
||||
|
||||
<h3>[property:Matrix4 matrixWorldInverse]</h3>
|
||||
<div>This is the inverse of matrixWorld. MatrixWorld contains the Matrix which has the world transform of the Camera.</div>
|
||||
|
||||
<h3>[property:Matrix4 projectionMatrix]</h3>
|
||||
<div>This is the matrix which contains the projection.</div>
|
||||
|
||||
|
||||
<h2>Methods</h2>
|
||||
|
||||
<h3>[method:null lookAt]( [page:Vector3 vector] )</h3>
|
||||
<div>
|
||||
vector — point to look at<br />
|
||||
<br />
|
||||
This makes the camera look at the vector position in the global space as long as the parent of this camera is the scene or at position (0,0,0).
|
||||
</div>
|
||||
|
||||
|
||||
<h2>Source</h2>
|
||||
|
||||
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
|
||||
</body>
|
||||
</html>
|
83
three.js-master/docs/api/cameras/CubeCamera.html
Executable file
83
three.js-master/docs/api/cameras/CubeCamera.html
Executable file
@ -0,0 +1,83 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<script src="../../list.js"></script>
|
||||
<script src="../../page.js"></script>
|
||||
<link type="text/css" rel="stylesheet" href="../../page.css" />
|
||||
</head>
|
||||
<body>
|
||||
[page:Object3D] →
|
||||
|
||||
<h1>[name]</h1>
|
||||
|
||||
<div class="desc">Creates 6 cameras that render to a [page:WebGLRenderTargetCube].</div>
|
||||
|
||||
<h2>Examples</h2>
|
||||
|
||||
<div>[example:webgl_materials_cubemap_dynamic materials / cubemap / dynamic ]</div>
|
||||
<div>[example:webgl_materials_cubemap_dynamic2 materials / cubemap / dynamic2 ]</div>
|
||||
<div>[example:webgl_materials_cubemap_dynamic2 shading / physical ]</div>
|
||||
|
||||
<code>//Create cube camera
|
||||
var cubeCamera = new THREE.CubeCamera( 1, 100000, 128 );
|
||||
scene.add( cubeCamera );
|
||||
|
||||
//Create car
|
||||
var chromeMaterial = new THREE.MeshLambertMaterial( { color: 0xffffff, envMap: cubeCamera.renderTarget } );
|
||||
var car = new Mesh( carGeometry, chromeMaterial );
|
||||
scene.add( car );
|
||||
|
||||
//Update the render target cube
|
||||
car.setVisible( false );
|
||||
cubeCamera.position.copy( car.position );
|
||||
cubeCamera.updateCubeMap( renderer, scene );
|
||||
|
||||
//Render the scene
|
||||
car.setVisible( true );
|
||||
renderer.render( scene, camera );
|
||||
</code>
|
||||
|
||||
|
||||
<h2>Constructor</h2>
|
||||
|
||||
|
||||
<h3>[name]([page:number near], [page:number far], [page:number cubeResolution])</h3>
|
||||
<div>
|
||||
near -- The near clipping distance. <br />
|
||||
far -- The far clipping distance <br />
|
||||
cubeResolution -- Sets the width of the cube.
|
||||
</div>
|
||||
<div>
|
||||
Constructs a CubeCamera that contains 6 [page:PerspectiveCamera PerspectiveCameras] that then
|
||||
render to a [page:WebGLRenderTargetCube]
|
||||
</div>
|
||||
|
||||
|
||||
<h2>Properties</h2>
|
||||
|
||||
|
||||
|
||||
<h3>[property:WebGLRenderTargetCube renderTarget]</h3>
|
||||
<div>
|
||||
The cube texture that gets generated.
|
||||
</div>
|
||||
|
||||
<h2>Methods</h2>
|
||||
|
||||
|
||||
|
||||
<h3>[method:todo updateCubeMap]([page:todo renderer], [page:todo scene])</h3>
|
||||
<div>
|
||||
renderer -- The current WebGL renderer <br />
|
||||
scene -- The current scene
|
||||
</div>
|
||||
<div>
|
||||
Call this to update the renderTarget.
|
||||
</div>
|
||||
|
||||
<h2>Source</h2>
|
||||
|
||||
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
|
||||
</body>
|
||||
</html>
|
70
three.js-master/docs/api/cameras/OrthographicCamera.html
Executable file
70
three.js-master/docs/api/cameras/OrthographicCamera.html
Executable file
@ -0,0 +1,70 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<script src="../../list.js"></script>
|
||||
<script src="../../page.js"></script>
|
||||
<link type="text/css" rel="stylesheet" href="../../page.css" />
|
||||
</head>
|
||||
<body>
|
||||
[page:Object3D] → [page:Camera] →
|
||||
|
||||
<h1>[name]</h1>
|
||||
|
||||
<div class="desc">Camera with orthographic projection.</div>
|
||||
|
||||
|
||||
<h2>Example</h2>
|
||||
|
||||
<code>var camera = new THREE.OrthographicCamera( width / - 2, width / 2, height / 2, height / - 2, 1, 1000 );
|
||||
scene.add( camera );</code>
|
||||
|
||||
|
||||
<h2>Constructor</h2>
|
||||
|
||||
|
||||
<h3>[name]( [page:Float left], [page:Float right], [page:Float top], [page:Float bottom], [page:Float near], [page:Float far] )</h3>
|
||||
<div>
|
||||
left — Camera frustum left plane.<br />
|
||||
right — Camera frustum right plane.<br />
|
||||
top — Camera frustum top plane.<br />
|
||||
bottom — Camera frustum bottom plane.<br />
|
||||
near — Camera frustum near plane.<br />
|
||||
far — Camera frustum far plane.
|
||||
</div>
|
||||
|
||||
|
||||
<h2>Properties</h2>
|
||||
|
||||
<h3>[property:Float left]</h3>
|
||||
<div>Camera frustum left plane.</div>
|
||||
|
||||
<h3>[property:Float right]</h3>
|
||||
<div>Camera frustum right plane.</div>
|
||||
|
||||
<h3>[property:Float top]</h3>
|
||||
<div>Camera frustum top plane.</div>
|
||||
|
||||
<h3>[property:Float bottom]</h3>
|
||||
<div>Camera frustum bottom plane.</div>
|
||||
|
||||
<h3>[property:Float near]</h3>
|
||||
<div>Camera frustum near plane.</div>
|
||||
|
||||
<h3>[property:Float far]</h3>
|
||||
<div>Camera frustum far plane.</div>
|
||||
|
||||
|
||||
<h2>Methods</h2>
|
||||
|
||||
<h3>[method:null updateProjectionMatrix]()</h3>
|
||||
<div>
|
||||
Updates the camera projection matrix. Must be called after change of parameters.
|
||||
</div>
|
||||
|
||||
|
||||
<h2>Source</h2>
|
||||
|
||||
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
|
||||
</body>
|
||||
</html>
|
119
three.js-master/docs/api/cameras/PerspectiveCamera.html
Executable file
119
three.js-master/docs/api/cameras/PerspectiveCamera.html
Executable file
@ -0,0 +1,119 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<script src="../../list.js"></script>
|
||||
<script src="../../page.js"></script>
|
||||
<link type="text/css" rel="stylesheet" href="../../page.css" />
|
||||
</head>
|
||||
<body>
|
||||
[page:Object3D] → [page:Camera] →
|
||||
|
||||
<h1>[name]</h1>
|
||||
|
||||
<div class="desc">Camera with perspective projection.</div>
|
||||
|
||||
|
||||
<h2>Example</h2>
|
||||
|
||||
<code>var camera = new THREE.PerspectiveCamera( 45, width / height, 1, 1000 );
|
||||
scene.add( camera );</code>
|
||||
|
||||
|
||||
<h2>Constructor</h2>
|
||||
|
||||
<h3>[name]( [page:Float fov], [page:Float aspect], [page:Float near], [page:Float far] )</h3>
|
||||
<div>
|
||||
fov — Camera frustum vertical field of view.<br />
|
||||
aspect — Camera frustum aspect ratio.<br />
|
||||
near — Camera frustum near plane.<br />
|
||||
far — Camera frustum far plane.
|
||||
</div>
|
||||
|
||||
|
||||
<h2>Properties</h2>
|
||||
|
||||
<h3>[property:Float fov]</h3>
|
||||
<div>Camera frustum vertical field of view, from bottom to top of view, in degrees.</div>
|
||||
|
||||
<h3>[property:Float aspect]</h3>
|
||||
<div>Camera frustum aspect ratio, window width divided by window height.</div>
|
||||
|
||||
<h3>[property:Float near]</h3>
|
||||
<div>Camera frustum near plane.</div>
|
||||
|
||||
<h3>[property:Float far]</h3>
|
||||
<div>Camera frustum far plane.</div>
|
||||
|
||||
|
||||
<h2>Methods</h2>
|
||||
|
||||
<h3>[method:null setLens]( [page:Float focalLength], [page:Float frameSize] )</h3>
|
||||
<div>
|
||||
focalLength — focal length<br />
|
||||
frameSize — frame size
|
||||
</div>
|
||||
|
||||
<div>
|
||||
Uses focal length (in mm) to estimate and set FOV 35mm (fullframe) camera is used if frame size is not specified.<br />
|
||||
Formula based on [link:http://www.bobatkins.com/photography/technical/field_of_view.html]
|
||||
</div>
|
||||
|
||||
<h3>[method:null setViewOffset]( [page:Float fullWidth], [page:Float fullHeight], [page:Float x], [page:Float y], [page:Float width], [page:Float height] )</h3>
|
||||
<div>
|
||||
fullWidth — full width of multiview setup<br />
|
||||
fullHeight — full height of multiview setup<br />
|
||||
x — horizontal offset of subcamera<br />
|
||||
y — vertical offset of subcamera<br />
|
||||
width — width of subcamera<br />
|
||||
height — height of subcamera
|
||||
</div>
|
||||
|
||||
<div>
|
||||
Sets an offset in a larger frustum. This is useful for multi-window or multi-monitor/multi-machine setups.
|
||||
</div>
|
||||
|
||||
<div>
|
||||
For example, if you have 3x2 monitors and each monitor is 1920x1080 and the monitors are in grid like this:<br />
|
||||
|
||||
<pre>+---+---+---+
|
||||
| A | B | C |
|
||||
+---+---+---+
|
||||
| D | E | F |
|
||||
+---+---+---+</pre>
|
||||
|
||||
then for each monitor you would call it like this:<br />
|
||||
|
||||
<code>var w = 1920;
|
||||
var h = 1080;
|
||||
var fullWidth = w * 3;
|
||||
var fullHeight = h * 2;
|
||||
|
||||
// A
|
||||
camera.setViewOffset( fullWidth, fullHeight, w * 0, h * 0, w, h );
|
||||
// B
|
||||
camera.setViewOffset( fullWidth, fullHeight, w * 1, h * 0, w, h );
|
||||
// C
|
||||
camera.setViewOffset( fullWidth, fullHeight, w * 2, h * 0, w, h );
|
||||
// D
|
||||
camera.setViewOffset( fullWidth, fullHeight, w * 0, h * 1, w, h );
|
||||
// E
|
||||
camera.setViewOffset( fullWidth, fullHeight, w * 1, h * 1, w, h );
|
||||
// F
|
||||
camera.setViewOffset( fullWidth, fullHeight, w * 2, h * 1, w, h );
|
||||
</code>
|
||||
|
||||
Note there is no reason monitors have to be the same size or in a grid.
|
||||
</div>
|
||||
|
||||
<h3>[method:null updateProjectionMatrix]()</h3>
|
||||
<div>
|
||||
Updates the camera projection matrix. Must be called after change of parameters.
|
||||
</div>
|
||||
|
||||
|
||||
<h2>Source</h2>
|
||||
|
||||
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
|
||||
</body>
|
||||
</html>
|
44
three.js-master/docs/api/constants/CustomBlendingEquations.html
Executable file
44
three.js-master/docs/api/constants/CustomBlendingEquations.html
Executable file
@ -0,0 +1,44 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<script src="../../list.js"></script>
|
||||
<script src="../../page.js"></script>
|
||||
<link type="text/css" rel="stylesheet" href="../../page.css" />
|
||||
</head>
|
||||
<body>
|
||||
<h1>Custom Blending Equation Constants</h1>
|
||||
|
||||
<h2>Equations</h2>
|
||||
<div>
|
||||
THREE.AddEquation<br />
|
||||
THREE.SubtractEquation<br />
|
||||
THREE.ReverseSubtractEquation<br />
|
||||
THREE.MinEquation<br />
|
||||
THREE.MaxEquation
|
||||
</div>
|
||||
|
||||
<h2>Destination Factors</h2>
|
||||
<div>
|
||||
THREE.ZeroFactor<br />
|
||||
THREE.OneFactor<br />
|
||||
THREE.SrcColorFactor<br />
|
||||
THREE.OneMinusSrcColorFactor<br />
|
||||
THREE.SrcAlphaFactor<br />
|
||||
THREE.OneMinusSrcAlphaFactor<br />
|
||||
THREE.DstAlphaFactor<br />
|
||||
THREE.OneMinusDstAlphaFactor
|
||||
</div>
|
||||
|
||||
<h2>Source Factors</h2>
|
||||
<div>
|
||||
THREE.DstColorFactor<br />
|
||||
THREE.OneMinusDstColorFactor<br />
|
||||
THREE.SrcAlphaSaturateFactor
|
||||
</div>
|
||||
|
||||
<h2>Source</h2>
|
||||
|
||||
[link:https://github.com/mrdoob/three.js/blob/master/src/Three.js src/Three.js]
|
||||
</body>
|
||||
</html>
|
30
three.js-master/docs/api/constants/GLState.html
Executable file
30
three.js-master/docs/api/constants/GLState.html
Executable file
@ -0,0 +1,30 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<script src="../../list.js"></script>
|
||||
<script src="../../page.js"></script>
|
||||
<link type="text/css" rel="stylesheet" href="../../page.css" />
|
||||
</head>
|
||||
<body>
|
||||
<h1>GL State Constants</h1>
|
||||
|
||||
<h2>Cull Face</h2>
|
||||
<div>
|
||||
THREE.CullFaceNone<br />
|
||||
THREE.CullFaceBack<br />
|
||||
THREE.CullFaceFront<br />
|
||||
THREE.CullFaceFrontBack
|
||||
</div>
|
||||
|
||||
<h2>Front Face Direction</h2>
|
||||
<div>
|
||||
THREE.FrontFaceDirectionCW<br />
|
||||
THREE.FrontFaceDirectionCCW<br />
|
||||
</div>
|
||||
|
||||
<h2>Source</h2>
|
||||
|
||||
[link:https://github.com/mrdoob/three.js/blob/master/src/Three.js src/Three.js]
|
||||
</body>
|
||||
</html>
|
47
three.js-master/docs/api/constants/Materials.html
Executable file
47
three.js-master/docs/api/constants/Materials.html
Executable file
@ -0,0 +1,47 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<script src="../../list.js"></script>
|
||||
<script src="../../page.js"></script>
|
||||
<link type="text/css" rel="stylesheet" href="../../page.css" />
|
||||
</head>
|
||||
<body>
|
||||
<h1>Material Constants</h1>
|
||||
|
||||
<h2>Side</h2>
|
||||
<div>
|
||||
THREE.FrontSide<br />
|
||||
THREE.BackSide<br />
|
||||
THREE.DoubleSide
|
||||
</div>
|
||||
|
||||
<h2>Shading</h2>
|
||||
<div>
|
||||
THREE.NoShading<br />
|
||||
THREE.FlatShading<br />
|
||||
THREE.SmoothShading
|
||||
</div>
|
||||
|
||||
<h2>Colors</h2>
|
||||
<div>
|
||||
THREE.NoColors<br />
|
||||
THREE.FaceColors<br />
|
||||
THREE.VertexColors
|
||||
</div>
|
||||
|
||||
<h2>Blending Mode</h2>
|
||||
<div>
|
||||
THREE.NoBlending<br />
|
||||
THREE.NormalBlending<br />
|
||||
THREE.AdditiveBlending<br />
|
||||
THREE.SubtractiveBlending<br />
|
||||
THREE.MultiplyBlending<br />
|
||||
THREE.CustomBlending
|
||||
</div>
|
||||
|
||||
<h2>Source</h2>
|
||||
|
||||
[link:https://github.com/mrdoob/three.js/blob/master/src/Three.js src/Three.js]
|
||||
</body>
|
||||
</html>
|
23
three.js-master/docs/api/constants/ShadowingTypes.html
Executable file
23
three.js-master/docs/api/constants/ShadowingTypes.html
Executable file
@ -0,0 +1,23 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<script src="../../list.js"></script>
|
||||
<script src="../../page.js"></script>
|
||||
<link type="text/css" rel="stylesheet" href="../../page.css" />
|
||||
</head>
|
||||
<body>
|
||||
<h1>Shadowing Type Constants</h1>
|
||||
|
||||
<h2>Shadow Map</h2>
|
||||
<div>
|
||||
THREE.BasicShadowMap<br />
|
||||
THREE.PCFShadowMap<br />
|
||||
THREE.PCFSoftShadowMap
|
||||
</div>
|
||||
|
||||
<h2>Source</h2>
|
||||
|
||||
[link:https://github.com/mrdoob/three.js/blob/master/src/Three.js src/Three.js]
|
||||
</body>
|
||||
</html>
|
95
three.js-master/docs/api/constants/Textures.html
Executable file
95
three.js-master/docs/api/constants/Textures.html
Executable file
@ -0,0 +1,95 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<script src="../../list.js"></script>
|
||||
<script src="../../page.js"></script>
|
||||
<link type="text/css" rel="stylesheet" href="../../page.css" />
|
||||
</head>
|
||||
<body>
|
||||
<h1>Texture Constants</h1>
|
||||
|
||||
<h2>Operations</h2>
|
||||
<div>
|
||||
THREE.MultiplyOperation<br />
|
||||
THREE.MixOperation<br />
|
||||
THREE.AddOperation
|
||||
</div>
|
||||
|
||||
<h2>Mapping Modes</h2>
|
||||
<div>
|
||||
THREE.UVMapping<br />
|
||||
THREE.CubeReflectionMapping<br />
|
||||
THREE.CubeRefractionMapping<br />
|
||||
THREE.EquirectangularReflectionMapping<br />
|
||||
THREE.EquirectangularRefractionMapping<br />
|
||||
THREE.SphericalReflectionMapping
|
||||
</div>
|
||||
|
||||
<h2>Wrapping Modes</h2>
|
||||
<div>
|
||||
THREE.RepeatWrapping<br />
|
||||
THREE.ClampToEdgeWrapping<br />
|
||||
THREE.MirroredRepeatWrapping
|
||||
</div>
|
||||
|
||||
<h2>Filters</h2>
|
||||
<div>
|
||||
THREE.NearestFilter<br />
|
||||
THREE.NearestMipMapNearestFilter<br />
|
||||
THREE.NearestMipMapLinearFilter<br />
|
||||
THREE.LinearFilter<br />
|
||||
THREE.LinearMipMapNearestFilter<br />
|
||||
THREE.LinearMipMapLinearFilter
|
||||
</div>
|
||||
|
||||
<h2>Data Types</h2>
|
||||
<div>
|
||||
THREE.UnsignedByteType<br />
|
||||
THREE.ByteType<br />
|
||||
THREE.ShortType<br />
|
||||
THREE.UnsignedShortType<br />
|
||||
THREE.IntType<br />
|
||||
THREE.UnsignedIntType<br />
|
||||
THREE.FloatType<br />
|
||||
THREE.HalfFloatType
|
||||
</div>
|
||||
|
||||
<h2>Pixel Types</h2>
|
||||
<div>
|
||||
THREE.UnsignedShort4444Type<br />
|
||||
THREE.UnsignedShort5551Type<br />
|
||||
THREE.UnsignedShort565Type
|
||||
</div>
|
||||
|
||||
<h2>Pixel Formats</h2>
|
||||
<div>
|
||||
THREE.AlphaFormat<br />
|
||||
THREE.RGBFormat<br />
|
||||
THREE.RGBAFormat<br />
|
||||
THREE.LuminanceFormat<br />
|
||||
THREE.LuminanceAlphaFormat<br />
|
||||
THREE.RGBEFormat
|
||||
</div>
|
||||
|
||||
<h2>DDS / ST3C Compressed Texture Formats</h2>
|
||||
<div>
|
||||
THREE.RGB_S3TC_DXT1_Format<br />
|
||||
THREE.RGBA_S3TC_DXT1_Format<br />
|
||||
THREE.RGBA_S3TC_DXT3_Format<br />
|
||||
THREE.RGBA_S3TC_DXT5_Format
|
||||
</div>
|
||||
|
||||
<h2>PVRTC Compressed Texture Formats</h2>
|
||||
<div>
|
||||
THREE.RGB_PVRTC_4BPPV1_Format<br />
|
||||
THREE.RGB_PVRTC_2BPPV1_Format<br />
|
||||
THREE.RGBA_PVRTC_4BPPV1_Format<br />
|
||||
THREE.RGBA_PVRTC_2BPPV1_Format
|
||||
</div>
|
||||
|
||||
<h2>Source</h2>
|
||||
|
||||
[link:https://github.com/mrdoob/three.js/blob/master/src/Three.js src/Three.js]
|
||||
</body>
|
||||
</html>
|
105
three.js-master/docs/api/core/BufferAttribute.html
Executable file
105
three.js-master/docs/api/core/BufferAttribute.html
Executable file
@ -0,0 +1,105 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<script src="../../list.js"></script>
|
||||
<script src="../../page.js"></script>
|
||||
<link type="text/css" rel="stylesheet" href="../../page.css" />
|
||||
</head>
|
||||
<body>
|
||||
<h1>[name]</h1>
|
||||
|
||||
<div class="desc">
|
||||
This class stores data for an attribute associated with a [page:BufferGeometry]. See that page for details and a usage example. This class is used to store builtin attributes such as vertex position, normals, color, etc., but can also be used in your code to store custom attributes in a [page:BufferGeometry].
|
||||
</div>
|
||||
|
||||
<h2>Constructor</h2>
|
||||
<h3>[name]([page:Array array], [page:Integer itemSize])</h3>
|
||||
<div>
|
||||
Instantiates this attibute with data from the associated buffer. The array can either be a regular Array or a Typed Array.
|
||||
itemSize gives the number of values of the array that should be associated with a particular vertex.
|
||||
</div>
|
||||
|
||||
<h2>Properties</h2>
|
||||
|
||||
<h3>[property:Array array]</h3>
|
||||
<div>
|
||||
Stores the data associated with this attribute; can be an Array or a Typed Array. This element should have <code>itemSize * numVertices</code> elements, where numVertices is the number of vertices in the associated [page:BufferGeometry geometry].
|
||||
</div>
|
||||
|
||||
<h3>[property:Integer itemSize]</h3>
|
||||
<div>
|
||||
Records how many items of the array are associated with a particular vertex. For instance, if this
|
||||
attribute is storing a 3-component vector (such as a position, normal, or color), then itemSize should be 3.
|
||||
</div>
|
||||
|
||||
<h3>[property:Integer length]</h3>
|
||||
<div>
|
||||
Gives the total number of elements in the array.
|
||||
</div>
|
||||
|
||||
<h3>[property:Boolean needsUpdate]</h3>
|
||||
<div>
|
||||
Flag to indicate that this attribute has changed and should be re-send to the GPU. Set this to true when you modify the value of the array.
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<h2>Methods</h2>
|
||||
|
||||
<h3>[method:null copyAt] ( [page:Integer index1], attribute, [page:Integer index2] ) </h3>
|
||||
<div>
|
||||
Copies itemSize values in the array from the vertex at index2 to the vertex at index1.
|
||||
</div>
|
||||
|
||||
<h3>[method:null set] ( [page:Array value] ) </h3>
|
||||
<div>
|
||||
Sets the associated array with values from the passed array.
|
||||
</div>
|
||||
|
||||
<h3>[method:null setX]( index, x ) </h3>
|
||||
<div>
|
||||
Sets the value of the array at <code>index * itemSize</code> to x
|
||||
</div>
|
||||
|
||||
<h3>[method:null setY]( index, y ) </h3>
|
||||
<div>
|
||||
Sets the value of the array at <code>index * itemSize + 1</code> to y
|
||||
</div>
|
||||
|
||||
<h3>[method:null setZ]( index, z ) </h3>
|
||||
<div>
|
||||
Sets the value of the array at <code>index * itemSize + 2</code> to z
|
||||
</div>
|
||||
|
||||
<h3>[method:null setXY]( index, x, y ) </h3>
|
||||
<div>
|
||||
Sets the value of the array at <code>index * itemSize</code> to x and
|
||||
sets the value of the array at <code>index * itemSize + 1</code> to y
|
||||
</div>
|
||||
|
||||
<h3>[method:null setXYZ]( index, x, y, z ) </h3>
|
||||
<div>
|
||||
Sets the value of the array at <code>index * itemSize</code> to x,
|
||||
the value of the array at <code>index * itemSize + 1</code> to y, and
|
||||
the value of the array at <code>index * itemSize + 2</code> to z.
|
||||
</div>
|
||||
|
||||
<h3>[method:null setXYZW]( index, x, y, z, w ) </h3>
|
||||
<div>
|
||||
Sets the value of the array at <code>index * itemSize</code> to x,
|
||||
the value of the array at <code>index * itemSize + 1</code> to y,
|
||||
the value of the array at <code>index * itemSize + 2</code> to z, and
|
||||
the value of the array at <code>index * itemSize + 3</code> to w.
|
||||
</div>
|
||||
|
||||
<h3>[method:BufferAttribute clone]() </h3>
|
||||
<div>
|
||||
Copies this attribute.
|
||||
</div>
|
||||
|
||||
<h2>Source</h2>
|
||||
|
||||
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
|
||||
</body>
|
||||
</html>
|
237
three.js-master/docs/api/core/BufferGeometry.html
Executable file
237
three.js-master/docs/api/core/BufferGeometry.html
Executable file
@ -0,0 +1,237 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<script src="../../list.js"></script>
|
||||
<script src="../../page.js"></script>
|
||||
<link type="text/css" rel="stylesheet" href="../../page.css" />
|
||||
</head>
|
||||
<body>
|
||||
<h1>[name]</h1>
|
||||
|
||||
<div class="desc">
|
||||
<p>
|
||||
This class is an efficient alternative to [page:Geometry], because it stores all data, including
|
||||
vertex positions, face indices, normals, colors, UVs, and custom attributes within buffers; this
|
||||
reduces the cost of passing all this data to the GPU.
|
||||
This also makes BufferGeometry harder to work with than [page:Geometry]; rather than accessing
|
||||
position data as [page:Vector3] objects, color data as [page:Color] objects, and so on, you have to
|
||||
access the raw data from the appropriate [page:BufferAttribute attribute] buffer. This makes
|
||||
BufferGeometry best-suited for static objects where you don't need to manipulate the geometry much
|
||||
after instantiating it.
|
||||
</p>
|
||||
|
||||
<h3>Example</h3>
|
||||
<code>
|
||||
var geometry = new THREE.BufferGeometry();
|
||||
// create a simple square shape. We duplicate the top left and bottom right
|
||||
// vertices because each vertex needs to appear once per triangle.
|
||||
var vertexPositions = [
|
||||
[-1.0, -1.0, 1.0],
|
||||
[ 1.0, -1.0, 1.0],
|
||||
[ 1.0, 1.0, 1.0],
|
||||
|
||||
[ 1.0, 1.0, 1.0],
|
||||
[-1.0, 1.0, 1.0],
|
||||
[-1.0, -1.0, 1.0]
|
||||
];
|
||||
var vertices = new Float32Array( vertexPositions.length * 3 ); // three components per vertex
|
||||
|
||||
// components of the position vector for each vertex are stored
|
||||
// contiguously in the buffer.
|
||||
for ( var i = 0; i < vertexPositions.length; i++ )
|
||||
{
|
||||
vertices[ i*3 + 0 ] = vertexPositions[i][0];
|
||||
vertices[ i*3 + 1 ] = vertexPositions[i][1];
|
||||
vertices[ i*3 + 2 ] = vertexPositions[i][2];
|
||||
}
|
||||
|
||||
// itemSize = 3 because there are 3 values (components) per vertex
|
||||
geometry.addAttribute( 'position', new THREE.BufferAttribute( vertices, 3 ) );
|
||||
var material = new THREE.MeshBasicMaterial( { color: 0xff0000 } );
|
||||
var mesh = new THREE.Mesh( geometry, material );
|
||||
</code>
|
||||
<p>More examples: [example:webgl_buffergeometry Complex mesh with non-indexed faces], [example:webgl_buffergeometry_uint Complex mesh with indexed faces], [example:webgl_buffergeometry_lines Lines], [example:webgl_buffergeometry_lines_indexed Indexed Lines], [example:webgl_buffergeometry_particles Particles], and [example:webgl_buffergeometry_rawshader Raw Shaders].</p>
|
||||
|
||||
|
||||
<h3>Accessing attributes</h3>
|
||||
<p>
|
||||
WebGL stores data associated with individual vertices of a geometry in <emph>attributes</emph>.
|
||||
Examples include the position of the vertex, the normal vector for the vertex, the vertex color,
|
||||
and so on. When using [page:Geometry], the [page:WebGLRenderer renderer] takes care of wrapping
|
||||
up this information into typed array buffers and sending this data to the shader. With
|
||||
BufferGeometry, all of this data is stored in buffers associated with an individual attributes.
|
||||
This means that to get the position data associated with a vertex (for instance), you must call
|
||||
[page:.getAttribute] to access the 'position' [page:BufferAttribute attribute], then access the individual
|
||||
x, y, and z coordinates of the position.
|
||||
</p>
|
||||
<p>
|
||||
The following attributes are set by various members of this class:
|
||||
</p>
|
||||
<h4>[page:BufferAttribute position] (itemSize: 3)</h4>
|
||||
<div>
|
||||
Stores the x, y, and z coordinates of each vertex in this geometry. Set by [page:.fromGeometry]().
|
||||
</div>
|
||||
|
||||
<h4>[page:BufferAttribute normal] (itemSize: 3)</h4>
|
||||
<div>
|
||||
Stores the x, y, and z components of the face or vertex normal vector of each vertex in this geometry.
|
||||
Set by [page:.fromGeometry]().
|
||||
</div>
|
||||
|
||||
<h4>[page:BufferAttribute color] (itemSize: 3)</h4>
|
||||
<div>
|
||||
Stores the red, green, and blue channels of vertex color of each vertex in this geometry.
|
||||
Set by [page:.fromGeometry]().
|
||||
</div>
|
||||
|
||||
<h4>[page:BufferAttribute tangent] (itemSize: 3)</h4>
|
||||
<div>
|
||||
Stores the x, y, and z components of the tangent vector of each vertex in this geometry. Set by [page:.computeTangents]().
|
||||
</div>
|
||||
|
||||
<h4>[page:BufferAttribute index] (itemSize: 3)</h4>
|
||||
Allows for vertices to be re-used across multiple triangles; this is called using "indexed triangles," and works much the same as it does in [page:Geometry]: each triangle is associated with the index of three vertices. This attribute therefore stores the index of each vertex for each triangular face.
|
||||
|
||||
If this attribute is not set, the [page:WebGLRenderer renderer] assumes that each three contiguous positions represent a single triangle.
|
||||
</div>
|
||||
<p>
|
||||
In addition to the the built-in attributes, you can set your own custom attributes using the addAttribute method. With [page:Geometry], these attributes are set and stored on the [page:Material]. In BufferGeometry, the attributes are stored with the geometry itself. Note that you still need to set the attributes information on the material as well, but the value of each attribute is stored in the BufferGeometry.
|
||||
</p>
|
||||
|
||||
|
||||
<h2>Constructor</h2>
|
||||
|
||||
|
||||
<h3>[name]()</h3>
|
||||
<div>
|
||||
This creates a new [name]. It also sets several properties to a default value.
|
||||
</div>
|
||||
|
||||
|
||||
<h2>Properties</h2>
|
||||
|
||||
<h3>[property:Integer id]</h3>
|
||||
<div>
|
||||
Unique number for this buffergeometry instance.
|
||||
</div>
|
||||
|
||||
<h3>[property:Hashmap attributes]</h3>
|
||||
<div>
|
||||
This hashmap has as id the name of the attribute to be set and as value the [page:BufferAttribute buffer] to set it to.
|
||||
Rather than accessing this property directly, use addAttribute and getAttribute to access attributes of this geometry.
|
||||
</div>
|
||||
|
||||
<!--
|
||||
<h3>[property:Boolean dynamic]</h3>
|
||||
<div>
|
||||
When set, it holds certain buffers in memory to have faster updates for this object. When unset, it deletes those buffers and saves memory.
|
||||
</div> -->
|
||||
|
||||
<h3>[property:Array drawCalls] (previously [property:Array offsets])</h3>
|
||||
<div>
|
||||
For geometries that use indexed triangles, this Array can be used to split the object into multiple WebGL draw calls. Each draw call will draw some subset of the vertices in this geometry using the configured [page:Material shader]. This may be necessary if, for instance, you have more than 65535 vertices in your object.
|
||||
Each element is an object of the form:
|
||||
<code>{ start: Integer, count: Integer, index: Integer }</code>
|
||||
where start specifies the index of the first vertex in this draw call, count specifies how many vertices are included, and index specifies an optional offset.
|
||||
|
||||
Use addDrawCall to add draw calls, rather than modifying this array directly.
|
||||
</div>
|
||||
|
||||
<h3>[property:Box3 boundingBox]</h3>
|
||||
<div>
|
||||
Bounding box.
|
||||
<code>{ min: new THREE.Vector3(), max: new THREE.Vector3() }</code>
|
||||
</div>
|
||||
|
||||
<h3>[property:Sphere boundingSphere]</h3>
|
||||
<div>
|
||||
Bounding sphere.
|
||||
<code>{ radius: float }</code>
|
||||
</div>
|
||||
|
||||
<h3>[property:Array morphTargets]</h3>
|
||||
<div>
|
||||
Array of morph targets. Each morph target is a Javascript object:
|
||||
<code>{ name: "targetName", vertices: [ new THREE.Vertex(), ... ] }</code>
|
||||
Morph vertices match number and order of primary vertices.
|
||||
</div>
|
||||
|
||||
<h3>[property:boolean hasTangents]</h3>
|
||||
<div>
|
||||
True if BufferGeometry has tangents. Set in [page:.computeTangents].
|
||||
</div>
|
||||
|
||||
<h2>Methods</h2>
|
||||
|
||||
<h3>[page:EventDispatcher EventDispatcher] methods are available on this class.</h3>
|
||||
|
||||
<h3>[property:null addAttribute]( [page:String name], [page:BufferAttribute attribute] )</h3>
|
||||
<div>
|
||||
Adds an attribute to this geometry. Use this rather than the attributes property,
|
||||
because an internal array of attributes is maintained to speed up iterating over
|
||||
attributes.
|
||||
</div>
|
||||
|
||||
<h3>[method:null addDrawCall]( [page:Integer start], [page:Integer count], [page:Integer indexOffset] )</h3>
|
||||
<div>
|
||||
Adds a draw call to this geometry; see the drawcalls property for details.
|
||||
</div>
|
||||
|
||||
|
||||
<h3>[method:null applyMatrix]( [page:Matrix4 matrix] )</h3>
|
||||
<div>
|
||||
Bakes matrix transform directly into vertex coordinates.
|
||||
</div>
|
||||
|
||||
<h3>[method:null computeVertexNormals]()</h3>
|
||||
<div>
|
||||
Computes vertex normals by averaging face normals.<br />
|
||||
</div>
|
||||
|
||||
<h3>[method:null computeTangents]()</h3>
|
||||
<div>
|
||||
Computes vertex tangents.<br />
|
||||
Based on [link:http://www.terathon.com/code/tangent.html]<br />
|
||||
Geometry must have vertex [page:UV UVs] (layer 0 will be used).
|
||||
</div>
|
||||
|
||||
<h3>[method:null computeBoundingBox]()</h3>
|
||||
<div>
|
||||
Computes bounding box of the geometry, updating [page:Geometry Geometry.boundingBox] attribute.<br />
|
||||
Bounding boxes aren't computed by default. They need to be explicitly computed, otherwise they are *null*.
|
||||
</div>
|
||||
|
||||
<h3>[method:null computeBoundingSphere]()</h3>
|
||||
<div>
|
||||
Computes bounding sphere of the geometry, updating [page:Geometry Geometry.boundingSphere] attribute.<br />
|
||||
Bounding spheres aren't computed by default. They need to be explicitly computed, otherwise they are *null*.
|
||||
</div>
|
||||
|
||||
<h3>[method:null dispose]()</h3>
|
||||
<div>
|
||||
Disposes the object from memory. <br />
|
||||
You need to call this when you want the bufferGeometry removed while the application is running.
|
||||
</div>
|
||||
|
||||
<h3>[method:null fromGeometry]( [page:Geometry] )</h3>
|
||||
<div>
|
||||
Populates this BufferGeometry with data from a [page:Geometry] object.
|
||||
</div>
|
||||
|
||||
<h3>[method:BufferAttribute getAttribute]( [page:String name] )</h3>
|
||||
<div>
|
||||
Returns the [page:BufferAttribute attribute] with the specified name.
|
||||
</div>
|
||||
|
||||
<h3>[method:null normalizeNormals]()</h3>
|
||||
<div>
|
||||
Every normal vector in a geometry will have a magnitude of 1.
|
||||
This will correct lighting on the geometry surfaces.
|
||||
</div>
|
||||
|
||||
<h2>Source</h2>
|
||||
|
||||
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
|
||||
</body>
|
||||
</html>
|
82
three.js-master/docs/api/core/Clock.html
Executable file
82
three.js-master/docs/api/core/Clock.html
Executable file
@ -0,0 +1,82 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<script src="../../list.js"></script>
|
||||
<script src="../../page.js"></script>
|
||||
<link type="text/css" rel="stylesheet" href="../../page.css" />
|
||||
</head>
|
||||
<body>
|
||||
<h1>[name]</h1>
|
||||
|
||||
<div class="desc">Object for keeping track of time.</div>
|
||||
|
||||
|
||||
<h2>Constructor</h2>
|
||||
|
||||
|
||||
<h3>[name]( [page:Boolean autoStart] )</h3>
|
||||
<div>
|
||||
autoStart — Automatically start the clock.
|
||||
</div>
|
||||
|
||||
<h2>Properties</h2>
|
||||
|
||||
<h3>[property:Boolean autoStart]</h3>
|
||||
<div>
|
||||
If set, starts the clock automatically when the first update is called.
|
||||
</div>
|
||||
|
||||
<h3>[property:Float startTime]</h3>
|
||||
<div>
|
||||
When the clock is running, It holds the start time of the clock. <br />
|
||||
This counted from the number of milliseconds elapsed since 1 January 1970 00:00:00 UTC.
|
||||
</div>
|
||||
|
||||
|
||||
<h3>[property:Float oldTime]</h3>
|
||||
<div>
|
||||
When the clock is running, It holds the previous time from a update.<br />
|
||||
This counted from the number of milliseconds elapsed since 1 January 1970 00:00:00 UTC.
|
||||
</div>
|
||||
|
||||
<h3>[property:Float elapsedTime]</h3>
|
||||
<div>
|
||||
When the clock is running, It holds the time elapsed between the start of the clock to the previous update.<br />
|
||||
This counted from the number of milliseconds elapsed since 1 January 1970 00:00:00 UTC.
|
||||
</div>
|
||||
|
||||
<h3>[property:Boolean running]</h3>
|
||||
<div>
|
||||
This property keeps track whether the clock is running or not.
|
||||
</div>
|
||||
|
||||
|
||||
<h2>Methods</h2>
|
||||
|
||||
<h3>[method:null start]()</h3>
|
||||
<div>
|
||||
Starts clock.
|
||||
</div>
|
||||
|
||||
<h3>[method:null stop]()</h3>
|
||||
<div>
|
||||
Stops clock.
|
||||
</div>
|
||||
|
||||
<h3>[method:Float getElapsedTime]()</h3>
|
||||
<div>
|
||||
Get the seconds passed since the clock started.
|
||||
</div>
|
||||
|
||||
<h3>[method:Float getDelta]()</h3>
|
||||
<div>
|
||||
Get the seconds passed since the last call to this method.
|
||||
</div>
|
||||
|
||||
|
||||
<h2>Source</h2>
|
||||
|
||||
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
|
||||
</body>
|
||||
</html>
|
66
three.js-master/docs/api/core/EventDispatcher.html
Executable file
66
three.js-master/docs/api/core/EventDispatcher.html
Executable file
@ -0,0 +1,66 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<script src="../../list.js"></script>
|
||||
<script src="../../page.js"></script>
|
||||
<link type="text/css" rel="stylesheet" href="../../page.css" />
|
||||
</head>
|
||||
<body>
|
||||
<h1>[name]</h1>
|
||||
|
||||
<div class="desc">JavaScript events for custom objects.<br />
|
||||
<a href="https://github.com/mrdoob/eventdispatcher.js">https://github.com/mrdoob/eventdispatcher.js</a></div>
|
||||
|
||||
<h2>Constructor</h2>
|
||||
|
||||
|
||||
<h3>[name]()</h3>
|
||||
<div>
|
||||
Creates EventDispatcher object.
|
||||
</div>
|
||||
|
||||
|
||||
<h2>Methods</h2>
|
||||
|
||||
<h3>[method:null addEventListener]( [page:String type], [page:Function listener] )</h3>
|
||||
<div>
|
||||
type - The type of event to listen to.<br />
|
||||
listener - The function that gets called when the event is fired.
|
||||
</div>
|
||||
<div>
|
||||
Adds a listener to an event type.
|
||||
</div>
|
||||
|
||||
<h3>[method:Boolean hasEventListener]( [page:String type], [page:Function listener] )</h3>
|
||||
<div>
|
||||
type - The type of event to listen to.<br />
|
||||
listener - The function that gets called when the event is fired.
|
||||
</div>
|
||||
<div>
|
||||
Checks if listener is added to an event type.
|
||||
</div>
|
||||
|
||||
<h3>[method:null removeEventListener]( [page:String type], [page:Function listener] )</h3>
|
||||
<div>
|
||||
type - The type of the listener that gets removed.<br />
|
||||
listener - The listener function that gets removed.
|
||||
</div>
|
||||
<div>
|
||||
Removes a listener from an event type.
|
||||
</div>
|
||||
|
||||
<h3>[method:null dispatchEvent]( [page:String type] )</h3>
|
||||
<div>
|
||||
type - The type of event that gets fired.
|
||||
</div>
|
||||
<div>
|
||||
Fire an event type.
|
||||
</div>
|
||||
|
||||
|
||||
<h2>Source</h2>
|
||||
|
||||
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
|
||||
</body>
|
||||
</html>
|
96
three.js-master/docs/api/core/Face3.html
Executable file
96
three.js-master/docs/api/core/Face3.html
Executable file
@ -0,0 +1,96 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<script src="../../list.js"></script>
|
||||
<script src="../../page.js"></script>
|
||||
<link type="text/css" rel="stylesheet" href="../../page.css" />
|
||||
</head>
|
||||
<body>
|
||||
<h1>[name]</h1>
|
||||
|
||||
<div class="desc">
|
||||
Triangle face.
|
||||
</div>
|
||||
|
||||
|
||||
<h2>Example</h2>
|
||||
|
||||
<code>var normal = new THREE.Vector3( 0, 1, 0 );
|
||||
var color = new THREE.Color( 0xffaa00 );
|
||||
var face = new THREE.Face3( 0, 1, 2, normal, color, 0 );</code>
|
||||
|
||||
|
||||
<h2>Constructor</h2>
|
||||
|
||||
<h3>[name]( [page:Integer a], [page:Integer b], [page:Integer c], [page:Vector3 normal], [page:Color color], [page:Integer materialIndex] )</h3>
|
||||
<div>
|
||||
a — Vertex A index.<br />
|
||||
b — Vertex B index.<br />
|
||||
c — Vertex C index.<br />
|
||||
normal — Face normal or array of vertex normals.<br />
|
||||
color — Face color or array of vertex colors.<br />
|
||||
materialIndex — Material index.
|
||||
</div>
|
||||
|
||||
<h2>Properties</h2>
|
||||
|
||||
<h3>[property:Integer a]</h3>
|
||||
<div>
|
||||
Vertex A index.
|
||||
</div>
|
||||
|
||||
<h3>[property:Integer b]</h3>
|
||||
<div>
|
||||
Vertex B index.
|
||||
</div>
|
||||
|
||||
<h3>[property:Integer c]</h3>
|
||||
<div>
|
||||
Vertex C index.
|
||||
</div>
|
||||
|
||||
<h3>[property:Vector3 normal]</h3>
|
||||
<div>
|
||||
Face normal.
|
||||
</div>
|
||||
|
||||
<h3>[property:Color color]</h3>
|
||||
<div>
|
||||
Face color.
|
||||
</div>
|
||||
|
||||
<h3>[property:Array vertexNormals]</h3>
|
||||
<div>
|
||||
Array of 3 vertex normals.
|
||||
</div>
|
||||
|
||||
<h3>[property:Array vertexColors]</h3>
|
||||
<div>
|
||||
Array of 3 vertex colors.
|
||||
</div>
|
||||
|
||||
<h3>[property:Array vertexTangents]</h3>
|
||||
<div>
|
||||
Array of 3 vertex tangents.
|
||||
</div>
|
||||
|
||||
|
||||
<h3>[property:Integer materialIndex]</h3>
|
||||
<div>
|
||||
Material index (points to [page:MeshFaceMaterial MeshFaceMaterial.materials]).
|
||||
</div>
|
||||
|
||||
<h2>Methods</h2>
|
||||
|
||||
<h3>[method:Face3 clone]()</h3>
|
||||
<div>
|
||||
Creates a new clone of the Face3 object.
|
||||
</div>
|
||||
|
||||
|
||||
<h2>Source</h2>
|
||||
|
||||
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
|
||||
</body>
|
||||
</html>
|
253
three.js-master/docs/api/core/Geometry.html
Executable file
253
three.js-master/docs/api/core/Geometry.html
Executable file
@ -0,0 +1,253 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<script src="../../list.js"></script>
|
||||
<script src="../../page.js"></script>
|
||||
<link type="text/css" rel="stylesheet" href="../../page.css" />
|
||||
</head>
|
||||
<body>
|
||||
<h1>[name]</h1>
|
||||
|
||||
<div class="desc">
|
||||
Base class for geometries.<br />
|
||||
A geometry holds all data necessary to describe a 3D model.
|
||||
</div>
|
||||
|
||||
|
||||
<h2>Example</h2>
|
||||
|
||||
<code>var geometry = new THREE.Geometry();
|
||||
|
||||
geometry.vertices.push(
|
||||
new THREE.Vector3( -10, 10, 0 ),
|
||||
new THREE.Vector3( -10, -10, 0 ),
|
||||
new THREE.Vector3( 10, -10, 0 )
|
||||
);
|
||||
|
||||
geometry.faces.push( new THREE.Face3( 0, 1, 2 ) );
|
||||
|
||||
geometry.computeBoundingSphere();
|
||||
</code>
|
||||
|
||||
<h2>Constructor</h2>
|
||||
|
||||
|
||||
<h3>[name]()</h3>
|
||||
<div>
|
||||
The constructor takes no arguments.
|
||||
</div>
|
||||
|
||||
|
||||
<h2>Properties</h2>
|
||||
|
||||
<h3>[property:Integer id]</h3>
|
||||
<div>
|
||||
Unique number for this geometry instance.
|
||||
</div>
|
||||
|
||||
<h3>[property:String name]</h3>
|
||||
<div>
|
||||
Name for this geometry. Default is an empty string.
|
||||
</div>
|
||||
|
||||
<h3>[property:Array vertices]</h3>
|
||||
<div>
|
||||
Array of [page:Vector3 vertices].<br />
|
||||
The array of vertices holds every position of points in the model.<br />
|
||||
To signal an update in this array, [page:Geometry Geometry.verticesNeedUpdate] needs to be set to true.
|
||||
</div>
|
||||
|
||||
<h3>[property:Array colors]</h3>
|
||||
<div>
|
||||
Array of vertex [page:Color colors], matching number and order of vertices.<br />
|
||||
Used in [page:PointCloud] and [page:Line].<br />
|
||||
[page:Mesh Meshes] use per-face-use-of-vertex colors embedded directly in faces.<br />
|
||||
To signal an update in this array, [page:Geometry Geometry.colorsNeedUpdate] needs to be set to true.
|
||||
</div>
|
||||
|
||||
<h3>[property:Array faces]</h3>
|
||||
<div>
|
||||
Array of [page:Face3 triangles].<br />
|
||||
The array of faces describe how each vertex in the model is connected with each other.<br />
|
||||
To signal an update in this array, [page:Geometry Geometry.elementsNeedUpdate] needs to be set to true.
|
||||
</div>
|
||||
|
||||
<h3>[property:Array faceVertexUvs]</h3>
|
||||
<div>
|
||||
Array of face [page:UV] layers.<br />
|
||||
Each UV layer is an array of [page:UV]s matching the order and number of vertices in faces.<br />
|
||||
To signal an update in this array, [page:Geometry Geometry.uvsNeedUpdate] needs to be set to true.
|
||||
</div>
|
||||
|
||||
<h3>[property:Array morphTargets]</h3>
|
||||
<div>
|
||||
Array of morph targets. Each morph target is a Javascript object:
|
||||
<code>{ name: "targetName", vertices: [ new THREE.Vector3(), ... ] }</code>
|
||||
Morph vertices match number and order of primary vertices.
|
||||
</div>
|
||||
|
||||
<h3>[property:Array morphColors]</h3>
|
||||
<div>
|
||||
Array of morph colors. Morph colors have similar structure as morph targets, each color set is a Javascript object:
|
||||
<code>morphColor = { name: "colorName", colors: [ new THREE.Color(), ... ] }</code>
|
||||
Morph colors can match either the number and order of faces (face colors) or the number of vertices (vertex colors).
|
||||
</div>
|
||||
|
||||
<h3>[property:Array morphNormals]</h3>
|
||||
<div>
|
||||
Array of morph normals. Morph normals have similar structure as morph targets, each normal set is a Javascript object:
|
||||
<code>morphNormal = { name: "NormalName", normals: [ new THREE.Vector3(), ... ] }</code>
|
||||
</div>
|
||||
|
||||
<h3>[property:Array skinWeights]</h3>
|
||||
<div>
|
||||
Array of skinning weights, matching number and order of vertices.
|
||||
</div>
|
||||
|
||||
<h3>[property:Array skinIndices]</h3>
|
||||
<div>
|
||||
Array of skinning indices, matching number and order of vertices.
|
||||
</div>
|
||||
|
||||
<h3>[property:Object boundingBox]</h3>
|
||||
<div>
|
||||
Bounding box.
|
||||
<code>{ min: new THREE.Vector3(), max: new THREE.Vector3() }</code>
|
||||
</div>
|
||||
|
||||
<h3>[property:Object boundingSphere]</h3>
|
||||
<div>
|
||||
Bounding sphere.
|
||||
<code>{ radius: float }</code>
|
||||
</div>
|
||||
|
||||
<h3>[property:Boolean hasTangents]</h3>
|
||||
<div>
|
||||
True if geometry has tangents. Set in [page:Geometry Geometry.computeTangents].
|
||||
</div>
|
||||
|
||||
<h3>[property:Boolean dynamic]</h3>
|
||||
<div>
|
||||
Set to *true* if attribute buffers will need to change in runtime (using "dirty" flags).<br/>
|
||||
Unless set to true internal typed arrays corresponding to buffers will be deleted once sent to GPU.<br/>
|
||||
Defaults to true.
|
||||
</div>
|
||||
|
||||
<h3>[property:Boolean verticesNeedUpdate]</h3>
|
||||
<div>
|
||||
Set to *true* if the vertices array has been updated.
|
||||
</div>
|
||||
|
||||
<h3>[property:Boolean elementsNeedUpdate]</h3>
|
||||
<div>
|
||||
Set to *true* if the faces array has been updated.
|
||||
</div>
|
||||
|
||||
<h3>[property:Boolean uvsNeedUpdate]</h3>
|
||||
<div>
|
||||
Set to *true* if the uvs array has been updated.
|
||||
</div>
|
||||
|
||||
<h3>[property:Boolean normalsNeedUpdate]</h3>
|
||||
<div>
|
||||
Set to *true* if the normals array has been updated.
|
||||
</div>
|
||||
|
||||
<h3>[property:Boolean tangentsNeedUpdate]</h3>
|
||||
<div>
|
||||
Set to *true* if the tangents in the faces has been updated.
|
||||
</div>
|
||||
|
||||
<h3>[property:Boolean colorsNeedUpdate]</h3>
|
||||
<div>
|
||||
Set to *true* if the colors array has been updated.
|
||||
</div>
|
||||
|
||||
<h3>[property:Boolean lineDistancesNeedUpdate]</h3>
|
||||
<div>
|
||||
Set to *true* if the linedistances array has been updated.
|
||||
</div>
|
||||
|
||||
<h3>[property:array lineDistances]</h3>
|
||||
<div>
|
||||
An array containing distances between vertices for Line geometries.
|
||||
This is required for LinePieces/LineDashedMaterial to render correctly.
|
||||
Line distances can also be generated with computeLineDistances.
|
||||
</div>
|
||||
|
||||
<h2>Methods</h2>
|
||||
|
||||
<h3>[page:EventDispatcher EventDispatcher] methods are available on this class.</h3>
|
||||
|
||||
<h3>[method:null applyMatrix]( [page:Matrix4 matrix] )</h3>
|
||||
<div>
|
||||
Bakes matrix transform directly into vertex coordinates.
|
||||
</div>
|
||||
|
||||
<h3>[method:null computeFaceNormals]()</h3>
|
||||
<div>
|
||||
Computes face normals.
|
||||
</div>
|
||||
|
||||
<h3>[method:null computeVertexNormals]()</h3>
|
||||
<div>
|
||||
Computes vertex normals by averaging face normals.<br />
|
||||
Face normals must be existing / computed beforehand.
|
||||
</div>
|
||||
|
||||
<h3>[method:null computeMorphNormals]()</h3>
|
||||
<div>
|
||||
Computes morph normals.
|
||||
</div>
|
||||
|
||||
<h3>[method:null computeTangents]()</h3>
|
||||
<div>
|
||||
Computes vertex tangents.<br />
|
||||
Based on [link:http://www.terathon.com/code/tangent.html]<br />
|
||||
Geometry must have vertex [page:UV UVs] (layer 0 will be used).
|
||||
</div>
|
||||
|
||||
<h3>[method:null computeBoundingBox]()</h3>
|
||||
<div>
|
||||
Computes bounding box of the geometry, updating [page:Geometry Geometry.boundingBox] attribute.
|
||||
</div>
|
||||
|
||||
<h3>[method:null computeBoundingSphere]()</h3>
|
||||
<div>
|
||||
Computes bounding sphere of the geometry, updating [page:Geometry Geometry.boundingSphere] attribute.
|
||||
</div>
|
||||
|
||||
<div>Neither bounding boxes or bounding spheres are computed by default. They need to be explicitly computed, otherwise they are *null*.</div>
|
||||
|
||||
<h3>[method:null merge]( [page:Geometry geometry], [page:Matrix4 matrix], [page:Integer materialIndexOffset] )</h3>
|
||||
<div>Merge two geometries or geometry and geometry from object (using object's transform)</div>
|
||||
|
||||
<h3>[method:null mergeVertices]()</h3>
|
||||
<div>
|
||||
Checks for duplicate vertices using hashmap.<br />
|
||||
Duplicated vertices are removed and faces' vertices are updated.
|
||||
</div>
|
||||
|
||||
<h3>[method:Geometry clone]()</h3>
|
||||
<div>
|
||||
Creates a new clone of the Geometry.
|
||||
</div>
|
||||
|
||||
<h3>[method:null dispose]()</h3>
|
||||
<div>
|
||||
Removes The object from memory. <br />
|
||||
Don't forget to call this method when you remove a geometry because it can cause memory leaks.
|
||||
</div>
|
||||
|
||||
<h3>[method:null computeLineDistances]()</h3>
|
||||
<div>
|
||||
Compute distances between vertices for Line geometries.
|
||||
</div>
|
||||
|
||||
|
||||
<h2>Source</h2>
|
||||
|
||||
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
|
||||
</body>
|
||||
</html>
|
309
three.js-master/docs/api/core/Object3D.html
Executable file
309
three.js-master/docs/api/core/Object3D.html
Executable file
@ -0,0 +1,309 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<script src="../../list.js"></script>
|
||||
<script src="../../page.js"></script>
|
||||
<link type="text/css" rel="stylesheet" href="../../page.css" />
|
||||
</head>
|
||||
<body>
|
||||
<h1>[name]</h1>
|
||||
|
||||
<div class="desc">Base class for scene graph objects.</div>
|
||||
|
||||
|
||||
<h2>Constructor</h2>
|
||||
|
||||
|
||||
<h3>[name]()</h3>
|
||||
<div>
|
||||
The constructor takes no arguments.
|
||||
</div>
|
||||
|
||||
|
||||
<h2>Properties</h2>
|
||||
|
||||
<h3>[property:Integer id]</h3>
|
||||
<div>
|
||||
readonly – Unique number for this object instance.
|
||||
</div>
|
||||
|
||||
<h3>[property:String uuid]</h3>
|
||||
<div>
|
||||
[link:http://en.wikipedia.org/wiki/Universally_unique_identifier UUID] of this object instance.
|
||||
This gets automatically assigned, so this shouldn't be edited.
|
||||
</div>
|
||||
|
||||
<h3>[property:String name]</h3>
|
||||
<div>
|
||||
Optional name of the object (doesn't need to be unique).
|
||||
</div>
|
||||
|
||||
<h3>[property:Object3D parent]</h3>
|
||||
<div>
|
||||
Object's parent in the scene graph.
|
||||
</div>
|
||||
|
||||
<h3>[property:Object3D children]</h3>
|
||||
<div>
|
||||
Array with object's children.
|
||||
</div>
|
||||
|
||||
<h3>[property:Vector3 position]</h3>
|
||||
<div>
|
||||
Object's local position.
|
||||
</div>
|
||||
|
||||
<h3>[property:Euler rotation]</h3>
|
||||
<div>
|
||||
Object's local rotation (<a href="https://en.wikipedia.org/wiki/Euler_angles" target="_blank">Euler angles</a>), in radians.
|
||||
</div>
|
||||
|
||||
<h3>[property:Vector3 scale]</h3>
|
||||
<div>
|
||||
Object's local scale.
|
||||
</div>
|
||||
|
||||
<h3>[property:Vector3 up]</h3>
|
||||
<div>
|
||||
Up direction.
|
||||
</div>
|
||||
|
||||
<h3>[property:Matrix4 matrix]</h3>
|
||||
<div>
|
||||
Local transform.
|
||||
</div>
|
||||
|
||||
<h3>[property:Quaternion quaternion]</h3>
|
||||
<div>
|
||||
Object's local rotation as [page:Quaternion Quaternion].
|
||||
</div>
|
||||
|
||||
<h3>[property:Boolean visible]</h3>
|
||||
<div>
|
||||
Object gets rendered if *true*.
|
||||
</div>
|
||||
<div>
|
||||
default – true
|
||||
</div>
|
||||
|
||||
<h3>[property:Boolean castShadow]</h3>
|
||||
<div>
|
||||
Gets rendered into shadow map.
|
||||
</div>
|
||||
<div>
|
||||
default – false
|
||||
</div>
|
||||
|
||||
<h3>[property:Boolean receiveShadow]</h3>
|
||||
<div>
|
||||
Material gets baked in shadow receiving.
|
||||
</div>
|
||||
<div>
|
||||
default – false
|
||||
</div>
|
||||
|
||||
<h3>[property:Boolean frustumCulled]</h3>
|
||||
<div>
|
||||
When this is set, it checks every frame if the object is in the frustum of the camera. Otherwise the object gets drawn every frame even if it isn't visible.
|
||||
</div>
|
||||
<div>
|
||||
default – true
|
||||
</div>
|
||||
|
||||
<h3>[property:Boolean matrixAutoUpdate]</h3>
|
||||
<div>
|
||||
When this is set, it calculates the matrix of position, (rotation or quaternion) and scale every frame and also recalculates the matrixWorld property.
|
||||
</div>
|
||||
<div>
|
||||
default – true
|
||||
</div>
|
||||
|
||||
<h3>[property:Boolean matrixWorldNeedsUpdate]</h3>
|
||||
<div>
|
||||
When this is set, it calculates the matrixWorld in that frame and resets this property to false.
|
||||
</div>
|
||||
<div>
|
||||
default – false
|
||||
</div>
|
||||
|
||||
<h3>[property:Boolean rotationAutoUpdate]</h3>
|
||||
<div>
|
||||
When this is set, then the rotationMatrix gets calculated every frame.
|
||||
</div>
|
||||
<div>
|
||||
default – true
|
||||
</div>
|
||||
|
||||
<h3>[property:object userData]</h3>
|
||||
<div>
|
||||
An object that can be used to store custom data about the Object3d. It should not hold references to functions as these will not be cloned.
|
||||
</div>
|
||||
|
||||
<h3>[property:Matrix4 matrixWorld]</h3>
|
||||
<div>
|
||||
The global transform of the object. If the Object3d has no parent, then it's identical to the local transform.
|
||||
</div>
|
||||
|
||||
|
||||
<h2>Methods</h2>
|
||||
|
||||
<h3>[page:EventDispatcher EventDispatcher] methods are available on this class.</h3>
|
||||
|
||||
<h3>[method:null applyMatrix]( [page:Matrix4 matrix])</h3>
|
||||
<div>
|
||||
matrix - matrix
|
||||
</div>
|
||||
<div>
|
||||
This updates the position, rotation and scale with the matrix.
|
||||
</div>
|
||||
|
||||
<h3>[method:null translateX]( [page:Float distance] )</h3>
|
||||
<div>
|
||||
distance - Distance.<br />
|
||||
</div>
|
||||
<div>
|
||||
Translates object along x axis by distance.
|
||||
</div>
|
||||
|
||||
<h3>[method:null translateY]( [page:Float distance] )</h3>
|
||||
<div>
|
||||
distance - Distance.<br />
|
||||
</div>
|
||||
<div>
|
||||
Translates object along y axis by distance.
|
||||
</div>
|
||||
|
||||
<h3>[method:null translateZ]( [page:Float distance] )</h3>
|
||||
<div>
|
||||
distance - Distance.<br />
|
||||
</div>
|
||||
<div>
|
||||
Translates object along z axis by distance.
|
||||
</div>
|
||||
|
||||
<h3>[method:Vector3 localToWorld]( [page:Vector3 vector] )</h3>
|
||||
<div>
|
||||
vector - A local vector.<br />
|
||||
</div>
|
||||
<div>
|
||||
Updates the vector from local space to world space.
|
||||
</div>
|
||||
|
||||
<h3>[method:Vector3 worldToLocal]( [page:Vector3 vector] )</h3>
|
||||
<div>
|
||||
vector - A world vector.<br />
|
||||
</div>
|
||||
<div>
|
||||
Updates the vector from world space to local space.
|
||||
</div>
|
||||
|
||||
<h3>[method:null lookAt]( [page:Vector3 vector] )</h3>
|
||||
<div>
|
||||
vector - A world vector to look at.<br />
|
||||
</div>
|
||||
<div>
|
||||
Rotates object to face point in space.
|
||||
</div>
|
||||
|
||||
<h3>[method:null add]( [page:Object3D object], ... )</h3>
|
||||
<div>
|
||||
object - An object.<br />
|
||||
</div>
|
||||
<div>
|
||||
Adds *object* as child of this object. An arbitrary number of objects may be added.
|
||||
</div>
|
||||
|
||||
<h3>[method:null remove]( [page:Object3D object], ... )</h3>
|
||||
<div>
|
||||
object - An object.<br />
|
||||
</div>
|
||||
<div>
|
||||
Removes *object* as child of this object. An arbitrary number of objects may be removed.
|
||||
</div>
|
||||
|
||||
<h3>[method:null traverse]( [page:Function callback] )</h3>
|
||||
<div>
|
||||
callback - A function with as first argument an object3D object.<br />
|
||||
</div>
|
||||
<div>
|
||||
Executes the callback on this object and all descendants.
|
||||
</div>
|
||||
|
||||
<h3>[method:null traverseVisible]( [page:Function callback] )</h3>
|
||||
<div>
|
||||
callback - A function with as first argument an object3D object.<br />
|
||||
</div>
|
||||
<div>
|
||||
Like traverse, but the callback will only be executed for visible objects.
|
||||
Descendants of invisible objects are not traversed.
|
||||
</div>
|
||||
|
||||
<h3>[method:null traverseAncestors]( [page:Function callback] )</h3>
|
||||
<div>
|
||||
callback - A function with as first argument an object3D object.<br />
|
||||
</div>
|
||||
<div>
|
||||
Executes the callback on this object and all ancestors.
|
||||
</div>
|
||||
|
||||
<h3>[method:null updateMatrix]()</h3>
|
||||
<div>
|
||||
Updates local transform.
|
||||
</div>
|
||||
|
||||
<h3>[method:null updateMatrixWorld]( [page:Boolean force] )</h3>
|
||||
<div>
|
||||
Updates global transform of the object and its children.
|
||||
</div>
|
||||
|
||||
<h3>[method:Object3D clone]()</h3>
|
||||
<div>
|
||||
Creates a new clone of this object and all descendants.
|
||||
</div>
|
||||
|
||||
|
||||
<h3>[method:Object3D getObjectByName]([page:String name])</h3>
|
||||
<div>
|
||||
name -- String to match to the children's Object3d.name property. <br />
|
||||
</div>
|
||||
<div>
|
||||
Searches through the object's children and returns the first with a matching name.
|
||||
</div>
|
||||
|
||||
<h3>[method:Object3D getObjectById]([page:Integer id])</h3>
|
||||
<div>
|
||||
id -- Unique number of the object instance<br />
|
||||
</div>
|
||||
<div>
|
||||
Searches through the object's children and returns the first with a matching id.
|
||||
</div>
|
||||
|
||||
<h3>[method:Object3D translateOnAxis]([page:Vector3 axis], [page:Float distance])</h3>
|
||||
<div>
|
||||
axis -- A normalized vector in object space.<br />
|
||||
distance -- The distance to translate.
|
||||
</div>
|
||||
<div>
|
||||
Translate an object by distance along an axis in object space. The axis is assumed to be normalized.
|
||||
</div>
|
||||
|
||||
<h3>[method:Object3D rotateOnAxis]([page:Vector3 axis], [page:Float angle])</h3>
|
||||
<div>
|
||||
axis -- A normalized vector in object space. <br />
|
||||
angle -- The angle in radians.
|
||||
</div>
|
||||
<div>
|
||||
Rotate an object along an axis in object space. The axis is assumed to be normalized.
|
||||
</div>
|
||||
|
||||
<h3>[method:Array raycast]([page:Raycaster raycaster], [page:Array intersects])</h3>
|
||||
<div>
|
||||
Abstract method to get intersections between a casted ray and this object. Subclasses such as [page:Mesh], [page:Line], and [page:PointCloud] implement this method in order to participate in raycasting.
|
||||
</div>
|
||||
|
||||
<h2>Source</h2>
|
||||
|
||||
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
|
||||
</body>
|
||||
</html>
|
177
three.js-master/docs/api/core/Raycaster.html
Executable file
177
three.js-master/docs/api/core/Raycaster.html
Executable file
@ -0,0 +1,177 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<script src="../../list.js"></script>
|
||||
<script src="../../page.js"></script>
|
||||
<link type="text/css" rel="stylesheet" href="../../page.css" />
|
||||
</head>
|
||||
<body>
|
||||
<h1>[name]</h1>
|
||||
|
||||
<div class="desc">
|
||||
This class makes raycasting easier. Raycasting is used for picking and more.
|
||||
</div>
|
||||
|
||||
<h2>Example</h2>
|
||||
<code>
|
||||
var raycaster = new THREE.Raycaster();
|
||||
var mouse = new THREE.Vector2();
|
||||
|
||||
function onMouseMove( event ) {
|
||||
|
||||
// calculate mouse position in normalized device coordinates
|
||||
// (-1 to +1) for both components
|
||||
|
||||
mouse.x = ( event.clientX / window.innerWidth ) * 2 - 1;
|
||||
mouse.y = - ( event.clientY / window.innerHeight ) * 2 + 1;
|
||||
|
||||
}
|
||||
|
||||
function render() {
|
||||
|
||||
// update the picking ray with the camera and mouse position
|
||||
raycaster.setFromCamera( mouse, camera );
|
||||
|
||||
// calculate objects intersecting the picking ray
|
||||
var intersects = raycaster.intersectObjects( scene.children );
|
||||
|
||||
for ( var i = 0; i < intersects.length; i++ ) {
|
||||
|
||||
intersects[ i ].object.material.color.set( 0xff0000 );
|
||||
|
||||
}
|
||||
|
||||
renderer.render( scene, camera );
|
||||
|
||||
}
|
||||
|
||||
window.addEventListener( 'mousemove', onMouseMove, false );
|
||||
|
||||
window.requestAnimationFrame(render);
|
||||
|
||||
</code>
|
||||
<div>Examples: [example:webgl_interactive_cubes Raycasting to a Mesh],
|
||||
[example:webgl_interactive_cubes_ortho Raycasting to a Mesh in using an OrthographicCamera],
|
||||
[example:webgl_interactive_buffergeometry Raycasting to a Mesh with BufferGeometry],
|
||||
[example:webgl_interactive_lines Raycasting to a Line],
|
||||
[example:webgl_interactive_raycasting_pointcloud Raycasting to a PointCloud],
|
||||
[example:webgl_geometry_terrain_raycast Terrain raycasting],
|
||||
[example:webgl_octree_raycasting Raycasting using an octree],
|
||||
[example:webgl_interactive_voxelpainter Raycasting to paint voxels]</div>
|
||||
|
||||
|
||||
<div>
|
||||
</div>
|
||||
|
||||
|
||||
<h2>Constructor</h2>
|
||||
|
||||
<h3>[name]( [page:Vector3 origin], [page:Vector3 direction], [page:Float near], [page:Float far] ) {</h3>
|
||||
<div>
|
||||
[page:Vector3 origin] — The origin vector where the ray casts from.<br />
|
||||
[page:Vector3 direction] — The direction vector that gives direction to the ray.<br />
|
||||
[page:Float near] — All results returned are further away than near. Near can't be negative. Default value is 0.<br />
|
||||
[page:Float far] — All results returned are closer then far. Far can't be lower then near . Default value is Infinity.
|
||||
</div>
|
||||
<div>
|
||||
This creates a new raycaster object.<br />
|
||||
</div>
|
||||
|
||||
|
||||
<h2>Properties</h2>
|
||||
|
||||
<h3>[property:Ray ray]</h3>
|
||||
<div>
|
||||
The Ray used for the raycasting.
|
||||
</div>
|
||||
|
||||
<h3>[property:float near]</h3>
|
||||
<div>
|
||||
The near factor of the raycaster. This value indicates which objects can be discarded based on the distance.<br />
|
||||
This value shouldn't be negative and should be smaller than the far property.
|
||||
</div>
|
||||
|
||||
<h3>[property:float far]</h3>
|
||||
<div>
|
||||
The far factor of the raycaster. This value indicates which objects can be discarded based on the distance.<br />
|
||||
This value shouldn't be negative and should be larger than the near property.
|
||||
</div>
|
||||
|
||||
<h3>[property:float precision]</h3>
|
||||
<div>
|
||||
The precision factor of the raycaster when intersecting [page:Mesh] objects.
|
||||
</div>
|
||||
|
||||
<h3>.[page:float linePrecision]</h3>
|
||||
<div>
|
||||
The precision factor of the raycaster when intersecting [page:Line] objects.
|
||||
</div>
|
||||
|
||||
<h2>Methods</h2>
|
||||
|
||||
<h3>[method:null set]( [page:Vector3 origin], [page:Vector3 direction] )</h3>
|
||||
<div>
|
||||
[page:Vector3 origin] — The origin vector where the ray casts from.<br />
|
||||
[page:Vector3 direction] — The direction vector that gives direction to the ray.
|
||||
</div>
|
||||
<div>
|
||||
Updates the ray with a new origin and direction.
|
||||
</div>
|
||||
|
||||
<h3>[method:null setFromCamera]( [page:Vector2 coords], [page:Camera camera] )</h3>
|
||||
<div>
|
||||
[page:Vector2 coords] — 2D coordinates of the mouse, in normalized device coordinates (NDC)---X and Y components should be between -1 and 1.<br />
|
||||
[page:Camera camera] — camera from which the ray should originate
|
||||
</div>
|
||||
<div>
|
||||
Updates the ray with a new origin and direction.
|
||||
</div>
|
||||
|
||||
|
||||
<h3>[method:Array intersectObject]( [page:Object3D object], [page:Boolean recursive] )</h3>
|
||||
<div>
|
||||
<p>
|
||||
[page:Object3D object] — The object to check for intersection with the ray.<br />
|
||||
[page:Boolean recursive] — If set, it also checks all descendants. Otherwise it only checks intersecton with the object.
|
||||
</p>
|
||||
</div>
|
||||
<div>
|
||||
Checks all intersection between the ray and the object with or without the descendants. Intersections are returned sorted by distance, closest first. An array of intersections is returned...
|
||||
<code>
|
||||
[ { distance, point, face, faceIndex, indices, object }, ... ]
|
||||
</code>
|
||||
<p>
|
||||
[page:Float distance] – distance between the origin of the ray and the intersection<br />
|
||||
[page:Vector3 point] – point of intersection, in world coordinates<br />
|
||||
[page:Face3 face] – intersected face<br />
|
||||
[page:Integer faceIndex] – index of the intersected face<br />
|
||||
[page:Array indices] – indices of vertices comprising the intersected face<br />
|
||||
[page:Object3D object] – the intersected object
|
||||
</p>
|
||||
<p>
|
||||
When intersecting a [page:Mesh] with a [page:BufferGeometry], the *faceIndex* will be *undefined*, and *indices* will be set; when intersecting a [page:Mesh] with a [page:Geometry], *indices* will be *undefined*.
|
||||
</p>
|
||||
<p>
|
||||
*Raycaster* delegates to the [page:Object3D.raycast raycast] method of the passed object, when evaluating whether the ray intersects the object or not. This allows [page:Mesh meshes] to respond differently to ray casting than [page:Line lines] and [page:PointCloud pointclouds].
|
||||
</p>
|
||||
<p>
|
||||
*Note* that for meshes, faces must be pointed towards the origin of the [page:.ray ray] in order to be detected; intersections of the ray passing through the back of a face will not be detected. To raycast against both faces of an object, you'll want to set the [page:Mesh.material material]'s [page:Material.side side] property to *THREE.DoubleSide*.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<h3>[method:Array intersectObjects]( [page:Array objects], [page:Boolean recursive] )</h3>
|
||||
<div>
|
||||
[page:Array objects] — The objects to check for intersection with the ray.<br />
|
||||
[page:Boolean recursive] — If set, it also checks all descendants of the objects. Otherwise it only checks intersecton with the objects.
|
||||
</div>
|
||||
<div>
|
||||
Checks all intersection between the ray and the objects with or without the descendants. Intersections are returned sorted by distance, closest first. Intersections are of the same form as those returned by [page:.intersectObject].
|
||||
</div>
|
||||
|
||||
|
||||
<h2>Source</h2>
|
||||
|
||||
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
|
||||
</body>
|
||||
</html>
|
142
three.js-master/docs/api/examples/Lut.html
Executable file
142
three.js-master/docs/api/examples/Lut.html
Executable file
@ -0,0 +1,142 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<script src="../../list.js"></script>
|
||||
<script src="../../page.js"></script>
|
||||
<link type="text/css" rel="stylesheet" href="../../page.css" />
|
||||
</head>
|
||||
<body>
|
||||
<h1>[name]</h1>
|
||||
|
||||
<div class="desc">
|
||||
Represents a lookup table for colormaps. It is used to determine the color values from a range of data values.
|
||||
</div>
|
||||
|
||||
|
||||
<h2>Example</h2>
|
||||
<code>var lut = new THREE.Lut( "rainbow", 512 );</code>
|
||||
<code>var data = [0, 10.1, 4.2, 3.4, 63, 28];</code>
|
||||
<code>lut.setMax(63);</code>
|
||||
<code>color = lut.getColor(10);</code>
|
||||
|
||||
<h2>Constructor</h2>
|
||||
|
||||
|
||||
<h3>[name]( colormap, numberOfColors )</h3>
|
||||
<div>
|
||||
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.
|
||||
</div>
|
||||
|
||||
<h2>Properties</h2>
|
||||
|
||||
<h3>[property:Float minV]</h3>
|
||||
<div>
|
||||
The minimum value to be represented with the lookup table. Default is 0.
|
||||
</div>
|
||||
|
||||
<h3>[property:Float maxV]</h3>
|
||||
<div>
|
||||
The maximum value to be represented with the lookup table. Default is 1.
|
||||
</div>
|
||||
|
||||
<h3>.[legend]</h3>
|
||||
<div>
|
||||
The legend of the lookup table.
|
||||
</div>
|
||||
|
||||
<h2>Methods</h2>
|
||||
|
||||
<h3>[method:null copy]( [page:Lut lut] ) [page:Lut this]</h3>
|
||||
<div>
|
||||
color — Lut to copy.
|
||||
</div>
|
||||
<div>
|
||||
Copies given lut.
|
||||
</div>
|
||||
|
||||
<h3>.setLegendOn [parameters]</h3>
|
||||
<div>
|
||||
parameters - { layout: value, position: { x: value, y: value, z: value }, dimensions: { width: value, height: value } }
|
||||
layout — Horizontal or vertical layout. Default is vertical.<br />
|
||||
position — The position x,y,z of the legend.<br />
|
||||
dimensions — The dimensions (width and height) of the legend.<br />
|
||||
</div>
|
||||
<div>
|
||||
Sets this Lut with the legend on.
|
||||
</div>
|
||||
|
||||
<h3>.setLegendOff</h3>
|
||||
<div>
|
||||
</div>
|
||||
<div>
|
||||
Sets this Lut with the legend off.
|
||||
</div>
|
||||
|
||||
<h3>.setLegendLabels [parameters, callback]</h3>
|
||||
<div>
|
||||
parameters - { fontsize: value, fontface: value, title: value, um: value, ticks: value, decimal: value, notation: value }
|
||||
fontsize — Font size to be used for labels.<br />
|
||||
fontface — Font type to be used for labels.<br />
|
||||
title — The title of the legend.<br />
|
||||
um — The unit of measurements of the legend.<br />
|
||||
ticks — The number of ticks to be displayed.<br />
|
||||
decimal — The number of decimals to be used for legend values.<br />
|
||||
notation — Legend notation: standard (default) or scientific.<br />
|
||||
callback — An optional callback to be used to format the legend labels.<br />
|
||||
</div>
|
||||
<div>
|
||||
Sets the labels of the legend of this Lut.
|
||||
</div>
|
||||
|
||||
<h3>[method:Lut setminV]( [page:Float minV] )</h3>
|
||||
<div>
|
||||
minV — The minimum value to be represented with the lookup table.<br />
|
||||
</div>
|
||||
<div>
|
||||
Sets this Lut with the minimum value to be represented.
|
||||
</div>
|
||||
|
||||
<h3>[method:Lut setmaxV]( [page:Float maxV] )</h3>
|
||||
<div>
|
||||
maxV — The maximum value to be represented with the lookup table.<br />
|
||||
</div>
|
||||
<div>
|
||||
Sets this Lut with the maximum value to be represented.
|
||||
</div>
|
||||
|
||||
<h3>[method:Lut changeNumberOfColors]( [page:Float numberOfColors] )</h3>
|
||||
<div>
|
||||
numberOfColors — The number of colors to be used to represent the data array.<br />
|
||||
</div>
|
||||
<div>
|
||||
Sets this Lut with the number of colors to be used.
|
||||
</div>
|
||||
|
||||
<h3>[method:Lut changeColorMap]( [page:Float colorMap] )</h3>
|
||||
<div>
|
||||
colorMap — The name of the color map to be used to represent the data array.<br />
|
||||
</div>
|
||||
<div>
|
||||
Sets this Lut with the colormap to be used.
|
||||
</div>
|
||||
|
||||
<h3>[method:Lut addColorMap]( colorMapName, arrayOfColors )</h3>
|
||||
<div>
|
||||
Insert a new color map into the set of available color maps.
|
||||
</div>
|
||||
|
||||
<h3>[method:Lut getColor]( value ) [page:Lut this]</h3>
|
||||
<div>
|
||||
value -- the data value to be displayed as a color.
|
||||
</div>
|
||||
<div>
|
||||
Returns a Three.Color.
|
||||
</div>
|
||||
|
||||
<h2>Source</h2>
|
||||
|
||||
[link:https://github.com/mrdoob/three.js/blob/master/examples/js/math/[path].js examples/js/math/[path].js]
|
||||
</body>
|
||||
</html>
|
187
three.js-master/docs/api/examples/cameras/CombinedCamera.html
Executable file
187
three.js-master/docs/api/examples/cameras/CombinedCamera.html
Executable file
@ -0,0 +1,187 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<script src="../../../list.js"></script>
|
||||
<script src="../../../page.js"></script>
|
||||
<link type="text/css" rel="stylesheet" href="../../../page.css" />
|
||||
</head>
|
||||
<body>
|
||||
[page:Camera] →
|
||||
|
||||
<h1>[name]</h1>
|
||||
|
||||
<div class="desc">A general purpose camera, for setting FOV, Lens Focal Length,
|
||||
and switching between perspective and orthographic views easily.
|
||||
Use this only if you do not wish to manage
|
||||
both an Orthographic and Perspective Camera</div>
|
||||
|
||||
|
||||
<h2>Constructor</h2>
|
||||
|
||||
|
||||
<h3>[name]([page:Number width], [page:Number height], [page:Number fov], [page:Number near], [page:Number far], [page:Number orthoNear], [page:Number orthoFar])</h3>
|
||||
<div>
|
||||
width -- Camera frustum width.<br />
|
||||
height -- Camera frustum height.<br />
|
||||
fov — Camera frustum vertical field of view in perspective view.<br />
|
||||
near — Camera frustum near plane in perspective view.<br />
|
||||
far — Camera frustum far plane in perspective view.<br />
|
||||
orthoNear — Camera frustum near plane in orthographic view.<br />
|
||||
orthoFar — Camera frustum far plane in orthographic view.
|
||||
</div>
|
||||
<div>
|
||||
Creates a [name]. This initializes 2 cameras, an OrthographicCamera and a PerspectiveCamera. The default is the perspective Camera.
|
||||
</div>
|
||||
|
||||
|
||||
<h2>Properties</h2>
|
||||
|
||||
|
||||
|
||||
<h3>[property:Number fov]</h3>
|
||||
<div>
|
||||
Gets or sets the camera frustum vertical field of view in perspective view.
|
||||
</div>
|
||||
|
||||
<h3>[property:number left]</h3>
|
||||
<div>
|
||||
Gets or sets the camera frustum left plane in orthographic view.
|
||||
</div>
|
||||
|
||||
<h3>[property:Number right]</h3>
|
||||
<div>
|
||||
Gets or sets the camera frustum right plane in orthographic view.
|
||||
</div>
|
||||
|
||||
<h3>[property:number top]</h3>
|
||||
<div>
|
||||
Gets or sets the camera frustum top plane in orthographic view.
|
||||
</div>
|
||||
|
||||
<h3>[property:Number bottom]</h3>
|
||||
<div>
|
||||
Gets or sets the camera frustum bottom plane in orthographic view.
|
||||
</div>
|
||||
|
||||
<h3>[property:number zoom]</h3>
|
||||
<div>
|
||||
Gets or sets the zoom factor of the camera.
|
||||
</div>
|
||||
|
||||
<h3>[property:number near]</h3>
|
||||
<div>
|
||||
Gets camera frustum near plane.
|
||||
</div>
|
||||
|
||||
<h3>[property:number far]</h3>
|
||||
<div>
|
||||
Gets camera frustum far plane.
|
||||
</div>
|
||||
|
||||
<h3>[property:OrthographicCamera cameraO]</h3>
|
||||
<div>
|
||||
Gets or sets the internal OrthographicCamera used as camera.
|
||||
</div>
|
||||
|
||||
<h3>[property:PerspectiveCamera cameraP]</h3>
|
||||
<div>
|
||||
Gets or sets the internal PerspectiveCamera used as camera.
|
||||
</div>
|
||||
|
||||
<h3>[property:boolean inOrthographicMode]</h3>
|
||||
<div>
|
||||
Gets whether the combinedCamera is in Orthographic Mode.
|
||||
</div>
|
||||
|
||||
<h3>[property:boolean inPerspectiveMode]</h3>
|
||||
<div>
|
||||
Gets whether the combinedCamera is in Perspective Mode.
|
||||
</div>
|
||||
|
||||
<h2>Methods</h2>
|
||||
|
||||
<h3>[method:null setFov]([page:Number fov])</h3>
|
||||
<div>
|
||||
fov -- Camera frustum vertical field of view in perspective view.
|
||||
</div>
|
||||
<div>
|
||||
sets the camera frustum vertical field of view in perspective view.
|
||||
</div>
|
||||
|
||||
<h3>[method:null setZoom]([page:Number zoom])</h3>
|
||||
<div>
|
||||
zoom -- The zoom factor.
|
||||
</div>
|
||||
<div>
|
||||
Sets the zoomfactor.
|
||||
</div>
|
||||
|
||||
<h3>[method:null setLens]([page:number focalLength], [page:Number frameHeight])</h3>
|
||||
<div>
|
||||
focalLength -- The focal length of a lens is defined as the distance from the optical center of a lens (or, the secondary principal point for a complex lens like a camera lens) to the focal point (sensor) when the lens is focused on an object at infinity. <br />
|
||||
frameHeight -- the size of the frame in mm. (default is *35*)
|
||||
</div>
|
||||
<div>
|
||||
Sets the fov based on lens data.
|
||||
</div>
|
||||
|
||||
<h3>[method:null toFrontView]()</h3>
|
||||
<div>
|
||||
Sets the camera to view the front of the target.
|
||||
</div>
|
||||
|
||||
<h3>[method:null toBackView]()</h3>
|
||||
<div>
|
||||
Sets the camera to view the back of the target.
|
||||
</div>
|
||||
|
||||
<h3>[method:null toLeftView]()</h3>
|
||||
<div>
|
||||
Sets the camera to view the left of the target.
|
||||
</div>
|
||||
|
||||
<h3>[method:null toRightView]()</h3>
|
||||
<div>
|
||||
Sets the camera to view the right of the target.
|
||||
</div>
|
||||
|
||||
<h3>[method:null toTopView]()</h3>
|
||||
<div>
|
||||
Sets the camera to view the top.
|
||||
</div>
|
||||
|
||||
<h3>[method:null toBottomView]()</h3>
|
||||
<div>
|
||||
Sets the camera to view the bottom.
|
||||
</div>
|
||||
|
||||
<h3>[method:null setSize]([page:Number width], [page:Number height])</h3>
|
||||
<div>
|
||||
width -- The width of the orthographic view.<br />
|
||||
height -- The height of the orthographic view.
|
||||
</div>
|
||||
<div>
|
||||
Sets the size of the orthographic view.
|
||||
</div>
|
||||
|
||||
<h3>[method:null toOrthographic]()</h3>
|
||||
<div>
|
||||
Change the camera to orthographic view.
|
||||
</div>
|
||||
|
||||
<h3>[method:null toPerspective]()</h3>
|
||||
<div>
|
||||
Change the camera to Perspective view.
|
||||
</div>
|
||||
|
||||
<h3>[method:null updateProjectionMatrix]()</h3>
|
||||
<div>
|
||||
Updates the ProjectionMatrix.
|
||||
</div>
|
||||
|
||||
<h2>Source</h2>
|
||||
|
||||
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
|
||||
</body>
|
||||
</html>
|
114
three.js-master/docs/api/extras/FontUtils.html
Executable file
114
three.js-master/docs/api/extras/FontUtils.html
Executable file
@ -0,0 +1,114 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<script src="../../list.js"></script>
|
||||
<script src="../../page.js"></script>
|
||||
<link type="text/css" rel="stylesheet" href="../../page.css" />
|
||||
</head>
|
||||
<body>
|
||||
<h1>[name]</h1>
|
||||
|
||||
<div class="desc">A class for text operations in three.js (See [page:TextGeometry])</div>
|
||||
|
||||
|
||||
<h2>Properties</h2>
|
||||
|
||||
|
||||
|
||||
<h3>[property:number divisions]</h3>
|
||||
<div>
|
||||
The amount of segments in a curve. Default is 10.
|
||||
</div>
|
||||
|
||||
<h3>[property:string style]</h3>
|
||||
<div>
|
||||
The style of the used font. Default is "normal".
|
||||
</div>
|
||||
|
||||
<h3>[property:string weight]</h3>
|
||||
<div>
|
||||
The weight of the used font. Default is "normal".
|
||||
</div>
|
||||
|
||||
<h3>[property:string face]</h3>
|
||||
<div>
|
||||
The name of the font. Default is "helvetiker".
|
||||
</div>
|
||||
|
||||
<h3>[property:object faces]</h3>
|
||||
<div>
|
||||
All Fonts which are already loaded in.
|
||||
</div>
|
||||
|
||||
<h3>[property:number size]</h3>
|
||||
<div>
|
||||
The size of the used Font. Default is 150.
|
||||
</div>
|
||||
|
||||
<h2>Methods</h2>
|
||||
|
||||
|
||||
|
||||
<h3>[method:Object drawText]([page:string text])</h3>
|
||||
<div>
|
||||
text -- The text to draw.
|
||||
</div>
|
||||
<div>
|
||||
Calculates the path and offset of the text in the used font. It returns an object like { paths : fontPaths, offset : width }.
|
||||
</div>
|
||||
|
||||
<h3>[method:Array Triangulate]([page:Array contour], [page:Boolean indices])</h3>
|
||||
<div>
|
||||
contour -- Array of vector2 to define an contour <br />
|
||||
indices -- A boolean indicating if you need to return indices.
|
||||
</div>
|
||||
<div>
|
||||
Triangulates a contour into an array of faces.
|
||||
</div>
|
||||
|
||||
<h3>[method:Object extractGlyphPoints]([page:string c], [page:string face], [page:number scale], [page:number offset], [page:Path path])</h3>
|
||||
<div>
|
||||
c -- The character to extract. <br />
|
||||
face -- The face to use. <br />
|
||||
scale -- The scale of the character. <br />
|
||||
offset -- The offset of the character compared to begin of the path. <br />
|
||||
path -- The path to which to add the character points.
|
||||
</div>
|
||||
<div>
|
||||
This ectracts the glyphPoints of the character of the face and returns an object containing the path and the new offset.
|
||||
</div>
|
||||
|
||||
<h3>[method:Array generateShapes]([page:string text], [page:Object parameters])</h3>
|
||||
<div>
|
||||
text -- The text to generate the shapes from.<br />
|
||||
parameters -- The parameter containing <br />
|
||||
size -- Default is 100.
|
||||
curveSegments -- Default is 4.
|
||||
font -- Default is "helvetiker".
|
||||
weight -- Default is "normal".
|
||||
style -- Default is "normal".
|
||||
|
||||
</div>
|
||||
<div>
|
||||
Generates shapes from the text and return them as an Array of [page:Shape].
|
||||
</div>
|
||||
|
||||
<h3>[method:Object loadFace]([page:Object data])</h3>
|
||||
<div>
|
||||
data -- The data of the face.
|
||||
</div>
|
||||
<div>
|
||||
This loads and saves the data of the face and return the data. When you add the font Data as javascriptfile, then this automatically get called. So there is no need to do this yourself.
|
||||
</div>
|
||||
|
||||
<h3>[method:Object getFace]()</h3>
|
||||
<div>
|
||||
Returns the used font its data based on its style and weight.
|
||||
</div>
|
||||
|
||||
<h2>Source</h2>
|
||||
|
||||
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
|
||||
</body>
|
||||
</html>
|
59
three.js-master/docs/api/extras/GeometryUtils.html
Executable file
59
three.js-master/docs/api/extras/GeometryUtils.html
Executable file
@ -0,0 +1,59 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<script src="../../list.js"></script>
|
||||
<script src="../../page.js"></script>
|
||||
<link type="text/css" rel="stylesheet" href="../../page.css" />
|
||||
</head>
|
||||
<body>
|
||||
<h1>[name]</h1>
|
||||
|
||||
<div class="desc">Contains handy functions geometry manipulations.</div>
|
||||
|
||||
|
||||
<h2>Methods</h2>
|
||||
|
||||
<h3> .merge( [page:Geometry geometry1] , [page:Geometry geometry2], [page:Integer materialIndexOffset] )</h3>
|
||||
<div>
|
||||
geometry1 — Parent geometry element <br />
|
||||
geometry2 — Geometry that need to be added in parent <br />
|
||||
materialIndexOffset — Offset applied to the materialIndex of all the new faces in the merged geometry. Default : 0 <br />
|
||||
</div>
|
||||
|
||||
<h3> .randomPointInTriangle( [page:Vector VectorA] , [page:Vector VectorB] , [page:Vector VectorC])</h3>
|
||||
<div>
|
||||
VectorA — Vector <br />
|
||||
VectorB — Vector <br />
|
||||
VectorC — Vector <br />
|
||||
|
||||
returns [page:Int Point]
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<h3> .center ( [page:Vector VectorA] , [page:Vector VectorB] , [page:Vector VectorC]) </h3>
|
||||
|
||||
<div>
|
||||
VectorA — Vector <br />
|
||||
VectorB — Vector <br />
|
||||
VectorC — Vector <br />
|
||||
|
||||
returns [page:Int Area]
|
||||
|
||||
</div>
|
||||
|
||||
<h3> .center ( [page:Geometry geometry] ) </h3>
|
||||
|
||||
<div>
|
||||
|
||||
Geometry — Geometry to Center position
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<h2>Source</h2>
|
||||
|
||||
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
|
||||
</body>
|
||||
</html>
|
104
three.js-master/docs/api/extras/ImageUtils.html
Executable file
104
three.js-master/docs/api/extras/ImageUtils.html
Executable file
@ -0,0 +1,104 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<script src="../../list.js"></script>
|
||||
<script src="../../page.js"></script>
|
||||
<link type="text/css" rel="stylesheet" href="../../page.css" />
|
||||
</head>
|
||||
<body>
|
||||
<h1>[name]</h1>
|
||||
|
||||
<div class="desc">A Helper class to ease the loading of images of different types.</div>
|
||||
|
||||
|
||||
<h2>Properties</h2>
|
||||
|
||||
|
||||
|
||||
<h3>[property:string crossOrigin]</h3>
|
||||
<div>
|
||||
The crossOrigin string to implement CORS for loading the image from a different domain that allows CORS.
|
||||
</div>
|
||||
|
||||
<h2>Methods</h2>
|
||||
|
||||
|
||||
|
||||
<h3>[method:DataTexture generateDataTexture]([page:Number width], [page:Number height], [page:Number color])</h3>
|
||||
<div>
|
||||
width -- The width of the texture. <br />
|
||||
height -- The height of the texture. <br />
|
||||
color -- The hexadecimal value of the color.
|
||||
</div>
|
||||
<div>
|
||||
Generates a texture of a single color. It is a DataTexture with format, RGBFormat.
|
||||
</div>
|
||||
|
||||
<h3>[method:CompressedTexture parseDDS]([page:String buffer], [page:boolean loadMipmaps])</h3>
|
||||
<div>
|
||||
buffer -- A string containing the data of the dds. <br />
|
||||
loadMipmaps -- A boolean to indicate if you need to load the mipmaps. Default is True.
|
||||
</div>
|
||||
<div>
|
||||
Parses a DDS Image from the string into a CompressedTexture.
|
||||
</div>
|
||||
|
||||
<h3>[method:todo loadCompressedTexture]([page:todo url], [page:todo mapping], [page:todo onLoad], [page:todo onError])</h3>
|
||||
<div>
|
||||
url -- todo <br />
|
||||
mapping -- todo <br />
|
||||
onLoad -- todo <br />
|
||||
onError -- todo
|
||||
</div>
|
||||
<div>
|
||||
todo
|
||||
</div>
|
||||
|
||||
<h3>[method:todo loadTexture]([page:String url], [page:UVMapping mapping], [page:Function onLoad], [page:Function onError])</h3>
|
||||
<div>
|
||||
url -- the url of the texture<br />
|
||||
mapping -- Can be an instance of [page:UVMapping THREE.UVMapping], [page:CubeReflectionMapping THREE.CubeReflectionMapping] or [page:SphericalReflectionMapping THREE.SphericalReflectionMapping]. Describes how the image is applied to the object.<br />Use undefined instead of null as a default value. See mapping property of [page:Texture texture] for more details. <br/>
|
||||
onLoad -- callback function<br />
|
||||
onError -- callback function
|
||||
</div>
|
||||
<div>
|
||||
todo
|
||||
</div>
|
||||
|
||||
<h3>[method:todo getNormalMap]([page:todo image], [page:todo depth])</h3>
|
||||
<div>
|
||||
image -- todo <br />
|
||||
depth -- todo
|
||||
</div>
|
||||
<div>
|
||||
todo
|
||||
</div>
|
||||
|
||||
<h3>[method:todo loadCompressedTextureCube]([page:todo array], [page:todo mapping], [page:todo onLoad], [page:todo onError])</h3>
|
||||
<div>
|
||||
array -- todo <br />
|
||||
mapping -- todo <br />
|
||||
onLoad -- todo <br />
|
||||
onError -- todo
|
||||
</div>
|
||||
<div>
|
||||
todo
|
||||
</div>
|
||||
|
||||
<h3>[method:todo loadTextureCube]([page:todo array], [page:todo mapping], [page:todo onLoad], [page:todo onError])</h3>
|
||||
<div>
|
||||
array -- todo <br />
|
||||
mapping -- todo <br />
|
||||
onLoad -- todo <br />
|
||||
onError -- todo
|
||||
</div>
|
||||
<div>
|
||||
todo
|
||||
</div>
|
||||
|
||||
<h2>Source</h2>
|
||||
|
||||
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
|
||||
</body>
|
||||
</html>
|
52
three.js-master/docs/api/extras/SceneUtils.html
Executable file
52
three.js-master/docs/api/extras/SceneUtils.html
Executable file
@ -0,0 +1,52 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<script src="../../list.js"></script>
|
||||
<script src="../../page.js"></script>
|
||||
<link type="text/css" rel="stylesheet" href="../../page.css" />
|
||||
</head>
|
||||
<body>
|
||||
<h1>[name]</h1>
|
||||
|
||||
<div class="desc">A class containing useful utility functions for scene manipulation.</div>
|
||||
|
||||
|
||||
<h2>Methods</h2>
|
||||
|
||||
|
||||
<h3>[method:Object3D createMultiMaterialObject]([page:Geometry geometry], [page:Array materials])</h3>
|
||||
<div>
|
||||
geometry -- The geometry for the Object. <br />
|
||||
materials -- The materials for the object.
|
||||
</div>
|
||||
<div>
|
||||
Creates an new Object3D an new mesh for each material defined in materials. Beware that this is not the same as Meshfacematerial which defines multiple material for 1 mesh.<br />
|
||||
This is mostly useful for object that need a material and a wireframe implementation.
|
||||
</div>
|
||||
|
||||
<h3>[method:null attach]([page:Object3D child], [page:Object3D scene], [page:Object3D parent])</h3>
|
||||
<div>
|
||||
child -- The object to add to the parent <br />
|
||||
scene -- The scene to detach the object on. <br />
|
||||
parent -- The parent to attach the object from.
|
||||
</div>
|
||||
<div>
|
||||
Attaches the object to the parent without the moving the object in the worldspace.
|
||||
</div>
|
||||
|
||||
<h3>[method:null detach]([page:Object3D child], [page:Object3D parent], [page:Object3D scene])</h3>
|
||||
<div>
|
||||
child -- The object to remove from the parent <br />
|
||||
scene -- The scene to attach the object on. <br />
|
||||
parent -- The parent to detach the object from.
|
||||
</div>
|
||||
<div>
|
||||
Detaches the object from the parent and adds it back to the scene without moving in worldspace.
|
||||
</div>
|
||||
|
||||
<h2>Source</h2>
|
||||
|
||||
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
|
||||
</body>
|
||||
</html>
|
127
three.js-master/docs/api/extras/animation/Animation.html
Executable file
127
three.js-master/docs/api/extras/animation/Animation.html
Executable file
@ -0,0 +1,127 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<script src="../../../list.js"></script>
|
||||
<script src="../../../page.js"></script>
|
||||
<link type="text/css" rel="stylesheet" href="../../../page.css" />
|
||||
</head>
|
||||
<body>
|
||||
<h1>[name]</h1>
|
||||
|
||||
<div class="desc">This class animates an object based on an hierarchy. This hierarchy can be Object3ds or bones.</div>
|
||||
|
||||
|
||||
<h2>Constructor</h2>
|
||||
|
||||
|
||||
<h3>[name]([page:Object3d root], [page:String name])</h3>
|
||||
<div>
|
||||
root -- The mesh to animate. <br />
|
||||
name -- The name of the animation
|
||||
</div>
|
||||
<div>
|
||||
Creates an animation for root. The animation data is gathered from AnimationHandler based on its name.
|
||||
</div>
|
||||
|
||||
<h2>Properties</h2>
|
||||
|
||||
<h3>[property:Object3d root]</h3>
|
||||
<div>
|
||||
The root object of the animation.
|
||||
</div>
|
||||
|
||||
<h3>[property:Object data]</h3>
|
||||
<div>
|
||||
The data containing the animation
|
||||
</div>
|
||||
|
||||
<h3>[property:Array hierarchy]</h3>
|
||||
<div>
|
||||
The objects that are influenced by the animation.
|
||||
</div>
|
||||
|
||||
<h3>[property:number currentTime]</h3>
|
||||
<div>
|
||||
The time elapsed since the last start/restart of the animation.
|
||||
</div>
|
||||
|
||||
<h3>[property:number timeScale]</h3>
|
||||
<div>
|
||||
The timez
|
||||
</div>
|
||||
|
||||
<h3>[property:boolean isPlaying]</h3>
|
||||
<div>
|
||||
Indicates whether the animation is playing. This shouldn't be adapted by user code.
|
||||
</div>
|
||||
|
||||
<h3>[property:boolean isPaused]</h3>
|
||||
<div>
|
||||
Indicates whether the animation is paused. This shouldn't be adapted by user code.
|
||||
</div>
|
||||
|
||||
<h3>[property:boolean loop]</h3>
|
||||
<div>
|
||||
Set to make the animation restart when the animation ends.
|
||||
</div>
|
||||
|
||||
<h3>[property:number interpolationType]</h3>
|
||||
<div>
|
||||
The type to indicate how to interpolate between 2 data points.
|
||||
</div>
|
||||
|
||||
<h2>Methods</h2>
|
||||
|
||||
<h3>[method:null play]([page:Number startTime])</h3>
|
||||
<div>
|
||||
Starts the animation from a moment startTime in the animation.
|
||||
</div>
|
||||
|
||||
<h3>[method:null stop]()</h3>
|
||||
<div>
|
||||
Stops the animation.
|
||||
</div>
|
||||
|
||||
<h3>[method:Boolean update]([page:Number deltaTimeMS])</h3>
|
||||
<div>
|
||||
deltaTimeMS -- The time of the between the previous frame and this frame in miliseconds.
|
||||
</div>
|
||||
<div>
|
||||
Updates the animation in time. This shouldn't be called by user code. The animationHandler calls this method.
|
||||
</div>
|
||||
|
||||
<h3>[method:array interpolateCatmullRom]([page:Array points], [page:Number scale])</h3>
|
||||
<div>
|
||||
points -- The 4 control point to calculate CatMullRom <br />
|
||||
scale -- The scale between the previous key and the nex key
|
||||
</div>
|
||||
<div>
|
||||
Interpolates the point based on the key. Is used in update.
|
||||
</div>
|
||||
|
||||
<h3>[method:Object getNextKeyWith]([page:String type], [page:Object h], [page:Number key])</h3>
|
||||
<div>
|
||||
type -- The animationtype for the key. Can be "pos", "rot" and "scl".<br />
|
||||
h -- The object of the hierarchy that catins the key <br />
|
||||
key -- The index of the next possible key.
|
||||
</div>
|
||||
<div>
|
||||
Gets the next key. Is used in Update.
|
||||
</div>
|
||||
|
||||
<h3>[method:Object getPrevKeyWith]([page:String type], [page:Object h], [page:Number key])</h3>
|
||||
<div>
|
||||
type -- The animationtype for the key. Can be "pos", "rot" and "scl".<br />
|
||||
h -- The object of the hierarchy that contains the key. <br />
|
||||
key -- The index of the prev possible key.
|
||||
</div>
|
||||
<div>
|
||||
Gets the previous key. Is used in Update.
|
||||
</div>
|
||||
|
||||
<h2>Source</h2>
|
||||
|
||||
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
|
||||
</body>
|
||||
</html>
|
101
three.js-master/docs/api/extras/animation/AnimationHandler.html
Executable file
101
three.js-master/docs/api/extras/animation/AnimationHandler.html
Executable file
@ -0,0 +1,101 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<script src="../../../list.js"></script>
|
||||
<script src="../../../page.js"></script>
|
||||
<link type="text/css" rel="stylesheet" href="../../../page.css" />
|
||||
</head>
|
||||
<body>
|
||||
<h1>[name]</h1>
|
||||
|
||||
<div class="desc">
|
||||
The AnimationHandler handles the initialisation of the Animation data and
|
||||
the animations itself. It keeps track of every animation and if it's active or not.
|
||||
It also update all animations which are active if its method *update* is called.
|
||||
</div>
|
||||
|
||||
|
||||
<h2>Constructor</h2>
|
||||
|
||||
|
||||
<h3>[name]()</h3>
|
||||
<div>
|
||||
The animationHandler can't be called as constructor.
|
||||
</div>
|
||||
|
||||
<h2>Properties</h2>
|
||||
|
||||
|
||||
<h3>[property:number CATMULLROM]</h3>
|
||||
<div>
|
||||
Enum Value to indicate that the animation needs to be interpolated as CATMULLROM.
|
||||
</div>
|
||||
|
||||
<h3>[property:number CATMULLROM_FORWARD]</h3>
|
||||
<div>
|
||||
Enum Value to indicate that the animation needs to be interpolated as CATMULLROM_FORWARD.
|
||||
</div>
|
||||
|
||||
<h3>[property:number LINEAR]</h3>
|
||||
<div>
|
||||
Enum Value to indicate that the animation needs to be interpolated as LINEAR.
|
||||
</div>
|
||||
|
||||
<h2>Methods</h2>
|
||||
|
||||
|
||||
|
||||
<h3>[method:null removeFromUpdate]([page:Animation animation])</h3>
|
||||
<div>
|
||||
animation -- The Animation to remove from the update.
|
||||
</div>
|
||||
<div>
|
||||
Removes the animation from the update cycle. This gets called when the animation stops. This shouldn't be called by usercode.
|
||||
</div>
|
||||
|
||||
<h3>[method:Object get]([page:String name])</h3>
|
||||
<div>
|
||||
name -- The name of the animationData
|
||||
</div>
|
||||
<div>
|
||||
Gets the animationData from its library.
|
||||
</div>
|
||||
|
||||
<h3>[method:null update]([page:Number deltaTimeMS]) </h3>
|
||||
<div>
|
||||
deltaTimeMS -- Time elapsed since last update in milliseconds.
|
||||
</div>
|
||||
<div>
|
||||
Updates all active animations with deltaTime.
|
||||
</div>
|
||||
|
||||
<h3>[method:null parse]([page:Object root])</h3>
|
||||
<div>
|
||||
root -- object
|
||||
</div>
|
||||
<div>
|
||||
Parses the object to get the hierachy.
|
||||
</div>
|
||||
|
||||
<h3>[method:null add]([page:object data])</h3>
|
||||
<div>
|
||||
data -- The animationData
|
||||
</div>
|
||||
<div>
|
||||
Adds the animationData from its library.
|
||||
</div>
|
||||
|
||||
<h3>[method:null addToUpdate]([page:Animation animation]) </h3>
|
||||
<div>
|
||||
animation -- The Animation to add from the update.
|
||||
</div>
|
||||
<div>
|
||||
Adds the animation from the update cycle. This gets called when the animation starts. This shouldn't be called by user code.
|
||||
</div>
|
||||
|
||||
<h2>Source</h2>
|
||||
|
||||
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
|
||||
</body>
|
||||
</html>
|
105
three.js-master/docs/api/extras/animation/AnimationMorphTarget.html
Executable file
105
three.js-master/docs/api/extras/animation/AnimationMorphTarget.html
Executable file
@ -0,0 +1,105 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<script src="../../../list.js"></script>
|
||||
<script src="../../../page.js"></script>
|
||||
<link type="text/css" rel="stylesheet" href="../../../page.css" />
|
||||
</head>
|
||||
<body>
|
||||
<h1>[name]</h1>
|
||||
|
||||
<div class="desc">todo</div>
|
||||
|
||||
|
||||
<h2>Constructor</h2>
|
||||
|
||||
|
||||
<h3>[name]([page:todo root], [page:todo data])</h3>
|
||||
<div>
|
||||
root -- todo <br />
|
||||
data -- todo
|
||||
</div>
|
||||
<div>
|
||||
todo
|
||||
</div>
|
||||
|
||||
<h2>Properties</h2>
|
||||
|
||||
<h3>[property:todo root]</h3>
|
||||
<div>
|
||||
todo
|
||||
</div>
|
||||
|
||||
<h3>[property:todo data]</h3>
|
||||
<div>
|
||||
todo
|
||||
</div>
|
||||
|
||||
<h3>[property:todo hierarchy]</h3>
|
||||
<div>
|
||||
todo
|
||||
</div>
|
||||
|
||||
<h3>[property:number currentTime]</h3>
|
||||
<div>
|
||||
todo
|
||||
</div>
|
||||
|
||||
<h3>[property:number timeScale]</h3>
|
||||
<div>
|
||||
todo
|
||||
</div>
|
||||
|
||||
<h3>[property:boolean isPlaying]</h3>
|
||||
<div>
|
||||
todo
|
||||
</div>
|
||||
|
||||
<h3>[property:boolean isPaused]</h3>
|
||||
<div>
|
||||
todo
|
||||
</div>
|
||||
|
||||
<h3>[property:boolean loop]</h3>
|
||||
<div>
|
||||
todo
|
||||
</div>
|
||||
|
||||
<h3>[property:number influence]</h3>
|
||||
<div>
|
||||
todo
|
||||
</div>
|
||||
|
||||
|
||||
<h2>Methods</h2>
|
||||
|
||||
<h3>[method:todo play]()</h3>
|
||||
<div>
|
||||
todo
|
||||
</div>
|
||||
|
||||
<h3>[method:todo pause]()</h3>
|
||||
<div>
|
||||
todo
|
||||
</div>
|
||||
|
||||
<h3>[method:todo stop]()</h3>
|
||||
<div>
|
||||
todo
|
||||
</div>
|
||||
|
||||
<h3>[method:todo update]([page:todo deltaTimeMS])</h3>
|
||||
<div>
|
||||
deltaTimeMS -- todo
|
||||
</div>
|
||||
<div>
|
||||
todo
|
||||
</div>
|
||||
|
||||
|
||||
<h2>Source</h2>
|
||||
|
||||
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
|
||||
</body>
|
||||
</html>
|
133
three.js-master/docs/api/extras/animation/KeyFrameAnimation.html
Executable file
133
three.js-master/docs/api/extras/animation/KeyFrameAnimation.html
Executable file
@ -0,0 +1,133 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<script src="../../../list.js"></script>
|
||||
<script src="../../../page.js"></script>
|
||||
<link type="text/css" rel="stylesheet" href="../../../page.css" />
|
||||
</head>
|
||||
<body>
|
||||
<h1>[name]</h1>
|
||||
|
||||
<div class="desc">todo</div>
|
||||
|
||||
|
||||
<h2>Constructor</h2>
|
||||
|
||||
|
||||
<h3>[name]([page:todo root], [page:todo data], [page:todo JITCompile])</h3>
|
||||
<div>
|
||||
root -- todo <br />
|
||||
data -- todo <br />
|
||||
JITCompile -- todo
|
||||
</div>
|
||||
<div>
|
||||
todo
|
||||
</div>
|
||||
|
||||
|
||||
<h2>Properties</h2>
|
||||
|
||||
<h3>[property:todo root]</h3>
|
||||
<div>
|
||||
todo
|
||||
</div>
|
||||
|
||||
<h3>[property:todo data]</h3>
|
||||
<div>
|
||||
todo
|
||||
</div>
|
||||
|
||||
<h3>[property:todo hierarchy]</h3>
|
||||
<div>
|
||||
todo
|
||||
</div>
|
||||
|
||||
<h3>[property:number currentTime]</h3>
|
||||
<div>
|
||||
todo
|
||||
</div>
|
||||
|
||||
<h3>[property:number timeScale]</h3>
|
||||
<div>
|
||||
todo
|
||||
</div>
|
||||
|
||||
<h3>[property:boolean isPlaying]</h3>
|
||||
<div>
|
||||
todo
|
||||
</div>
|
||||
|
||||
<h3>[property:boolean isPaused]</h3>
|
||||
<div>
|
||||
todo
|
||||
</div>
|
||||
|
||||
<h3>[property:boolean loop]</h3>
|
||||
<div>
|
||||
todo
|
||||
</div>
|
||||
|
||||
<h3>[property:boolean JITCompile]</h3>
|
||||
<div>
|
||||
todo
|
||||
</div>
|
||||
|
||||
<h2>Methods</h2>
|
||||
|
||||
<h3>[method:todo play]()</h3>
|
||||
<div>
|
||||
todo
|
||||
</div>
|
||||
|
||||
<h3>[method:todo pause]()</h3>
|
||||
<div>
|
||||
todo
|
||||
</div>
|
||||
|
||||
<h3>[method:todo stop]()</h3>
|
||||
<div>
|
||||
todo
|
||||
</div>
|
||||
|
||||
<h3>[method:todo update]([page:todo deltaTimeMS])</h3>
|
||||
<div>
|
||||
deltaTimeMS -- todo
|
||||
</div>
|
||||
<div>
|
||||
todo
|
||||
</div>
|
||||
|
||||
<h3>[method:todo interpolateCatmullRom]([page:todo points], [page:todo scale])</h3>
|
||||
<div>
|
||||
points -- todo <br />
|
||||
scale -- todo
|
||||
</div>
|
||||
<div>
|
||||
todo
|
||||
</div>
|
||||
|
||||
<h3>[method:todo getNextKeyWith]([page:todo sid], [page:todo h], [page:todo key])</h3>
|
||||
<div>
|
||||
sid -- todo <br />
|
||||
h -- todo <br />
|
||||
key -- todo
|
||||
</div>
|
||||
<div>
|
||||
todo
|
||||
</div>
|
||||
|
||||
<h3>[method:todo getPrevKeyWith]([page:todo sid], [page:todo h], [page:todo key])</h3>
|
||||
<div>
|
||||
sid -- todo <br />
|
||||
h -- todo <br />
|
||||
key -- todo
|
||||
</div>
|
||||
<div>
|
||||
todo
|
||||
</div>
|
||||
<h2>Source</h2>
|
||||
|
||||
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
|
||||
</body>
|
||||
</html>
|
64
three.js-master/docs/api/extras/core/Curve.html
Executable file
64
three.js-master/docs/api/extras/core/Curve.html
Executable file
@ -0,0 +1,64 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<script src="../../../list.js"></script>
|
||||
<script src="../../../page.js"></script>
|
||||
<link type="text/css" rel="stylesheet" href="../../../page.css" />
|
||||
</head>
|
||||
<body>
|
||||
<h1>[name]</h1>
|
||||
|
||||
<div class="desc">An extensible curve object which contains methods for interpolation.</div>
|
||||
|
||||
<h2>Examples</h2>
|
||||
|
||||
<h3>[example:webgl_geometry_extrude_splines geometry / extrude / splines ]
|
||||
|
||||
<h2>Constructor</h2>
|
||||
|
||||
|
||||
<h3>[name]()</h3>
|
||||
<div>
|
||||
This constructor creates a new [name].
|
||||
</div>
|
||||
|
||||
|
||||
<h2>Methods</h2>
|
||||
|
||||
<h3>[method:Vector getPoint]( t )</h3>
|
||||
<div>Returns a vector for point t of the curve where t is between 0 and 1</div>
|
||||
|
||||
<h3>[method:Vector getPointAt]( u )</h3>
|
||||
<div>Returns a vector for point at relative position in curve according to arc length</div>
|
||||
|
||||
<h3>[method:Array getPoints]( divisions )</h3>
|
||||
<div>Get sequence of points using getPoint( t ) </div>
|
||||
|
||||
<h3>[method:Array getSpacedPoints]( divisions )</h3>
|
||||
<div>Get sequence of equi-spaced points using getPointAt( u )</div>
|
||||
|
||||
<h3>[method:Float getLength]()</h3>
|
||||
<div>Get total curve arc length</div>
|
||||
|
||||
<h3>[method:Array getLengths]( divisions )</h3>
|
||||
<div>Get list of cumulative segment lengths</div>
|
||||
|
||||
<h3>[method:null updateArcLengths]()</h3>
|
||||
<div>Update the cumlative segment distance cache</div>
|
||||
|
||||
<h3>[method:Float getUtoTmapping]( u, distance )</h3>
|
||||
<div>Given u ( 0 .. 1 ), get a t to find p. This gives you points which are equidistant</div>
|
||||
|
||||
<h3>[method:Vector getTangent]( t )</h3>
|
||||
<div>Returns a unit vector tangent at t. If the subclassed curve do not implement its tangent derivation, 2 points a small delta apart will be used to find its gradient which seems to give a reasonable approximation</div>
|
||||
|
||||
<h3>[method:Vector getTangentAt]( u )</h3>
|
||||
<div>Returns tangent at equidistant point u on the curve</div>
|
||||
|
||||
|
||||
<h2>Source</h2>
|
||||
|
||||
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
|
||||
</body>
|
||||
</html>
|
138
three.js-master/docs/api/extras/core/CurvePath.html
Executable file
138
three.js-master/docs/api/extras/core/CurvePath.html
Executable file
@ -0,0 +1,138 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<script src="../../../list.js"></script>
|
||||
<script src="../../../page.js"></script>
|
||||
<link type="text/css" rel="stylesheet" href="../../../page.css" />
|
||||
</head>
|
||||
<body>
|
||||
[page:Curve] →
|
||||
|
||||
<h1>[name]</h1>
|
||||
|
||||
<div class="desc">todo</div>
|
||||
|
||||
|
||||
<h2>Constructor</h2>
|
||||
|
||||
|
||||
<h3>[name]()</h3>
|
||||
<div>
|
||||
todo
|
||||
</div>
|
||||
|
||||
|
||||
<h2>Properties</h2>
|
||||
|
||||
|
||||
<h3>[property:array curves]</h3>
|
||||
<div>
|
||||
todo
|
||||
</div>
|
||||
|
||||
<h3>[property:array bends]</h3>
|
||||
<div>
|
||||
todo
|
||||
</div>
|
||||
|
||||
<h3>[property:boolean autoClose]</h3>
|
||||
<div>
|
||||
todo
|
||||
</div>
|
||||
|
||||
<h2>Methods</h2>
|
||||
|
||||
|
||||
<h3>[method:todo getWrapPoints]([page:todo oldPts], [page:todo path])</h3>
|
||||
<div>
|
||||
oldPts -- todo <br />
|
||||
path -- todo
|
||||
</div>
|
||||
<div>
|
||||
todo
|
||||
</div>
|
||||
|
||||
<h3>[method:todo createPointsGeometry]([page:todo divisions])</h3>
|
||||
<div>
|
||||
divisions -- todo
|
||||
</div>
|
||||
<div>
|
||||
todo
|
||||
</div>
|
||||
|
||||
<h3>[method:todo addWrapPath]([page:todo bendpath])</h3>
|
||||
<div>
|
||||
bendpath -- todo
|
||||
</div>
|
||||
<div>
|
||||
todo
|
||||
</div>
|
||||
|
||||
<h3>[method:todo createGeometry]([page:todo points])</h3>
|
||||
<div>
|
||||
points -- todo
|
||||
</div>
|
||||
<div>
|
||||
todo
|
||||
</div>
|
||||
|
||||
<h3>[method:todo add]([page:todo curve])</h3>
|
||||
<div>
|
||||
curve -- todo
|
||||
</div>
|
||||
<div>
|
||||
todo
|
||||
</div>
|
||||
|
||||
<h3>[method:todo getTransformedSpacedPoints]([page:todo segments], [page:todo bends])</h3>
|
||||
<div>
|
||||
segments -- todo <br />
|
||||
bends -- todo
|
||||
</div>
|
||||
<div>
|
||||
todo
|
||||
</div>
|
||||
|
||||
<h3>[method:todo createSpacedPointsGeometry]([page:todo divisions])</h3>
|
||||
<div>
|
||||
divisions -- todo
|
||||
</div>
|
||||
<div>
|
||||
todo
|
||||
</div>
|
||||
|
||||
<h3>[method:todo closePath]()</h3>
|
||||
<div>
|
||||
todo
|
||||
</div>
|
||||
|
||||
<h3>[method:todo getBoundingBox]()</h3>
|
||||
<div>
|
||||
todo
|
||||
</div>
|
||||
|
||||
<h3>[method:todo getCurveLengths]()</h3>
|
||||
<div>
|
||||
todo
|
||||
</div>
|
||||
|
||||
<h3>[method:todo getTransformedPoints]([page:todo segments], [page:todo bends])</h3>
|
||||
<div>
|
||||
segments -- todo <br />
|
||||
bends -- todo
|
||||
</div>
|
||||
<div>
|
||||
todo
|
||||
</div>
|
||||
|
||||
<h3>[method:todo checkConnection]()</h3>
|
||||
<div>
|
||||
todo
|
||||
</div>
|
||||
|
||||
<h2>Source</h2>
|
||||
|
||||
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
|
||||
</body>
|
||||
</html>
|
36
three.js-master/docs/api/extras/core/Gyroscope.html
Executable file
36
three.js-master/docs/api/extras/core/Gyroscope.html
Executable file
@ -0,0 +1,36 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<script src="../../../list.js"></script>
|
||||
<script src="../../../page.js"></script>
|
||||
<link type="text/css" rel="stylesheet" href="../../../page.css" />
|
||||
</head>
|
||||
<body>
|
||||
[page:Object3D] →
|
||||
|
||||
<h1>[name]</h1>
|
||||
|
||||
<div class="desc">todo</div>
|
||||
|
||||
|
||||
<h2>Constructor</h2>
|
||||
|
||||
|
||||
<h3>[name]()</h3>
|
||||
<div>
|
||||
todo
|
||||
</div>
|
||||
|
||||
|
||||
<h2>Properties</h2>
|
||||
|
||||
|
||||
<h2>Methods</h2>
|
||||
|
||||
|
||||
<h2>Source</h2>
|
||||
|
||||
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
|
||||
</body>
|
||||
</html>
|
79
three.js-master/docs/api/extras/core/Path.html
Executable file
79
three.js-master/docs/api/extras/core/Path.html
Executable file
@ -0,0 +1,79 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<script src="../../../list.js"></script>
|
||||
<script src="../../../page.js"></script>
|
||||
<link type="text/css" rel="stylesheet" href="../../../page.css" />
|
||||
</head>
|
||||
<body>
|
||||
[page:CurvePath] →
|
||||
|
||||
<h1>[name]</h1>
|
||||
|
||||
<div class="desc">A 2d path representation, comprising of points, lines, and cubes, similar to the html5 2d canvas api. It extends CurvePath.</div>
|
||||
|
||||
|
||||
<h2>Constructor</h2>
|
||||
|
||||
|
||||
<h3>[name]([page:todo points])</h3>
|
||||
<div>
|
||||
points -- array of Vector2
|
||||
</div>
|
||||
<div>
|
||||
Creates a Path from the points. The first vector defines the offset. After that the lines get defined.
|
||||
</div>
|
||||
|
||||
|
||||
<h2>Properties</h2>
|
||||
|
||||
|
||||
<h3>[property:array actions]</h3>
|
||||
<div>
|
||||
The possible actions that define the path.
|
||||
</div>
|
||||
|
||||
<h2>Methods</h2>
|
||||
|
||||
<h3>[method:todo fromPoints]( vectors )</h3>
|
||||
<div>
|
||||
Adds to the Path from the points. The first vector defines the offset. After that the lines get defined.
|
||||
</div>
|
||||
|
||||
<h3>[method:todo moveTo]( x, y )</h3>
|
||||
<div>This moves the offset to x and y</div>
|
||||
|
||||
<h3>[method:todo lineTo]( x, y )</h3>
|
||||
<div>This creates a line from the offset to X and Y and updates the offset to X and Y.</div>
|
||||
|
||||
<h3>[method:todo quadraticCurveTo]( aCPx, aCPy, aX, aY )</h3>
|
||||
<div>This creates a quadratic curve from the offset to aX and aY with aCPx and aCPy as control point and updates the offset to aX and aY.</div>
|
||||
|
||||
<h3>[method:todo bezierCurveTo]( aCP1x, aCP1y, aCP2x, aCP2y, aX, aY )</h3>
|
||||
<div>This creates a bezier curve from the offset to aX and aY with aCP1x, aCP1y and aCP1x, aCP1y as control points and updates the offset to aX and aY.</div>
|
||||
|
||||
<h3>.splineThru ( pts /*Array of Vector*/ ) </h3>
|
||||
<div>todo</div>
|
||||
|
||||
<h3>[method:todo arc]( aX, aY, aRadius, aStartAngle, aEndAngle, aClockwise )</h3>
|
||||
<div>todo</div>
|
||||
|
||||
<h3>[method:todo absarc]( aX, aY, aRadius, aStartAngle, aEndAngle, aClockwise )</h3>
|
||||
<div>todo</div>
|
||||
|
||||
<h3>[method:todo ellipse]( aX, aY, xRadius, yRadius, aStartAngle, aEndAngle, aClockwise )</h3>
|
||||
<div>todo</div>
|
||||
|
||||
<h3>[method:todo absellipse]( aX, aY, xRadius, yRadius, aStartAngle, aEndAngle, aClockwise )</h3>
|
||||
<div>todo</div>
|
||||
|
||||
<h3>[method:todo toShapes]()</h3>
|
||||
<div>todo</div>
|
||||
|
||||
|
||||
<h2>Source</h2>
|
||||
|
||||
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
|
||||
</body>
|
||||
</html>
|
97
three.js-master/docs/api/extras/core/Shape.html
Executable file
97
three.js-master/docs/api/extras/core/Shape.html
Executable file
@ -0,0 +1,97 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<script src="../../../list.js"></script>
|
||||
<script src="../../../page.js"></script>
|
||||
<link type="text/css" rel="stylesheet" href="../../../page.css" />
|
||||
</head>
|
||||
<body>
|
||||
[page:Path] →
|
||||
|
||||
<h1>[name]</h1>
|
||||
|
||||
<div class="desc">Defines a 2d shape plane using paths.</div>
|
||||
|
||||
|
||||
<h2>Constructor</h2>
|
||||
|
||||
|
||||
<h3>[name]()</h3>
|
||||
<div>
|
||||
todo
|
||||
</div>
|
||||
|
||||
|
||||
<h2>Properties</h2>
|
||||
|
||||
|
||||
<h3>[property:array holes]</h3>
|
||||
<div>
|
||||
todo
|
||||
</div>
|
||||
|
||||
<h2>Methods</h2>
|
||||
|
||||
|
||||
<h3>[method:todo makeGeometry]([page:todo options])</h3>
|
||||
<div>
|
||||
options -- The options passed as the second argument to [page:ShapeGeometry ShapeGeometry]
|
||||
</div>
|
||||
<div>
|
||||
Convenience method to return ShapeGeometry
|
||||
</div>
|
||||
|
||||
<h3>[method:todo extractAllPoints]([page:todo divisions])</h3>
|
||||
<div>
|
||||
divisions -- todo
|
||||
</div>
|
||||
<div>
|
||||
Get points of shape and holes (keypoints based on segments parameter)
|
||||
</div>
|
||||
|
||||
<h3>[method:todo extrude]([page:todo options])</h3>
|
||||
<div>
|
||||
options -- The options passed as the second argument to [page:ExtrudeGeometry ExtrudeGeometry]
|
||||
</div>
|
||||
<div>
|
||||
Convenience method to return ExtrudeGeometry
|
||||
</div>
|
||||
|
||||
<h3>[method:todo extractPoints]([page:todo divisions])</h3>
|
||||
<div>
|
||||
divisions -- todo
|
||||
</div>
|
||||
<div>
|
||||
todo
|
||||
</div>
|
||||
|
||||
<h3>[method:todo extractAllSpacedPoints]([page:todo divisions])</h3>
|
||||
<div>
|
||||
divisions -- todo
|
||||
</div>
|
||||
<div>
|
||||
todo
|
||||
</div>
|
||||
|
||||
<h3>[method:todo getPointsHoles]([page:todo divisions])</h3>
|
||||
<div>
|
||||
divisions -- todo
|
||||
</div>
|
||||
<div>
|
||||
Get points of holes
|
||||
</div>
|
||||
|
||||
<h3>[method:todo getSpacedPointsHoles]([page:todo divisions])</h3>
|
||||
<div>
|
||||
divisions -- todo
|
||||
</div>
|
||||
<div>
|
||||
Get points of holes (spaced by regular distance)
|
||||
</div>
|
||||
|
||||
<h2>Source</h2>
|
||||
|
||||
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
|
||||
</body>
|
||||
</html>
|
20
three.js-master/docs/api/extras/curves/ArcCurve.html
Executable file
20
three.js-master/docs/api/extras/curves/ArcCurve.html
Executable file
@ -0,0 +1,20 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<script src="../../../list.js"></script>
|
||||
<script src="../../../page.js"></script>
|
||||
<link type="text/css" rel="stylesheet" href="../../../page.css" />
|
||||
</head>
|
||||
<body>
|
||||
[page:EllipseCurve] →
|
||||
|
||||
<h1>[name]</h1>
|
||||
|
||||
<div class="desc">Alias for [page:EllipseCurve]</div>
|
||||
|
||||
<h2>Source</h2>
|
||||
|
||||
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
|
||||
</body>
|
||||
</html>
|
54
three.js-master/docs/api/extras/curves/ClosedSplineCurve3.html
Executable file
54
three.js-master/docs/api/extras/curves/ClosedSplineCurve3.html
Executable file
@ -0,0 +1,54 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<script src="../../../list.js"></script>
|
||||
<script src="../../../page.js"></script>
|
||||
<link type="text/css" rel="stylesheet" href="../../../page.css" />
|
||||
</head>
|
||||
<body>
|
||||
[page:Curve] →
|
||||
|
||||
<h1>[name]</h1>
|
||||
|
||||
<div class="desc">Create a smooth 3d spline curve from a series of points that loops back onto itself</div>
|
||||
|
||||
<h2>Example</h2>
|
||||
|
||||
<code>
|
||||
//Create a closed wavey loop
|
||||
var curve = new THREE.ClosedSplineCurve3( [
|
||||
new THREE.Vector3( -10, 0, 10 ),
|
||||
new THREE.Vector3( -5, 5, 5 ),
|
||||
new THREE.Vector3( 0, 0, 0 ),
|
||||
new THREE.Vector3( 5, -5, 5 ),
|
||||
new THREE.Vector3( 10, 0, 10 )
|
||||
] );
|
||||
|
||||
var geometry = new THREE.Geometry();
|
||||
geometry.vertices = curve.getPoints( 50 );
|
||||
|
||||
var material = new THREE.LineBasicMaterial( { color : 0xff0000 } );
|
||||
</code>
|
||||
|
||||
<h3>[example:webgl_geometry_extrude_splines geometry / extrude / splines] (choose SampleClosedSpline)</h3>
|
||||
|
||||
|
||||
<h2>Constructor</h2>
|
||||
|
||||
|
||||
<h3>[name]( [page:Array points] )</h3>
|
||||
<div>points – An array of [page:Vector3] points</div>
|
||||
|
||||
|
||||
<h2>Properties</h2>
|
||||
|
||||
<h3>[property:Array points]</h3>
|
||||
|
||||
<h2>Methods</h2>
|
||||
|
||||
<h3>See [page:Curve] for inherited methods</h3>
|
||||
|
||||
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
|
||||
</body>
|
||||
</html>
|
67
three.js-master/docs/api/extras/curves/CubicBezierCurve.html
Executable file
67
three.js-master/docs/api/extras/curves/CubicBezierCurve.html
Executable file
@ -0,0 +1,67 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<script src="../../../list.js"></script>
|
||||
<script src="../../../page.js"></script>
|
||||
<link type="text/css" rel="stylesheet" href="../../../page.css" />
|
||||
</head>
|
||||
<body>
|
||||
[page:Curve] →
|
||||
|
||||
<h1>[name]</h1>
|
||||
|
||||
<div class="desc">
|
||||
Create a smooth 2d <a href="http://en.wikipedia.org/wiki/B%C3%A9zier_curve#mediaviewer/File:Bezier_curve.svg" target="_blank">cubic bezier curve</a>.
|
||||
</div>
|
||||
|
||||
<h2>Example</h2>
|
||||
|
||||
<code>
|
||||
var curve = new THREE.CubicBezierCurve(
|
||||
new THREE.Vector3( -10, 0, 0 ),
|
||||
new THREE.Vector3( -5, 15, 0 ),
|
||||
new THREE.Vector3( 20, 15, 0 ),
|
||||
new THREE.Vector3( 10, 0, 0 )
|
||||
);
|
||||
|
||||
var path = new THREE.Path( curve.getPoints( 50 ) );
|
||||
|
||||
var geometry = path.createPointsGeometry( 50 );
|
||||
var material = new THREE.LineBasicMaterial( { color : 0xff0000 } );
|
||||
|
||||
// Create the final Object3d to add to the scene
|
||||
var curveObject = new THREE.Line( geometry, material );
|
||||
</code>
|
||||
|
||||
<h2>Constructor</h2>
|
||||
|
||||
|
||||
<h3>[name] ( [page:Vector2 v0], [page:Vector2 v1], [page:Vector2 v2], [page:Vector2 v3] )</h3>
|
||||
<div>
|
||||
[page:Vector2 v0] – The starting point<br/>
|
||||
[page:Vector2 v1] – The first control point<br/>
|
||||
[page:Vector2 v2] – The second control point<br/>
|
||||
[page:Vector2 v3] – The ending point<br/>
|
||||
</div>
|
||||
|
||||
<h2>Properties</h2>
|
||||
|
||||
<h3>[property:Vector2 v0]</h3>
|
||||
|
||||
<h3>[property:Vector2 v1]</h3>
|
||||
|
||||
<h3>[property:Vector2 v2]</h3>
|
||||
|
||||
<h3>[property:Vector2 v3]</h3>
|
||||
|
||||
|
||||
<h2>Methods</h2>
|
||||
|
||||
<h3>See [page:Curve] for inherited methods</h3>
|
||||
|
||||
<h2>Source</h2>
|
||||
|
||||
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
|
||||
</body>
|
||||
</html>
|
67
three.js-master/docs/api/extras/curves/CubicBezierCurve3.html
Executable file
67
three.js-master/docs/api/extras/curves/CubicBezierCurve3.html
Executable file
@ -0,0 +1,67 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<script src="../../../list.js"></script>
|
||||
<script src="../../../page.js"></script>
|
||||
<link type="text/css" rel="stylesheet" href="../../../page.css" />
|
||||
</head>
|
||||
<body>
|
||||
[page:Curve] →
|
||||
|
||||
<h1>[name]</h1>
|
||||
|
||||
<div class="desc">
|
||||
Create a smooth 3d <a href="http://en.wikipedia.org/wiki/B%C3%A9zier_curve#mediaviewer/File:Bezier_curve.svg" target="_blank">cubic bezier curve</a>.
|
||||
</div>
|
||||
|
||||
<h2>Example</h2>
|
||||
|
||||
<code>
|
||||
var curve = new THREE.CubicBezierCurve3(
|
||||
new THREE.Vector3( -10, 0, 0 ),
|
||||
new THREE.Vector3( -5, 15, 0 ),
|
||||
new THREE.Vector3( 20, 15, 0 ),
|
||||
new THREE.Vector3( 10, 0, 0 )
|
||||
);
|
||||
|
||||
var geometry = new THREE.Geometry();
|
||||
geometry.vertices = curve.getPoints( 50 );
|
||||
|
||||
var material = new THREE.LineBasicMaterial( { color : 0xff0000 } );
|
||||
|
||||
// Create the final Object3d to add to the scene
|
||||
var curveObject = new THREE.Line( geometry, material );
|
||||
|
||||
</code>
|
||||
|
||||
<h2>Constructor</h2>
|
||||
|
||||
|
||||
<h3>[name]( [page:Vector3 v0], [page:Vector3 v1], [page:Vector3 v2], [page:Vector3 v3] )</h3>
|
||||
<div>
|
||||
[page:Vector3 v0] – The starting point<br/>
|
||||
[page:Vector3 v1] – The first control point<br/>
|
||||
[page:Vector3 v2] – The second control point<br/>
|
||||
[page:Vector3 v3] – The ending point<br/>
|
||||
</div>
|
||||
|
||||
<h2>Properties</h2>
|
||||
|
||||
<h3>[property:Vector3 v0]</h3>
|
||||
|
||||
<h3>[property:Vector3 v1]</h3>
|
||||
|
||||
<h3>[property:Vector3 v2]</h3>
|
||||
|
||||
<h3>[property:Vector3 v3]</h3>
|
||||
|
||||
|
||||
<h2>Methods</h2>
|
||||
|
||||
<h3>See [page:Curve] for inherited methods</h3>
|
||||
<h2>Source</h2>
|
||||
|
||||
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
|
||||
</body>
|
||||
</html>
|
69
three.js-master/docs/api/extras/curves/EllipseCurve.html
Executable file
69
three.js-master/docs/api/extras/curves/EllipseCurve.html
Executable file
@ -0,0 +1,69 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<script src="../../../list.js"></script>
|
||||
<script src="../../../page.js"></script>
|
||||
<link type="text/css" rel="stylesheet" href="../../../page.css" />
|
||||
</head>
|
||||
<body>
|
||||
[page:Curve] →
|
||||
|
||||
<h1>[name]</h1>
|
||||
|
||||
<div class="desc">Creates a 2d curve in the shape of an ellipse.</div>
|
||||
|
||||
<h2>Example</h2>
|
||||
|
||||
<code>
|
||||
var curve = new THREE.EllipseCurve(
|
||||
0, 0, // ax, aY
|
||||
10, 10, // xRadius, yRadius
|
||||
0, 2 * Math.PI, // aStartAngle, aEndAngle
|
||||
false // aClockwise
|
||||
);
|
||||
|
||||
var path = new THREE.Path( curve.getPoints( 50 ) );
|
||||
var geometry = path.createPointsGeometry( 50 );
|
||||
var material = new THREE.LineBasicMaterial( { color : 0xff0000 } );
|
||||
|
||||
// Create the final Object3d to add to the scene
|
||||
var ellipse = new THREE.Line( geometry, material );
|
||||
</code>
|
||||
|
||||
<h2>Constructor</h2>
|
||||
|
||||
|
||||
<h3>[name]( [page:Float aX], [page:Float aY], [page:Float xRadius], [page:Float yRadius], [page:Radians aStartAngle], [page:Radians aEndAngle], [page:Boolean aClockwise] )</h3>
|
||||
<div>
|
||||
aX – The X center of the ellipse<br/>
|
||||
aY – The Y center of the ellipse<br/>
|
||||
xRadius – The radius of the ellipse in the x direction<br/>
|
||||
yRadius – The radius of the ellipse in the y direction<br/>
|
||||
aStartAngle – The start angle of the curve in radians starting from the middle right side<br/>
|
||||
aEndAngle – The end angle of the curve in radians starting from the middle right side<br/>
|
||||
aClockwise – Whether the ellipse is clockwise<br/><br/>
|
||||
|
||||
<strong>Note:</strong> When going clockwise it's best to set the start angle to (Math.PI * 2) and then work towards lower numbers.
|
||||
</div>
|
||||
|
||||
|
||||
<h2>Properties</h2>
|
||||
|
||||
<h3>[property:Float aX]</h3>
|
||||
<h3>[property:Float aY]</h3>
|
||||
<h3>[property:Radians xRadius]</h3>
|
||||
<h3>[property:Radians yRadius]</h3>
|
||||
<h3>[property:Float aStartAngle]</h3>
|
||||
<h3>[property:Float aEndAngle]</h3>
|
||||
<h3>[property:Boolean aClockwise]</h3>
|
||||
|
||||
<h2>Methods</h2>
|
||||
|
||||
<h3>See [page:Curve] for inherited methods</h3>
|
||||
|
||||
<h2>Source</h2>
|
||||
|
||||
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
|
||||
</body>
|
||||
</html>
|
41
three.js-master/docs/api/extras/curves/LineCurve.html
Executable file
41
three.js-master/docs/api/extras/curves/LineCurve.html
Executable file
@ -0,0 +1,41 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<script src="../../../list.js"></script>
|
||||
<script src="../../../page.js"></script>
|
||||
<link type="text/css" rel="stylesheet" href="../../../page.css" />
|
||||
</head>
|
||||
<body>
|
||||
[page:Curve] →
|
||||
|
||||
<h1>[name]</h1>
|
||||
|
||||
<div class="desc">A curve representing a 2d line segment</div>
|
||||
|
||||
<h2>Constructor</h2>
|
||||
|
||||
|
||||
<h3>[name]( [page:Vector2 v1], [page:Vector2 v2] )</h3>
|
||||
<div>
|
||||
v1 – The start point<br/>
|
||||
v2 - The end point
|
||||
</div>
|
||||
|
||||
|
||||
<h2>Properties</h2>
|
||||
|
||||
<h3>[property:Vector2 v1]</h3>
|
||||
<h3>[property:Vector2 v2]</h3>
|
||||
|
||||
|
||||
<h2>Methods</h2>
|
||||
|
||||
<h3>See [page:Curve] for inherited methods</h3>
|
||||
|
||||
|
||||
<h2>Source</h2>
|
||||
|
||||
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
|
||||
</body>
|
||||
</html>
|
40
three.js-master/docs/api/extras/curves/LineCurve3.html
Executable file
40
three.js-master/docs/api/extras/curves/LineCurve3.html
Executable file
@ -0,0 +1,40 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<script src="../../../list.js"></script>
|
||||
<script src="../../../page.js"></script>
|
||||
<link type="text/css" rel="stylesheet" href="../../../page.css" />
|
||||
</head>
|
||||
<body>
|
||||
[page:Curve] →
|
||||
|
||||
<h1>[name]</h1>
|
||||
|
||||
<div class="desc">A curve representing a 3d line segment</div>
|
||||
|
||||
<h2>Constructor</h2>
|
||||
|
||||
|
||||
<h3>[name]( [page:Vector3 v1], [page:Vector3 v2] )</h3>
|
||||
<div>
|
||||
v1 – The start point<br/>
|
||||
v2 - The end point
|
||||
</div>
|
||||
|
||||
|
||||
<h2>Properties</h2>
|
||||
|
||||
<h3>[property:Vector3 v1]</h3>
|
||||
<h3>[property:Vector3 v2]</h3>
|
||||
|
||||
|
||||
<h2>Methods</h2>
|
||||
|
||||
<h3>See [page:Curve] for inherited methods</h3>
|
||||
|
||||
<h2>Source</h2>
|
||||
|
||||
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
|
||||
</body>
|
||||
</html>
|
66
three.js-master/docs/api/extras/curves/QuadraticBezierCurve.html
Executable file
66
three.js-master/docs/api/extras/curves/QuadraticBezierCurve.html
Executable file
@ -0,0 +1,66 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<script src="../../../list.js"></script>
|
||||
<script src="../../../page.js"></script>
|
||||
<link type="text/css" rel="stylesheet" href="../../../page.css" />
|
||||
</head>
|
||||
<body>
|
||||
[page:Curve] →
|
||||
|
||||
<h1>[name]</h1>
|
||||
|
||||
<div class="desc">
|
||||
Create a smooth 2d <a href="http://en.wikipedia.org/wiki/B%C3%A9zier_curve#mediaviewer/File:B%C3%A9zier_2_big.gif" target="_blank">quadratic bezier curve</a>.
|
||||
</div>
|
||||
|
||||
<h2>Example</h2>
|
||||
|
||||
<code>
|
||||
var curve = new THREE.QuadraticBezierCurve(
|
||||
new THREE.Vector3( -10, 0, 0 ),
|
||||
new THREE.Vector3( 20, 15, 0 ),
|
||||
new THREE.Vector3( 10, 0, 0 )
|
||||
);
|
||||
|
||||
var path = new THREE.Path( curve.getPoints( 50 ) );
|
||||
|
||||
var geometry = path.createPointsGeometry( 50 );
|
||||
var material = new THREE.LineBasicMaterial( { color : 0xff0000 } );
|
||||
|
||||
//Create the final Object3d to add to the scene
|
||||
var curveObject = new THREE.Line( geometry, material );
|
||||
</code>
|
||||
|
||||
<h2>Constructor</h2>
|
||||
|
||||
|
||||
<h3>[name]( [page:Vector2 v0], [page:Vector2 v1], [page:Vector2 v2] )</h3>
|
||||
<div>
|
||||
[page:Vector2 v0] – The starting point<br/>
|
||||
[page:Vector2 v1] – The middle control point<br/>
|
||||
[page:Vector2 v2] – The ending point<br/>
|
||||
</div>
|
||||
|
||||
|
||||
<h2>Properties</h2>
|
||||
|
||||
|
||||
<h3>[property:Vector2 v0]</h3>
|
||||
|
||||
<h3>[property:Vector2 v1]</h3>
|
||||
|
||||
<h3>[property:Vector2 v2]</h3>
|
||||
|
||||
|
||||
<h2>Methods</h2>
|
||||
|
||||
|
||||
<h3>See [page:Curve] for inherited methods</h3>
|
||||
|
||||
<h2>Source</h2>
|
||||
|
||||
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
|
||||
</body>
|
||||
</html>
|
66
three.js-master/docs/api/extras/curves/QuadraticBezierCurve3.html
Executable file
66
three.js-master/docs/api/extras/curves/QuadraticBezierCurve3.html
Executable file
@ -0,0 +1,66 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<script src="../../../list.js"></script>
|
||||
<script src="../../../page.js"></script>
|
||||
<link type="text/css" rel="stylesheet" href="../../../page.css" />
|
||||
</head>
|
||||
<body>
|
||||
[page:Curve] →
|
||||
|
||||
<h1>[name]</h1>
|
||||
|
||||
<div class="desc">
|
||||
Create a smooth 3d <a href="http://en.wikipedia.org/wiki/B%C3%A9zier_curve#mediaviewer/File:B%C3%A9zier_2_big.gif" target="_blank">quadratic bezier curve</a>.
|
||||
</div>
|
||||
|
||||
<h2>Example</h2>
|
||||
|
||||
<code>
|
||||
var curve = new THREE.QuadraticBezierCurve3(
|
||||
new THREE.Vector3( -10, 0, 0 ),
|
||||
new THREE.Vector3( 20, 15, 0 ),
|
||||
new THREE.Vector3( 10, 0, 0 )
|
||||
);
|
||||
|
||||
var geometry = new THREE.Geometry();
|
||||
geometry.vertices = curve.getPoints( 50 );
|
||||
|
||||
var material = new THREE.LineBasicMaterial( { color : 0xff0000 } );
|
||||
|
||||
// Create the final Object3d to add to the scene
|
||||
var curveObject = new THREE.Line( geometry, material );
|
||||
</code>
|
||||
|
||||
<h2>Constructor</h2>
|
||||
|
||||
|
||||
<h3>[name]( [page:Vector3 v0], [page:Vector3 v1], [page:Vector3 v2] )</h3>
|
||||
<div>
|
||||
[page:Vector3 v0] – The starting point<br/>
|
||||
[page:Vector3 v1] – The middle control point<br/>
|
||||
[page:Vector3 v2] – The ending point<br/>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<h2>Properties</h2>
|
||||
|
||||
<h3>[property:Vector3 v0]</h3>
|
||||
|
||||
<h3>[property:Vector3 v1]</h3>
|
||||
|
||||
<h3>[property:Vector3 v2]</h3>
|
||||
|
||||
|
||||
<h2>Methods</h2>
|
||||
|
||||
|
||||
<h3>See [page:Curve] for inherited methods</h3>
|
||||
|
||||
<h2>Source</h2>
|
||||
|
||||
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
|
||||
</body>
|
||||
</html>
|
56
three.js-master/docs/api/extras/curves/SplineCurve.html
Executable file
56
three.js-master/docs/api/extras/curves/SplineCurve.html
Executable file
@ -0,0 +1,56 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<script src="../../../list.js"></script>
|
||||
<script src="../../../page.js"></script>
|
||||
<link type="text/css" rel="stylesheet" href="../../../page.css" />
|
||||
</head>
|
||||
<body>
|
||||
[page:Curve] →
|
||||
|
||||
<h1>[name]</h1>
|
||||
|
||||
<div class="desc">Create a smooth 2d spline curve from a series of points</div>
|
||||
|
||||
<h2>Example</h2>
|
||||
|
||||
<code>
|
||||
// Create a sine-like wave
|
||||
var curve = new THREE.SplineCurve( [
|
||||
new THREE.Vector2( -10, 0 ),
|
||||
new THREE.Vector2( -5, 5 ),
|
||||
new THREE.Vector2( 0, 0 ),
|
||||
new THREE.Vector2( 5, -5 ),
|
||||
new THREE.Vector2( 10, 0 )
|
||||
] );
|
||||
|
||||
var path = new THREE.Path( curve.getPoints( 50 ) );
|
||||
|
||||
var geometry = path.createPointsGeometry( 50 );
|
||||
var material = new THREE.LineBasicMaterial( { color : 0xff0000 } );
|
||||
|
||||
// Create the final Object3d to add to the scene
|
||||
var splineObject = new THREE.Line( geometry, material );
|
||||
</code>
|
||||
|
||||
<h2>Constructor</h2>
|
||||
|
||||
|
||||
<h3>[name]( [page:Array points] )</h3>
|
||||
<div>points – An array of [page:Vector2] points</div>
|
||||
|
||||
|
||||
<h2>Properties</h2>
|
||||
|
||||
<h3>[property:Array points]</h3>
|
||||
|
||||
<h2>Methods</h2>
|
||||
|
||||
<h3>See [page:Curve] for inherited methods</h3>
|
||||
|
||||
<h2>Source</h2>
|
||||
|
||||
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
|
||||
</body>
|
||||
</html>
|
57
three.js-master/docs/api/extras/curves/SplineCurve3.html
Executable file
57
three.js-master/docs/api/extras/curves/SplineCurve3.html
Executable file
@ -0,0 +1,57 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<script src="../../../list.js"></script>
|
||||
<script src="../../../page.js"></script>
|
||||
<link type="text/css" rel="stylesheet" href="../../../page.css" />
|
||||
</head>
|
||||
<body>
|
||||
[page:Curve] →
|
||||
|
||||
<h1>[name]</h1>
|
||||
|
||||
<div class="desc">Create a smooth 3d spline curve from a series of points</div>
|
||||
|
||||
<h2>Example</h2>
|
||||
|
||||
<code>
|
||||
//Create a closed bent a sine-like wave
|
||||
var curve = new THREE.SplineCurve3( [
|
||||
new THREE.Vector3( -10, 0, 10 ),
|
||||
new THREE.Vector3( -5, 5, 5 ),
|
||||
new THREE.Vector3( 0, 0, 0 ),
|
||||
new THREE.Vector3( 5, -5, 5 ),
|
||||
new THREE.Vector3( 10, 0, 10 )
|
||||
] );
|
||||
|
||||
var geometry = new THREE.Geometry();
|
||||
geometry.vertices = curve.getPoints( 50 );
|
||||
|
||||
var material = new THREE.LineBasicMaterial( { color : 0xff0000 } );
|
||||
|
||||
//Create the final Object3d to add to the scene
|
||||
var splineObject = new THREE.Line( geometry, material );
|
||||
</code>
|
||||
|
||||
<h3>[example:webgl_geometry_extrude_splines geometry / extrude / splines ] (choose PipeSpline)</h3>
|
||||
|
||||
|
||||
<h2>Constructor</h2>
|
||||
|
||||
|
||||
<h3>[name]( [page:Array points] )</h3>
|
||||
<div>points – An array of [page:Vector3] points</div>
|
||||
|
||||
|
||||
<h2>Properties</h2>
|
||||
|
||||
<h3>[property:Array points]</h3>
|
||||
|
||||
<h2>Methods</h2>
|
||||
|
||||
<h3>See [page:Curve] for inherited methods</h3>
|
||||
|
||||
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
|
||||
</body>
|
||||
</html>
|
48
three.js-master/docs/api/extras/geometries/BoxGeometry.html
Executable file
48
three.js-master/docs/api/extras/geometries/BoxGeometry.html
Executable file
@ -0,0 +1,48 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<script src="../../../list.js"></script>
|
||||
<script src="../../../page.js"></script>
|
||||
<link type="text/css" rel="stylesheet" href="../../../page.css" />
|
||||
</head>
|
||||
<body>
|
||||
[page:Geometry] →
|
||||
|
||||
<h1>[name]</h1>
|
||||
|
||||
<div class="desc">BoxGeometry is the quadrilateral primitive geometry class. It is typically used for creating a cube or irregular quadrilateral of the dimensions provided with the 'width', 'height', and 'depth' constructor arguments.</div>
|
||||
|
||||
<h2>Example</h2>
|
||||
|
||||
<code>var geometry = new THREE.BoxGeometry( 1, 1, 1 );
|
||||
var material = new THREE.MeshBasicMaterial( {color: 0x00ff00} );
|
||||
var cube = new THREE.Mesh( geometry, material );
|
||||
scene.add( cube );
|
||||
</code>
|
||||
|
||||
<h2>Constructor</h2>
|
||||
|
||||
|
||||
<h3>[name]([page:Float width], [page:Float height], [page:Float depth], [page:Integer widthSegments], [page:Integer heightSegments], [page:Integer depthSegments])</h3>
|
||||
<div>
|
||||
width — Width of the sides on the X axis.<br />
|
||||
height — Height of the sides on the Y axis.<br />
|
||||
depth — Depth of the sides on the Z axis.<br />
|
||||
widthSegments — Optional. Number of segmented faces along the width of the sides. Default is 1.<br />
|
||||
heightSegments — Optional. Number of segmented faces along the height of the sides. Default is 1.<br />
|
||||
depthSegments — Optional. Number of segmented faces along the depth of the sides. Default is 1.
|
||||
</div>
|
||||
|
||||
|
||||
<h2>Properties</h2>
|
||||
|
||||
<div>
|
||||
Each of the constructor parameters is accessible as a property of the same name. Any modification of these properties after instantiation does not change the geometry.
|
||||
</div>
|
||||
|
||||
<h2>Source</h2>
|
||||
|
||||
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
|
||||
</body>
|
||||
</html>
|
47
three.js-master/docs/api/extras/geometries/CircleGeometry.html
Executable file
47
three.js-master/docs/api/extras/geometries/CircleGeometry.html
Executable file
@ -0,0 +1,47 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<script src="../../../list.js"></script>
|
||||
<script src="../../../page.js"></script>
|
||||
<link type="text/css" rel="stylesheet" href="../../../page.css" />
|
||||
</head>
|
||||
<body>
|
||||
[page:Geometry] →
|
||||
|
||||
<h1>[name]</h1>
|
||||
|
||||
<div class="desc">CircleGeometry is a simple shape of Euclidean geometry. It is contructed from a number of triangular segments that are oriented around a central point and extend as far out as a given radius. It is built counter-clockwise from a start angle and a given central angle. It can also be used to create regular polygons, where the number of segments determines the number of sides.
|
||||
</div>
|
||||
|
||||
<h2>Example</h2>
|
||||
|
||||
<code>var material = new THREE.MeshBasicMaterial({
|
||||
color: 0x0000ff
|
||||
});
|
||||
|
||||
var radius = 5;
|
||||
var segments = 32;
|
||||
|
||||
var circleGeometry = new THREE.CircleGeometry( radius, segments );
|
||||
var circle = new THREE.Mesh( circleGeometry, material );
|
||||
scene.add( circle );
|
||||
</code>
|
||||
|
||||
|
||||
<h2>Constructor</h2>
|
||||
|
||||
<h3>[name]([page:Float radius], [page:Integer segments], [page:Float thetaStart], [page:Float thetaLength])</h3>
|
||||
<div>
|
||||
radius — Radius of the circle, default = 50.<br />
|
||||
segments — Number of segments (triangles), minimum = 3, default = 8.<br />
|
||||
thetaStart — Start angle for first segment, default = 0 (three o'clock position).<br />
|
||||
thetaLength — The central angle, often called theta, of the circular sector. The default is 2*Pi, which makes for a complete circle.
|
||||
</div>
|
||||
|
||||
|
||||
<h2>Source</h2>
|
||||
|
||||
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
|
||||
</body>
|
||||
</html>
|
19
three.js-master/docs/api/extras/geometries/CubeGeometry.html
Executable file
19
three.js-master/docs/api/extras/geometries/CubeGeometry.html
Executable file
@ -0,0 +1,19 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<script src="../../../list.js"></script>
|
||||
<script src="../../../page.js"></script>
|
||||
<link type="text/css" rel="stylesheet" href="../../../page.css" />
|
||||
</head>
|
||||
<body>
|
||||
[page:Geometry] →
|
||||
|
||||
<h1>[name]</h1>
|
||||
|
||||
<div class="desc">Renamed CubeGeometry to BoxGeometry. see [page:BoxGeometry].</div>
|
||||
|
||||
|
||||
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
|
||||
</body>
|
||||
</html>
|
53
three.js-master/docs/api/extras/geometries/CylinderGeometry.html
Executable file
53
three.js-master/docs/api/extras/geometries/CylinderGeometry.html
Executable file
@ -0,0 +1,53 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<script src="../../../list.js"></script>
|
||||
<script src="../../../page.js"></script>
|
||||
<link type="text/css" rel="stylesheet" href="../../../page.css" />
|
||||
</head>
|
||||
<body>
|
||||
[page:Geometry] →
|
||||
|
||||
<h1>[name]</h1>
|
||||
|
||||
<div class="desc">A class for generating cylinder geometries</div>
|
||||
|
||||
|
||||
<h2>Example</h2>
|
||||
|
||||
<code>var geometry = new THREE.CylinderGeometry( 5, 5, 20, 32 );
|
||||
var material = new THREE.MeshBasicMaterial( {color: 0xffff00} );
|
||||
var cylinder = new THREE.Mesh( geometry, material );
|
||||
scene.add( cylinder );
|
||||
</code>
|
||||
|
||||
|
||||
<h2>Constructor</h2>
|
||||
|
||||
|
||||
<h3>[name]([page:Float radiusTop], [page:Float radiusBottom], [page:Float height], [page:Integer radiusSegments], [page:Integer heightSegments], [page:Boolean openEnded], [page:Float thetaStart], [page:Float thetaLength])</h3>
|
||||
<div>
|
||||
radiusTop — Radius of the cylinder at the top. Default is 20.<br />
|
||||
radiusBottom — Radius of the cylinder at the bottom. Default is 20.<br />
|
||||
height — Height of the cylinder. Default is 100.<br />
|
||||
radiusSegments — Number of segmented faces around the circumference of the cylinder. Default is 8<br />
|
||||
heightSegments — Number of rows of faces along the height of the cylinder. Default is 1.<br />
|
||||
openEnded — A Boolean indicating whether the ends of the cylinder are open or capped. Default is false, meaning capped.<br />
|
||||
thetaStart — Start angle for first segment, default = 0 (three o'clock position).<br />
|
||||
thetaLength — The central angle, often called theta, of the circular sector. The default is 2*Pi, which makes for a complete cylinder.
|
||||
</div>
|
||||
|
||||
|
||||
<h2>Properties</h2>
|
||||
|
||||
<div>
|
||||
Each of the constructor parameters is accessible as a property of the same name. Any modification of these properties after instantiation does not change the geometry.
|
||||
</div>
|
||||
|
||||
|
||||
<h2>Source</h2>
|
||||
|
||||
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
|
||||
</body>
|
||||
</html>
|
39
three.js-master/docs/api/extras/geometries/DodecahedronGeometry.html
Executable file
39
three.js-master/docs/api/extras/geometries/DodecahedronGeometry.html
Executable file
@ -0,0 +1,39 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<script src="../../../list.js"></script>
|
||||
<script src="../../../page.js"></script>
|
||||
<link type="text/css" rel="stylesheet" href="../../../page.css" />
|
||||
</head>
|
||||
<body>
|
||||
[page:PolyhedronGeometry] →
|
||||
|
||||
<h1>[name]</h1>
|
||||
|
||||
<div class="desc">A class for generating a dodecahedron geometries.</div>
|
||||
|
||||
|
||||
<h2>Constructor</h2>
|
||||
|
||||
|
||||
<h3>[name]([page:Float radius], [page:Integer detail])</h3>
|
||||
<div>
|
||||
radius — Radius of the dodecahedron. Default is 1.<br />
|
||||
detail — Default is 0. Setting this to a value greater than 0 adds vertices making it no longer a dodecahedron.
|
||||
</div>
|
||||
|
||||
|
||||
<h2>Properties</h2>
|
||||
|
||||
<h3>[property:Object parameters]</h3>
|
||||
<div>
|
||||
An object with all of the parameters that were used to generate the geometry.
|
||||
</div>
|
||||
|
||||
|
||||
<h2>Source</h2>
|
||||
|
||||
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
|
||||
</body>
|
||||
</html>
|
98
three.js-master/docs/api/extras/geometries/ExtrudeGeometry.html
Executable file
98
three.js-master/docs/api/extras/geometries/ExtrudeGeometry.html
Executable file
@ -0,0 +1,98 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<script src="../../../list.js"></script>
|
||||
<script src="../../../page.js"></script>
|
||||
<link type="text/css" rel="stylesheet" href="../../../page.css" />
|
||||
</head>
|
||||
<body>
|
||||
[page:Geometry] →
|
||||
|
||||
<h1>[name]</h1>
|
||||
|
||||
<div class="desc">Creates extruded geometry from a path shape</div>
|
||||
|
||||
|
||||
<h2>Constructor</h2>
|
||||
|
||||
|
||||
<h3>[name]([page:Array shapes], [page:Object options])</h3>
|
||||
<div>
|
||||
shapes — Shape or an array of shapes. <br />
|
||||
options — Object that can contain the following parameters.
|
||||
|
||||
<ul>
|
||||
<li>curveSegments — int. number of points on the curves</li>
|
||||
<li>steps — int. number of points used for subdividing segements of extrude spline</li>
|
||||
<li>amount — int. Depth to extrude the shape</li>
|
||||
<li>bevelEnabled — bool. turn on bevel</li>
|
||||
<li>bevelThickness — float. how deep into the original shape bevel goes</li>
|
||||
<li>bevelSize — float. how far from shape outline is bevel</li>
|
||||
<li>bevelSegments — int. number of bevel layers</li>
|
||||
<li>extrudePath — THREE.CurvePath. 3d spline path to extrude shape along. (creates Frames if (frames aren't defined)</li>
|
||||
<li>frames — THREE.TubeGeometry.FrenetFrames. containing arrays of tangents, normals, binormals</li>
|
||||
<li>material — int. material index for front and back faces</li>
|
||||
<li>extrudeMaterial — int. material index for extrusion and beveled faces</li>
|
||||
<li>uvGenerator — Object. object that provides UV generator functions</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
<div>
|
||||
This object extrudes an 2D shape to an 3D geometry.
|
||||
</div>
|
||||
|
||||
|
||||
<h2>Properties</h2>
|
||||
|
||||
|
||||
<h2>Methods</h2>
|
||||
|
||||
<h3>[method:null addShapeList]([page:Array shapes], [page:Object options])</h3>
|
||||
<div>
|
||||
shapes — An Array of shapes to add. <br />
|
||||
options — Object that can contain the following parameters.
|
||||
<ul>
|
||||
<li>curveSegments — int. number of points on the curves</li>
|
||||
<li>steps — int. number of points used for subdividing segements of extrude spline</li>
|
||||
<li>amount — int. Depth to extrude the shape</li>
|
||||
<li>bevelEnabled — bool. turn on bevel</li>
|
||||
<li>bevelThickness — float. how deep into the original shape bevel goes</li>
|
||||
<li>bevelSize — float. how far from shape outline is bevel</li>
|
||||
<li>bevelSegments — int. number of bevel layers</li>
|
||||
<li>extrudePath — THREE.CurvePath. 3d spline path to extrude shape along. (creates Frames if (frames aren't defined)</li>
|
||||
<li>frames — THREE.TubeGeometry.FrenetFrames. containing arrays of tangents, normals, binormals</li>
|
||||
<li>material — int. material index for front and back faces</li>
|
||||
<li>extrudeMaterial — int. material index for extrusion and beveled faces</li>
|
||||
<li>uvGenerator — Object. object that provides UV generator functions</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div>Adds the shapes to the list to extrude.</div>
|
||||
|
||||
<h3>[method:null addShape]([page:Shape shape], [page:Object options])</h3>
|
||||
<div>
|
||||
shape — A shape to add. <br />
|
||||
options — Object that can contain the following parameters.
|
||||
<ul>
|
||||
<li>curveSegments — int. number of points on the curves</li>
|
||||
<li>steps — int. number of points used for subdividing segements of extrude spline</li>
|
||||
<li>amount — int. Depth to extrude the shape</li>
|
||||
<li>bevelEnabled — bool. turn on bevel</li>
|
||||
<li>bevelThickness — float. how deep into the original shape bevel goes</li>
|
||||
<li>bevelSize — float. how far from shape outline is bevel</li>
|
||||
<li>bevelSegments — int. number of bevel layers</li>
|
||||
<li>extrudePath — THREE.CurvePath. 3d spline path to extrude shape along. (creates Frames if (frames aren't defined)</li>
|
||||
<li>frames — THREE.TubeGeometry.FrenetFrames. containing arrays of tangents, normals, binormals</li>
|
||||
<li>material — int. material index for front and back faces</li>
|
||||
<li>extrudeMaterial — int. material index for extrusion and beveled faces</li>
|
||||
<li>uvGenerator — Object. object that provides UV generator functions</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div>Add the shape to the list to extrude.</div>
|
||||
|
||||
|
||||
<h2>Source</h2>
|
||||
|
||||
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
|
||||
</body>
|
||||
</html>
|
38
three.js-master/docs/api/extras/geometries/IcosahedronGeometry.html
Executable file
38
three.js-master/docs/api/extras/geometries/IcosahedronGeometry.html
Executable file
@ -0,0 +1,38 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<script src="../../../list.js"></script>
|
||||
<script src="../../../page.js"></script>
|
||||
<link type="text/css" rel="stylesheet" href="../../../page.css" />
|
||||
</head>
|
||||
<body>
|
||||
[page:PolyhedronGeometry] →
|
||||
<h1>[name]</h1>
|
||||
|
||||
<div class="desc">A class for generating an icosahedron geometry.</div>
|
||||
|
||||
|
||||
<h2>Constructor</h2>
|
||||
|
||||
|
||||
<h3>[name]([page:Float radius], [page:Integer detail])</h3>
|
||||
<div>
|
||||
radius — Default is 1. <br />
|
||||
detail — Default is 0. Setting this to a value greater than 0 adds more vertices making it no longer an icosahedron. When detail is greater than 1, it's effectively a sphere.
|
||||
</div>
|
||||
|
||||
|
||||
<h2>Properties</h2>
|
||||
|
||||
<h3>[property:Object parameters]</h3>
|
||||
<div>
|
||||
An object with all of the parameters that were used to generate the geometry.
|
||||
</div>
|
||||
|
||||
|
||||
<h2>Source</h2>
|
||||
|
||||
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
|
||||
</body>
|
||||
</html>
|
50
three.js-master/docs/api/extras/geometries/LatheGeometry.html
Executable file
50
three.js-master/docs/api/extras/geometries/LatheGeometry.html
Executable file
@ -0,0 +1,50 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<script src="../../../list.js"></script>
|
||||
<script src="../../../page.js"></script>
|
||||
<link type="text/css" rel="stylesheet" href="../../../page.css" />
|
||||
</head>
|
||||
<body>
|
||||
[page:Geometry] →
|
||||
|
||||
<h1>[name]</h1>
|
||||
|
||||
<div class="desc">Class for generating meshes with axial symmetry. Possible uses include donuts, pipes, vases etc. The lathe rotate around the Z axis.</div>
|
||||
|
||||
|
||||
<h2>Example</h2>
|
||||
|
||||
<code>
|
||||
var points = [];
|
||||
for ( var i = 0; i < 10; i ++ ) {
|
||||
points.push( new THREE.Vector3( Math.sin( i * 0.2 ) * 15 + 50, 0, ( i - 5 ) * 2 ) );
|
||||
|
||||
}
|
||||
var geometry = new THREE.LatheGeometry( points );
|
||||
var material = new THREE.MeshBasicMaterial( { color: 0xffff00 } );
|
||||
var lathe = new THREE.Mesh( geometry, material );
|
||||
scene.add( lathe );
|
||||
</code>
|
||||
|
||||
<h2>Constructor</h2>
|
||||
|
||||
|
||||
<h3>[name]([page:Array points], [page:Integer segments], [page:Float phiStart], [page:Float phiLength])</h3>
|
||||
<div>
|
||||
points — Array of Vector3s. Since this rotates around Z axis, the y-values can be set to 0<br />
|
||||
segments — the number of circumference segments to generate. Default is 12.<br />
|
||||
phiStart — the starting angle in radians. Default is 0.<br />
|
||||
phiLength — the radian (0 to 2*PI) range of the lathed section 2*PI is a closed lathe, less than 2PI is a portion. Default is 2*PI
|
||||
</div>
|
||||
<div>
|
||||
This creates a LatheGeometry based on the parameters.
|
||||
</div>
|
||||
|
||||
|
||||
<h2>Source</h2>
|
||||
|
||||
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
|
||||
</body>
|
||||
</html>
|
37
three.js-master/docs/api/extras/geometries/OctahedronGeometry.html
Executable file
37
three.js-master/docs/api/extras/geometries/OctahedronGeometry.html
Executable file
@ -0,0 +1,37 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<script src="../../../list.js"></script>
|
||||
<script src="../../../page.js"></script>
|
||||
<link type="text/css" rel="stylesheet" href="../../../page.css" />
|
||||
</head>
|
||||
<body>
|
||||
[page:PolyhedronGeometry] →
|
||||
<h1>[name]</h1>
|
||||
|
||||
<div class="desc">A class for generating an octahedron geometry.</div>
|
||||
|
||||
|
||||
<h2>Constructor</h2>
|
||||
|
||||
|
||||
<h3>[name]([page:Float radius], [page:Integer detail])</h3>
|
||||
<div>
|
||||
radius — Radius of the octahedron. Default is 1.<br />
|
||||
detail — Default is 0. Setting this to a value greater than zero add vertices making it no longer an octahedron.
|
||||
</div>
|
||||
|
||||
|
||||
<h2>Properties</h2>
|
||||
|
||||
<h3>[property:Object parameters]</h3>
|
||||
<div>
|
||||
An object with all of the parameters that were used to generate the geometry.
|
||||
</div>
|
||||
|
||||
<h2>Source</h2>
|
||||
|
||||
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
|
||||
</body>
|
||||
</html>
|
32
three.js-master/docs/api/extras/geometries/ParametricGeometry.html
Executable file
32
three.js-master/docs/api/extras/geometries/ParametricGeometry.html
Executable file
@ -0,0 +1,32 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<script src="../../../list.js"></script>
|
||||
<script src="../../../page.js"></script>
|
||||
<link type="text/css" rel="stylesheet" href="../../../page.css" />
|
||||
</head>
|
||||
<body>
|
||||
[page:Geometry] →
|
||||
|
||||
<h1>[name]</h1>
|
||||
|
||||
<div class="desc">Generate geometry representing a parametric surface.</div>
|
||||
|
||||
|
||||
<h2>Constructor</h2>
|
||||
|
||||
|
||||
<h3>[name]([page:Function func], [page:Integer slices], [page:Integer stacks])</h3>
|
||||
<div>
|
||||
func — A function that takes in a [page:Float u] and [page:Float v] value each between 0 and 1 and returns a [page:Vector3]<br />
|
||||
slices — The count of slices to use for the parametric function <br />
|
||||
stacks — The count of stacks to use for the parametric function
|
||||
</div>
|
||||
|
||||
|
||||
<h2>Source</h2>
|
||||
|
||||
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
|
||||
</body>
|
||||
</html>
|
48
three.js-master/docs/api/extras/geometries/PlaneGeometry.html
Executable file
48
three.js-master/docs/api/extras/geometries/PlaneGeometry.html
Executable file
@ -0,0 +1,48 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<script src="../../../list.js"></script>
|
||||
<script src="../../../page.js"></script>
|
||||
<link type="text/css" rel="stylesheet" href="../../../page.css" />
|
||||
</head>
|
||||
<body>
|
||||
[page:Geometry] →
|
||||
|
||||
<h1>[name]</h1>
|
||||
|
||||
<div class="desc">A class for generating plane geometries</div>
|
||||
|
||||
|
||||
<h2>Example</h2>
|
||||
|
||||
<code>var geometry = new THREE.PlaneGeometry( 5, 20, 32 );
|
||||
var material = new THREE.MeshBasicMaterial( {color: 0xffff00, side: THREE.DoubleSide} );
|
||||
var plane = new THREE.Mesh( geometry, material );
|
||||
scene.add( plane );
|
||||
</code>
|
||||
|
||||
|
||||
<h2>Constructor</h2>
|
||||
|
||||
|
||||
<h3>[name]([page:Float width], [page:Float height], [page:Integer widthSegments], [page:Integer heightSegments])</h3>
|
||||
<div>
|
||||
width — Width along the X axis.<br />
|
||||
height — Height along the Y axis.<br />
|
||||
widthSegments — Optional. Default is 1. <br />
|
||||
heightSegments — Optional. Default is 1.
|
||||
</div>
|
||||
|
||||
|
||||
<h2>Properties</h2>
|
||||
|
||||
<div>
|
||||
Each of the contructor parameters is accessible as a property of the same name. Any modification of these properties after instantiation does not change the geometry.
|
||||
</div>
|
||||
|
||||
<h2>Source</h2>
|
||||
|
||||
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
|
||||
</body>
|
||||
</html>
|
63
three.js-master/docs/api/extras/geometries/PolyhedronGeometry.html
Executable file
63
three.js-master/docs/api/extras/geometries/PolyhedronGeometry.html
Executable file
@ -0,0 +1,63 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<script src="../../../list.js"></script>
|
||||
<script src="../../../page.js"></script>
|
||||
<link type="text/css" rel="stylesheet" href="../../../page.css" />
|
||||
</head>
|
||||
<body>
|
||||
[page:Geometry] →
|
||||
|
||||
<h1>[name]</h1>
|
||||
|
||||
<div class="desc">
|
||||
A polyhedron is a solid in three dimensions with flat faces. This class will take an array of vertices,
|
||||
project them onto a sphere, and then divide them up to the desired level of detail. This class is used
|
||||
by [page:DodecahedronGeometry], [page:IcosahedronGeometry], [page:OctahedronGeometry],
|
||||
and [page:TetrahedronGeometry] to generate their respective geometries.
|
||||
</div>
|
||||
|
||||
<h2>Example</h2>
|
||||
<code>
|
||||
var verticesOfCube = [
|
||||
-1,-1,-1, 1,-1,-1, 1, 1,-1, -1, 1,-1,
|
||||
-1,-1, 1, 1,-1, 1, 1, 1, 1, -1, 1, 1,
|
||||
];
|
||||
|
||||
var indicesOfFaces = [
|
||||
2,1,0, 0,3,2,
|
||||
0,4,7, 7,3,0,
|
||||
0,1,5, 5,4,0,
|
||||
1,2,6, 6,5,1,
|
||||
2,3,7, 7,6,2,
|
||||
4,5,6, 6,7,4
|
||||
];
|
||||
|
||||
var geometry = new THREE.PolyhedronGeometry( verticesOfCube, indicesOfFaces, 6, 2 );
|
||||
</code>
|
||||
|
||||
<h2>Constructor</h2>
|
||||
|
||||
|
||||
<h3>[name]([page:Array vertices], [page:Array faces], [page:Float radius], [page:Integer detail])</h3>
|
||||
<div>
|
||||
vertices — [page:Array] of points of the form [1,1,1, -1,-1,-1, ... ] <br />
|
||||
faces — [page:Array] of indices that make up the faces of the form [0,1,2, 2,3,0, ... ] <br />
|
||||
radius — [page:Float] - The radius of the final shape <br />
|
||||
detail — [page:Integer] - How many levels to subdivide the geometry. The more detail, the smoother the shape.
|
||||
</div>
|
||||
|
||||
<h2>Properties</h2>
|
||||
|
||||
<h3>[property:Object parameters]</h3>
|
||||
<div>
|
||||
An object with all of the parameters that were used to generate the geometry.
|
||||
</div>
|
||||
|
||||
|
||||
<h2>Source</h2>
|
||||
|
||||
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
|
||||
</body>
|
||||
</html>
|
42
three.js-master/docs/api/extras/geometries/RingGeometry.html
Executable file
42
three.js-master/docs/api/extras/geometries/RingGeometry.html
Executable file
@ -0,0 +1,42 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<script src="../../../list.js"></script>
|
||||
<script src="../../../page.js"></script>
|
||||
<link type="text/css" rel="stylesheet" href="../../../page.css" />
|
||||
</head>
|
||||
<body>
|
||||
[page:Geometry] →
|
||||
|
||||
<h1>[name]</h1>
|
||||
|
||||
<div class="desc">A class for generating a two-dimensional ring geometry.</div>
|
||||
|
||||
<h2>Example</h2>
|
||||
|
||||
<code>var geometry = new THREE.RingGeometry( 1, 5, 32 );
|
||||
var material = new THREE.MeshBasicMaterial( { color: 0xffff00, side: THREE.DoubleSide } );
|
||||
var mesh = new THREE.Mesh( geometry, material );
|
||||
scene.add( mesh );
|
||||
</code>
|
||||
|
||||
<h2>Constructor</h2>
|
||||
|
||||
|
||||
<h3>[name]([page:Float innerRadius], [page:Float outerRadius], [page:Integer thetaSegments], [page:Integer phiSegments], [page:Float thetaStart], [page:Float thetaLength])</h3>
|
||||
<div>
|
||||
innerRadius — Default is 0, but it doesn't work right when innerRadius is set to 0.<br />
|
||||
outerRadius — Default is 50. <br />
|
||||
thetaSegments — Number of segments. A higher number means the ring will be more round. Minimum is 3. Default is 8. <br />
|
||||
phiSegments — Minimum is 3. Default is 8.<br />
|
||||
thetaStart — Starting angle. Default is 0. <br />
|
||||
thetaLength — Central angle. Default is Math.PI * 2.
|
||||
</div>
|
||||
|
||||
|
||||
<h2>Source</h2>
|
||||
|
||||
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
|
||||
</body>
|
||||
</html>
|
75
three.js-master/docs/api/extras/geometries/ShapeGeometry.html
Executable file
75
three.js-master/docs/api/extras/geometries/ShapeGeometry.html
Executable file
@ -0,0 +1,75 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<script src="../../../list.js"></script>
|
||||
<script src="../../../page.js"></script>
|
||||
<link type="text/css" rel="stylesheet" href="../../../page.css" />
|
||||
</head>
|
||||
<body>
|
||||
[page:Geometry] →
|
||||
|
||||
<h1>[name]</h1>
|
||||
|
||||
<div class="desc">Creates a one-sided polygonal geometry from one or more path shapes. Similar to [page:ExtrudeGeometry]</div>
|
||||
|
||||
<h2>Example</h2>
|
||||
|
||||
|
||||
<code>var rectLength = 120, rectWidth = 40;
|
||||
|
||||
var rectShape = new THREE.Shape();
|
||||
rectShape.moveTo( 0,0 );
|
||||
rectShape.lineTo( 0, rectWidth );
|
||||
rectShape.lineTo( rectLength, rectWidth );
|
||||
rectShape.lineTo( rectLength, 0 );
|
||||
rectShape.lineTo( 0, 0 );
|
||||
|
||||
var rectGeom = new THREE.ShapeGeometry( rectShape );
|
||||
var rectMesh = new THREE.Mesh( rectGeom, new THREE.MeshBasicMaterial( { color: 0xff0000 } ) ) ;
|
||||
|
||||
scene.add( rectMesh );
|
||||
</code>
|
||||
|
||||
<h2>Constructor</h2>
|
||||
|
||||
|
||||
<h3>[name]([page:Array shapes], [page:Object options])</h3>
|
||||
<div>
|
||||
shapes — [page:Array] of shapes, or a single [page:Shape shape] <br />
|
||||
options — Optional options [page:Object object]
|
||||
<ul>
|
||||
<li>curveSegments - [page:Integer] - Not used at the moment - defaults to 12</li>
|
||||
<li>material - [page:Integer] - index of the material in a material list</li>
|
||||
<li>UVGenerator - A UV generator, defaults to [page:ExtrudeGeometry]'s WorldUVGenerator</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
<h2>Methods</h2>
|
||||
|
||||
|
||||
|
||||
<h3>.addShapeList([page:Array shapes], [page:Object options]) [page:this]</h3>
|
||||
<div>
|
||||
shapes — [page:Array] of [page:Shape shapes] <br />
|
||||
options — See options in constructor
|
||||
</div>
|
||||
<div>
|
||||
Adds a list of shapes to the geometry.
|
||||
</div>
|
||||
|
||||
<h3>[method:null addShape]([page:Shape shape], [page:Object options])</h3>
|
||||
<div>
|
||||
shape — [page:Shape] <br />
|
||||
options — See options in constructor
|
||||
</div>
|
||||
<div>
|
||||
Adds a single shape to the geometry
|
||||
</div>
|
||||
|
||||
<h2>Source</h2>
|
||||
|
||||
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
|
||||
</body>
|
||||
</html>
|
54
three.js-master/docs/api/extras/geometries/SphereGeometry.html
Executable file
54
three.js-master/docs/api/extras/geometries/SphereGeometry.html
Executable file
@ -0,0 +1,54 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<script src="../../../list.js"></script>
|
||||
<script src="../../../page.js"></script>
|
||||
<link type="text/css" rel="stylesheet" href="../../../page.css" />
|
||||
</head>
|
||||
<body>
|
||||
[page:Geometry] →
|
||||
|
||||
<h1>[name]</h1>
|
||||
|
||||
<div class="desc">A class for generating sphere geometries</div>
|
||||
|
||||
<h2>Example</h2>
|
||||
|
||||
<code>var geometry = new THREE.SphereGeometry( 5, 32, 32 );
|
||||
var material = new THREE.MeshBasicMaterial( {color: 0xffff00} );
|
||||
var sphere = new THREE.Mesh( geometry, material );
|
||||
scene.add( sphere );
|
||||
</code>
|
||||
|
||||
<h2>Constructor</h2>
|
||||
|
||||
|
||||
<h3>[name]([page:Float radius], [page:Integer widthSegments], [page:Integer heightSegments], [page:Float phiStart], [page:Float phiLength], [page:Float thetaStart], [page:Float thetaLength])</h3>
|
||||
|
||||
<div>
|
||||
radius — sphere radius. Default is 50.<br />
|
||||
widthSegments — number of horizontal segments. Minimum value is 3, and the default is 8.<br />
|
||||
heightSegments — number of vertical segments. Minimum value is 2, and the default is 6.<br />
|
||||
phiStart — specify horizontal starting angle. Default is 0.<br />
|
||||
phiLength — specify horizontal sweep angle size. Default is Math.PI * 2.<br />
|
||||
thetaStart — specify vertical starting angle. Default is 0.<br />
|
||||
thetaLength — specify vertical sweep angle size. Default is Math.PI.<br />
|
||||
</div>
|
||||
|
||||
<div>
|
||||
The geometry is created by sweeping and calculating vertexes around the Y axis (horizontal sweep) and the Z axis (vertical sweep). Thus, incomplete spheres (akin to <em>'sphere slices'</em>) can be created through the use of different values of phiStart, phiLength, thetaStart and thetaLength, in order to define the points in which we start (or end) calculating those vertices.
|
||||
</div>
|
||||
|
||||
|
||||
<h2>Properties</h2>
|
||||
|
||||
<div>
|
||||
Each of the contructor parameters is accessible as a property of the same name. Any modification of these properties after instantiation does not change the geometry.
|
||||
</div>
|
||||
|
||||
<h2>Source</h2>
|
||||
|
||||
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
|
||||
</body>
|
||||
</html>
|
39
three.js-master/docs/api/extras/geometries/TetrahedronGeometry.html
Executable file
39
three.js-master/docs/api/extras/geometries/TetrahedronGeometry.html
Executable file
@ -0,0 +1,39 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<script src="../../../list.js"></script>
|
||||
<script src="../../../page.js"></script>
|
||||
<link type="text/css" rel="stylesheet" href="../../../page.css" />
|
||||
</head>
|
||||
<body>
|
||||
[page:PolyhedronGeometry] →
|
||||
|
||||
<h1>[name]</h1>
|
||||
|
||||
<div class="desc">A class for generating a tetrahedron geometries.</div>
|
||||
|
||||
|
||||
<h2>Constructor</h2>
|
||||
|
||||
|
||||
<h3>[name]([page:Float radius], [page:Integer detail])</h3>
|
||||
<div>
|
||||
radius — Radius of the tetrahedron. Default is 1.<br />
|
||||
detail — Default is 0. Setting this to a value greater than 0 adds vertices making it no longer a tetrahedron.
|
||||
</div>
|
||||
|
||||
|
||||
<h2>Properties</h2>
|
||||
|
||||
<h3>[property:Object parameters]</h3>
|
||||
<div>
|
||||
An object with all of the parameters that were used to generate the geometry.
|
||||
</div>
|
||||
|
||||
|
||||
<h2>Source</h2>
|
||||
|
||||
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
|
||||
</body>
|
||||
</html>
|
42
three.js-master/docs/api/extras/geometries/TextGeometry.html
Executable file
42
three.js-master/docs/api/extras/geometries/TextGeometry.html
Executable file
@ -0,0 +1,42 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<script src="../../../list.js"></script>
|
||||
<script src="../../../page.js"></script>
|
||||
<link type="text/css" rel="stylesheet" href="../../../page.css" />
|
||||
</head>
|
||||
<body>
|
||||
[page:ExtrudeGeometry] →
|
||||
|
||||
<h1>[name]</h1>
|
||||
|
||||
<div class="desc">This object creates an 3D object of text as a single object.</div>
|
||||
|
||||
|
||||
<h2>Constructor</h2>
|
||||
|
||||
|
||||
<h3>[name]([page:String text], [page:Object parameters])</h3>
|
||||
<div>
|
||||
text — The text that needs to be shown. <br />
|
||||
parameters — Object that can contain the following parameters.
|
||||
<ul>
|
||||
<li>size — Float. Size of the text.</li>
|
||||
<li>height — Float. Thickness to extrude text. Default is 50.</li>
|
||||
<li>curveSegments — Integer. Number of points on the curves.</li>
|
||||
<li>font — String. Font name.</li>
|
||||
<li>weight — String. Font weight (normal, bold).</li>
|
||||
<li>style — String. Font style (normal, italics).</li>
|
||||
<li>bevelEnabled — Boolean. Turn on bevel. Default is False.</li>
|
||||
<li>bevelThickness — Float. How deep into text bevel goes. Default is 10.</li>
|
||||
<li>bevelSize — Float. How far from text outline is bevel. Default is 8.</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
<h2>Source</h2>
|
||||
|
||||
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
|
||||
</body>
|
||||
</html>
|
49
three.js-master/docs/api/extras/geometries/TorusGeometry.html
Executable file
49
three.js-master/docs/api/extras/geometries/TorusGeometry.html
Executable file
@ -0,0 +1,49 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<script src="../../../list.js"></script>
|
||||
<script src="../../../page.js"></script>
|
||||
<link type="text/css" rel="stylesheet" href="../../../page.css" />
|
||||
</head>
|
||||
<body>
|
||||
[page:Geometry] →
|
||||
|
||||
<h1>[name]</h1>
|
||||
|
||||
<div class="desc">A class for generating torus geometries</div>
|
||||
|
||||
|
||||
<h2>Example</h2>
|
||||
|
||||
<code>var geometry = new THREE.TorusGeometry( 10, 3, 16, 100 );
|
||||
var material = new THREE.MeshBasicMaterial( { color: 0xffff00 } );
|
||||
var torus = new THREE.Mesh( geometry, material );
|
||||
scene.add( torus );
|
||||
</code>
|
||||
|
||||
|
||||
<h2>Constructor</h2>
|
||||
|
||||
|
||||
<h3>[name]([page:Float radius], [page:Float tube], [page:Integer radialSegments], [page:Integer tubularSegments], [page:Float arc])</h3>
|
||||
<div>
|
||||
radius — Default is 100. <br />
|
||||
tube — Diameter of the tube. Default is 40. <br />
|
||||
radialSegments — Default is 8 <br />
|
||||
tubularSegments — Default is 6. <br />
|
||||
arc — Central angle. Default is Math.PI * 2.
|
||||
</div>
|
||||
|
||||
|
||||
<h2>Properties</h2>
|
||||
|
||||
<div>
|
||||
Each of the contructor parameters is accessible as a property of the same name. Any modification of these properties after instantiation does not change the geometry.
|
||||
</div>
|
||||
|
||||
<h2>Source</h2>
|
||||
|
||||
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
|
||||
</body>
|
||||
</html>
|
53
three.js-master/docs/api/extras/geometries/TorusKnotGeometry.html
Executable file
53
three.js-master/docs/api/extras/geometries/TorusKnotGeometry.html
Executable file
@ -0,0 +1,53 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<script src="../../../list.js"></script>
|
||||
<script src="../../../page.js"></script>
|
||||
<link type="text/css" rel="stylesheet" href="../../../page.css" />
|
||||
</head>
|
||||
<body>
|
||||
[page:Geometry] →
|
||||
|
||||
<h1>[name]</h1>
|
||||
|
||||
<div class="desc">Creates a torus knot, the particular shape of which is defined by a pair of coprime integers, p and q. If p and q are not coprime, the result will be a torus link.</div>
|
||||
|
||||
|
||||
<h2>Example</h2>
|
||||
|
||||
<code>var geometry = new THREE.TorusKnotGeometry( 10, 3, 100, 16 );
|
||||
var material = new THREE.MeshBasicMaterial( { color: 0xffff00 } );
|
||||
var torusKnot = new THREE.Mesh( geometry, material );
|
||||
scene.add( torusKnot );
|
||||
</code>
|
||||
|
||||
|
||||
<h2>Constructor</h2>
|
||||
|
||||
|
||||
<h3>[name]([page:Float radius], [page:Float tube], [page:Integer radialSegments], [page:Integer tubularSegments], [page:Integer p], [page:Integer q], [page:Float heightScale])</h3>
|
||||
<div>
|
||||
radius — Default is 100. <br />
|
||||
tube — Default is 40. <br />
|
||||
radialSegments — Default is 64. <br />
|
||||
tubularSegments — Default is 8. <br />
|
||||
p — Default is 2. <br />
|
||||
q — Default is 3. <br />
|
||||
heightScale — Default is 1.
|
||||
</div>
|
||||
|
||||
|
||||
<h2>Properties</h2>
|
||||
|
||||
|
||||
<div>
|
||||
Each of the contructor parameters is accessible as a property of the same name. Any modification of these properties after instantiation does not change the geometry.
|
||||
</div>
|
||||
|
||||
|
||||
<h2>Source</h2>
|
||||
|
||||
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
|
||||
</body>
|
||||
</html>
|
98
three.js-master/docs/api/extras/geometries/TubeGeometry.html
Executable file
98
three.js-master/docs/api/extras/geometries/TubeGeometry.html
Executable file
@ -0,0 +1,98 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<script src="../../../list.js"></script>
|
||||
<script src="../../../page.js"></script>
|
||||
<link type="text/css" rel="stylesheet" href="../../../page.css" />
|
||||
</head>
|
||||
<body>
|
||||
[page:Geometry] →
|
||||
|
||||
<h1>[name]</h1>
|
||||
|
||||
<div class="desc">Creates a tube that extrudes along a 3d curve</div>
|
||||
|
||||
<h2>Example</h2>
|
||||
|
||||
<code>
|
||||
var CustomSinCurve = THREE.Curve.create(
|
||||
function ( scale ) { //custom curve constructor
|
||||
this.scale = (scale === undefined) ? 1 : scale;
|
||||
},
|
||||
|
||||
function ( t ) { //getPoint: t is between 0-1
|
||||
var tx = t * 3 - 1.5,
|
||||
ty = Math.sin( 2 * Math.PI * t ),
|
||||
tz = 0;
|
||||
|
||||
return new THREE.Vector3(tx, ty, tz).multiplyScalar(this.scale);
|
||||
}
|
||||
);
|
||||
|
||||
var path = new CustomSinCurve( 10 );
|
||||
|
||||
var geometry = new THREE.TubeGeometry(
|
||||
path, //path
|
||||
20, //segments
|
||||
2, //radius
|
||||
8, //radiusSegments
|
||||
false //closed
|
||||
);
|
||||
</code>
|
||||
|
||||
<h2>Constructor</h2>
|
||||
|
||||
|
||||
<h3>[name]([page:Curve path], [page:Integer segments], [page:Float radius], [page:Integer radiusSegments], [page:Boolean closed])</h3>
|
||||
<div>
|
||||
path — [page:Curve] - A path that inherits from the [page:Curve] base class<br />
|
||||
segments — [page:Integer] - The number of segments that make up the tube, default is 64<br />
|
||||
radius — [page:Float] - The radius of the tube, default is 1<br />
|
||||
radiusSegments — [page:Integer] - The number of segments that make up the cross-section, default is 8 <br />
|
||||
closed — [page:Float] Is the tube open or closed, default is false <br />
|
||||
</div>
|
||||
|
||||
|
||||
<h2>Properties</h2>
|
||||
|
||||
<h3>[property:Object parameters]</h3>
|
||||
<div>
|
||||
An object with all of the parameters that were used to generate the geometry.
|
||||
</div>
|
||||
|
||||
<h3>[property:Array tangents]</h3>
|
||||
<div>
|
||||
An array of [page:Vector3] tangents
|
||||
</div>
|
||||
|
||||
<h3>[property:Array normals]</h3>
|
||||
<div>
|
||||
An array of [page:Vector3] normals
|
||||
</div>
|
||||
|
||||
<h3>[property:Array binormals]</h3>
|
||||
<div>
|
||||
An array of [page:Vector3] binormals
|
||||
</div>
|
||||
|
||||
|
||||
<h2>Methods</h2>
|
||||
|
||||
|
||||
<h3>THREE.TubeGeometry.FrenetFrames([page:Curve path], [page:Integer segments], [page:Boolean closed])</h3>
|
||||
<div>
|
||||
path — A path that inherits from the [page:Curve] base class <br />
|
||||
segments — The number of segments that make up the tube <br />
|
||||
closed — Is the tube open or closed
|
||||
</div>
|
||||
<div>
|
||||
A static method that generates the Frenet Frames. This is internally run on any new TubeGeometry and then the
|
||||
generated tangents, normals, and binormals are exposed as properties on the TubeGeometry object.
|
||||
</div>
|
||||
|
||||
<h2>Source</h2>
|
||||
|
||||
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
|
||||
</body>
|
||||
</html>
|
95
three.js-master/docs/api/extras/helpers/ArrowHelper.html
Executable file
95
three.js-master/docs/api/extras/helpers/ArrowHelper.html
Executable file
@ -0,0 +1,95 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<script src="../../../list.js"></script>
|
||||
<script src="../../../page.js"></script>
|
||||
<link type="text/css" rel="stylesheet" href="../../../page.css" />
|
||||
</head>
|
||||
<body>
|
||||
[page:Object3D] →
|
||||
|
||||
<h1>[name]</h1>
|
||||
|
||||
<div class="desc">An 3D arrow Object.</div>
|
||||
|
||||
|
||||
<h2>Example</h2>
|
||||
|
||||
<code>var dir = new THREE.Vector3( 1, 0, 0 );
|
||||
var origin = new THREE.Vector3( 0, 0, 0 );
|
||||
var length = 1;
|
||||
var hex = 0xffff00;
|
||||
|
||||
var arrowHelper = new THREE.ArrowHelper( dir, origin, length, hex );
|
||||
scene.add( arrowHelper );
|
||||
</code>
|
||||
|
||||
|
||||
|
||||
<h2>Constructor</h2>
|
||||
|
||||
|
||||
<h3>[name]([page:Vector3 dir], [page:Vector3 origin], [page:Number length], [page:Number hex], [page:Number headLength], [page:Number headWidth] )</h3>
|
||||
<div>
|
||||
dir -- Vector3 -- direction from origin. Must be a unit vector. <br />
|
||||
origin -- Vector3 <br />
|
||||
length -- scalar <br />
|
||||
hex -- hexadecimal value to define color ex:0xffff00<br />
|
||||
headLength -- The length of the head of the arrow<br />
|
||||
headWidth -- The length of the width of the arrow
|
||||
</div>
|
||||
<div>
|
||||
This creates an arrow starting in origin in the direction dir for a certain length. It is also possible to change color.
|
||||
</div>
|
||||
|
||||
|
||||
<h2>Properties</h2>
|
||||
|
||||
|
||||
|
||||
<h3>[property:Line line]</h3>
|
||||
<div>
|
||||
Contains the line part of the arrowHelper.
|
||||
</div>
|
||||
|
||||
<h3>[property:Mesh cone]</h3>
|
||||
<div>
|
||||
Contains the cone part of the arrowHelper.
|
||||
</div>
|
||||
|
||||
<h2>Methods</h2>
|
||||
|
||||
|
||||
|
||||
<h3>[method:null setColor]([page:Number hex])</h3>
|
||||
<div>
|
||||
hex -- The hexadicmal value of the color
|
||||
</div>
|
||||
<div>
|
||||
Sets the color of the arrowHelper.
|
||||
</div>
|
||||
|
||||
<h3>[method:null setLength]([page:Number length], [page:Number headLength], [page:Number headWidth])</h3>
|
||||
<div>
|
||||
length -- The desired length<br />
|
||||
headLength -- The length of the head of the arrow<br />
|
||||
headWidth -- The length of the width of the arrow
|
||||
</div>
|
||||
<div>
|
||||
Sets the length of the arrowhelper.
|
||||
</div>
|
||||
|
||||
<h3>[method:null setDirection]([page:Vector3 dir])</h3>
|
||||
<div>
|
||||
dir -- The desired direction. Must be a unit vector.
|
||||
</div>
|
||||
<div>
|
||||
Sets the direction of the arrowhelper.
|
||||
</div>
|
||||
|
||||
<h2>Source</h2>
|
||||
|
||||
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
|
||||
</body>
|
||||
</html>
|
39
three.js-master/docs/api/extras/helpers/AxisHelper.html
Executable file
39
three.js-master/docs/api/extras/helpers/AxisHelper.html
Executable file
@ -0,0 +1,39 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<script src="../../../list.js"></script>
|
||||
<script src="../../../page.js"></script>
|
||||
<link type="text/css" rel="stylesheet" href="../../../page.css" />
|
||||
</head>
|
||||
<body>
|
||||
[page:Line] →
|
||||
|
||||
<h1>[name]</h1>
|
||||
|
||||
<div class="desc">An axis object to visualize the the 3 axes in a simple way. <br />
|
||||
The X axis is red. The Y axis is green. The Z axis is blue.</div>
|
||||
|
||||
|
||||
<h2>Example</h2>
|
||||
|
||||
<code>var axisHelper = new THREE.AxisHelper( 5 );
|
||||
scene.add( axisHelper );
|
||||
</code>
|
||||
|
||||
<h2>Constructor</h2>
|
||||
|
||||
|
||||
<h3>[name]([page:Number size])</h3>
|
||||
<div>
|
||||
size -- Define the size of the line representing the axes.
|
||||
</div>
|
||||
<div>
|
||||
Creates an axisHelper with lines of length size.
|
||||
</div>
|
||||
|
||||
<h2>Source</h2>
|
||||
|
||||
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
|
||||
</body>
|
||||
</html>
|
71
three.js-master/docs/api/extras/helpers/BoundingBoxHelper.html
Executable file
71
three.js-master/docs/api/extras/helpers/BoundingBoxHelper.html
Executable file
@ -0,0 +1,71 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<script src="../../../list.js"></script>
|
||||
<script src="../../../page.js"></script>
|
||||
<link type="text/css" rel="stylesheet" href="../../../page.css" />
|
||||
</head>
|
||||
<body>
|
||||
[page:Mesh] →
|
||||
|
||||
<h1>[name]</h1>
|
||||
|
||||
<div class="desc">A helper object to show the world-axis-aligned bounding box for an object.</div>
|
||||
|
||||
|
||||
<h2>Example</h2>
|
||||
|
||||
<code>var hex = 0xff0000;
|
||||
|
||||
var sphereMaterial = new THREE.MeshLambertMaterial( {color: 0x00ff00} );
|
||||
var sphere = new THREE.Mesh( new THREE.SphereGeometry( 30, 12, 12), sphereMaterial );
|
||||
scene.add( sphere );
|
||||
|
||||
var bbox = new THREE.BoundingBoxHelper( sphere, hex );
|
||||
bbox.update();
|
||||
scene.add( bbox );
|
||||
</code>
|
||||
<div>Note that this helper will create a wireframe [page:Mesh] object with a [page:BoxGeometry]; the resulting bounding box object will therefore have face diagonals. You may want to use [page:BoxHelper], which generates a [page:Line] object without face diagonals.</div>
|
||||
|
||||
|
||||
<h2>Constructor</h2>
|
||||
|
||||
|
||||
<h3>[name]([page:Object3D object], [page:Number hex])</h3>
|
||||
<div>
|
||||
object -- Object3D -- the object3D to show the world-axis-aligned boundingbox.<br />
|
||||
hex -- hexadecimal value to define color ex:0x888888
|
||||
</div>
|
||||
<div>
|
||||
This creates an line object to the boundingbox.
|
||||
</div>
|
||||
|
||||
|
||||
<h2>Properties</h2>
|
||||
|
||||
|
||||
|
||||
<h3>[property:Object3D object]</h3>
|
||||
<div>
|
||||
Contains the object3D to show the world-axis-aligned boundingbox.
|
||||
</div>
|
||||
|
||||
<h3>[property:Box3 box]</h3>
|
||||
<div>
|
||||
Contains the bounding box of the object.
|
||||
</div>
|
||||
|
||||
<h2>Methods</h2>
|
||||
|
||||
<h3>[method:null update]()</h3>
|
||||
<div>
|
||||
Updates the BoundingBoxHelper based on the object property.
|
||||
</div>
|
||||
|
||||
|
||||
<h2>Source</h2>
|
||||
|
||||
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
|
||||
</body>
|
||||
</html>
|
45
three.js-master/docs/api/extras/helpers/BoxHelper.html
Executable file
45
three.js-master/docs/api/extras/helpers/BoxHelper.html
Executable file
@ -0,0 +1,45 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<script src="../../../list.js"></script>
|
||||
<script src="../../../page.js"></script>
|
||||
<link type="text/css" rel="stylesheet" href="../../../page.css" />
|
||||
</head>
|
||||
<body>
|
||||
[page:Line] →
|
||||
|
||||
<h1>[name]</h1>
|
||||
|
||||
<div class="desc">Helper object to show a wireframe box (with no face diagonals) around an object</div>
|
||||
|
||||
|
||||
<h2>Example</h2>
|
||||
|
||||
<code>var sphere = new THREE.SphereGeometry();
|
||||
var object = new THREE.Mesh( sphere, new THREE.MeshBasicMaterial(0xff0000) );
|
||||
var box = new THREE.BoxHelper( object );
|
||||
scene.add( box );
|
||||
</code>
|
||||
|
||||
|
||||
<h2>Constructor</h2>
|
||||
|
||||
<h3>[name]( [page:Object3D object] )</h3>
|
||||
<div>Creates a new wireframe box matching the size of the passed box.</div>
|
||||
|
||||
<h2>Properties</h2>
|
||||
|
||||
<div>(none)</div>
|
||||
|
||||
<h2>Methods</h2>
|
||||
|
||||
<h3>[method:null update]( [page:Object3D object] )</h3>
|
||||
<div>
|
||||
Updates the helper's geometry to match the dimensions of the [page:Geometry.boundingBox bounding box] of the passed object's geometry.
|
||||
|
||||
<h2>Source</h2>
|
||||
|
||||
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
|
||||
</body>
|
||||
</html>
|
57
three.js-master/docs/api/extras/helpers/CameraHelper.html
Executable file
57
three.js-master/docs/api/extras/helpers/CameraHelper.html
Executable file
@ -0,0 +1,57 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<script src="../../../list.js"></script>
|
||||
<script src="../../../page.js"></script>
|
||||
<link type="text/css" rel="stylesheet" href="../../../page.css" />
|
||||
</head>
|
||||
<body>
|
||||
[page:Line] →
|
||||
|
||||
<h1>[name]</h1>
|
||||
|
||||
<div class="desc">
|
||||
The camera Helper is an Object3D which helps visualizing what a camera contains in its frustum.<br />
|
||||
It visualizes the frustum with an line Geometry.
|
||||
</div>
|
||||
|
||||
|
||||
<h2>Constructor</h2>
|
||||
|
||||
|
||||
<h3>[name]([page:Camera camera])</h3>
|
||||
<div>
|
||||
camera -- The camera to visualize.
|
||||
</div>
|
||||
<div>
|
||||
This create a new [Name] for the specified camera.
|
||||
</div>
|
||||
|
||||
|
||||
<h2>Properties</h2>
|
||||
|
||||
|
||||
<h3>[property:object pointMap]</h3>
|
||||
<div>
|
||||
This contains the points to viualize the cameraHelper
|
||||
</div>
|
||||
|
||||
<h3>[property:Camera camera]</h3>
|
||||
<div>
|
||||
The camera to visualize.
|
||||
</div>
|
||||
|
||||
<h2>Methods</h2>
|
||||
|
||||
|
||||
<h3>[method:null update]()</h3>
|
||||
<div>
|
||||
Updates the helper based on the projectionMatrix of the camera.
|
||||
</div>
|
||||
|
||||
<h2>Source</h2>
|
||||
|
||||
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
|
||||
</body>
|
||||
</html>
|
60
three.js-master/docs/api/extras/helpers/DirectionalLightHelper.html
Executable file
60
three.js-master/docs/api/extras/helpers/DirectionalLightHelper.html
Executable file
@ -0,0 +1,60 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<script src="../../../list.js"></script>
|
||||
<script src="../../../page.js"></script>
|
||||
<link type="text/css" rel="stylesheet" href="../../../page.css" />
|
||||
</head>
|
||||
<body>
|
||||
[page:Object3D] →
|
||||
|
||||
<h1>[name]</h1>
|
||||
|
||||
<div class="desc">Visualize a [page:DirectionalLight]'s effect on the scene</div>
|
||||
|
||||
|
||||
<h2>Constructor</h2>
|
||||
|
||||
|
||||
<h3>[name]([page:DirectionalLight light], [page:Number size])</h3>
|
||||
<div>
|
||||
light -- [page:DirectionalLight] -- Light to visualize <br />
|
||||
size -- dimensions of the plane
|
||||
</div>
|
||||
<div>
|
||||
Creates a line and plane to visualize the light's position and direction
|
||||
</div>
|
||||
|
||||
|
||||
<h2>Properties</h2>
|
||||
|
||||
|
||||
<h3>[property:Line lightPlane]</h3>
|
||||
<div>
|
||||
Contains the line mesh showing the location of the directional light.
|
||||
</div>
|
||||
|
||||
<h3>[property:DirectionalLight light]</h3>
|
||||
<div>
|
||||
Contains the directionalLight.
|
||||
</div>
|
||||
|
||||
<h3>[property:Line targetLine]</h3>
|
||||
<div>
|
||||
Contains the line mesh that shows the direction of the light.
|
||||
</div>
|
||||
|
||||
<h2>Methods</h2>
|
||||
|
||||
|
||||
<h3>.[method:null update]()</h3>
|
||||
<div>
|
||||
Updates the helper to match the position and direction of the [page:.light].
|
||||
</div>
|
||||
|
||||
<h2>Source</h2>
|
||||
|
||||
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
|
||||
</body>
|
||||
</html>
|
56
three.js-master/docs/api/extras/helpers/EdgesHelper.html
Executable file
56
three.js-master/docs/api/extras/helpers/EdgesHelper.html
Executable file
@ -0,0 +1,56 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<script src="../../../list.js"></script>
|
||||
<script src="../../../page.js"></script>
|
||||
<link type="text/css" rel="stylesheet" href="../../../page.css" />
|
||||
</head>
|
||||
<body>
|
||||
[page:Line] →
|
||||
|
||||
<h1>[name]</h1>
|
||||
|
||||
<div class="desc">Creates a wireframe object that shows the "hard" edges of another object's geometry. To draw a full wireframe image of an object, see [page:WireframeHelper].</div>
|
||||
|
||||
<h2>Example</h2>
|
||||
|
||||
<code>
|
||||
geometry = new THREE.BoxGeometry( 10, 10, 10, 2, 2, 2 );
|
||||
material = new THREE.MeshBasicMaterial( { color: 0xff0000 } );
|
||||
object = new THREE.Mesh( geometry, material );
|
||||
|
||||
edges = new THREE.EdgesHelper( object, 0x00ff00 );
|
||||
|
||||
scene.add( object );
|
||||
scene.add( edges );
|
||||
</code>
|
||||
|
||||
<h2>Constructor</h2>
|
||||
<h3>[name]( [page:Object3D object], [page:Color color], [page:Float thresholdAngle] )</h3>
|
||||
<div>
|
||||
object -- Object of which to draw edges <br />
|
||||
color -- Color of the edges.<br />
|
||||
thresholdAngle -- the minimim angle (in degrees), between the face normals of adjacent faces, that is required to render an edge. Default is 0.1.
|
||||
|
||||
</div>
|
||||
<div>
|
||||
Creates a [page:Line], showing only the "hard" edges of the passed object; specifically, no edge will be drawn between faces which are adjacent and coplanar (or nearly coplanar).
|
||||
</div>
|
||||
|
||||
|
||||
<h2>Properties</h2>
|
||||
|
||||
<div>none</div>
|
||||
|
||||
|
||||
<h2>Methods</h2>
|
||||
|
||||
<div>none</div>
|
||||
|
||||
|
||||
<h2>Source</h2>
|
||||
|
||||
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
|
||||
</body>
|
||||
</html>
|
60
three.js-master/docs/api/extras/helpers/FaceNormalsHelper.html
Executable file
60
three.js-master/docs/api/extras/helpers/FaceNormalsHelper.html
Executable file
@ -0,0 +1,60 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<script src="../../../list.js"></script>
|
||||
<script src="../../../page.js"></script>
|
||||
<link type="text/css" rel="stylesheet" href="../../../page.css" />
|
||||
</head>
|
||||
<body>
|
||||
[page:Line] →
|
||||
|
||||
<h1>[name]</h1>
|
||||
|
||||
<div class="desc">Renders [page:ArrowHelper arrows] to visualize an object's [page:Face3 face] normals. Requires that the object's geometry be an instance of [page:Geometry] (does not work with [page:BufferGeometry]), and that face normals have been specified on all [page:Face3 faces] or calculated with [page:Geometry.computeFaceNormals computeFaceNormals].</div>
|
||||
|
||||
<h2>Example</h2>
|
||||
|
||||
<code>
|
||||
geometry = new THREE.BoxGeometry( 10, 10, 10, 2, 2, 2 );
|
||||
material = new THREE.MeshBasicMaterial( { color: 0xff0000 } );
|
||||
object = new THREE.Mesh( geometry, material );
|
||||
|
||||
edges = new THREE.FaceNormalsHelper( object, 2, 0x00ff00, 1 );
|
||||
|
||||
scene.add( object );
|
||||
scene.add( edges );
|
||||
</code>
|
||||
[example:webgl_helpers Example using various helpers]
|
||||
|
||||
<h2>Constructor</h2>
|
||||
|
||||
|
||||
<h3>[name]( [page:Object3D object], [page:Number size], [page:Color color], [page:Number linewidth] )</h3>
|
||||
<div>object -- object for which to render face normals
|
||||
size -- size (length) of the arrows
|
||||
color -- color of the arrows
|
||||
linewidth -- width of the arrow lines
|
||||
</div>
|
||||
|
||||
|
||||
<h2>Properties</h2>
|
||||
|
||||
<h3>[property:Object3D object]</h3>
|
||||
<div>
|
||||
The attached object
|
||||
</div>
|
||||
|
||||
|
||||
<h2>Methods</h2>
|
||||
|
||||
|
||||
<h3>[method:null update]()</h3>
|
||||
<div>Updates the face normal preview based on movement of the object.</div>
|
||||
|
||||
|
||||
<h2>Source</h2>
|
||||
|
||||
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
|
||||
</body>
|
||||
</html>
|
55
three.js-master/docs/api/extras/helpers/GridHelper.html
Executable file
55
three.js-master/docs/api/extras/helpers/GridHelper.html
Executable file
@ -0,0 +1,55 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<script src="../../../list.js"></script>
|
||||
<script src="../../../page.js"></script>
|
||||
<link type="text/css" rel="stylesheet" href="../../../page.css" />
|
||||
</head>
|
||||
<body>
|
||||
[page:Line] →
|
||||
|
||||
<h1>[name]</h1>
|
||||
|
||||
<div class="desc">The GridHelper is an object to define grids. Grids are two-dimensional arrays of lines.</div>
|
||||
|
||||
|
||||
<h2>Example</h2>
|
||||
|
||||
<code>var size = 10;
|
||||
var step = 1;
|
||||
|
||||
var gridHelper = new THREE.GridHelper( size, step );
|
||||
scene.add( gridHelper );
|
||||
</code>
|
||||
[example:webgl_helpers Example using various helpers]
|
||||
|
||||
|
||||
<h2>Constructor</h2>
|
||||
|
||||
<h3>[name]([page:number size], [page:Number step])</h3>
|
||||
<div>
|
||||
size -- The size of the grid <br />
|
||||
step -- The size of the step between 2 lines
|
||||
</div>
|
||||
<div>
|
||||
Creates a new [name] of size 'size' and with steps of size 'step'.
|
||||
</div>
|
||||
|
||||
<h2>Methods</h2>
|
||||
|
||||
<h3>[method:null setColors]([page:number colorCenterLine], [page:Number colorGrid])</h3>
|
||||
<div>
|
||||
colorCenterLine -- The color of the centerline. This can be a [page:Color], a hexadecimal value and an CSS-Color name. <br />
|
||||
colorGrid -- The color of the lines of the grid. This can be a [page:Color], a hexadecimal value and an CSS-Color name.
|
||||
</div>
|
||||
<div>
|
||||
Updates the color of the grid lines.
|
||||
</div>
|
||||
|
||||
|
||||
<h2>Source</h2>
|
||||
|
||||
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
|
||||
</body>
|
||||
</html>
|
54
three.js-master/docs/api/extras/helpers/HemisphereLightHelper.html
Executable file
54
three.js-master/docs/api/extras/helpers/HemisphereLightHelper.html
Executable file
@ -0,0 +1,54 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<script src="../../../list.js"></script>
|
||||
<script src="../../../page.js"></script>
|
||||
<link type="text/css" rel="stylesheet" href="../../../page.css" />
|
||||
</head>
|
||||
<body>
|
||||
[page:Object3D] →
|
||||
|
||||
<h1>[name]</h1>
|
||||
|
||||
<div class="desc">Creates a visual aid for a [page:HemisphereLight HemisphereLight].</div>
|
||||
|
||||
|
||||
<h2>Constructor</h2>
|
||||
|
||||
<h3>[name]([page:HemisphereLight light], [page:Number sphereSize])</h3>
|
||||
<div>
|
||||
light -- The HemisphereLight. <br />
|
||||
sphereSize -- The size of the sphere that shows the location.
|
||||
</div>
|
||||
<div>
|
||||
Creates an helper for the hemispherelight.
|
||||
</div>
|
||||
|
||||
|
||||
<h2>Properties</h2>
|
||||
|
||||
<h3>[property:Mesh lightSphere]</h3>
|
||||
<div>
|
||||
The sphere mesh that shows the location of the hemispherelight.
|
||||
</div>
|
||||
|
||||
<h3>[property:HemisphereLight light]</h3>
|
||||
<div>
|
||||
Contains the HemisphereLight.
|
||||
</div>
|
||||
|
||||
|
||||
<h2>Methods</h2>
|
||||
|
||||
<h3>[method:null update]()</h3>
|
||||
<div>
|
||||
Updates the helper to match the position and direction of the [page:.light].
|
||||
</div>
|
||||
|
||||
|
||||
<h2>Source</h2>
|
||||
|
||||
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
|
||||
</body>
|
||||
</html>
|
66
three.js-master/docs/api/extras/helpers/PointLightHelper.html
Executable file
66
three.js-master/docs/api/extras/helpers/PointLightHelper.html
Executable file
@ -0,0 +1,66 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<script src="../../../list.js"></script>
|
||||
<script src="../../../page.js"></script>
|
||||
<link type="text/css" rel="stylesheet" href="../../../page.css" />
|
||||
</head>
|
||||
<body>
|
||||
[page:Mesh] →
|
||||
|
||||
<h1>[name]</h1>
|
||||
|
||||
<div class="desc">This display a helper for a pointLight </div>
|
||||
|
||||
|
||||
<h2>Example</h2>
|
||||
|
||||
<code>var pointLight = new THREE.PointLight( 0xff0000, 1, 100 );
|
||||
pointLight.position.set( 10, 10, 10 );
|
||||
scene.add( pointLight );
|
||||
|
||||
var sphereSize = 1;
|
||||
var pointLightHelper = new THREE.PointLightHelper( pointLight, sphereSize );
|
||||
scene.add( pointLightHelper );
|
||||
</code>
|
||||
[example:webgl_helpers Example using various helpers]
|
||||
|
||||
|
||||
<h2>Constructor</h2>
|
||||
|
||||
<h3>[name]([page:todo light], [page:todo sphereSize])</h3>
|
||||
<div>
|
||||
light -- todo <br />
|
||||
sphereSize -- todo
|
||||
</div>
|
||||
<div>
|
||||
todo
|
||||
</div>
|
||||
|
||||
|
||||
<h2>Properties</h2>
|
||||
|
||||
<h3>[property:Mesh lightSphere]</h3>
|
||||
<div>
|
||||
todo
|
||||
</div>
|
||||
|
||||
<h3>[property:PointLight light]</h3>
|
||||
<div>
|
||||
todo
|
||||
</div>
|
||||
|
||||
|
||||
<h2>Methods</h2>
|
||||
|
||||
<h3>[method:todo update]()</h3>
|
||||
<div>
|
||||
todo
|
||||
</div>
|
||||
|
||||
<h2>Source</h2>
|
||||
|
||||
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
|
||||
</body>
|
||||
</html>
|
60
three.js-master/docs/api/extras/helpers/SpotLightHelper.html
Executable file
60
three.js-master/docs/api/extras/helpers/SpotLightHelper.html
Executable file
@ -0,0 +1,60 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<script src="../../../list.js"></script>
|
||||
<script src="../../../page.js"></script>
|
||||
<link type="text/css" rel="stylesheet" href="../../../page.css" />
|
||||
</head>
|
||||
<body>
|
||||
[page:Object3D] →
|
||||
|
||||
<h1>[name]</h1>
|
||||
|
||||
<div class="desc">todo</div>
|
||||
|
||||
|
||||
<h2>Constructor</h2>
|
||||
|
||||
|
||||
<h3>[name]([page:todo light], [page:todo sphereSize])</h3>
|
||||
<div>
|
||||
light -- todo <br />
|
||||
sphereSize -- todo
|
||||
</div>
|
||||
<div>
|
||||
todo
|
||||
</div>
|
||||
|
||||
|
||||
<h2>Properties</h2>
|
||||
|
||||
|
||||
<h3>[property:Mesh lightSphere]</h3>
|
||||
<div>
|
||||
todo
|
||||
</div>
|
||||
|
||||
<h3>[property:SpotLight light]</h3>
|
||||
<div>
|
||||
todo
|
||||
</div>
|
||||
|
||||
<h3>[property:Mesh lightCone]</h3>
|
||||
<div>
|
||||
todo
|
||||
</div>
|
||||
|
||||
<h2>Methods</h2>
|
||||
|
||||
|
||||
<h3>[method:todo update]()</h3>
|
||||
<div>
|
||||
todo
|
||||
</div>
|
||||
|
||||
<h2>Source</h2>
|
||||
|
||||
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
|
||||
</body>
|
||||
</html>
|
60
three.js-master/docs/api/extras/helpers/VertexNormalsHelper.html
Executable file
60
three.js-master/docs/api/extras/helpers/VertexNormalsHelper.html
Executable file
@ -0,0 +1,60 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<script src="../../../list.js"></script>
|
||||
<script src="../../../page.js"></script>
|
||||
<link type="text/css" rel="stylesheet" href="../../../page.css" />
|
||||
</head>
|
||||
<body>
|
||||
[page:Line] →
|
||||
|
||||
<h1>[name]</h1>
|
||||
|
||||
<div class="desc">Renders [page:ArrowHelper arrows] to visualize an object's vertex normal vectors. Requires that normals have been specified in a [page:BufferAttribute custom attribute] or have been calculated using [page:Geometry.computeVertexNormals computeVertexNormals]. </div>
|
||||
|
||||
<h2>Example</h2>
|
||||
|
||||
<code>
|
||||
geometry = new THREE.BoxGeometry( 10, 10, 10, 2, 2, 2 );
|
||||
material = new THREE.MeshBasicMaterial( { color: 0xff0000 } );
|
||||
object = new THREE.Mesh( geometry, material );
|
||||
|
||||
edges = new THREE.VertexNormalsHelper( object, 2, 0x00ff00, 1 );
|
||||
|
||||
scene.add( object );
|
||||
scene.add( edges );
|
||||
</code>
|
||||
[example:webgl_helpers Example using various helpers]
|
||||
|
||||
<h2>Constructor</h2>
|
||||
|
||||
|
||||
<h3>[name]( [page:Object3D object], [page:Number size], [page:Color color], [page:Number linewidth] )</h3>
|
||||
<div>object -- object for which to render vertex normals
|
||||
size -- size (length) of the arrows
|
||||
color -- color of the arrows
|
||||
linewidth -- width of the arrow lines
|
||||
</div>
|
||||
|
||||
|
||||
<h2>Properties</h2>
|
||||
|
||||
<h3>[property:Object3D object]</h3>
|
||||
<div>
|
||||
The attached object
|
||||
</div>
|
||||
|
||||
|
||||
<h2>Methods</h2>
|
||||
|
||||
|
||||
<h3>[method:null update]()</h3>
|
||||
<div>Updates the vertex normal preview based on movement of the object.</div>
|
||||
|
||||
|
||||
<h2>Source</h2>
|
||||
|
||||
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
|
||||
</body>
|
||||
</html>
|
58
three.js-master/docs/api/extras/helpers/VertexTangentsHelper.html
Executable file
58
three.js-master/docs/api/extras/helpers/VertexTangentsHelper.html
Executable file
@ -0,0 +1,58 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<script src="../../../list.js"></script>
|
||||
<script src="../../../page.js"></script>
|
||||
<link type="text/css" rel="stylesheet" href="../../../page.css" />
|
||||
</head>
|
||||
<body>
|
||||
[page:Line] →
|
||||
|
||||
<h1>[name]</h1>
|
||||
|
||||
<div class="desc">Renders [page:ArrowHelper arrows] to visualize an object's vertex tangent vectors. Requires that tangents have been specified in a [page:BufferAttribute custom attribute] or have been computed using [page:Geometry.computeTangents computeTangents]. </div>
|
||||
|
||||
<h2>Example</h2>
|
||||
|
||||
<code>
|
||||
geometry = new THREE.BoxGeometry( 10, 10, 10, 2, 2, 2 );
|
||||
material = new THREE.MeshBasicMaterial( { color: 0xff0000 } );
|
||||
object = new THREE.Mesh( geometry, material );
|
||||
|
||||
edges = new THREE.VertexTangentsHelper( object, 2, 0x00ff00, 1 );
|
||||
|
||||
scene.add( object );
|
||||
scene.add( edges );
|
||||
</code>
|
||||
|
||||
<h2>Constructor</h2>
|
||||
|
||||
|
||||
<h3>[name]( [page:Object3D object], [page:Number size], [page:Color color], [page:Number linewidth] )</h3>
|
||||
<div>object -- object for which to render vertex tangents
|
||||
size -- size (length) of the arrows
|
||||
color -- color of the arrows
|
||||
linewidth -- width of the arrow lines
|
||||
</div>
|
||||
|
||||
|
||||
<h2>Properties</h2>
|
||||
|
||||
<h3>[property:Object3D object]</h3>
|
||||
<div>
|
||||
The attached object
|
||||
</div>
|
||||
|
||||
|
||||
<h2>Methods</h2>
|
||||
|
||||
|
||||
<h3>[method:null update]()</h3>
|
||||
<div>Updates the vertex tangent preview arrows based on the new position and tangents of the object.</div>
|
||||
|
||||
<h2>Source</h2>
|
||||
|
||||
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
|
||||
</body>
|
||||
</html>
|
57
three.js-master/docs/api/extras/helpers/WireframeHelper.html
Executable file
57
three.js-master/docs/api/extras/helpers/WireframeHelper.html
Executable file
@ -0,0 +1,57 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<script src="../../../list.js"></script>
|
||||
<script src="../../../page.js"></script>
|
||||
<link type="text/css" rel="stylesheet" href="../../../page.css" />
|
||||
</head>
|
||||
<body>
|
||||
[page:Line] →
|
||||
|
||||
<h1>[name]</h1>
|
||||
|
||||
<div class="desc">Creates a wireframe object that shows the edges of another object's geometry. To draw a wireframe image showing only "hard" edges (edges between non-coplanar faces), see [page:EdgesHelper].</div>
|
||||
|
||||
<h2>Example</h2>
|
||||
|
||||
<code>
|
||||
geometry = new THREE.BoxGeometry( 10, 10, 10, 2, 2, 2 );
|
||||
material = new THREE.MeshBasicMaterial( { color: 0xff0000 } );
|
||||
object = new THREE.Mesh( geometry, material );
|
||||
|
||||
wireframe = new THREE.WireframeHelper( object, 0x00ff00 );
|
||||
|
||||
scene.add( object );
|
||||
scene.add( wireframe );
|
||||
|
||||
</code>
|
||||
[example:webgl_helpers Example using various helpers], [example:webgl_materials_wireframe Alternative approach using a shader.]
|
||||
|
||||
<h2>Constructor</h2>
|
||||
<h3>[name]( [page:Object3D object], [page:Color color] )</h3>
|
||||
<div>
|
||||
object -- Object of which to draw edges <br />
|
||||
color -- Color of the edges.
|
||||
</div>
|
||||
<div>
|
||||
Creates a [page:Line], showing only the edges between vertices of an object.
|
||||
</div>
|
||||
|
||||
|
||||
<h2>Properties</h2>
|
||||
|
||||
<div>none</div>
|
||||
|
||||
|
||||
<h2>Methods</h2>
|
||||
|
||||
<div>none</div>
|
||||
|
||||
|
||||
<h2>Source</h2>
|
||||
<h2>Source</h2>
|
||||
|
||||
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
|
||||
</body>
|
||||
</html>
|
41
three.js-master/docs/api/extras/objects/ImmediateRenderObject.html
Executable file
41
three.js-master/docs/api/extras/objects/ImmediateRenderObject.html
Executable file
@ -0,0 +1,41 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<script src="../../../list.js"></script>
|
||||
<script src="../../../page.js"></script>
|
||||
<link type="text/css" rel="stylesheet" href="../../../page.css" />
|
||||
</head>
|
||||
<body>
|
||||
[page:Object3D] →
|
||||
|
||||
<h1>[name]</h1>
|
||||
|
||||
<div class="desc">base class for immediate rendering objects.</div>
|
||||
|
||||
|
||||
<h2>Constructor</h2>
|
||||
|
||||
|
||||
<h3>[name]()</h3>
|
||||
<div>
|
||||
This creates a new [name].
|
||||
</div>
|
||||
|
||||
|
||||
<h2>Methods</h2>
|
||||
|
||||
|
||||
<h3>[method:null render]([page:Function renderCallback])</h3>
|
||||
<div>
|
||||
renderCallback -- A function to render the generated object.
|
||||
</div>
|
||||
<div>
|
||||
This function needs to be overridden to start the creation of the object and should call renderCallback when finished.
|
||||
</div>
|
||||
|
||||
<h2>Source</h2>
|
||||
|
||||
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
|
||||
</body>
|
||||
</html>
|
162
three.js-master/docs/api/extras/objects/MorphBlendMesh.html
Executable file
162
three.js-master/docs/api/extras/objects/MorphBlendMesh.html
Executable file
@ -0,0 +1,162 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<script src="../../../list.js"></script>
|
||||
<script src="../../../page.js"></script>
|
||||
<link type="text/css" rel="stylesheet" href="../../../page.css" />
|
||||
</head>
|
||||
<body>
|
||||
[page:Mesh] →
|
||||
|
||||
<h1>[name]</h1>
|
||||
|
||||
<div class="desc">todo</div>
|
||||
|
||||
|
||||
<h2>Constructor</h2>
|
||||
|
||||
|
||||
<h3>[name]([page:todo geometry], [page:todo material])</h3>
|
||||
<div>
|
||||
geometry -- todo <br />
|
||||
material -- todo
|
||||
</div>
|
||||
<div>
|
||||
todo
|
||||
</div>
|
||||
|
||||
|
||||
<h2>Properties</h2>
|
||||
|
||||
|
||||
<h3>[property:object animationsMap]</h3>
|
||||
<div>
|
||||
todo
|
||||
</div>
|
||||
|
||||
<h3>[property:array animationsList]</h3>
|
||||
<div>
|
||||
todo
|
||||
</div>
|
||||
|
||||
<h2>Methods</h2>
|
||||
|
||||
|
||||
|
||||
<h3>[method:todo setAnimationWeight]([page:todo name], [page:todo weight])</h3>
|
||||
<div>
|
||||
name -- todo <br />
|
||||
weight -- todo
|
||||
</div>
|
||||
<div>
|
||||
todo
|
||||
</div>
|
||||
|
||||
<h3>[method:todo setAnimationFPS]([page:todo name], [page:todo fps])</h3>
|
||||
<div>
|
||||
name -- todo <br />
|
||||
fps -- todo
|
||||
</div>
|
||||
<div>
|
||||
todo
|
||||
</div>
|
||||
|
||||
<h3>[method:todo createAnimation]([page:todo name], [page:todo start], [page:todo end], [page:todo fps])</h3>
|
||||
<div>
|
||||
name -- todo <br />
|
||||
start -- todo <br />
|
||||
end -- todo <br />
|
||||
fps -- todo
|
||||
</div>
|
||||
<div>
|
||||
todo
|
||||
</div>
|
||||
|
||||
<h3>[method:todo playAnimation]([page:todo name])</h3>
|
||||
<div>
|
||||
name -- todo
|
||||
</div>
|
||||
<div>
|
||||
todo
|
||||
</div>
|
||||
|
||||
<h3>[method:todo update]([page:todo delta])</h3>
|
||||
<div>
|
||||
delta -- todo
|
||||
</div>
|
||||
<div>
|
||||
todo
|
||||
</div>
|
||||
|
||||
<h3>[method:todo autoCreateAnimations]([page:todo fps])</h3>
|
||||
<div>
|
||||
fps -- todo
|
||||
</div>
|
||||
<div>
|
||||
todo
|
||||
</div>
|
||||
|
||||
<h3>[method:todo setAnimationDuration]([page:todo name], [page:todo duration])</h3>
|
||||
<div>
|
||||
name -- todo <br />
|
||||
duration -- todo
|
||||
</div>
|
||||
<div>
|
||||
todo
|
||||
</div>
|
||||
|
||||
<h3>[method:todo setAnimationDirectionForward]([page:todo name])</h3>
|
||||
<div>
|
||||
name -- todo
|
||||
</div>
|
||||
<div>
|
||||
todo
|
||||
</div>
|
||||
|
||||
<h3>[method:todo getAnimationDuration]([page:todo name])</h3>
|
||||
<div>
|
||||
name -- todo
|
||||
</div>
|
||||
<div>
|
||||
todo
|
||||
</div>
|
||||
|
||||
<h3>[method:todo getAnimationTime]([page:todo name])</h3>
|
||||
<div>
|
||||
name -- todo
|
||||
</div>
|
||||
<div>
|
||||
todo
|
||||
</div>
|
||||
|
||||
<h3>[method:todo setAnimationDirectionBackward]([page:todo name])</h3>
|
||||
<div>
|
||||
name -- todo
|
||||
</div>
|
||||
<div>
|
||||
todo
|
||||
</div>
|
||||
|
||||
<h3>[method:todo setAnimationTime]([page:todo name], [page:todo time])</h3>
|
||||
<div>
|
||||
name -- todo <br />
|
||||
time -- todo
|
||||
</div>
|
||||
<div>
|
||||
todo
|
||||
</div>
|
||||
|
||||
<h3>[method:todo stopAnimation]([page:todo name])</h3>
|
||||
<div>
|
||||
name -- todo
|
||||
</div>
|
||||
<div>
|
||||
todo
|
||||
</div>
|
||||
|
||||
<h2>Source</h2>
|
||||
|
||||
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
|
||||
</body>
|
||||
</html>
|
40
three.js-master/docs/api/lights/AmbientLight.html
Executable file
40
three.js-master/docs/api/lights/AmbientLight.html
Executable file
@ -0,0 +1,40 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<script src="../../list.js"></script>
|
||||
<script src="../../page.js"></script>
|
||||
<link type="text/css" rel="stylesheet" href="../../page.css" />
|
||||
</head>
|
||||
<body>
|
||||
[page:Object3D] → [page:Light] →
|
||||
|
||||
<h1>[name]</h1>
|
||||
|
||||
<div class="desc">
|
||||
This light's color gets applied to all the objects in the scene globally.
|
||||
</div>
|
||||
|
||||
|
||||
<h2>Example</h2>
|
||||
|
||||
<code>var light = new THREE.AmbientLight( 0x404040 ); // soft white light
|
||||
scene.add( light );</code>
|
||||
|
||||
<h2>Constructor</h2>
|
||||
|
||||
|
||||
<h3>[name]( [page:Integer hex] )</h3>
|
||||
<div>
|
||||
[page:Integer hex] — Numeric value of the RGB component of the color.
|
||||
</div>
|
||||
<div>
|
||||
This creates an Ambientlight with a color.
|
||||
</div>
|
||||
|
||||
|
||||
<h2>Source</h2>
|
||||
|
||||
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
|
||||
</body>
|
||||
</html>
|
89
three.js-master/docs/api/lights/AreaLight.html
Executable file
89
three.js-master/docs/api/lights/AreaLight.html
Executable file
@ -0,0 +1,89 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<script src="../../list.js"></script>
|
||||
<script src="../../page.js"></script>
|
||||
<link type="text/css" rel="stylesheet" href="../../page.css" />
|
||||
</head>
|
||||
<body>
|
||||
[page:Object3D] → [page:Light] →
|
||||
|
||||
<h1>[name]</h1>
|
||||
|
||||
<div class="desc">This illuminates the scene from a complete surface. This light only works in the [page:WebGLDeferredRenderer deferredrenderer]. </div>
|
||||
|
||||
|
||||
<h2>Example</h2>
|
||||
<code>areaLight1 = new THREE.AreaLight( 0xffffff, 1 );
|
||||
areaLight1.position.set( 0.0001, 10.0001, -18.5001 );
|
||||
areaLight1.rotation.set( -0.74719, 0.0001, 0.0001 );
|
||||
areaLight1.width = 10;
|
||||
areaLight1.height = 1;
|
||||
|
||||
scene.add( areaLight1 );</code>
|
||||
|
||||
<h2>Constructor</h2>
|
||||
|
||||
|
||||
<h3>[name]( [page:Integer hex], [page:Float intensity])</h3>
|
||||
<div>
|
||||
[page:Integer hex] — Numeric value of the RGB component of the color.<br />
|
||||
[page:Float intensity] — Numeric value of the light's strength/intensity.
|
||||
</div>
|
||||
<div>
|
||||
This creates a arealight with color.
|
||||
</div>
|
||||
|
||||
|
||||
<h2>Properties</h2>
|
||||
|
||||
|
||||
|
||||
<h3>[property:Vector3 right]</h3>
|
||||
<div>
|
||||
Sets or gets an unit vector that indicates the right side of the light. This is calculated in local space.
|
||||
</div>
|
||||
|
||||
<h3>[property:Vector3 normal]</h3>
|
||||
<div>
|
||||
Sets or gets an unit vectorSets or gets an unit vector that indicates the right side of the light. This is calculated in local space.
|
||||
</div>
|
||||
|
||||
<h3>[property:number height]</h3>
|
||||
<div>
|
||||
Sets or gets the height of the illuminating plane.
|
||||
</div>
|
||||
|
||||
<h3>[property:number width]</h3>
|
||||
<div>
|
||||
Sets or gets the width of the illuminating plane.
|
||||
</div>
|
||||
|
||||
<h3>[property:Float intensity]</h3>
|
||||
<div>
|
||||
Light's intensity.<br />
|
||||
Default — *1.0*.
|
||||
</div>
|
||||
|
||||
<h3>[property:number constantAttenuation]</h3>
|
||||
<div>
|
||||
Sets or gets the attention of the light in constant space. This is independant of the distance of the light.
|
||||
</div>
|
||||
|
||||
<h3>[property:number linearAttenuation]</h3>
|
||||
<div>
|
||||
Sets or gets the attention of the light in linear space. This increases the attenuation linearly with the distance from the light.
|
||||
</div>
|
||||
|
||||
<h3>[property:number quadraticAttenuation]</h3>
|
||||
<div>
|
||||
Sets or gets the attention of the light in linear space. This increases the attenuation quadratic with the distance from the light.
|
||||
</div>
|
||||
|
||||
|
||||
<h2>Source</h2>
|
||||
|
||||
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
|
||||
</body>
|
||||
</html>
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user