Skip to main content

extension-epic-mode

package @remirror/extension-epic-mode

class EpicModeExtension

Signature:

export declare class EpicModeExtension extends PlainExtension<EpicModeOptions> 

Extends: PlainExtension<EpicModeOptions>

(Some inherited members may not be shown because they are not represented in the documentation.)

property name

Signature:

get name(): "epicMode";

method createPlugin

Signature:

createPlugin(): CreateExtensionPlugin<EpicModePluginState>;

Returns:

CreateExtensionPlugin<EpicModePluginState>

variable COLORS

Signature:

COLORS: string[]

variable defaultEffect

Signature:

defaultEffect: ParticleEffect

variable heartEffect

Signature:

heartEffect: ParticleEffect

variable spawningEffect

Signature:

spawningEffect: ParticleEffect

interface CreateParticleProps

Signature:

export interface CreateParticleProps 

property canvas

The canvas element

Signature:

canvas: HTMLCanvasElement;

property color

Suggested color of the particle

Signature:

color: string[] | number[];

property ctx

The ctx of the canvas

Signature:

ctx: CanvasRenderingContext2D;

property textColor

Current color of the font being typed

Signature:

textColor: string[] | number[];

property x

x coordinate

Signature:

x: number;

property y

y coordinate

Signature:

y: number;

interface EpicModeOptions

Signature:

export interface EpicModeOptions 

property active

Whether epic mode is active.

Signature:

active?: boolean;

property colors

The colors for the epic effect

Signature:

colors?: string[];

property getCanvasContainer

Where in the dom the canvas element should be stored

Signature:

getCanvasContainer?: () => HTMLElement;

property particleEffect

The particle effect to use

Signature:

particleEffect?: ParticleEffect;

property particleRange

Range for the particles

Signature:

particleRange?: ParticleRange;

property shakeIntensity

How strong should the intensity of the shaking be.

Signature:

shakeIntensity?: number;

property shakeTime

How long the shaking should last for.

Signature:

shakeTime?: number;

interface Particle

Signature:

export interface Particle 

property alpha

Signature:

alpha: number;

property color

Signature:

color: string[] | number[];

property drag

Signature:

drag?: number;

property size

Signature:

size: number;

property theta

Signature:

theta?: number;

property vx

Signature:

vx: number;

property vy

Signature:

vy: number;

property wander

Signature:

wander?: number;

property x

Signature:

x: number;

property y

Signature:

y: number;

interface ParticleEffect

Signature:

export interface ParticleEffect 

property createParticle

Create a particle

Signature:

createParticle: (props: CreateParticleProps) => Particle;

property updateParticle

Update the created particle (via mutation)

Signature:

updateParticle: (props: UpdateParticleProps) => void;

interface ParticleRange

Signature:

export interface ParticleRange 

property max

Signature:

max: number;

property min

Signature:

min: number;

interface UpdateParticleProps

Signature:

export interface UpdateParticleProps 

property canvas

Signature:

canvas: HTMLCanvasElement;

property ctx

Signature:

ctx: CanvasRenderingContext2D;

property particle

Signature:

particle: Particle;

type EpicModePluginStateProps

Signature:

export type EpicModePluginStateProps = Required<EpicModeOptions>;

References: EpicModeOptions