Three Blocks

Murmuration / source

Open preview
helpers/exampleGui.jsPlain text ↗
import { Controller, GUI } from 'three/addons/libs/lil-gui.module.min.js';

if ( typeof Controller.prototype.info !== 'function' ) {

	Controller.prototype.info = function ( message ) {

		this.domElement.title = message;
		this.domElement.setAttribute( 'aria-description', message );
		return this;

	};

}

/** Create the one controls UI used by every gallery example. */
export function createExampleGui( title = 'Controls', options = {} ) {

	return new GUI( { title, ...options } );

}