提交 d8e0e3db 编写于 作者: A aardgoose 提交者: Mr.doob

add documentation for the Layers object. (#9892)

上级 b6bfc4e4
......@@ -33,6 +33,10 @@
<h3>[property:Matrix4 projectionMatrix]</h3>
<div>This is the matrix which contains the projection.</div>
<h3>[property:Layers layers]</h3>
<div>
The layer membership of the camera. Only objects that have at least one layer in common with the camera will be visible.
</div>
<h2>Methods</h2>
......
<!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>
<h1>[name]</h1>
<div class="desc">
An object providing a bit mask and accessor method used to control an [page:Object3D]'s visibility.
A [page:Layers] object assigns an [page:Object3D] to 0 or more of 32 layers numbered 0 to 31.
</div>
<h2>Constructor</h2>
<h3>[name]()</h3>
<div>
Create a new Layers object, with an initial mask set to layer 1.
</div>
<h2>Properties</h2>
<h3>[property:Integer mask]</h3>
<div>
Internal layer mask.
</div>
<h2>Methods</h2>
<h3>[method:null set]( [page:Integer layer] )</h3>
<div>
layer - an integer from 0 to 31.
</div>
<div>
Set the layer mask to the value *layer*.
</div>
<h3>[method:null enable]( [page:Integer layer] )</h3>
<div>
layer - an integer from 0 to 31.
</div>
<div>
Add *layer* to the mask.
</div>
<h3>[method:null disable]( [page:Integer layer] )</h3>
<div>
layer - an integer from 0 to 31.
</div>
<div>
Remove *layer* from the mask.
</div>
<h3>[method:null toggle]( [page:Integer layer] )</h3>
<div>
layer - an integer from 0 to 31.
</div>
<div>
Toggle the *layer* value in the mask.
</div>
<h3>[method:Boolean test]( [page:Integer layers] )</h3>
<div>
layers - a 32bit bit mask of layer numbers.
</div>
<div>
Returns true if *layers* and .mask have any bits set in common.
</div>
<h2>Source</h2>
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
</body>
</html>
......@@ -153,6 +153,11 @@
This value allows the default rendering order of scene graph objects to be overridden although opaque and transparent objects remain sorted independently. Sorting is from lowest to highest renderOrder. Default value is 0.
</div>
<h3>[property:Layers layers]</h3>
<div>
The layer membership of the object. The object is only visible if it has at least one layer in common with the [page:Camera] in use.
</div>
<h2>Methods</h2>
<h3>[page:EventDispatcher EventDispatcher] methods are available on this class.</h3>
......
......@@ -31,6 +31,7 @@ var list = {
[ "EventDispatcher", "api/core/EventDispatcher" ],
[ "Face3", "api/core/Face3" ],
[ "Geometry", "api/core/Geometry" ],
[ "Layers", "api/core/Layers" ],
[ "Object3D", "api/core/Object3D" ],
[ "Raycaster", "api/core/Raycaster" ],
[ "Uniform", "api/core/Uniform"]
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册