Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface IGumballParameterApi

Hierarchy

Index

Properties

hidden: boolean
id: string
name: string
sessionValue: string

The value that corresponds to the latest successful call to ISessionApi.customize. This property will be updated immediately before ISessionApi.customize returns.

value: string

The current value.

Validation happens immediately when setting this property. An error will be thrown in case validation fails. Use isValid to test whether a value passes validation.

In case ISessionApi.automaticSceneUpdate is true, setting the value will immediately trigger a customization (see ISessionApi.customize).

choices?: string[]
decimalplaces?: number
defval?: string
deselectOnEmpty?: boolean

If true, the selection will be cleared when clicking on an empty space. (default: false)

displayname?: string
enableRotation?: boolean

If the rotation is enabled. (default: true)

enableRotationAxes?: { x?: boolean; xy?: boolean; xz?: boolean; y?: boolean; yz?: boolean; z?: boolean }

If the rotation per axis is enabled.

Type declaration

  • Optional x?: boolean
  • Optional xy?: boolean
  • Optional xz?: boolean
  • Optional y?: boolean
  • Optional yz?: boolean
  • Optional z?: boolean
enableScaling?: boolean

If the scaling is enabled. (default: false)

enableScalingAxes?: { x?: boolean; xy?: boolean; xz?: boolean; y?: boolean; yz?: boolean; z?: boolean }

If the scaling per axis is enabled.

Type declaration

  • Optional x?: boolean
  • Optional xy?: boolean
  • Optional xz?: boolean
  • Optional y?: boolean
  • Optional yz?: boolean
  • Optional z?: boolean
enableTranslation?: boolean

If the translation is enabled. (default: true)

enableTranslationAxes?: { x?: boolean; xy?: boolean; xz?: boolean; y?: boolean; yz?: boolean; z?: boolean }

If the translation per axis is enabled.

Type declaration

  • Optional x?: boolean
  • Optional xy?: boolean
  • Optional xz?: boolean
  • Optional y?: boolean
  • Optional yz?: boolean
  • Optional z?: boolean
expression?: string
format?: string[]
group?: ResParameterGroup
hint?: string
hover?: boolean

If the objects are hoverable. (default: true)

hoverColor?: string

The color of the objects when hovered. (default: '#00ff78')

interval?: number
max?: number
maximumSelection?: number

The maximum number of objects that can be selected. (default: 1)

min?: number
minimumSelection?: number

The minimum number of objects that can be selected. (default: 1)

nameFilter?: string[]

The names of the objects that can be interacted with. (see Jira document and discussion result)

objects?: IDraggableObject[]

The objects that can be dragged.

For each object, the name filter and the restrictions can be defined. The name filter is used to filter the objects that can be dragged with the defined settings. This means that multiple objects can be dragged with different settings, but also multiple objects can be dragged with the same settings.

This is only used for dragging, not for rotation or scaling!

order?: number
prompt?: { activeText?: string; activeTitle?: string; inactiveTitle?: string }

A prompt that can be defined which is displayed instead of the default prompt.

Type declaration

  • Optional activeText?: string

    The text when the parameter is inactive.

  • Optional activeTitle?: string

    The title when the parameter is active.

  • Optional inactiveTitle?: string

    The title when the parameter is inactive.

restrictions?: RestrictionDefinition[]

The restrictions that can be applied to the draggable objects.

scale?: number

The scale of the controls. The scale divides the scene bounding sphere to get the actual size. (default: 0.005)

selectionColor?: string

The color of the objects when selected. (default: '#0d44f0')

settings?: object
space?: "local" | "world"

The space in which the controls operate. In world space, scaling is not available. (default: 'local')

structure?: ResStructureType
tooltip?: string
umax?: number
umin?: number
visualization?: PARAMETER_VISUALIZATION
vmax?: number
vmin?: number

Methods

  • isValid(value: unknown, throwError?: boolean): boolean
  • Evaluates if a given value is valid for this parameter.

    Parameters

    • value: unknown

      the value to evaluate

    • Optional throwError: boolean

      if true, an error is thrown if validation does not pass (default: false)

    Returns boolean

  • resetToDefaultValue(): void
  • Resets the value to the default value.

    Returns void

  • resetToSessionValue(): void
  • Resets the value to sessionValue.

    Returns void

  • stringify(value?: unknown): string
  • Returns the current value as a string, or attempts to stringify a given value if provided.

    Parameters

    • Optional value: unknown

      the value to stringify

    Returns string