Options
All
  • Public
  • Public/Protected
  • All
Menu

CollSpace manages 3D objects rendered by WebGL (BABYLON JS) and provides all the tooling around the 3D scene, positioning, textures, materials, etc.

collboard-system

Hierarchy

  • AbstractSystem
    • CollSpace

Index

Constructors

  • new CollSpace(systems: ISystemsExtended): CollSpace
  • Parameters

    • systems: ISystemsExtended

    Returns CollSpace

Properties

appState: any
ready: Promise<void>

Promise which is resolved when the system is initialized and ready to use.

systems: ISystemsExtended
testPickPoint: any

Testing code to showcase pickPoint method

testScreenBorder: any

Testing code to showcase screenBorder property

Accessors

  • get isDestroyed(): boolean
  • Is this object destroyed?

    Returns boolean

  • get isReady(): boolean
  • Checks if the system is initialized and ready to use.

    Returns boolean

  • get screenBorder(): BoundingBox
  • Border of the user screen

    Returns BoundingBox

Methods

  • addSubdestroyable(...subdestroyable: ITeardownLogic[]): CollSpace
  • Binds new registration with itself. This registration/destroyable will be destroyed with this.

    Parameters

    • Rest ...subdestroyable: ITeardownLogic[]

    Returns CollSpace

  • checkIsReady(): void
  • Checks if the system is initialized and ready to use. If not, throws an error. If it is, do nothing.

    Returns void

  • checkWhetherNotDestroyed(errorMessage?: string, runBeforeError?: () => void): void
  • Checks, whether the object is not destroyed

    Parameters

    • Optional errorMessage: string

      Message that will replace default one before error

    • Optional runBeforeError: () => void

      Callback runed before error is thrown; typically this can be some logging

        • (): void
        • Returns void

    Returns void

  • destroy(): Promise<void>
  • Returns Promise<void>

  • init(): Promise<void>
  • Returns Promise<void>

  • pickPoint(pointOnScreen: IVectorData): { normal: Vector; point: Vector }
  • Pick point on the board based on point on users screen

    Parameters

    • pointOnScreen: IVectorData

      means top-left corner of the window

    Returns { normal: Vector; point: Vector }

    point on the board with normal vector (if there is 3D shape)

    • normal: Vector
    • point: Vector
  • isDestroyable(obj: any): obj is IDestroyable
  • Chcek whether the given object is destroyable

    Parameters

    • obj: any

    Returns obj is IDestroyable