import{_ as e,c as a,o as s,a as t}from"./app.4bcfb575.js";const f=JSON.parse('{"title":"Particles","description":"","frontmatter":{},"headers":[],"relativePath":"public/kronos/docs/particles.md","lastUpdated":null}'),l={name:"public/kronos/docs/particles.md"},n=t(`

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),o=[n];function i(p,r,c,d,h,u){return s(),a("div",null,o)}const D=e(l,[["render",i]]);export{f as __pageData,D as default};