All Projects → T-vK → SuperParticles

T-vK / SuperParticles

Licence: other
Amazing CPU-friendly particle network animations

Programming Languages

javascript
184084 projects - #8 most used programming language
HTML
75241 projects

Projects that are alternatives of or similar to SuperParticles

Interactive-Image-Particles
A Simple Javascript library that use image data to create a small interactive particles network.
Stars: ✭ 24 (-25%)
Mutual labels:  particles, particles-js
Tsparticles
tsParticles - Easily create highly customizable particles animations and use them as animated backgrounds for your website. Ready to use components available for React.js, Vue.js (2.x and 3.x), Angular, Svelte, jQuery, Preact, Inferno, Solid, Riot and Web Components.
Stars: ✭ 2,694 (+8318.75%)
Mutual labels:  particles, particles-js
pixijs-ts-boilerplate
Just another PixiJS Typescript Boilerplate with some basic functionalities
Stars: ✭ 54 (+68.75%)
Mutual labels:  pixi
SPConfetti
Show the confetti only when the user is having fun, and if not having fun, don't show it.
Stars: ✭ 187 (+484.38%)
Mutual labels:  particles
Aboria
Enables computations over a set of particles in N-dimensional space
Stars: ✭ 83 (+159.38%)
Mutual labels:  particles
phantom
Phantom Smoothed Particle Hydrodynamics and Magnetohydrodynamics code
Stars: ✭ 52 (+62.5%)
Mutual labels:  particles
d2dx
D2DX is a complete solution to make Diablo II run well on modern PCs, with high fps and better resolutions.
Stars: ✭ 214 (+568.75%)
Mutual labels:  fps
Tokenmagic
A Foundry VTT module that allows you to add animations and graphic effects to tokens, tiles, templates and drawings.
Stars: ✭ 28 (-12.5%)
Mutual labels:  pixi
power-mode-input
PowerModeInput can make your text input box more compelling
Stars: ✭ 68 (+112.5%)
Mutual labels:  particles
memcache
Node.js memcached client with the most efficient ASCII protocol parser
Stars: ✭ 26 (-18.75%)
Mutual labels:  efficient
spark-particle-uv
Demo of how to sample the camera texture and map it to particles.
Stars: ✭ 25 (-21.87%)
Mutual labels:  particles
rtcwPro
RtcwPro - Competition Mod for Return to Castle Wolfenstein
Stars: ✭ 16 (-50%)
Mutual labels:  fps
Kosm-Classic-FPS-Template-UE4
Classic Arena First-Person-Shooter Mechanics for Unreal Engine 4.
Stars: ✭ 38 (+18.75%)
Mutual labels:  fps
FWDebug
iOS调试库,支持iOS11+,无需添加任何代码,方便iOS开发和测试。 iOS debugging library, support for iOS11 +, without adding any code to facilitate iOS development and testing.
Stars: ✭ 49 (+53.13%)
Mutual labels:  fps
animate
PixiJS runtime library for content from Adobe Animate CC
Stars: ✭ 142 (+343.75%)
Mutual labels:  pixi
pazuru-pico
Puyo-puyo-ish game inspired from BanG Dream! Girls Band Party!☆PICO ~ OHMORI ~ Episode 9.
Stars: ✭ 46 (+43.75%)
Mutual labels:  pixi
awesome-html5gamedev
A curated list of awesome things related to HTML5 Game Development
Stars: ✭ 15 (-53.12%)
Mutual labels:  pixi
NovaShader
Multi-functional shader for the Particle System that supports Universal Render Pipeline (URP) of Unity.
Stars: ✭ 448 (+1300%)
Mutual labels:  particles
templates
tsParticles website templates collection
Stars: ✭ 42 (+31.25%)
Mutual labels:  particles-js
Galaxia-Runtime
Galaxy generator for Unity 3D, with Custom Particle Distributors, DirectX 11 Particles and Highly customization, curve driven Generation.
Stars: ✭ 36 (+12.5%)
Mutual labels:  particles

SuperParticles

Performance-focused alternative to VincentGarreau's particles.js

Introduction

SuperParticles aims at resolving the major performance issues that come with particles.js, by using WebGL when possible and also by allowing you to limit the frame rate (FPS). If you have more ideas on what could be done to further improve the performance, feel free to open an issue.

GIF Demo

Video

Live Demo

https://t-vk.github.io/SuperParticles/demo.html

How To Use

Jquery is optional, but recommended. Pixi.js is required (preferrably in a version above 5.0.0-rc):

<script src="https://code.jquery.com/jquery-1.12.0.min.js"></script>
<script src="https://pixijs.download/dev-graphics-batch-pool/pixi.js"></script>
<script src="https://cdn.jsdelivr.net/gh/T-vK/SuperParticles@master/SuperParticles.js"></script>
<script>
    window.onload = function(){
        var superParticles = new SuperParticles()
    }
</script>

If you want, you can pass a div container to SuperParticles which then will be used to render the particles:

<body>
    <script src="https://code.jquery.com/jquery-1.12.0.min.js"></script>
    <script src="https://pixijs.download/dev-graphics-batch-pool/pixi.js"></script>
    <script src="https://cdn.jsdelivr.net/gh/T-vK/SuperParticles@master/SuperParticles.js"></script>
    <div id="super-particles"></div>

    <script>
        window.onload = function(){
            var divContainer = '#super-particles'
            new SuperParticles({
                container: divContainer
            })
        }
    </script>
</body>

You can limit the FPS like this:

new SuperParticles({
    maxFps: 30
})

API

new SuperParticles(cfg)

Creates a new SuperParticles instance.

cfg defaults to:

{
    useJquery: undefined, // true/false/undefined
    maxFps: 30, // requires pixi.js v5
    autoStartAnimation: true, // true/false
    container: {
        element: undefined,
        backgroundCssRule: "radial-gradient(ellipse at center, rgba(10,46,56,1) 0%,rgba(34,34,34,1) 70%)" // css or null (null: don't modify container background)
    },
    pixiApp: { // these are documented here: http://pixijs.download/release/docs/PIXI.Application.html#Application
        antialias: true,
        transparent: true,
        forceFXAA: false,
        powerPreference: 'high-performance',
        resolution: 1.0
    },
    particles: {
        amount: 80, // unit: particles
        radius: 2, // unit: pixels
        velocity : 10, // unit: pixels/second
        color: "0xFFFFFF", // unit: rgb hex color
        fadeInDuration: 3000, // unit: milliseconds
        fadeOutDuration: 600, // unit: milliseconds
        keepRelativePositionOnResize: true, // true/false
    },
    lines: {
        minDistance: 0.09, // unit: percent (1: 100%; 0: 0%
        color: "0xFFFFFF", // unit: hex color
        maxOpacity: 0.4, // 1: full opacity; 0: no opacity
        thickness: 1, // unit: pixels
        distanceBasedTransparency: true, // true/false
    },
    debug: {
        showFps: false, // true/false
    }
}

but you can overwrite individual properties if you like.

superParticles.stopAnimation()

Pauses the SuperParticles instance.

superParticles.startAnimation()

Resume the SuperParticles instance.

superParticles.destroy()

Destroys the SuperParticles instance. (If you want to reuse the instance afterwards, you have to call reinit first!)

superParticles.reinit()

Reinitializes the instance. (Useful after destroying it.)

superParticles.cfg

This is the config object of the instance. You can overwrite the cfg object during runtime. E.g. superParticles.cfg = { pixiApp: { antialiasing: true } }
Don't do superParticles.cfg.pixiApp.antialiasing = true

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].