
|
| |
|
The Mascot Capsule® Micro3D engine (Java 3D) allows you to create nice effects by animating the textures with a sprite bitmap. In JSR-184 it's possible to move or rotate the whole texture instead of using a sprite.
The textures are animated by just showing a part of the image in each frame. Textures in Mascot Capsule Micro3D can be dimensioned at any size up to 256 pixels per side. When specifying the texture coordinates for a figure, the part of the image to be mapped is actually specified. To show a whole 255*255 image, we use the texture coordinates (x, y):
And to just show the left 16 pixels on a 255x255 image, we use (x, y):
So, to animate the texture we just change the part of the texture to be shown. The top left corner of the plane has the texture coordinate (0,0) and the right bottom corner has the coordinate (ImageWidth, ImageHeight). Download an example with source code>>
|
Copyright © 2001 - 2009 Sony Ericsson Mobile Communications AB. All Rights Reserved.