https://github.com/angydev/three-clipping-vr
The clipping function of the project threejs-clipping applied in a VR project
https://github.com/angydev/three-clipping-vr
javascript threejs vr
Last synced: 4 months ago
JSON representation
The clipping function of the project threejs-clipping applied in a VR project
- Host: GitHub
- URL: https://github.com/angydev/three-clipping-vr
- Owner: AngyDev
- License: mit
- Created: 2022-12-13T13:44:15.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-01-27T13:03:06.000Z (about 3 years ago)
- Last Synced: 2025-03-15T23:27:19.391Z (11 months ago)
- Topics: javascript, threejs, vr
- Language: JavaScript
- Homepage:
- Size: 364 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Clipping in VR
This code implements clipping in a virtual reality scene using the Three.js library. It includes classes, methods, and examples that are useful for creating and manipulating clipping planes, or for adjusting the visibility of objects in a Three.js VR scene based on the position of the user's head-mounted display. The function used in the project [threejs-clipping](https://github.com/AngyDev/threejs-clipping) is not used because when this function is applied to this case the colored clipping planes are not visible in the correct space, they are translated, I wasn't able to figure out why.
## Demo
https://clipping-vr.netlify.app/

## Functionalities
- Import an STL file
- Add planes
- Hide planes
- Clipping
- Nagate clipping
- Join mesh, with this function is possible to move all the objects in the scene together
- Scale the selected object
- With the controller is possible to move the object in the scene
## Setup
If you want to start the application in local:
1. Clone the project `git clone git@github.com:AngyDev/three-clipping-vr.git`
2. With your terminal go in the folder where you cloned the project
3. Run the command `npm install` to install the dependencies
4. Run the command `npm run start` to run the project