Giter Site home page Giter Site logo

jayadityashah / bluefries_particlechargesimulation-on-webgpu Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 22 KB

By editing the properties of the particles, simulation can be performed with high performance using WebGPU. The following proof of concept shows so, live demo link:

WGSL 26.62% JavaScript 70.15% HTML 3.22%
simulation web webgpu wgsl wgsl-shader

bluefries_particlechargesimulation-on-webgpu's Introduction

BlueFries---Particle-Charge-Simulation-on-WebGPU

By editing the properties of the particles, simulation can be performed with high performance using WebGPU. The following proof of concept shows so:

Live demo link with WebGPU: https://jayadityashah.github.io/BlueFries_ParticleChargeSimulation-on-WebGPU/?balls=600&width=1400&height=650

Live demo Without Web GPU: https://jayadityashah.github.io/BlueFries_ParticleChargeSimulation-WOGPU/?balls=2000&width=1400&height=650

repository for w/o gpu: https://github.com/jayadityashah/BlueFries_ParticleChargeSimulation-WOGPU

You can edit the following parameters, by passing them to the url above by using the ?tag:

balls parameter - number of balls
min/max_radius parameter - min and max particle radius
plus_probability - the probability of the particle to have a +1 charge. if -1, all particles are neutral
width, height - width and height of the canvas

A key on the particle color and charges:

White - neutral
Dark Blue - positive	
Pink - negetive

(Charges behave so simmilars attract for the demo but this can be changed by changing the charge co-relation to negetive in the wgsl file)

bluefries_particlechargesimulation-on-webgpu's People

Contributors

jayadityashah avatar

Watchers

 avatar

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.