Input Toggle - IRobot1/ng3-vr-examples GitHub Wiki
Toggle Boolean state. Interact to toggle state.
input-toggle code
Inputs
Name |
Type |
Default |
Description |
checked |
boolean |
false |
State of toggle position |
enabled |
boolean |
true |
When true, toggle can be changed. When false, interaction is disabled |
width |
number |
0.2 |
Width of button in meters |
height |
number |
0.1 |
Height of button in meters |
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 |
falsematerial |
Material |
Theme toggle false material (color white) |
Toggle false material. Set to override with custom material |
truematerial |
Material |
Theme toggle true material (color cornflowerblue) |
Toggle true 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 geometry |
Outputs
Name |
Type |
Description |
change |
boolean |
Triggered when state changed. Event contains new state |
Examples
<flat-ui-input-toggle [position]="[0.55, 0, 0]" [checked]="checked" [selectable]="selectable" (change)="changed($event)">
</flat-ui-input-toggle>