Git Product home page Git Product logo

Comments (6)

jeromeetienne avatar jeromeetienne commented on August 16, 2024

this kind of error is often due to an error of parameter.

sorry i dont have time to review your code

from threex.

 avatar commented on August 16, 2024

It seems I didn't added

THREE.Object3D._threexDomEvent.camera(camera);

This is why I hate debugging javascript :/ . Anway, it's solved now, and works like a charm! Awesome :) .

from threex.

brunougomes avatar brunougomes commented on August 16, 2024

I'm having the same problem, what you did to fix it? I do not understand. pls help :)

from threex.

 avatar commented on August 16, 2024

You should add this line of code in your initiation (init() most of the times):

THREE.Object3D._threexDomEvent.camera(camera);

That will add another object from where domevent will measure the mouse hit (if I understand it correctly).

EDIT: I added that line after:

// Add all the objects, lights and camera to the scene
    scene.add(light);
    scene.add(cube);
    scene.add(plane);
    scene.add(camera);

from threex.

brunougomes avatar brunougomes commented on August 16, 2024

Thanks, I'll try to do this.

from threex.

plafStar avatar plafStar commented on August 16, 2024

I am also getting the above error and adding that line within init and initScene did not help.
http://heart3d.encephalostudios.com/ThreeJStest/index_semayEx.html

Any guidance is greatly appreciated.

--edit
I am still working on getting the DOM events to work, but I had to edit some things in threex.domevent.js in order to make the file work with the new version of threejs.

for each instance of THREE.ray I changed it to THREE.Raycaster .
Also Vector.subSelf to Vector.sub
...

from threex.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.