romellogoodman / flow-field.js Goto Github PK
View Code? Open in Web Editor NEWA library for generating flow fields.
Home Page: https://www.are.na/romello-goodman/flow-fields-ddrqag_mr44
License: MIT License
A library for generating flow fields.
Home Page: https://www.are.na/romello-goodman/flow-fields-ddrqag_mr44
License: MIT License
I took a first pass at running everything here through tsc
and this was the result:
export function generateParticles({ count, height, margin, seed, width, }: {
count: any;
height: any;
margin?: number;
seed: any;
width: any;
}): {
x: number;
y: number;
vx: number;
vy: number;
line: any[];
}[];
export function moveParticle({ amplitude, damping, frequency, lengthOfStep, particle, }: {
amplitude: any;
damping: any;
frequency: any;
lengthOfStep: any;
particle: any;
}): void;
export function generateField({ amplitude, count, damping, height, margin, particles: suppliedParticles, scale, seed, width, }?: {
amplitude?: number;
count?: number;
damping?: number;
height: any;
margin?: number;
particles: any;
scale?: number;
seed: any;
width: any;
}): any;
Looks like the return type for generateField
is wrong–are you open to adding type defs to the distributed library?
I played around with this a tiny bit and made a small demo
Feel free to copy the code and include in the repo, or if the demo doesn't showcase what the library is meant to do, feel free to create a new demo.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.