Class sandy.core.Sprite3D

Description

Field Index

Inherited from Object3D

Inherited from Node

Method Index

new Sprite3D()
getOffset(), render(), setOffset(), setSkin()

Inherited from Sprite2D

Inherited from Object3D

Inherited from Leaf

Inherited from Node

Constructor Detail

Sprite3D

public function Sprite3D(pScale:Number, pOffset:Number)

A Sprite3D is in fact a special Sprite2D. A Sprite3D is batween a real Object3D and a Sprite2D. It has a skin which is a movie clip containing 360 frames (at least!). Depending on the camera position, the _currentframe of the Clip3D will change, to give a 3D effect.

Parameters

pScaleNumber A number used to change the scale of the displayed object. In case that the object projected dimension isn't adapted to your needs. Default value is 1.0 which means unchanged. A value of 2.0 will make the object twice bigger and so on.
pOffsetNumber A number between [0-360] to give an offset in the 3D representation.

Method Detail

setSkin

public function setSkin(s:MovieSkin):Boolean

Set a Skin to the Object3D.

This method will set the the new Skin to all his faces.

Parameters

sThe TexstureSkin to apply to the object

Return

Boolean True is the skin is applied, false otherwise.

Overrides

setSkin() in sandy.core.Sprite2D

render

public function render(Void):Void

Render the Sprite3D.

Check Faces display visibility and store visible Faces into ZBuffer.

Specified By

render() in sandy.core.group.INode

Overrides

render() in sandy.core.Sprite2D

getOffset

public function getOffset(Void):Number

getOffset Ollows you to get the offset of the Clip3D and later change it with setOffset if you need.

Parameters

Void

Return

setOffset

public function setOffset(n:Number):Void

Allows you to change the oject offset.

Parameters

nNumber The offset. This value must be between 0 and 360.