RenderSpriteState3d
From OxeyeWiki
(Difference between revisions)
(Created page with '{{VideoMethod | video.renderSpriteState3d(spriteId, x, y, z[, angle[, scale [, mirrored[, a, r, g, b]]]]) | Renders a sprite at the given 3d space coordinate. The sprite will be ...') |
|||
Line 19: | Line 19: | ||
Returns nothing. | Returns nothing. | ||
}} | }} | ||
+ | === Notes === | ||
+ | The angle and scale parameters are in a different order compared to the other sprite render methods. This may be inconvenient but will not be changed. | ||
+ | |||
=== Example === | === Example === | ||
<pre> | <pre> |
Latest revision as of 20:33, 27 December 2009
video.renderSpriteState3d(spriteId, x, y, z[, angle[, scale [, mirrored[, a, r, g, b]]]]) | ||
Renders a sprite at the given 3d space coordinate. The sprite will be rendered along the XY plane. | ||
Parameter | Expected Type | Description |
spriteId | An integer | The sprite ID. |
x | A number | The x coordinate for the sprite's hotspot. |
y | A number | The y coordinate for the sprite's hotspot. |
z | A number | The z coordinate for the sprite's hotspot. |
angle | Optional number | The angle (rotation) of the sprite, measured in radians. The sprite will rotate around its hotspot. |
scale | Optional number | The scale of the sprite, defaults to 1.0. |
mirrored | Optional boolean | Set this to true if the image should be flipped. |
a | Optional integer | The alpha component of the diffuse color. Use this to blend the sprite with the background. |
r | Optional integer | The red pigment of the diffuse color, defaults to 255. |
g | Optional integer | The green pigment of the diffuse color, defaults to 255. |
b | Optional integer | The blue pigment of the diffuse color, defaults to 255. |
Returns | ||
Returns nothing. |
Notes
The angle and scale parameters are in a different order compared to the other sprite render methods. This may be inconvenient but will not be changed.
Example
video.renderSpriteState3d(player.sprite, player.x, player.y, 0, 0, 1.0, false, 255, 255, 255, 255)