ThreePipe
    Preparing search index...

    Class PopmotionPlugin

    Popmotion plugin

    Provides animation capabilities to the viewer using the popmotion library: https://popmotion.io/

    Overrides the driver in popmotion to sync with the viewer and provide ways to keep track and stop animations.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    _dirty: boolean = false
    _viewer?: ThreeViewer
    _viewerListeners: PartialRecord<IViewerEventTypes, (e: IViewerEvent) => void> = {}
    animations: Record<string, AnimationResult> = {}
    autoIncrementTime: boolean = true
    constructor: typeof AViewerPluginSync & typeof AViewerPlugin
    defaultDriver: Driver = ...
    dependencies: never[] = []
    disableFrameFade: boolean = true

    Disable the frame fade plugin while animation is running

    enabled: boolean = true
    fromJSON: any = undefined
    timelineDriver: Driver = ...
    toJSON: any = undefined
    uiConfig?: UiObjectConfig<any, string, any> = undefined
    OldPluginType?: string
    PluginType: "PopmotionPlugin" = 'PopmotionPlugin'

    Accessors

    Methods

    • Type Parameters

      • V

      Parameters

      • options1: AnimationOptions<V> & { key?: string; target?: any }
      • OptionalanimateFunc:
            | (<V = number>(__namedParameters: AnimationOptions<V>) => {})
            | (
                <V = number>(
                    __namedParameters: KeyframeOptions<V> & Omit<
                        PlaybackOptions<V>,
                        "type" | "repeat" | "repeatType" | "repeatDelay" | "onRepeat",
                    > & { canComplete?: boolean; delay?: number },
                ) => { stop: () => void }
            )
        • <V = number>(__namedParameters: AnimationOptions<V>) => {}
        • <V = number>(
              __namedParameters: KeyframeOptions<V> & Omit<
                  PlaybackOptions<V>,
                  "type" | "repeat" | "repeatType" | "repeatDelay" | "onRepeat",
              > & { canComplete?: boolean; delay?: number },
          ) => { stop: () => void }
            • <V = number>(
                  __namedParameters: KeyframeOptions<V> & Omit<
                      PlaybackOptions<V>,
                      "type" | "repeat" | "repeatType" | "repeatDelay" | "onRepeat",
                  > & { canComplete?: boolean; delay?: number },
              ): { stop: () => void }
            • Simplified version of popmption animate that supports seeking around the animation. Used in AnimationObject.ts

              Type Parameters

              • V = number

              Parameters

              • __namedParameters: KeyframeOptions<V> & Omit<
                    PlaybackOptions<V>,
                    "type" | "repeat" | "repeatType" | "repeatDelay" | "onRepeat",
                > & { canComplete?: boolean; delay?: number }

              Returns { stop: () => void }

      Returns AnimationResult

    • Similar to animate, but specifically for numbers, defaults from 0 to 1. Also calls onUpdate with the delta value.

      Parameters

      • options: Omit<
            PlaybackOptions<number> & KeyframeOptions<number>,
            "to" | "from" | "onUpdate",
        > & {
            from?: number;
            onUpdate?: (value: number, delta: number) => void;
            to?: number;
        }

      Returns AnimationResult

    • Parameters

      • options: AnimationOptions<any> = {}

      Returns {
          _stop: () => void;
          anims: AnimationResult[];
          id: string;
          options: AnimationOptions<any>;
          promise: any;
          stop: () => void;
          stopped: false;
      }