you can also use the Raycaster class from node_modules\three\src\core
@classoutside7 ай бұрын
I believe the Raycaster from ThreeJS, loaded in node_modules\three\src\core, is being used in the file: RayCastHelper.js on the line: const raycaster = new THREE.Raycaster(); Perhaps there is more raycaster functionality that may be beneficial from that file. three\src\core\Raycaster.js: github.com/mrdoob/three.js/blob/dev/src/core/Raycaster.js RayCastHelper.js: github.com/ClassOutside/Clicking_Objects_ThreeJS/blob/main/src/helpers/RayCastHelper.js
@xanaxmister9304 Жыл бұрын
Hello i like your videos but i have hard time to execute the '' npm run start-dev '' . It says start: not found
@classoutside Жыл бұрын
Hello! Thank you for the compliment :) It sounds like when you run 'npm run start-dev' npm cannot seem to find the start-dev script. The start-dev script should be available in the package.json file. You can currently see this on line 19: github.com/ClassOutside/Clicking_Objects_ThreeJS/blob/main/package.json One possibility is that your terminal is not pointing at the correct directory. When you extract the downloaded zip file, it creates a new folder with the project inside of it. The directory looks like this: C:\Downloads\Clicking_Objects_ThreeJS-main\Clicking_Objects_ThreeJS-main. When you open a terminal window, you need to make sure that you are in the same directory as the package.json. This can be seen at kzbin.info/www/bejne/jpy9hHShn7JnY6Msi=1qLsn1ZIfxJxsRmg&t=106 If you are on windows, you might be able to run the command 'ls' in the terminal to print each file in the current directory/folder. If you do not see package.json, you need to change the directory. If this is the case, you may also need to run 'npm install' again. I hope this helps, good luck!
@svenkugler71259 ай бұрын
normally there shouldn't be a start prefix: only npm run dev
@marcoscarvalhodev5 ай бұрын
Will it work on mobile devices also?
@classoutside5 ай бұрын
I have not recently tested the compatibility of a "Click" event listener with mobile. For mobile it is often recommended to use Touch Events. These are described more here: developer.mozilla.org/en-US/docs/Web/API/Touch_events/Using_Touch_Events So for a mobile design, if click does not work, an event listener like "touchend" may need to be added.