dataarts / dat.guiVR

A flexible graphical user interface for changing variables within WebVR.
https://workshop.chromeexperiments.com/examples/guiVR/
Apache License 2.0
311 stars 50 forks source link

Allow to do ambiguous controller add() #55

Closed customlogic closed 8 years ago

customlogic commented 8 years ago

From our discussion in #53

Allow folders to do the ambiguous ".add" to create new controllers, appends it to itself, and returns the controller's own view

mflux commented 8 years ago
  folder.add(
    DATGUIVR.add( mesh.position, 'y', 2, 6 ).listen(),
    DATGUIVR.add( material, 'wireframe' ).listen(),
    DATGUIVR.add( animation, 'speed', {fast: 1, slow: 0.1 } ).listen()
  );

Will now be

  gui.add( mesh.position, 'y', 2, 6 ).listen();
  gui.add( material, 'wireframe' ).listen();
  gui.add( animation, 'speed', {fast: 1, slow: 0.1 } ).listen();
mflux commented 8 years ago

09115b2b7e2249cf357b729b8c1e39a3c8702b53

mflux commented 8 years ago

Tests need to be updated

customlogic commented 8 years ago

done in e4af9bd