You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
TLDR: I think this line is flawed because the handleResize method is not bound to the class instance.
I setup Webvs like so:
const analyser = new Webvs.WebAudioAnalyser({
context: analyserNode.context
});
analyser.connectToNode(analyserNode);
this._webvsMain = new Webvs.Main({
canvas: this._canvasNode,
analyser: analyser
});
this._webvsMain.loadPreset(preset);
this._webvsMain.start();
Then at some point in the future, I update the canvas size and call:
this._webvsMain.notifyResize();
And I get the following error, because this is actually the event and not the DynamicMovement instance.
webvs.node.js:17667 Uncaught TypeError: Cannot read property 'updateDimVars' of undefined
at Main.module.exports.DynamicMovement.handleResize (webvs.node.js:17667)
at Main.emit (webvs.node.js:10809)
at Main.module.exports.Main.notifyResize (webvs.node.js:7185)
[MY CODE BELOW HERE]
at AvsWindow.componentDidUpdate (Webvs.js:31)
at commitLifeCycles (react-dom.development.js:9706)
at commitAllLifeCycles (react-dom.development.js:11349)
at HTMLUnknownElement.callCallback (react-dom.development.js:104)
at Object.invokeGuardedCallbackDev (react-dom.development.js:142)
at invokeGuardedCallback (react-dom.development.js:191)
at commitRoot (react-dom.development.js:11488)
The text was updated successfully, but these errors were encountered:
Using Webvs
2.0.2
from npm.TLDR: I think this line is flawed because the
handleResize
method is not bound to the class instance.I setup Webvs like so:
Then at some point in the future, I update the canvas size and call:
And I get the following error, because
this
is actually the event and not theDynamicMovement
instance.The text was updated successfully, but these errors were encountered: