123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475 |
- <!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:Material] →
- <h1>[name]</h1>
- <div class="desc">A material for a use with a [page:Sprite].</div>
- <h2>Examples</h2>
- <div>
- [example:webgl_sprites WebGL / sprites]<br />
- [example:misc_ubiquity_test misc / ubiquity / test]<br />
- [example:misc_ubiquity_test2 misc / ubiquity / test2]<br />
- [example:software_sandbox software / sandbox]<br />
- [example:svg_sandbox svg / sandbox]<br />
- [example:webgl_materials_cubemap_dynamic webgl / materials / cubemap / dynamic]
- </div>
- <code>
- var spriteMap = new THREE.TextureLoader().load( 'textures/sprite.png' );
- var spriteMaterial = new THREE.SpriteMaterial( { map: spriteMap, color: 0xffffff } );
- var sprite = new THREE.Sprite( spriteMaterial );
- sprite.scale.set(200, 200, 1)
- scene.add( sprite );
- </code>
- <h3>[name]( [page:Object parameters] )</h3>
- <div>
- [page:Object parameters] - (optional) an object with one or more properties defining the material's appearance.
- Any property of the material (including any property inherited from [page:Material]) can be passed in here.<br /><br />
- The exception is the property [page:Hexadecimal color], which can be passed in as a hexadecimal
- string and is *0xffffff* (white) by default. [page:Color.set]( color ) is called internally.
- </div>
- <h2>Properties</h2>
- <div>See the base [page:Material] class for common properties.</div>
- <h3>[property:Color color]</h3>
- <div>[page:Color] of the material, by default set to white (0xffffff). The [page:.map] is mutiplied by the color.</div>
- <h3>[property:boolean fog]</h3>
- <div>Whether or not this material affected by the scene's fog. Default is false</div>
- <h3>[property:Boolean lights]</h3>
- <div>Whether the material is affected by lights. Default is *false*.</div>
- <h3>[property:Texture map]</h3>
- <div>The texture map. Default is null.</div>
- <h3>[property:Radians rotation]</h3>
- <div>The rotation of the sprite in radians. Default is 0.</div>
- <h2>Methods</h2>
- <div>See the base [page:Material] class for common methods.</div>
- <h2>Source</h2>
- [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
- </body>
- </html>
|