Tidewater: Oceans, Lakes, Rivers, Waterfalls, Swimming and Splashes Water Kit
README.md
fx
Tidewater's water effects for gameplay, each in the seven looks and usable without any other part of the kit:
local Fx = require("tidewater.modules.fx") -- inside the package: require("~.modules.fx")
Fx.splash("plop", { x, y, z }) -- pebble
Fx.splash("body", pos, { size = 1.2, sync = true }) -- person, played on every peer
Fx.splash("spray", pos, { wind = { 8, 0, 0 } })
local mist = Fx.mist(pos, { width = 8, sparkle = 0.6 }) -- continuous: :set(opts) / :stop()
local bow = Fx.emitter("bow", { position = p, dir = d, speed = 9 })
local stop = Fx.autoSplash() -- everything entering water splashes, exits drip
One-shots: plop, body, droplets, spray. Continuous (Fx.emitter, or Fx.splash for
duration s): bow, spindrift, mist, drips, bubbles, wake. The look defaults to the
look of the Tidewater water at the point, else opts.look, else realistic. Every one-shot rings
the water through the ripple field (ripple = false skips it). sync = true sends the effect
to every peer on the tidewater.fx channel; Fx.autoSplash / the Splashes component play
automatic splashes on the body's owner only, synced, so nothing is doubled. Fx.classify,
Fx.lookFor, Fx.windFor, Fx.warm, Fx.stats and Fx.stopAll round it out.