File: BufferGeometryUtils.html

package info (click to toggle)
three.js 111%2Bdfsg1-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 15,184 kB
  • sloc: javascript: 133,174; makefile: 24; sh: 1
file content (82 lines) | stat: -rw-r--r-- 2,991 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
<!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>

		<p class="desc">
		A class containing utility functions for [page:BufferGeometry BufferGeometry] instances.<br /><br />
		</p>


		<h2>Methods</h2>

		<h3>[method:null computeTangents]( [param:BufferGeometry geometry] )</h3>
		<p>
		geometry -- A [page:BufferGeometry BufferGeometry] instance, which must have index, position, normal, and uv attributes.<br /><br />

		Calculates and adds tangent attribute to a geometry.<br /><br />

		</p>

		<h3>[method:BufferGeometry mergeBufferGeometries]( [param:Array geometries], [param:Boolean useGroups] )</h3>
		<p>
		geometries -- Array of [page:BufferGeometry BufferGeometry] instances.<br />
		useGroups -- Whether groups should be generated for the merged geometry or not.<br /><br />

		Merges a set of geometries into a single instance. All geometries must have compatible attributes.
		If merge does not succeed, the method returns null.<br /><br />

		</p>

		<h3>[method:BufferAttribute mergeBufferAttributes]( [param:Array attributes] )</h3>
		<p>
		attributes -- Array of [page:BufferAttribute BufferAttribute] instances.<br /><br />

		Merges a set of attributes into a single instance. All attributes must have compatible properties
		and types, and [page:InterleavedBufferAttribute InterleavedBufferAttributes] are not supported. If merge does not succeed, the method
		returns null.

		</p>

		<h3>[method:InterleavedBufferAttribute interleaveAttributes]( [param:Array attributes] )</h3>
		<p>
		attributes -- Array of [page:BufferAttribute BufferAttribute] instances.<br /><br />

		Interleaves a set of attributes and returns a new array of corresponding attributes that share
		a single InterleavedBuffer instance. All attributes must have compatible types. If merge does not
		succeed, the method returns null.

		</p>

		<h3>[method:Number estimateBytesUsed]( [param:BufferGeometry geometry] )</h3>
		<p>
		geometry -- Instance of [page:BufferGeometry BufferGeometry] to estimate the memory use of.<br /><br />

		Returns the amount of bytes used by all attributes to represent the geometry.

		</p>

		<h3>[method:BufferGeometry mergeVertices]( [param:BufferGeometry geometry], [param:Number tolerance] )</h3>
		<p>
		geometry -- Instance of [page:BufferGeometry BufferGeometry] to merge the vertices of.<br />
		tolerance -- The maximum allowable difference between vertex attributes to merge. Defaults to 1e-4.<br /><br />

		Returns a new [page:BufferGeometry BufferGeometry] with vertices for which all similar vertex attributes
		(within tolerance) are merged.

		</p>

		<h2>Source</h2>

		<p>
			[link:https://github.com/mrdoob/three.js/blob/master/examples/js/utils/BufferGeometryUtils.js examples/js/utils/BufferGeometryUtils.js]
		</p>
	</body>
</html>