General
- What JS libraries have you used?
- Why that over X?
- What JS tempting libraries have you used?
- How do you organize your code?
- Have you used CoffeeScript?
- What do you like/dislike about it?
- Advantages/Disadvantages over JavaScript?
General
Please consider using http://lygia.xyz instead of copy/pasting this functions. It expand suport for voronoi, voronoise, fbm, noise, worley, noise, derivatives and much more, through simple file dependencies. Take a look to https://github.com/patriciogonzalezvivo/lygia/tree/main/generative
float rand(float n){return fract(sin(n) * 43758.5453123);}
float noise(float p){
float fl = floor(p);
float fc = fract(p);
--[[------------------------------------ | |
RandomLua v0.3.1 | |
Pure Lua Pseudo-Random Numbers Generator | |
Under the MIT license. | |
copyright(c) 2011 linux-man | |
--]]------------------------------------ | |
local math_floor = math.floor | |
local function normalize(n) --keep numbers at (positive) 32 bits |
Photo by Ricardo Gomez Angel on Unsplash
This gist is a collection of common patterns I've personally used here and there with Custom Elements.
These patterns are all basic suggestions that could be improved, enriched, readapted, accordingly with your needs.