Options
All
  • Public
  • Public/Protected
  • All
Menu

Class PathObject

Hierarchy

  • PathObject

Index

Constructors

constructor

  • Parameters

    • Optional name: string

    Returns PathObject

Properties

curIndex

curIndex: number = 0

cyclePlay

cyclePlay: boolean = false

endIndex

endIndex: undefined | number

fastForwardRatio

fastForwardRatio: number = 1

isPlaying

isPlaying: boolean = false

name

name: string

pathPointAry

pathPointAry: PathPointObj[] = []

startIndex

startIndex: number = 0

Methods

appendPathPoint

  • 路径上增加路径点

    Parameters

    Returns void

appendPt

deletePathPoint

  • 路径上删除路径点

    Parameters

    Returns void

insertAfterPathPoint

  • 在指定路径点后面插入路径点

    Parameters

    Returns void

insertBeforePathPoint

  • 在指定路径点前面插入路径点

    Parameters

    Returns void

play

  • play(playFn: (_: ViewPosition, duration: number, dist: number, callback: (value?: any) => void, easingFunction?: Callback) => void, playEndCallback?: () => void, playEachStepCallback?: () => void): string | void
  • 播放

    Parameters

    • playFn: (_: ViewPosition, duration: number, dist: number, callback: (value?: any) => void, easingFunction?: Callback) => void
        • (_: ViewPosition, duration: number, dist: number, callback: (value?: any) => void, easingFunction?: Callback): void
        • Parameters

          • _: ViewPosition
          • duration: number
          • dist: number
          • callback: (value?: any) => void
              • (value?: any): void
              • Parameters

                • Optional value: any

                Returns void

          • Optional easingFunction: Callback

          Returns void

    • playEndCallback: () => void = ...
        • (): void
        • Returns void

    • playEachStepCallback: () => void = ...
        • (): void
        • Returns void

    Returns string | void

resetStartEnd

  • resetStartEnd(): void
  • 重置

    Returns void

setEndIndex

  • setEndIndex(EndIndex: number): string | void
  • 设置从哪个路径点结束

    Parameters

    • EndIndex: number

      路径点的索引

    Returns string | void

setFastForwardRatio

  • setFastForwardRatio(ratio: number): void
  • 设置快进系数

    Parameters

    • ratio: number

      快进系数

    Returns void

setName

  • setName(name: string): void
  • 设置路径的名称

    Parameters

    • name: string

      路径的名称

    Returns void

setStartIndex

  • setStartIndex(startIndex: number): string | void
  • 设置从哪个路径点开始

    Parameters

    • startIndex: number

      路径点的索引

    Returns string | void

stop

  • stop(): void
  • 停止

    Returns void

toPromiseFn

  • toPromiseFn(_: ViewPosition, duration: number, dist?: number, item: PathPointObj, fn: (_: ViewPosition, duration: number, dist: number, callback: (value?: any) => void, easingFunction?: Callback) => void, playEachStepCallback?: () => void): () => Promise<unknown>
  • Parameters

    • _: ViewPosition
    • duration: number
    • dist: number = 0
    • item: PathPointObj
    • fn: (_: ViewPosition, duration: number, dist: number, callback: (value?: any) => void, easingFunction?: Callback) => void
        • (_: ViewPosition, duration: number, dist: number, callback: (value?: any) => void, easingFunction?: Callback): void
        • Parameters

          • _: ViewPosition
          • duration: number
          • dist: number
          • callback: (value?: any) => void
              • (value?: any): void
              • Parameters

                • Optional value: any

                Returns void

          • Optional easingFunction: Callback

          Returns void

    • playEachStepCallback: () => void = ...
        • (): void
        • Returns void

    Returns () => Promise<unknown>

      • (): Promise<unknown>
      • Returns Promise<unknown>