RangeMetaField
class
RangeMetaField
extends
MetaField
number
number
null
number
number
Represents a range stored in a meta file.
Range is an array with two elements denoting the beginning and end of arange, respectively.
Constructors
constructor
Parameters
-
name : stringThe name of this field displayed in the editor.
-
initial : number numberThe initial value of this field.
MetaField.constructor
Properties
description
public
description
:
string
=
''
MetaField.description
initial
readonly
public
initial
:
number
number
The initial value of this field.
Inherited from
MetaField.initial
name
readonly
public
name
:
string
The name of this field displayed in the editor.
Inherited from
MetaField.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
static
readonly
public
symbol
:
typeof
symbol
=
...
Events
onChanged
public
get
onChanged
():
SubscribableValueEvent
TValue
Triggered when the data of this field changes.
Inherited from
MetaField.onChanged
onDisabled
public
get
onDisabled
():
SubscribableValueEvent
boolean
Triggered when the field becomes disabled or enabled.
Inherited from
MetaField.onDisabled
Methods
clone
public
clone
():
RangeMetaField
Create a clone of this field.
Inherited from
MetaField.clone
describe
public
describe
description
:
string
:
RangeMetaField
Set the description of this field.
Parameters
-
description : stringThe description.
MetaField.describe
disable
public
disable
value
:
boolean
=
true
:
RangeMetaField
Disable or enable the field in the editor.
Parameters
-
value : boolean = trueWhether the field should be disabled.
MetaField.disable
get
public
get
():
number
number
Get the current value.
Inherited from
MetaField.get
parse
public
override
parse
value
:
number
null
number
:
number
number
Convert a serialized value into a runtime type.
Parameters
-
value : number null numberThe serialized value.
MetaField.parse
serialize
public
serialize
():
number
null
number
Serialize the value of this field.
Inherited from
MetaField.serialize
set
public
set
value
:
number
null
number
:
void
Set the current value.
Parameters
-
value : number null numberThe new value.
MetaField.set
space
public
space
value
:
boolean
=
true
:
RangeMetaField
Add or remove spacing at the beginning of this field.
Parameters
-
value : boolean = trueWhether to include the spacing.
MetaField.space
update
public
update
startFrame
:
number
endFrame
:
number
duration
:
number
fps
:
number
:
void
Convert the given range from frames to seconds and update this field.
This helper method applies additional validation to the range, preventingit from overflowing the timeline.
Parameters
-
startFrame : numberThe beginning of the range.
-
endFrame : numberThe end of the range.
-
duration : numberThe current duration in frames.
-
fps : numberThe current framerate.