Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Conflicts: build/three.js build/three.min.js src/core/Object3D.js src/renderers/WebGLRenderer.js
- Loading branch information
Showing
324 changed files
with
13,134 additions
and
5,458 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,90 +1,78 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<base href="../../" /> | ||
<script src="list.js"></script> | ||
<script src="page.js"></script> | ||
<link type="text/css" rel="stylesheet" href="page.css" /> | ||
</head> | ||
<body> | ||
[page:Loader] → | ||
<h1>[name]</h1> | ||
|
||
<div class="desc">A loader for loading objects in JSON format.</div> | ||
|
||
|
||
<h2>Constructor</h2> | ||
|
||
<h3>[name]()</h3> | ||
<div> | ||
Creates a new [name]. | ||
</div> | ||
|
||
|
||
<h2>Properties</h2> | ||
|
||
<h3>[property:boolean withCredentials]</h3> | ||
<div> | ||
If true, the ajax request will use cookies. | ||
</div> | ||
|
||
|
||
<h2>Methods</h2> | ||
|
||
<h3>[method:null load]( [page:String url], [page:Function callback], [page:String texturePath] )</h3> | ||
<div> | ||
[page:String url] — required<br /> | ||
[page:Function callback] — required. Will be called when load completes. The arguments will be the loaded [page:Object3D] and the loaded [page:Array materials].<br /> | ||
[page:String texturePath] — optional. If not specified, textures will be assumed to be in the same folder as the Javascript model file. | ||
</div> | ||
|
||
<h3>[method:null loadAjaxJSON]([page:JSONLoader context], [page:String url], [page:Function callback], [page:String texturePath], [page:Function callbackProgress])</h3> | ||
<div> | ||
[page:JSONLoader context] — The [page:JSONLoader] instance<br /> | ||
[page:String url] — required<br /> | ||
[page:Function callback] — required. This function will be called with the loaded model as an instance of [page:Geometry geometry] when the load is completed.<br /> | ||
[page:String texturePath] — Base path for textures.<br /> | ||
[page:Function callbackProgress] — Will be called while load progresses. The argument will be an [page:Object] containing two attributes: .[page:Integer total] and .[page:Integer loaded] bytes. | ||
</div> | ||
<div> | ||
Begin loading from url and call <em>callback</em> with the parsed response content. | ||
</div> | ||
|
||
<h3>[method:Object3D parse]( [page:Object json], [page:String texturePath] )</h3> | ||
<div> | ||
[page:String json] — JSON object to parse.<br /> | ||
[page:String texturePath] — Base path for textures. | ||
</div> | ||
<div> | ||
Parse a <em>JSON</em> structure and return an [page:Object] containing the parsed .[page:Geometry] and .[page:Array materials]. | ||
</div> | ||
|
||
|
||
<h2>Example</h2> | ||
|
||
<code> | ||
// instantiate a loader | ||
var loader = new THREE.JSONLoader(); | ||
|
||
// load a resource | ||
loader.load( | ||
// resource URL | ||
'models/animated/monster/monster.js', | ||
// Function when resource is loaded | ||
function ( geometry, materials ) { | ||
var material = new THREE.MeshFaceMaterial( materials ); | ||
var object = new THREE.Mesh( geometry, material ); | ||
scene.add( object ); | ||
} | ||
); | ||
</code> | ||
|
||
[example:webgl_loader_json_blender] | ||
|
||
|
||
<h2>Source</h2> | ||
|
||
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js] | ||
</body> | ||
</html> | ||
<base href="../../" /> | ||
<script src="list.js"></script> | ||
<script src="page.js"></script> | ||
<link type="text/css" rel="stylesheet" href="page.css" /> | ||
</head> | ||
<body> | ||
[page:Loader] → | ||
<h1>[name]</h1> | ||
|
||
<div class="desc">A loader for loading objects in JSON format.</div> | ||
|
||
|
||
<h2>Constructor</h2> | ||
|
||
<h3>[name]()</h3> | ||
<div> | ||
Creates a new [name]. | ||
</div> | ||
|
||
|
||
<h2>Properties</h2> | ||
|
||
<h3>[property:boolean withCredentials]</h3> | ||
<div> | ||
If true, the ajax request will use cookies. | ||
</div> | ||
|
||
|
||
<h2>Methods</h2> | ||
|
||
<h3>[method:null load]( [page:String url], [page:Function callback], [page:String texturePath] )</h3> | ||
<div> | ||
[page:String url] — required<br /> | ||
[page:Function callback] — required. Will be called when load completes. The arguments will be the loaded [page:Object3D] and the loaded [page:Array materials].<br /> | ||
[page:String texturePath] — optional. If not specified, textures will be assumed to be in the same folder as the Javascript model file. | ||
</div> | ||
|
||
<h3>[method:Object3D parse]( [page:Object json], [page:String texturePath] )</h3> | ||
<div> | ||
[page:String json] — JSON object to parse.<br /> | ||
[page:String texturePath] — Base path for textures. | ||
</div> | ||
<div> | ||
Parse a <em>JSON</em> structure and return an [page:Object] containing the parsed .[page:Geometry] and .[page:Array materials]. | ||
</div> | ||
|
||
|
||
<h2>Example</h2> | ||
|
||
<code> | ||
// instantiate a loader | ||
var loader = new THREE.JSONLoader(); | ||
|
||
// load a resource | ||
loader.load( | ||
// resource URL | ||
'models/animated/monster/monster.js', | ||
// Function when resource is loaded | ||
function ( geometry, materials ) { | ||
var material = new THREE.MeshFaceMaterial( materials ); | ||
var object = new THREE.Mesh( geometry, material ); | ||
scene.add( object ); | ||
} | ||
); | ||
</code> | ||
|
||
[example:webgl_loader_json_blender] | ||
|
||
|
||
<h2>Source</h2> | ||
|
||
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js] | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.