[0.10.2 water-waves-v.0.1] - library for water waves creation

Showcase your libraries, tools and other projects that help your fellow love users.
Post Reply
Posts: 18
Joined: Wed Dec 27, 2017 5:19 pm

[0.10.2 water-waves-v.0.1] - library for water waves creation

Post by azoyan »

I am glad to show first version of water library for 0.10.2

Usage example:

Code: Select all

local Water = require "water"

function love.load(arg)
  local x, y, width, height, color = 100, 150, 500, 400, { 0, 130, 200, 255 }
  water = Water(x, y, width, height, color)

function love.update(dt) water:update(dt); end

function love.mousemoved(x, y, dx, dy)
  local weight = 20
  local speed  = weight * dy
  if water:isTouched(x, y, dx, dy) then water:splash(x, speed); end

function love.draw() water:draw(); end
It is porting and implementation for love2d of water waves from this tutorial https://gamedevelopment.tutsplus.com/tu ... amedev-236

Source code raw water.lua https://raw.githubusercontent.com/azoya ... /water.lua

Welcome on GitHub: https://github.com/azoyan/water-waves-love2d

water waves example
(1.3 KiB) Downloaded 113 times
User avatar
Party member
Posts: 378
Joined: Sat Sep 24, 2016 11:20 am

Re: [0.10.2 water-waves-v.0.1] - library for water waves creation

Post by yetneverdone »

Awesome! Add 11.0 compatibility and api please
Post Reply

Who is online

Users browsing this forum: No registered users and 17 guests