- Source:
Attaches the callback's associated with the WebGL canvas element to the event.
Example
function clickCallback() {
console.log('CLICKED');
}
$$$
.on('click', clickCallback)
.trigger('click') // logs 'CLICKED'
Attaches the callback's associated with the WebGL canvas element to the event.
function clickCallback() {
console.log('CLICKED');
}
$$$
.on('click', clickCallback)
.trigger('click') // logs 'CLICKED'