Skip to content

off(...)

Studio is being deprecated, please head over to the documentation page for Mattercraft, our most advanced 3D tool for the web, where you can find the most recent information and tutorials.

off(evt : string, func : (...params : any[]) => void) : this;

Removes a handler function from an event.

ParameterTypeDescription
evtstringThe name of the event with the attached function.
funcfunctionThe function to be removed.

this

myobject.on("pointerdown", myHandler);
myobject.off("pointerdown", myHandler);
function myHandler() {
// This function is not called
}