New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@9am/fire-flame

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@9am/fire-flame

A fire flame library.

latest
Source
npmnpm
Version
0.3.2
Version published
Weekly downloads
54
-41.94%
Maintainers
1
Weekly downloads
 
Created
Source
fire-flame

A fire flame library 🔥 Light a 'Fire' with Canvas and Particles

GitHub npm npm npm bundle size

Demo

https://user-images.githubusercontent.com/1435457/181478598-803a9822-247f-44e2-8643-3de775900153.mov

Packages

PackageStatusDescriptionInstallationLive Demo
@9am/fire-flameVanilla JSnpm install @9am/fire-flameEdit fire-flame
@9am/fire-flame-elementWeb Componentnpm install @9am/fire-flame-element Edit fire-flame-element
@9am/fire-flame-reactReact Componentnpm install @9am/fire-flame-reactEdit fire-flame-react

Usage

@9am/fire-flame

import { FireFlame } from '@9am/fire-flame';

const ff = new FireFlame(document.querySelector('#container'), { /* option */ });

@9am/fire-flame-element

import '@9am/fire-flame-element';

// HTML
<fire-flame option='/* JSON.stringify(option) */'></fire-flame>

@9am/fire-flame-react

import { FireFlame } from '@9am/fire-flame-react';

// JSX
<FireFlame option={/* option */}></FireFlame>

Documentation

Option

NameTypeDefaultDescription
painter'canvas' | 'svg''canvas'the renderer for fire flame
wnumber400width
hnumber400height
xnumber0position x
ynumber0position y
mousemovebooleantrueenable mousemove
fpsnumber60render fps
windVectornew Vector({ x: 0, y: -0.8 })the Vector force applied to particles
frictionnumber0.98the friction applied to particles
particleNumnumber15the number of particle to draw the flame
particleDistancenumber10the distance between particles
particleFPSnumber10particle spawn fps
sizeCurveFnfunction
() => x > 0.7 
? Math.sqrt(1 - x) * 50
: Math.pow(x - 1, 2) * -30 + 30
define the size of the flame
innerColorstring'blue'flame color inner
outerColorstring'blueviolet'flame color outer

API

.start()

Start fire flame.

.stop()

Stop fire flame.

.setOption(option)

Update fire flame options.

.destroy()

Destroy fire flame.

License

MIT

Keywords

fire

FAQs

Package last updated on 18 Aug 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts