Options
All
  • Public
  • Public/Protected
  • All
Menu

A behavior that forwards the Base3D interface to its object.

Hierarchy

Implements

Index

Methods

  • activate(enable: boolean): void
  • activated(): boolean
  • enableSynchronization(enable: boolean): void
  • flipZ(enable: boolean): void
  • getCenterZInScene(): number
  • getDepth(): number
  • getName(): string
  • getNameId(): number
  • getNetworkSyncData(): BehaviorNetworkSyncData
  • getRotationX(): number
  • getRotationY(): number
  • getScaleZ(): number
  • getUnrotatedAABBMaxZ(): number
  • getUnrotatedAABBMinZ(): number
  • getZ(): number
  • isFlippedZ(): boolean
  • isSyncedOverNetwork(): boolean
  • onActivate(): void
  • onCreated(): void
  • onDeActivate(): void
  • onDestroy(): void
  • This method is called when the owner of the behavior is being removed from the scene and is about to be destroyed/reused later or when the behavior is removed from an object (can happen in case of hot-reloading only. Otherwise, behaviors are just de-activated, not removed. See onDeActivate).

    Returns void

  • onObjectHotReloaded(): void
  • setCenterZInScene(z: number): void
  • setDepth(depth: number): void
  • setRotationX(angle: number): void
  • setRotationY(angle: number): void
  • setScaleZ(newScale: number): void
  • setZ(z: number): void
  • turnAroundX(deltaAngle: number): void
  • turnAroundY(deltaAngle: number): void
  • turnAroundZ(deltaAngle: number): void
  • updateFromBehaviorData(oldBehaviorData: any, newBehaviorData: any): boolean
  • Called when the behavior must be updated using the specified behaviorData. This is the case during hot-reload, and is only called if the behavior was modified.

    Parameters

    • oldBehaviorData: any
    • newBehaviorData: any

    Returns boolean

    true if the behavior was updated, false if it could not (i.e: hot-reload is not supported).

  • updateFromNetworkSyncData(networkSyncData: BehaviorNetworkSyncData): void
  • usesLifecycleFunction(): boolean
  • Should return false if the behavior does not need any lifecycle function to be called. Default, hidden, "capability" behaviors set it to false. This avoids useless calls to empty lifecycle functions, which would waste CPU time (and have a sizeable impact for example when lots of static instances are living in the scene).

    Returns boolean

Constructors

Properties

name: string
type: string

Generated using TypeDoc