Giter VIP home page Giter VIP logo

anuraghazra / verly.js Goto Github PK

View Code? Open in Web Editor NEW
643.0 11.0 46.0 426 KB

:red_circle::wavy_dash::large_blue_circle::wavy_dash::black_circle: Easy to integrate Verlet physics engine. :link:

Home Page: https://anuraghazra.github.io/Verly.js

License: MIT License

HTML 16.15% JavaScript 82.58% CSS 1.27%
verlet verlet-engine verlet-integration physics-engine physics-2d engine 2d-physics-simulations verlet-physics verlyjs

verly.js's People

Contributors

anuraghazra avatar dependabot[bot] avatar mreinstein avatar pr0d33p avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

verly.js's Issues

fixed point question

Hello

I was using this library to make a cord that hangs from the top of the page you can pull on and it works great but the one issue i have is that the point that is fixed can still be moved by the mouse, is there a way to prevent that

edit: setting the radius to 0.001 seems to work to hide the first point but if someone has a better suggestion let me know

Port to p5js ?

Hello,

First congrats because this is a very nice library and really easy to use.

I was wondering if it would be interesting to workout a fork to be used with p5js : https://p5js.org/
(I coul help to do this by the way).

The main thing that I see would be to rewrite the render functions with p5 primitives, or maybe to enable people to get a list of points per objects to let them redraw.

This second option might help us to keep everything in this repo, and just write of few examples for p5js on how to get an customize the drawing.

What do you think ?

[Feat]: Publish to NPM

  • Setup proper release pipeline with changesets
  • Use a better bundler eg vite or rollup so we can target dual cjs/esm bundles
  • Publish to NPM
  • Keep CDN packaged publishing too

[Feat]: Decouple render from physics

Right now we have render() functions inside entity/point & stick, ideally we can keep the physics simulation renderer agnostic and have a separate Renderer class which can be swapped for any other renderer eg #9 webgl.

WebGL support

Hi, I love this physics engine, is really easy to use...
but can't the renderer support WebGL? or should I use a WebGL renderer, like Pixi.js?

also, can this be used in a Web Worker object?

I'm half newbie to js, I need performance for having thousands of particles, that's why I'm asking...

A collection of improvement ideas

I don't know if you'd be up for any of these, so I'll just throw the ideas here. If you're game for any of them, happy to PR:

  • standardize on the vec2 module from gl-matrix - this would mean vectors would be [ x, y ] rather than { x, y }.
    it's nice in that it re-uses a popular vector module. I'm always a little saddened looking at various game/sim repos in javascript, and every one invents it's own vector/matrix libraries. :(
  • switch from Object-oriented to data-oriented design - rather than using classes to bundle code, the different primitives (sticks, dots etc.) essentially become structs, and the data structure gets passed in to all of the related functions

Will add more ideas as they come up., just wanted to throw these in as a starting point.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.