Trigger Action When Clicking an Object in ThreeJS

  Рет қаралды 4,713

Class Outside

Class Outside

Күн бұрын

Пікірлер: 7
@nawakman
@nawakman 8 ай бұрын
you can also use the Raycaster class from node_modules\three\src\core
@classoutside
@classoutside 7 ай бұрын
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
@xanaxmister9304 Жыл бұрын
Hello i like your videos but i have hard time to execute the '' npm run start-dev '' . It says start: not found
@classoutside
@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!
@svenkugler7125
@svenkugler7125 9 ай бұрын
normally there shouldn't be a start prefix: only npm run dev
@marcoscarvalhodev
@marcoscarvalhodev 5 ай бұрын
Will it work on mobile devices also?
@classoutside
@classoutside 5 ай бұрын
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.
Three.js Raycasting for Mouse Picking [Checkers 3]
19:22
SyntaxByte
Рет қаралды 28 М.
The 5 Stages of Learning Blender
3:14
Artin Azarnejad
Рет қаралды 343 М.
小丑女COCO的审判。#天使 #小丑 #超人不会飞
00:53
超人不会飞
Рет қаралды 16 МЛН
Quando A Diferença De Altura É Muito Grande 😲😂
00:12
Mari Maria
Рет қаралды 45 МЛН
Master 3D Click Positioning in Three.Js in 5 Minutes
6:46
Lun Dev
Рет қаралды 19 М.
How To Create A Loading Screen For Your Three.js App
7:09
Wael Yasmina
Рет қаралды 24 М.
Controlling Blender with my voice using LLM
15:33
Polyfjord Deep Dive
Рет қаралды 217 М.
Simple Third Person Camera (using Three.js/JavaScript)
13:00
SimonDev
Рет қаралды 67 М.
Three.js Optimization - Best Practices and Techniques
17:47
Valentin's coding book
Рет қаралды 43 М.
Three.js Raycaster Tutorial | How to Handle Mouse Input in Three.js
3:34
Suboptimal Engineer
Рет қаралды 16 М.
10 Minutes vs. 10 Years of Animation
19:29
Isto Inc.
Рет қаралды 1,5 МЛН
Inside the V3 Nazi Super Gun
19:52
Blue Paw Print
Рет қаралды 2,6 МЛН
小丑女COCO的审判。#天使 #小丑 #超人不会飞
00:53
超人不会飞
Рет қаралды 16 МЛН