prismarine-viewer icon indicating copy to clipboard operation
prismarine-viewer copied to clipboard

Animate blocks

Open AlexProgrammerDE opened this issue 5 years ago • 3 comments

Some blocks like nether portals and water/lava have a animation, which is rendered. Adding that would make the world feel more lifely.

AlexProgrammerDE avatar Jul 29 '20 14:07 AlexProgrammerDE

I found a minecraft wiki entry with all animated blocks: https://minecraft.gamepedia.com/Category:Animated_block_icons

AlexProgrammerDE avatar Jul 29 '20 14:07 AlexProgrammerDE

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).

Karang avatar Jul 29 '20 20:07 Karang

Please note my support for this issue. We're building a game client on top of prismarine-viewer and this is important functionality.

raymondjxu avatar Dec 13 '20 00:12 raymondjxu