question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

using transformControl.attach() and transformControl.detach() cause TypeError: Cannot read property 'call' of undefined

See original GitHub issue
Description of the problem

hover and drag transformControl’s model cause TypeError: Cannot read property ‘call’ of undefined

Describe the bug or feature request in detail.

this happens in my vue.js project ,when i debug the program i found hoveron and hoveroff and drag transformControl’s arrow will cause this type error. also i find error locates in dispatchEvent method of event array undefined

Uncaught TypeError: Cannot read property 'call' of undefined
    at TransformControls.dispatchEvent (webpack-internal:///./node_modules/three/build/three.module.js:792)
    at TransformControls.set (webpack-internal:///./node_modules/three/examples/jsm/controls/TransformControls.js:193)
    at TransformControls.pointerHover (webpack-internal:///./node_modules/three/examples/jsm/controls/TransformControls.js:240)
    at HTMLCanvasElement.onPointerHover (webpack-internal:///./node_modules/three/examples/jsm/controls/TransformControls.js:583)
Uncaught TypeError: Cannot read property 'call' of undefined
    at TransformControls.dispatchEvent (webpack-internal:///./node_modules/three/build/three.module.js:792)
    at TransformControls.set (webpack-internal:///./node_modules/three/examples/jsm/controls/TransformControls.js:193)
    at TransformControls.attach (webpack-internal:///./node_modules/three/examples/jsm/controls/TransformControls.js:153)
    at DragControls.eval (webpack-internal:///./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./src/components/SceneManagement.vue:686)
    at DragControls.dispatchEvent (webpack-internal:///./node_modules/three/build/three.module.js:792)
    at HTMLCanvasElement.onDocumentMouseMove (webpack-internal:///./node_modules/three/examples/jsm/controls/DragControls.js:95)
Three.js version
  • Dev
  • r110
Browser
  • All of them
  • Chrome
  • Firefox
  • Internet Explorer
OS
  • All of them
  • Windows
  • macOS
  • Linux
  • Android
  • iOS
Hardware Requirements (graphics card, VR Device, …)

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
jiangheng90commented, Nov 14, 2019
transformControl.addEventListener( 'change', this.render() );

should be

transformControl.addEventListener( 'change', this.render );

There are other errors, so check your code carefully.

thanks, it solved !

1reaction
WestLangleycommented, Nov 14, 2019
transformControl.addEventListener( 'change', this.render() );

should be

transformControl.addEventListener( 'change', this.render );

There are other errors, so check your code carefully.

Read more comments on GitHub >

github_iconTop Results From Across the Web

THREE.TransformControls is undefined while trying to ...
1) it doesn't change the mode to rotation/scaling/etc. It gives the following error, when called: "Uncaught TypeError: Cannot read property ' ...
Read more >
TransformControls – three.js docs
This class can be used to transform objects in 3D space by adapting a similar interaction model of DCC tools like Blender. Unlike...
Read more >
Angular Reactive Forms: Tips and Tricks
The way we get around this is by using the updateOn property. We can tell Angular that we only want to run the...
Read more >
Easy To Read Divi Changelog - Free Resource ...
Fixed JavaScript error Cannot read property et_slider_destroy of null that may have occurred in modules that use the et_slider_destroy() function.
Read more >
Three.js Making a Game
function init() {; // hide the loading bar; const loadingElem = document. ... ❌TypeError: Cannot read properties of undefined (reading 'animations').
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found