@moefy-canvas/theme-sakura
v0.5.2
Published
<p align="center"> <img alt="type" src="https://img.shields.io/static/v1?label=type&message=background&color=green&style=for-the-badge" /> <a href="https://www.npmjs.com/package/@moefy-canvas/theme-sakura" target="_blank"><img alt="npm" src="https:/
Downloads
17
Maintainers
Readme
@moefy-canvas/theme-sakura
:cherry_blossom: 稍等片刻~
Install
pnpm add @moefy-canvas/theme-sakura
Usage
<canvas id="moefy-canvas"></canvas>
import {
Sakura,
type SakuraConfig,
MAX_Z_INDEX,
type CanvasOptions,
} from '@moefy-canvas/theme-sakura'
const themeConfig: SakuraConfig = {
numPatels: 30,
}
const canvasOptions: CanvasOptions = {
opacity: 1,
zIndex: -MAX_Z_INDEX,
}
const el = document.getElementById('moefy-canvas')
const sakura = new Sakura(themeConfig, canvasOptions)
sakura.mount(el as HTMLCanvasElement)
ThemeConfig
export interface SakuraConfig extends ThemeConfig {
numPatels?: number
}