Options
All
  • Public
  • Public/Protected
  • All
Menu

Module Utils/CanvasUtils

Index

Functions

  • Alters HSL values for enlighten or darken the given color.

    Parameters

    • color: IHsl

      The color to enlighten or darken.

    • type: AlterType

      The type of alteration.

    • value: number

      The value of the alteration.

    Returns IHsl

  • Draws an ellipse for the given particle.

    Parameters

    • context: <internal>.CanvasRenderingContext2D

      The canvas context.

    • particle: IParticle

      The particle to draw.

    • fillColorValue: undefined | IHsl

      The particle fill color.

    • radius: number

      The radius of the particle.

    • opacity: number

      The opacity of the particle.

    • width: number

      The width of the particle.

    • rotation: number

      The rotation of the particle.

    • start: number

      The start angle of the particle.

    • end: number

      The end angle of the particle.

    Returns void

  • Draws the particle using canvas API in the given context.

    Parameters

    • container: Container

      The container of the particle.

    • context: <internal>.CanvasRenderingContext2D

      The canvas context to draw on.

    • particle: IParticle

      The particle to draw.

    • delta: IDelta

      this variable contains the delta between the current frame and the previous frame

    • colorStyles: IParticleColorStyle

      The color styles value.

    • backgroundMask: boolean

      If enabled, the composite value will be used for blending the particle in the canvas.

    • composite: GlobalCompositeOperation

      The composite value to use for blending the particle in the canvas.

    • radius: number

      The radius of the particle.

    • opacity: number

      The opacity of the particle.

    • shadow: IShadow

      The shadow of the particle.

    Returns void

  • Draws the particle shape using the plugin's shape renderer.

    Parameters

    • container: Container

      The container of the particle.

    • context: <internal>.CanvasRenderingContext2D

      The canvas context.

    • particle: IParticle

      The particle to draw.

    • radius: number

      The radius of the particle.

    • opacity: number

      The opacity of the particle.

    • delta: IDelta

      this variable contains the delta between the current frame and the previous frame

    Returns void

  • Draws the particle effect after the plugin's shape renderer.

    Parameters

    • container: Container

      The container of the particle.

    • context: <internal>.CanvasRenderingContext2D

      The canvas context.

    • particle: IParticle

      The particle to draw.

    • radius: number

      The radius of the particle.

    • opacity: number

      The opacity of the particle.

    • delta: IDelta

      this variable contains the delta between the current frame and the previous frame

    Returns void

  • Fills a rectangle with the given color for the whole canvas.

    Parameters

    • context: <internal>.CanvasRenderingContext2D

      The canvas context to draw on.

    • dimension: IDimension

      The dimension of the rectangle.

    • Optional baseColor: string

      The base color of the rectangle, if not specified a transparent color will be used.

    Returns void