Options
All
  • Public
  • Public/Protected
  • All
Menu

Class NgxThreeGui

Three gui

See the ngx3js docs page for details.

Hierarchy

Index

Constructors

constructor

constructor

Properties

_closed

_closed: boolean

Used to determine if the GUI is closed. Use gui.open() or gui.close() to change this.

_hidden

_hidden: boolean

Used to determine if the GUI is hidden. Use gui.show() or gui.hide() to change this.

_title

_title: string

title.

children

children: (I3JS.GUI | GUIController)[]

The list of controllers and folders contained by this GUI.

controllers

controllers: GUIController[]

The list of controllers contained by this GUI.

domElement

domElement: HTMLElement

The outermost container element.

folders

folders: I3JS.GUI[]

The list of folders contained by this GUI.

parent

parent: I3JS.GUI

The GUI containing this folder, or undefined if this is the root GUI.

root

root: I3JS.GUI

The top level GUI containing this folder, or this if this is the root GUI.

Static _closed

_closed: boolean

Used to determine if the GUI is closed. Use gui.open() or gui.close() to change this.

Static _hidden

_hidden: boolean

Used to determine if the GUI is hidden. Use gui.show() or gui.hide() to change this.

Static _title

_title: string

title.

Static children

children: (I3JS.GUI | GUIController)[]

The list of controllers and folders contained by this GUI.

Static controllers

controllers: GUIController[]

The list of controllers contained by this GUI.

Static customCss

customCss: string = '.no-pointer-events {pointer-events: none;}.control-disabled {color: #888;text-decoration: line-through;}'

Custom css of three gui

Static domElement

domElement: HTMLElement

The outermost container element.

Static folders

folders: I3JS.GUI[]

The list of folders contained by this GUI.

Static parent

parent: I3JS.GUI

The GUI containing this folder, or undefined if this is the root GUI.

Static root

root: I3JS.GUI

The top level GUI containing this folder, or this if this is the root GUI.

Methods

add

  • add(object: object, property: string, min?: number | object | any[], max?: number, step?: number): GUIController
  • Adds a controller to the GUI, inferring controller type using the typeof operator.

    gui.add( object, 'property' );
    gui.add( object, 'number', 0, 100, 1 );
    gui.add( object, 'options', [ 1, 2, 3 ] );

    Parameters

    • object: object

      The object the controller will modify.

    • property: string

      Name of the property to control.

    • Optional min: number | object | any[]

      Minimum value for number controllers, or the set of selectable values for a dropdown.

    • Optional max: number

      Maximum value for number controllers.

    • Optional step: number

      Step value for number controllers.

    Returns GUIController

    add

addColor

  • addColor(object: object, property: string, rgbScale?: number): GUIController
  • Adds a color controller to the GUI.

    params = {
    cssColor: '#ff00ff',
    rgbColor: { r: 0, g: 0.2, b: 0.4 },
    customRange: [ 0, 127, 255 ],
    };
    gui.addColor( params, 'cssColor' );
    gui.addColor( params, 'rgbColor' );
    gui.addColor( params, 'customRange', 255 );

    Parameters

    • object: object

      The object the controller will modify.

    • property: string

      Name of the property to control.

    • Optional rgbScale: number

    Returns GUIController

    color

addFolder

  • Adds a folder to the GUI, which is just another GUI. This method returns the nested GUI so you can add controllers to it.

    Parameters

    • title: string

      Name to display in the folder's title bar.

    Returns I3JS.GUI

    folder

close

controllersRecursive

destroy

  • destroy(): void

foldersRecursive

hide

load

onChange

onFinishChange

open

reset

save

  • save(recursive?: boolean): object
  • Returns an object mapping controller names to values. The object can be passed to gui.load() to recall these values.

    Parameters

    • Optional recursive: boolean

    Returns object

    save

setStyle

title

Static add

  • add(object: object, property: string, min?: number | object | any[], max?: number, step?: number): GUIController
  • Adds a controller to the GUI, inferring controller type using the typeof operator.

    gui.add( object, 'property' );
    gui.add( object, 'number', 0, 100, 1 );
    gui.add( object, 'options', [ 1, 2, 3 ] );

    Parameters

    • object: object

      The object the controller will modify.

    • property: string

      Name of the property to control.

    • Optional min: number | object | any[]

      Minimum value for number controllers, or the set of selectable values for a dropdown.

    • Optional max: number

      Maximum value for number controllers.

    • Optional step: number

      Step value for number controllers.

    Returns GUIController

    add

Static addColor

  • addColor(object: object, property: string, rgbScale?: number): GUIController
  • Adds a color controller to the GUI.

    params = {
    cssColor: '#ff00ff',
    rgbColor: { r: 0, g: 0.2, b: 0.4 },
    customRange: [ 0, 127, 255 ],
    };
    gui.addColor( params, 'cssColor' );
    gui.addColor( params, 'rgbColor' );
    gui.addColor( params, 'customRange', 255 );

    Parameters

    • object: object

      The object the controller will modify.

    • property: string

      Name of the property to control.

    • Optional rgbScale: number

    Returns GUIController

    color

Static addFolder

  • Adds a folder to the GUI, which is just another GUI. This method returns the nested GUI so you can add controllers to it.

    Parameters

    • title: string

      Name to display in the folder's title bar.

    Returns I3JS.GUI

    folder

Static close

Static controllersRecursive

Static destroy

  • destroy(): void

Static foldersRecursive

Static hide

Static load

  • load(obj: object, recursive?: boolean): I3JS.GUI

Static onChange

Static onFinishChange

Static open

Static reset

  • reset(recursive?: boolean): I3JS.GUI

Static save

  • save(recursive?: boolean): object
  • Returns an object mapping controller names to values. The object can be passed to gui.load() to recall these values.

    Parameters

    • Optional recursive: boolean

    Returns object

    save

Static title

Generated using TypeDoc