import{_ as e,q as i,p as s,ag as a}from"./chunks/framework.Sr2_9k8k.js";const g=JSON.parse('{"title":"Particles","description":"","frontmatter":{},"headers":[],"relativePath":"public/kronos/docs/particles.md","filePath":"public/kronos/docs/particles.md"}'),t={name:"public/kronos/docs/particles.md"},l=a(`

Particles

Particles are free-floating elements that can move and have many different behaviors. They can also interact with the mouse.

To make particles, use makeParticles(particle, amount). particle is a particle-defining object, with features as explained below. There is also makeShinies, which uses different defaults and creates stationary particles at a random location. There are also a few other useful things listed at the end.

js

const myParticle {
    image:"options_wheel.png",
    spread: 20,
    gravity: 2,
    time: 3,
    speed() { // Randomize speed a bit
        return (Math.random() + 1.2) * 8 
    },
    etc...
}

Features can be functions or constant. These features will be called when each particle is made, with an id argument, which is assigned based on which of the amount particles being spawned this is. All of these are optional, with a default value.

All distances are in pixels and angles are in degrees, with 0 being up and going clockwise.

Function features: These stay as functions and are for more advanced things. They are optional.

Other useful things that are not features of the particle object:

`,11),n=[l];function h(p,r,o,d,c,k){return s(),i("div",null,n)}const f=e(t,[["render",h]]);export{g as __pageData,f as default};