Putty Controls is a Three.js module that lets you scale and rotate an object between two points.
Link: src/js/PuttyControls.js
import { PuttyControls } from 'src/js/PuttyControls.js';
// Create controls
const puttyControls = new PuttyControls(camera, renderer.domElement);
scene.add(puttyControls.getHelper());
// Attach to any 3D object
puttyControls.attach(mesh);
Link: https://htmlpreview.github.io/?https://github.com/doppl3r/putty-controls/blob/main/demo/index.html
- Clone repo:
git clone https://github.com/doppl3r/putty-controls - Open project in VS Code
- Open Terminal:
View > Terminal - Install NodeJS package libraries:
npm install - Run development libraries
npm run dev - Use the link it provides. Ex:
http://localhost:5173
This example uses Vite for hosting a local environment and includes commands to package for web (similar to Webpack).
Vue.js is used for the game UI, and leverages the latest Composition API introduced in version 3. This JavaScript framework is "An approachable, performant and versatile framework for building web user interfaces".
- All 3D models and textures were designed by doppl3r (Jacob DeBenedetto), and can be used on any project with proper credit.
