Input Number - IRobot1/ng3-vr-examples GitHub Wiki

Show number value. Interact to open number pad to modify value.

image

Code

Inputs

Name Type Default Description
text string blank Number value
overflow number 6 Number of characters to display before text is scrolled
min number undefined Optional minimum value. When set, value is clamped to minimum value
max number undefined Optional maximum value. When set, value is clamped to maximum value
width number 0.5 Width of input box in meters
height number 0.1 Height of input box in meters
enabled boolean true When true, number can be changed. When false, interaction is disabled
backgroundmaterial Material Theme button material (color #505050) Background material. Set to override with custom material
disabledmaterial Material Theme disabled material (color #666666) Disabled material. Set to override with custom material
outlinematerial LineBasicMaterial Theme outline material (color white) Outline material. Set to override with custom material
numbermaterial Material Theme number material (color lime) Number material. Set to override with custom material
selectable InteractiveObjects undefined Add to list of objects ray caster can test for overlap
geometry BufferGeoemtry Rounded rectangle shape Override to provide your own button geometry

Outputs

Name Type Description
change number Triggered when number changed. Event contains new number
openinput Object3D Triggered when interaction requested. Event contains mesh showing number

Examples


<flat-ui-input-number #numpad [min]="item._min" [max]="item._max" [text]="textvalue"
                      [enabled]="item.enabled && !(item._min && item._max)" [selectable]="selectable"
                      (change)="numbervalue=$event" (openinput)="input.opennumpad($event, numpad, textvalue)">
</flat-ui-input-number>