skip to Main Content

So I am using this library https://dev.codemotionkids.com/libraries/diorama/docs/index.html

I wanted to use the function getOrbit().disable() to disable the camera rotation. However I face this error:

Uncaught TypeError: getOrbit(…).disable is not a function
at draw (sketch.js:166:14)
at _main.default.redraw (p5.js:70809:27)
at _draw (p5.js:63046:25)

If anybody, given that library understand where I am making the error, thank you. I also tried it in one of the examples provided but still had the same problem. If anybody knows how to fix it thank you

2

Answers


  1. Chosen as BEST ANSWER

    Found the solution it is:

    getOrbit().enabled = false;
    

  2. From the source code, I can’t see any enable() or disable(), getOrbit() only returns the value of orbit. Is it possible for you to use the original OrbitControl from three.js?

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search