Class: ScaleController

ScaleController~ScaleController(onclick, optionsopt)

new ScaleController(onclick, optionsopt)

dat.GUI graphical user interface controller for control of the scale of threejs 3D object
Parameters:
Name Type Attributes Description
onclick onclick Called whenever user has clicked this controller.
options object <optional>
the following options are available:
Properties
Name Type Attributes Default Description
settings object <optional>
settings.
Properties
Name Type Attributes Description
zoomMultiplier number <optional>
control value. Default is 1.1
getLanguageCode function <optional>
language code of your browser returns the "primary language" subtag of the version of the browser.
Source:
Example
//Add new ScaleController to the dat.GUI folder
folder.add( new ScaleController( function ( customController, action ) {

	var zoom = customController.controller.getValue();

	//Scale a THREE.Mesh object
	mesh.scale.x = action( mesh.scale.x, zoom );
	mesh.scale.y = action( mesh.scale.y, zoom );
	mesh.scale.z = action( mesh.scale.z, zoom );
	mesh.needsUpdate = true;

},
	{

		settings: { zoomMultiplier: 1.1, },
		getLanguageCode: getLanguageCode,

	} ) );