-
Notifications
You must be signed in to change notification settings - Fork 2
Sprite
Joel Martinez edited this page Jul 1, 2013
·
7 revisions
var ball = engineInstance.SpriteManager.add("http://www.flatredball.com/frb/docs/images/9/99/Frblogo128.png");
x
y
xVelocity
yVelocity
xAcceleration
yAcceleration
zRotation
zRotationAcceleration
zRotationVelocity
-
alpha
- range 0 (fully transparent) to 1 (fully opaque)
All sprites are rendered relative to the Camera position.
You can render a subset of a sprite by assigning texture coordinates
// left, right, top, buttom
sprite.addTextureCoordinate(0, .5, 0, 1);
These coordinates are normalized from 0, 1
Tiling sprites to make a "floor" http://joelmartinez.github.io/flatredball-js/#tiles