提交 ce658801 编写于 作者: V Vincent Lark

glTFLoader docs

上级 3dd4450e
......@@ -10,8 +10,11 @@
<h1>[name]</h1>
<div class="desc">A loader for loading a <em>.pdb</em> resource.<br />
The <a href="http://en.wikipedia.org/wiki/Protein_Data_Bank_(file_format)">Protein Data Bank file format</a> is a textual file format describing the three-dimensional structures of molecules.</div>
<div class="desc">
A loader for loading a <em>.pdb</em> resource.
<br /><br />
The <a href="http://en.wikipedia.org/wiki/Protein_Data_Bank_(file_format)">Protein Data Bank file format</a> is a textual file format describing the three-dimensional structures of molecules.
</div>
<h2>Constructor</h2>
......
<!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 loader for loading a <em>.gltf</em> resource in <em>JSON</em> format.
<br /><br />
The <a href="https://www.khronos.org/gltf">glTF file format</a> is a JSON file format to enable rapid delivery and loading of 3D content.
</div>
<h2>Constructor</h2>
<h3>[name]( )</h3>
<div>
Creates a new [name].
</div>
<h2>Properties</h2>
<h2>Methods</h2>
<h3>[method:Object3D load]( [page:String url], [page:Function callback] )</h3>
<div>
[page:String url] — required<br />
[page:Function callback] — Will be called when load completes. The argument will be an [page:Object] containing the loaded .[page:Object3D scene], .[page:Array cameras] and .[page:Array animations].<br />
</div>
<div>
Begin loading from url and call the callback function with the parsed response content.
</div>
<h2>Notes</h2>
<div>
This class is often used with [page:glTFAnimator THREE.glTFAnimator] to animate parsed animations.
</div>
<h2>Example</h2>
<code>
// instantiate a loader
var loader = new THREE.glTFLoader();
// load a glTF resource
loader.load(
// resource URL
'models/gltf/duck/duck.json',
// Function when resource is loaded
function ( object ) {
scene.add( object.scene );
}
);
</code>
[example:webgl_loader_gltf]
<h2>Source</h2>
[link:https://github.com/mrdoob/three.js/blob/master/examples/js/loaders/gltf/glTFLoader.js examples/js/loaders/gltf/glTFLoader.js]
</body>
</html>
......@@ -50,6 +50,7 @@ var list = {
[ "BufferGeometryLoader", "api/loaders/BufferGeometryLoader" ],
[ "Cache", "api/loaders/Cache" ],
[ "ColladaLoader", "api/loaders/ColladaLoader" ],
[ "glTFLoader", "api/loaders/glTFLoader" ],
[ "ImageLoader", "api/loaders/ImageLoader" ],
[ "JSONLoader", "api/loaders/JSONLoader" ],
[ "Loader", "api/loaders/Loader" ],
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册