modules/datguivr/index.js
/**
   * 
   * @param {function} func to call back when button pressed
   * @param {*} image can be filename, WebGLRenderTarget or Material
   * @param {Boolean} wide whether to make button fill entire width of panel (api subject to change)
   */
@param {function} func to call back when button pressed
@param {*} image can be filename, WebGLRenderTarget or Material
@param {Boolean} wide whether to make button fill entire width of panel (api subject to change)
@param { function } func to call back when button pressed @param { * } image can be filename WebGLRenderTarget or Material @param { Boolean } wide whether to make button fill entire width of panel ( api subject to change )
function addImageButton(func, image, wide, height) {
    const object = { f: func };
    const propertyName = 'f';
    const button = createImageButton({
      textCreator, object, propertyName, image, wide, height
    });
    controllers.push( button );
    return button;
  }
function addImageButton ( func , image , wide , height ) { const object = { f : func } ; const propertyName = 'f' ; const button = createImageButton ( { textCreator , object , propertyName , image , wide , height } ) ; controllers . push ( button ) ; return button ; }
@param {function} func to call back when button pressed
 @param {*} image can be filename, WebGLRenderTarget or Material
 @param {Boolean} wide whether to make button fill entire width of panel (api subject to change)
@param { function } func to call back when button pressed @param { * } image can be filename WebGLRenderTarget or Material @param { Boolean } wide whether to make button fill entire width of panel ( api subject to change )
//see also folder.js where this is added to group object... //as such this function also needs to be passed as an argument to createFolder. //perhaps all of these 'addX' functions could be initially put onto an object so that //new additions could be added slightly more easily.