未验证 提交 e051da87 编写于 作者: M Mr.doob 提交者: GitHub

Merge pull request #16473 from jsantell/tojson-docs

Update type annotations and links to three.js JSON object format for several toJSON methods
......@@ -130,12 +130,12 @@ scene.add( camera );</code>
Updates the camera projection matrix. Must be called after any change of parameters.
</p>
<h3>[method:JSON toJSON]()</h3>
<h3>[method:Object toJSON](param:object meta])</h3>
<p>
Return the camera's data in JSON format.
meta -- object containing metadata such as textures or images in objects' descendants.<br />
Convert the camera to three.js [link:https://github.com/mrdoob/three.js/wiki/JSON-Object-Scene-format-4 JSON Object/Scene format].
</p>
<h2>Source</h2>
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
......
......@@ -190,9 +190,10 @@ camera.setViewOffset( fullWidth, fullHeight, w * 2, h * 1, w, h );
Updates the camera projection matrix. Must be called after any change of parameters.
</p>
<h3>[method:JSON toJSON]()</h3>
<h3>[method:Object toJSON](param:object meta])</h3>
<p>
Return camera data in JSON format.
meta -- object containing metadata such as textures or images in objects' descendants.<br />
Convert the camera to three.js [link:https://github.com/mrdoob/three.js/wiki/JSON-Object-Scene-format-4 JSON Object/Scene format].
</p>
<h2>Source</h2>
......
......@@ -327,7 +327,7 @@
<p>Sets the attributes for this BufferGeometry from an array of points.</p>
<h3>[method:Object toJSON]()</h3>
<p>Returns a JSON object representation of the BufferGeometry.</p>
<p>Convert the buffer geometry to three.js [link:https://github.com/mrdoob/three.js/wiki/JSON-Object-Scene-format-4 JSON Object/Scene format].</p>
<h3>[method:BufferGeometry toNonIndexed]()</h3>
<p>Return a non-index version of an indexed BufferGeometry.</p>
......
......@@ -327,8 +327,10 @@
Use [page:Object3D.scale] for typical real-time mesh scaling.
</p>
<h3>[method:JSON toJSON] ( )</h3>
<p>Convert the geometry to JSON format.</p>
<h3>[method:Object toJSON] ( )</h3>
<p>Convert the geometry to JSON format.<br />
Convert the geometry to three.js [link:https://github.com/mrdoob/three.js/wiki/JSON-Object-Scene-format-4 JSON Object/Scene format].
</p>
<h3>[method:Geometry translate] ( [param:Float x], [param:Float y], [param:Float z] )</h3>
<p>
......
......@@ -389,9 +389,10 @@
Copy the given quaternion into [page:.quaternion].
</p>
<h3>[method:null toJSON]( [param:Quaternion q] )</h3>
<h3>[method:Object toJSON]( [param:object meta] )</h3>
<p>
Convert the object to JSON format.
meta -- object containing metadata such as materials, textures or images for the object.<br />
Convert the object to three.js [link:https://github.com/mrdoob/three.js/wiki/JSON-Object-Scene-format-4 JSON Object/Scene format].
</p>
<h3>[method:this translateOnAxis]( [param:Vector3 axis], [param:Float distance] )</h3>
......
......@@ -67,9 +67,10 @@
[page:Light source] light into this one.
</p>
<h3>[method:JSON toJSON]( [param:String meta] )</h3>
<h3>[method:Object toJSON]( [param:object meta] )</h3>
<p>
Return Light data in JSON format.
meta -- object containing metadata such as materials, textures for objects.<br />
Convert the light to three.js [link:https://github.com/mrdoob/three.js/wiki/JSON-Object-Scene-format-4 JSON Object/Scene format].
</p>
<h2>Source</h2>
......
......@@ -307,10 +307,10 @@
Sets the properties based on the *values*.
</p>
<h3>[method:null toJSON]( [param:object meta] )</h3>
<h3>[method:Object toJSON]( [param:object meta] )</h3>
<p>
meta -- object containing metadata such as textures or images for the material.<br />
Convert the material to three.js JSON format.
Convert the material to three.js [link:https://github.com/mrdoob/three.js/wiki/JSON-Object-Scene-format-4 JSON Object/Scene format].
</p>
<h2>Source</h2>
......
......@@ -46,9 +46,10 @@
<h2>Methods</h2>
<h3>[method:JSON toJSON]</h3>
<h3>[method:Object toJSON]</h3>
<p>
Return the scene data in JSON format.
meta -- object containing metadata such as textures or images for the scene.<br />
Convert the scene to three.js [link:https://github.com/mrdoob/three.js/wiki/JSON-Object-Scene-format-4 JSON Object/Scene format].
</p>
<h3>[method:null dispose]()</h3>
......
......@@ -251,10 +251,10 @@
Make copy of the texture. Note this is not a "deep copy", the image is shared.
</p>
<h3>[method:Texture toJSON]( [param:Object meta] )</h3>
<h3>[method:Object toJSON]( [param:Object meta] )</h3>
<p>
meta -- optional object containing metadata.<br />
Convert the material to three.js JSON format.
Convert the texture to three.js [link:https://github.com/mrdoob/three.js/wiki/JSON-Object-Scene-format-4 JSON Object/Scene format].
</p>
<h3>[method:null dispose]()</h3>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册