Options
All
  • Public
  • Public/Protected
  • All
Menu

Specify default control descriptors for the parameters

Type parameters

Hierarchy

Index

Properties

customSerialization?: { fromJSON: any; toJSON: any }

Custom conversion to and from JSON

Type declaration

  • fromJSON:function
    • fromJSON(data: any): P
    • Parameters

      • data: any

      Returns P

  • toJSON:function
    • toJSON(params: P, obj?: B): any
    • Parameters

      • params: P
      • Optional obj: B

      Returns any

Methods

  • Apply the actual transformation. It must be pure (i.e. with no side effects). Returns a task that produces the result of the result directly.

    Parameters

    Returns B | Task<B>

  • Determine if the transformer can be applied automatically on UI change. Default is false.

    Parameters

    Returns boolean

  • Cleanup resources

    Automatically called on deleting an object and on recreating it (i.e. when update returns UpdateResult.Recreate or UpdateResult.Null)

    Not called on UpdateResult.Updated because the resources might not have been invalidated. In this case, the possible cleanup has to be handled manually.

    Parameters

    Returns void

  • interpolate(src: P, target: P, t: number, globalCtx: unknown): P
  • Parameter interpolation

    Parameters

    • src: P
    • target: P
    • t: number
    • globalCtx: unknown

    Returns P

  • isApplicable(a: A, globalCtx: unknown): boolean
  • Test if the transform can be applied to a given node

    Parameters

    • a: A
    • globalCtx: unknown

    Returns boolean

  • isSerializable(params: P): { isSerializable: true } | { isSerializable: false; reason: string }
  • By default, returns true

    Parameters

    • params: P

    Returns { isSerializable: true } | { isSerializable: false; reason: string }

  • Attempts to update the entity in a non-destructive way. For example changing a color scheme of a visual does not require computing new geometry. Return/resolve to undefined if the update is not possible.

    Parameters

    Returns UpdateResult | Task<UpdateResult>

Generated using TypeDoc