forked from mrdoob/three.js
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSprite.html
More file actions
58 lines (42 loc) · 1.56 KB
/
Sprite.html
File metadata and controls
58 lines (42 loc) · 1.56 KB
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
<!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>
[page:Object3D] →
<h1>[name]</h1>
<div class="desc">A sprite is a plane in an 3d scene which faces always towards the camera.<br /><br />Sprites do not cast shadows, setting <code>castShadow = true</code> will have no effect.</div>
<h2>Example</h2>
<code>
var map = new THREE.TextureLoader().load( "sprite.png" );
var material = new THREE.SpriteMaterial( { map: map, color: 0xffffff, fog: true } );
var sprite = new THREE.Sprite( material );
scene.add( sprite );
</code>
<h2>Constructor</h2>
<h3>[name]( [page:Material material] )</h3>
<div>
material — An instance of [page:Material] (optional).
</div>
<div>
This creates a new sprite with an specific material.
</div>
<h2>Properties</h2>
<h3>[property:SpriteMaterial material]</h3>
<div>
An instance of [page:Material], defining the object's appearance. Default is a [page:SpriteMaterial] which is a white plane.
</div>
<h2>Methods</h2>
<h3>[method:Sprite clone]()</h3>
<div>
Returns a clone of this Sprite object and its descendants.
</div>
<h2>Source</h2>
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
</body>
</html>