prismarine-viewer
prismarine-viewer copied to clipboard
Animate blocks
Some blocks like nether portals and water/lava have a animation, which is rendered. Adding that would make the world feel more lifely.
I found a minecraft wiki entry with all animated blocks: https://minecraft.gamepedia.com/Category:Animated_block_icons
We have that information in minecraft-assets (animated textures have metadata files and all frames are on the same file). There is 2 basic solutions to animate the textures:
- Change the uv of the animated blocks (can be very expensive because we need to recompute a big part of the mesh each frame)
- Change the texture atlas (we can generate 1 atlas for each frame). This solution is cheaper but the drawback will be that it is harder to implement different delays between frames. The second solution is easier to implement, but idk if the result would be good enough (and support all special blocks).
Please note my support for this issue. We're building a game client on top of prismarine-viewer and this is important functionality.