Skip to content

AdityaKotari/ObjectExtrusion

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🚀 Object Extrusion on Three.js

Recognizes mouse clicks and visualizes multiple extrusions made to an object in Three.js, without using gizmos.

How to run it

This project has been created using BabylonJS and ES6/NPM , you can run it using:

npm i
npx webpack serve

To bundle your application, you can run

npm run build

Notes

  • Mesh should stay in the same position despite any combination of extrusions.
  • To track mouse movement, an invisible range of extrusion mesh was used. Experimented with planes as babylonjs official documentation suggests but that was not as accurate as the current solution.
  • Originally, implemented a solution that utilizes a single cube mesh that is scaled using a pivot to simulate extrusion on one side only. However, when extrusion on another face is attempted, the cube shifts position as the pivot must shift as well. To solve this issue, the current solution was implemented using a seperate cube that is created using the mouse pointer location and old center to calculate the new dimension and center, for the new mesh.

About

Demo project that recognizes extrusions made to an object in Threejs.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published