added animatedfluids
parent
71f5a9eb92
commit
6afbf67778
|
@ -0,0 +1,8 @@
|
|||
Animated-Fluids
|
||||
===============
|
||||
|
||||
A mod for minetest
|
||||
|
||||
extract the zip to ~/.minetest/mods/minetest/
|
||||
|
||||
rename khonkhortisan-animatedfluids-a73caea to animatedfluids
|
|
@ -0,0 +1,11 @@
|
|||
[Mod] Animated Fluids [animatedfluids]
|
||||
|
||||
Homepage: http://minetest.net/forum/viewtopic.php?id=2420
|
||||
License: cc-by-sa, contains derivative works of the default textures
|
||||
|
||||
Contributors:
|
||||
khonkhortisan
|
||||
|
||||
Description:
|
||||
This mod gives an animated texture to water and lava. Each frame moves the texture one pixel for a total of 16 frames. The speed of the flow animation is based on the viscosity of the fluid. It's only 13 lines of code! (plus textures)
|
||||
It only animates flowing fluid, not a static body of fluid.
|
|
@ -0,0 +1 @@
|
|||
default
|
|
@ -0,0 +1,13 @@
|
|||
fluids = {'water', 'lava'}
|
||||
for fluid=1,#fluids do
|
||||
name = fluids[fluid]
|
||||
fluid = minetest.registered_nodes['default:'..name..'_flowing']
|
||||
tile = {name='default_'..name..'_animated.png', animation={type='vertical_frames', aspect_w=16, aspect_h=16, length=fluid.viscosity}}
|
||||
fluid.tiles = {tile}
|
||||
tile1 = tile
|
||||
tile2 = tile
|
||||
tile1.backface_culling=false
|
||||
tile2.backface_culling=true
|
||||
fluid.special_tiles = {tile1,tile2}
|
||||
minetest.register_node(':default:'..name..'_flowing', fluid)
|
||||
end
|
Binary file not shown.
After Width: | Height: | Size: 934 B |
Binary file not shown.
After Width: | Height: | Size: 510 B |
Binary file not shown.
After Width: | Height: | Size: 5.7 KiB |
Binary file not shown.
After Width: | Height: | Size: 1.5 KiB |
Loading…
Reference in New Issue