source: other-projects/playing-in-the-street/summer-2013/trunk/Playing-in-the-Street-WPF/Content/Web/mrdoob-three.js-4862f5f/docs/api/materials/Material.html@ 28897

Last change on this file since 28897 was 28897, checked in by davidb, 10 years ago

GUI front-end to server base plus web page content

File size: 4.7 KB
Line 
1<!DOCTYPE html>
2<html lang="en">
3 <head>
4 <meta charset="utf-8" />
5 <script src="../../list.js"></script>
6 <script src="../../page.js"></script>
7 <link type="text/css" rel="stylesheet" href="../../page.css" />
8 </head>
9 <body>
10 <h1>[name]</h1>
11
12 <div class="desc">Materials describe the appearance of [page:Object objects]. They are defined in a (mostly) renderer-independent way, so you don't have to rewrite materials if you decide to use a different renderer.</div>
13
14
15 <h2>Constructor</h2>
16
17
18 <h3>[name]()</h3>
19 <div>
20 This creates a generic material.
21 </div>
22
23
24 <h2>Properties</h2>
25
26 <h3>.[page:Integer id]</h3>
27 <div>
28 Unique number of this material instance.
29 </div>
30
31 <h3>.[page:String name]</h3>
32 <div>
33 Material name. Default is an empty string.
34 </div>
35
36 <h3>.[page:Float opacity]</h3>
37 <div>
38 Float in the range of 0.0 - 1.0 indicating how transparent the material is.
39 A value of 0.0 indicates fully transparent, 1.0 is fully opaque. If
40 *transparent* is not set to true for the material, the material will remain
41 fully opaque and this value will only affect its color.
42 </div>
43 <div>Default is *1.0*.</div>
44
45 <h3>.[page:Boolean transparent]</h3>
46 <div>
47 Defines whether this material is transparent. This has an effect on rendering
48 as transparent objects need special treatment and are rendered after
49 non-transparent objects. For a working example of this behaviour, check the
50 [page:WebGLRenderer WebGLRenderer] code.<br />
51 When set to true, the extent to which the material is transparent is
52 controlled by setting *opacity*.
53 </div>
54 <div>Default is *false*.</div>
55
56 <h3>.[page:Blending blending]</h3>
57 <div>
58 Which blending to use when displaying objects with this material. Default is [page:Materials NormalBlending].
59 </div>
60
61 <h3>.[page:Integer blendSrc]</h3>
62 <div>
63 Blending source. It's one of the blending mode constants defined in [page:Three Three.js]. Default is [page:CustomBlendingEquation SrcAlphaFactor]
64 </div>
65
66 <h3>.[page:Integer blendDst]</h3>
67 <div>
68 Blending destination. It's one of the blending mode constants defined in [page:Three Three.js]. Default is [page:CustomBlendingEquation OneMinusSrcAlphaFactor].
69 </div>
70
71 <h3>.[page:Integer blendEquation]</h3>
72 <div>
73 Blending equation to use when applying blending. It's one of the constants defined in [page:Three Three.js]. Default is [page:CustomBlendingEquation AddEquation.]
74 </div>
75
76 <h3>.[page:Boolean depthTest]</h3>
77 <div>
78 Whether to have depth test enabled when rendering this material. Default is *true*.
79 </div>
80
81 <h3>.[page:Boolean depthWrite]</h3>
82 <div>
83 Whether rendering this material has any effect on the depth buffer. Default is *true*.
84 </div>
85 <div>
86 When drawing 2D overlays it can be useful to disable the depth writing in order to layer several things together without creating z-index artifacts.
87 </div>
88
89 <h3>.[page:Boolean polygonOffset]</h3>
90 <div>
91 Whether to use polygon offset. Default is *false*. This corresponds to the *POLYGON_OFFSET_FILL* WebGL feature.
92 </div>
93
94 <h3>.[page:Integer polygonOffsetFactor]</h3>
95 <div>
96 Sets the polygon offset factor. Default is *0*.
97 </div>
98
99 <h3>.[page:Integer polygonOffsetUnits]</h3>
100 <div>
101 Sets the polygon offset units. Default is *0*.
102 </div>
103
104 <h3>.[page:Number alphaTest]</h3>
105 <div>
106 Sets the alpha value to be used when running an alpha test. Default is *0*.
107 </div>
108
109 <h3>.[page:Boolean overdraw]</h3>
110 <div>
111 Enables/disables overdraw. If enabled, polygons are drawn slightly bigger in order to fix antialiasing gaps when using the [page:CanvasRenderer]. Default is *false*.
112 </div>
113
114 <h3>.[page:Boolean visible]</h3>
115 <div>
116 Defines whether this material is visible. Default is *true*.
117 </div>
118
119 <h3>.[page:Enum side]</h3>
120 <div>
121 Defines which of the face sides will be rendered - front, back or both.
122 </div>
123 <div>
124 Default is [page:Materials THREE.FrontSide]. Other options are [page:Materials THREE.BackSide] and [page:Materials THREE.DoubleSide].
125 </div>
126
127 <h3>.[page:Boolean needsUpdate]</h3>
128 <div>
129 Specifies that the material needs to be updated at the WebGL level. Set it to true if you made changes that need to be reflected in WebGL.
130 </div>
131 <div>
132 This property is automatically set to *true* when instancing a new material.
133 </div>
134
135
136 <h2>Methods</h2>
137
138 <h3>[page:EventDispatcher EventDispatcher] methods are available on this class.</h3>
139
140 <h3>.clone([page:todo material]) [page:todo]</h3>
141 <div>
142 material -- todo
143 </div>
144 <div>
145 todo
146 </div>
147
148 <h3>.dispose() [page:todo]</h3>
149 <div>
150 todo
151 </div>
152
153 <h3>.setValues([page:todo values]) [page:todo]</h3>
154 <div>
155 values -- todo
156 </div>
157 <div>
158 todo
159 </div>
160
161 <h2>Source</h2>
162
163 [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
164 </body>
165</html>
Note: See TracBrowser for help on using the repository browser.