JAVASCRIPT 10
Gui.js Guest on 6th April 2021 03:11:59 AM
  1. iii.params = {
  2.  
  3.     updateFinger: true,
  4.     updateWater: false,
  5.     updateParticles: true,
  6.     updateUniforms: false,
  7.  
  8.     pianoRollParticleDecay: 0.91,
  9.     pianoRollParticleLifeSpan: 100,
  10.     pianoRollParticleInitialSize: 1.6,
  11.     pianoRollParticleVelocity: 0.1,
  12.     pianoRollParticleGravity: 0.003,
  13.     pianoRollParticleDrag: 0.9
  14.  
  15. };
  16.  
  17. iii.initGUI = function() {
  18.  
  19.     if (url.boolean('gui')) {
  20.  
  21.         var gui = iii.gui = new dat.GUI();
  22.  
  23.         gui.add(iii.params, 'updateFinger');
  24.         gui.add(iii.params, 'updateWater');
  25.         gui.add(iii.params, 'updateParticles');
  26.         gui.add(iii.params, 'updateUniforms');
  27.  
  28.  
  29.         gui.add(iii.params, 'pianoRollParticleDecay', 0.8, 1).name('particle decay');
  30.         gui.add(iii.params, 'pianoRollParticleInitialSize', 0, 5).name('particle size');
  31.         gui.add(iii.params, 'pianoRollParticleVelocity', 0.1, 3).name('particle vel');
  32.         gui.add(iii.params, 'pianoRollParticleGravity', -0.1, 0).name('particle grav');
  33.         gui.add(iii.params, 'pianoRollParticleDrag', 0, 1).name('particle drag');
  34.     }
  35.  
  36.  
  37. };

Paste-bin is for source code and general debugging text.

Login or Register to edit, delete and keep track of your pastes and more.

Raw Paste

Login or Register to edit or fork this paste. It's free.