NumberMetaField
class NumberMetaField extends MetaFieldanynumber
Represents a number stored in a meta file.
Constructors​
constructor​
public new NumberMetaFieldname: stringinitial: number: NumberMetaField
Parameters
name: stringThe name of this field displayed in the editor.
initial: numberThe initial value of this field.
MetaField.constructorProperties​
description​
public description: string = ''
MetaField.descriptioninitial​
readonly public initial: number
The initial value of this field.
Inherited fromMetaField.initialname​
readonly public name: string
The name of this field displayed in the editor.
Inherited fromMetaField.namespacing​
public spacing: boolean = false
MetaField.spacingtype​
readonly public type: NumberConstructor = Number
The type of this field used by the editor to display the correct input.
Events​
onChanged​
public get onChanged(): SubscribableValueEventTValue
Triggered when the data of this field changes.
Inherited fromMetaField.onChangedonDisabled​
public get onDisabled(): SubscribableValueEventboolean
Triggered when the field becomes disabled or enabled.
Inherited fromMetaField.onDisabledMethods​
clone​
public clone(): NumberMetaField
Create a clone of this field.
Inherited fromMetaField.clonedescribe​
public describedescription: string: NumberMetaField
Set the description of this field.
Parameters
description: stringThe description.
MetaField.describedisable​
public disablevalue: boolean = true: NumberMetaField
Disable or enable the field in the editor.
Parameters
value: boolean = trueWhether the field should be disabled.
MetaField.disableget​
public get(): number
Get the current value.
Inherited fromMetaField.getgetMax​
public getMax(): number
getMin​
public getMin(): number
getPrecision​
public getPrecision(): number
getPresets​
public getPresets(): MetaOptionnumber[]
getStep​
public getStep(): number
parse​
public override parsevalue: any: number
Convert a serialized value into a runtime type.
Parameters
value: anyThe serialized value.
MetaField.parseserialize​
public serialize(): any
Serialize the value of this field.
Inherited fromMetaField.serializeset​
public setvalue: any: void
Set the current value.
Parameters
value: anyThe new value.
MetaField.setsetPrecision​
public setPrecisionprecision: number: NumberMetaField
Parameters
precision: number
setPresets​
public setPresetsoptions: MetaOptionnumber[]: NumberMetaField
Parameters
options: MetaOptionnumber[]
setRange​
public setRangemin?: numbermax?: number: NumberMetaField
Parameters
setStep​
public setStepstep: number: NumberMetaField
Parameters
step: number
space​
public spacevalue: boolean = true: NumberMetaField
Add or remove spacing at the beginning of this field.
Parameters
value: boolean = trueWhether to include the spacing.
MetaField.space