Interface TweenComponentDefinitionExtended

Hierarchy

Properties

Texture helpers with constructor

componentId: number
componentName: string
componentType: LastWriteWinElementSet
schema: ISchema<PBTween>

Methods

  • Add the current component to an entity, throw an error if the component already exists (use createOrReplace instead).

    • Internal comment: This method adds the <entity,component> to the list to be reviewed next frame

    Parameters

    • entity: Entity

      Entity that will be used to create the component

    • Optional val: PBTween

      The initial value

    Returns PBTween

  • Add the current component to an entity or replace the content if the entity already has the component

    • Internal comment: This method adds the <entity,component> to the list to be reviewed next frame

    Parameters

    • entity: Entity

      Entity that will be used to create or replace the component

    • Optional val: PBTween

      The initial or new value

    Returns PBTween

  • Delete the current component to an entity, return null if the entity doesn't have the current component.

    • Internal comment: This method adds the <entity,component> to the list to be reviewed next frame

    Parameters

    • entity: Entity

      Entity to delete the component from

    Returns null | PBTween

  • Marks the entity as deleted and signals it cannot be used ever again. It must clear the component internal state, produces a synchronization message to remove the component from the entity.

    Parameters

    • entity: Entity

      Entity ID that was deleted.

    • markAsDirty: boolean

    Returns void

  • Get the mutable component of the entity, throw an error if the entity doesn't have the component.

    • Internal comment: This method adds the <entity,component> to the list to be reviewed next frame

    Parameters

    • entity: Entity

      Entity to get the component from

    Returns PBTween

  • Get the mutable component of the entity, return null if the entity doesn't have the component.

    • Internal comment: This method adds the <entity,component> to the list to be reviewed next frame

    Parameters

    • entity: Entity

      Entity to get the component from

    Returns null | PBTween

  • Triggers the callback if the entity has changed on the last tick. If the value is undefined, the component was deleted.

    Parameters

    • entity: Entity
    • cb: ((value: undefined | PBTween) => void)
        • (value: undefined | PBTween): void
        • Parameters

          Returns void

    Returns void

  • Creates or replaces a move tween component that animates an entity's position from start to end

    Parameters

    • entity: Entity

      entity to apply the tween to

    • start: PBVector3

      starting position vector

    • end: PBVector3

      ending position vector

    • duration: number

      duration of the tween in seconds

    • Optional easingFunction: EasingFunction

      easing function to use (defaults to EF_LINEAR)

    Returns void

  • Creates or replaces a continuous move tween component that moves an entity continuously in a direction

    Parameters

    • entity: Entity

      entity to apply the tween to

    • direction: PBVector3

      direction vector to move towards

    • speed: number

      speed of movement per second

    • Optional duration: number

      duration of the tween in seconds (defaults to 0 for infinite)

    Returns void

  • Creates or replaces a rotation tween component that animates an entity's rotation from start to end

    Parameters

    • entity: Entity

      entity to apply the tween to

    • start: PBQuaternion

      starting rotation quaternion

    • end: PBQuaternion

      ending rotation quaternion

    • duration: number

      duration of the tween in seconds

    • Optional easingFunction: EasingFunction

      easing function to use (defaults to EF_LINEAR)

    Returns void

  • Creates or replaces a continuous rotation tween component that rotates an entity continuously

    Parameters

    • entity: Entity

      entity to apply the tween to

    • direction: PBQuaternion

      rotation direction quaternion

    • speed: number

      speed of rotation per second

    • Optional duration: number

      duration of the tween in seconds (defaults to 0 for infinite)

    Returns void

  • Creates or replaces a scale tween component that animates an entity's scale from start to end

    Parameters

    • entity: Entity

      entity to apply the tween to

    • start: PBVector3

      starting scale vector

    • end: PBVector3

      ending scale vector

    • duration: number

      duration of the tween in seconds

    • Optional easingFunction: EasingFunction

      easing function to use (defaults to EF_LINEAR)

    Returns void

  • Creates or replaces a texture move tween component that animates texture UV coordinates from start to end

    Parameters

    • entity: Entity

      entity to apply the tween to

    • start: PBVector2

      starting UV coordinates

    • end: PBVector2

      ending UV coordinates

    • duration: number

      duration of the tween in seconds

    • Optional movementType: TextureMovementType

      type of texture movement (defaults to TMT_OFFSET)

    • Optional easingFunction: EasingFunction

      easing function to use (defaults to EF_LINEAR)

    Returns void

  • Creates or replaces a continuous texture move tween component that moves texture UV coordinates continuously

    Parameters

    • entity: Entity

      entity to apply the tween to

    • direction: PBVector2

      direction vector for UV movement

    • speed: number

      speed of UV movement per second

    • Optional movementType: TextureMovementType

      type of texture movement (defaults to TMT_OFFSET)

    • Optional duration: number

      duration of the tween in seconds (defaults to 0 for infinite)

    Returns void