SceneUtils.html 2.0 KB
Newer Older
1 2 3
<!DOCTYPE html>
<html lang="en">
	<head>
M
Mr.doob 已提交
4 5 6 7 8
		<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" />
9 10 11
	</head>
	<body>
		<h1>[name]</h1>
M
Mr.doob 已提交
12

G
Greg Tatum 已提交
13
		<div class="desc">A class containing useful utility functions for scene manipulation.</div>
M
Mr.doob 已提交
14 15


16
		<h2>Methods</h2>
M
Mr.doob 已提交
17 18


19
		<h3>[method:Object3D createMultiMaterialObject]([page:Geometry geometry], [page:Array materials])</h3>
C
cjshannon 已提交
20
		<div>
G
gero3 已提交
21 22
		geometry -- The geometry for the Object. <br />
		materials -- The materials for the object.
C
cjshannon 已提交
23 24
		</div>
		<div>
M
Mugen87 已提交
25
		Creates an new Object3D an new mesh for each material defined in materials. Beware that this is not the same as MultiMaterial which defines multiple material for 1 mesh.<br />
G
gero3 已提交
26
		This is mostly useful for object that need a material and a wireframe implementation.
C
cjshannon 已提交
27 28
		</div>

G
Greg Tatum 已提交
29
		<h3>[method:null attach]([page:Object3D child], [page:Object3D scene], [page:Object3D parent])</h3>
C
cjshannon 已提交
30
		<div>
G
gero3 已提交
31 32 33
		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.
C
cjshannon 已提交
34 35
		</div>
		<div>
G
gero3 已提交
36
		Attaches the object to the parent without the moving the object in the worldspace. Beware that to do this the matrixWorld needs to be updated, this can be done by calling the updateMatrixWorld method on the parent object.
C
cjshannon 已提交
37 38
		</div>

G
Greg Tatum 已提交
39
		<h3>[method:null detach]([page:Object3D child], [page:Object3D parent], [page:Object3D scene])</h3>
C
cjshannon 已提交
40
		<div>
G
gero3 已提交
41 42 43
		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.
C
cjshannon 已提交
44 45
		</div>
		<div>
G
gero3 已提交
46
		Detaches the object from the parent and adds it back to the scene without moving in worldspace. Beware that to do this the matrixWorld needs to be updated, this can be done by calling the updateMatrixWorld method on the parent object.
C
cjshannon 已提交
47 48
		</div>

49
		<h2>Source</h2>
M
Mr.doob 已提交
50

51 52 53
		[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
	</body>
</html>