RangeMetaField
class RangeMetaField extends MetaFieldnumbernumbernullnumbernumber
Represents a range stored in a meta file.
Range is an array with two elements denoting the beginning and end of a range, respectively.
Constructors
constructor
public new RangeMetaFieldname: stringinitial: numbernumber: RangeMetaField
Parameters
name: string
The name of this field displayed in the editor.
initial: numbernumber
The initial value of this field.
MetaField.constructor
Properties
description
public description: string = ''
MetaField.description
initial
readonly public initial: numbernumber
The initial value of this field.
Inherited fromMetaField.initial
name
readonly public name: string
The name of this field displayed in the editor.
Inherited fromMetaField.name
spacing
public spacing: boolean = false
MetaField.spacing
type
readonly public type: symbol = RangeMetaField.symbol
The type of this field used by the editor to display the correct input.
symbol
Events
onChanged
public get onChanged(): SubscribableValueEventTValue
Triggered when the data of this field changes.
Inherited fromMetaField.onChanged
onDisabled
public get onDisabled(): SubscribableValueEventboolean
Triggered when the field becomes disabled or enabled.
Inherited fromMetaField.onDisabled
Methods
clone
public clone(): RangeMetaField
Create a clone of this field.
Inherited fromMetaField.clone
describe
public describedescription: string: RangeMetaField
Set the description of this field.
Parameters
description: string
The description.
MetaField.describe
disable
public disablevalue: boolean = true: RangeMetaField
Disable or enable the field in the editor.
Parameters
value: boolean = true
Whether the field should be disabled.
MetaField.disable
get
public get(): numbernumber
Get the current value.
Inherited fromMetaField.get
parse
public override parsevalue: numbernullnumber: numbernumber
Convert a serialized value into a runtime type.
Parameters
value: numbernullnumber
The serialized value.
MetaField.parse
serialize
public serialize(): numbernullnumber
Serialize the value of this field.
Inherited fromMetaField.serialize
set
public setvalue: numbernullnumber: void
Set the current value.
Parameters
value: numbernullnumber
The new value.
MetaField.set
space
public spacevalue: boolean = true: RangeMetaField
Add or remove spacing at the beginning of this field.
Parameters
value: boolean = true
Whether to include the spacing.
MetaField.space
update
public updatestartFrame: numberendFrame: numberduration: numberfps: number: void
Convert the given range from frames to seconds and update this field.
This helper method applies additional validation to the range, preventing it from overflowing the timeline.
Parameters
startFrame: number
The beginning of the range.
endFrame: number
The end of the range.
duration: number
The current duration in frames.
fps: number
The current framerate.