Class used to store all common util functions

Constructors

Methods

  • Create a metallic sphere to the scene

    Parameters

    • scene: AbstractScene

      an instance of class which extends AbstractScene

    • sphereProportionOfScreen: number = 0.15

      controls the size of sphere

    • borderOffsetPx: number = 25

      canvas boarder offset in pixel

    • placement:
          | "top-left"
          | "top-right"
          | "bottom-left"
          | "bottom-right" = 'top-right'

      controls where to place the sphere, default: 'top-right'

    Returns Nullable<AbstractMesh>

  • Check if the file is a texture asset

    Parameters

    • name: string

      file name

    Returns boolean

    true if the file is a texture asset, else false