<divclass="desc">This is almost identical to an [page:Object3D Object3D]. It's purpose is to make working with groups of objects syntactically clearer.</div>
<divclass="desc">
This is almost identical to an [page:Object3D Object3D]. It's purpose is to make working
with groups of objects syntactically clearer.
</div>
<h2>Example</h2>
...
...
@@ -42,15 +45,13 @@
<h3>[name]( )</h3>
<h2>Properties</h2>
Properties are identical to an [page:Object3D]'s properties, with the exception of:
<div>See the base [page:Object3D] class for common properties.</div>
<h3>[property:String type]</h3>
<div>A string 'Group'. This should not be changed.</div>
<h2>Methods</h2>
Methods are identical to an [page:Object3D]'s methods.
<div>See the base [page:Object3D] class for common methods.</div>
material — An instance of [page:Material] (optional).
[page:Geometry geometry] — (optional) an instance of [page:Geometry] or [page:BufferGeometry].
Default is a new [page:BufferGeometry].<br/>
[page:Material material] — (optional) a [page:Material]. Default is a new [page:MeshBasicMaterial]
with a random color.
</div>
<h2>Properties</h2>
<div>See the base [page:Object3D] class for common properties.</div>
<h3>[property:Integer drawMode]</h3>
<div>
Determines how the mesh triangles are constructed from the vertices.
See the draw mode [page:DrawModes constants] for all possible values.
Default is [page:DrawModes TrianglesDrawMode].
</div>
<h3>[property:Boolean isMesh]</h3>
<div>
Used to check whether this or derived classes are meshes. Default is *true*.<br/><br/>
You should not change this, as it used internally for optimisation.
</div>
<h3>[property:Geometry geometry]</h3>
<div>
An instance of [page:Geometry] or [page:BufferGeometry] (or derived classes),
defining the object's structure.<br/><br/>
<div>An instance of [page:Geometry], defining the object's structure.</div>
Its recommended to always use a [page:BufferGeometry] if possible for best performance.
</div>
<h3>[property:Material material]</h3>
<div>An instance of [page:Material], defining the object's appearance. Default is a [page:MeshBasicMaterial] with wireframe mode enabled and randomised colour.</div>
<div>
An instance of material derived from the [page:Material] base class, defining the
object's appearance. Default is a [page:MeshBasicMaterial] with a random colour.
</div>
<h3>[property:Array morphTargetInfluences]</h3>
<div>
An array of weights typically from 0-1 that specify how much of the morph is applied.
Undefined by default, but reset to a blank array by [page:Mesh.updateMorphTargets updateMorphTargets].
</div>
<h3>[property:Array morphTargetDictionary]</h3>
<div>
A dictionary of morphTargets based on the morphTarget.name property.
Undefined by default, but rebuilt [page:Mesh.updateMorphTargets updateMorphTargets].
</div>
<h3>[property:Integer drawMode]</h3>
<div>
Determines how the mesh triangles are constructed from the vertices. See the draw mode [page:DrawModes constants] for all possible values. Default is [page:DrawModes TrianglesDrawMode].
</div>
<h2>Methods</h2>
<div>See the base [page:Object3D] class for common methods.</div>
<h3>[method:null updateMorphTargets]()</h3>
<div>
Updates the morphtargets to have no influence on the object. Resets the
<divclass="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>
<divclass="desc">
A sprite is a plane that always faces towards the camera, generally with a
partially transparent texture applied.<br/><br/>
<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>
Sprites do not cast shadows, setting <code>castShadow = true</code> will have no effect.
</div>
<h2>Example</h2>
<code>
var spriteMap = new THREE.TextureLoader().load( "sprite.png" );
var spriteMaterial = new THREE.SpriteMaterial( { map: spriteMap, color: 0xffffff } );
var sprite = new THREE.Sprite( spriteMaterial );
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.
[page:Material material] - (optional) an instance of [page:SpriteMaterial]. Default is a white [page:SpriteMaterial].<br/><br/>
Creates a new [name].
</div>
<h2>Properties</h2>
<div>See the base [page:Object3D] class for common properties.</div>
<h3>[property:Boolean isSprite]</h3>
<div>
Used to check whether this or derived classes are sprites. Default is *true*.<br/><br/>
You should not change this, as it used internally for optimisation.
</div>
<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.
An instance of [page:SpriteMaterial], defining the object's appearance.
Default is a white [page:SpriteMaterial].
</div>
<h2>Methods</h2>
<div>See the base [page:Object3D] class for common methods.</div>
<h3>[method:Sprite clone]()</h3>
<div>
Returns a clone of this Sprite object and its descendants.
Returns a clone of this Sprite object and any descendants.