1.0.1 • Published 4 years ago

pick-helper v1.0.1

Weekly downloads
2
License
ISC
Repository
github
Last release
4 years ago

This is Pick Helper. It does one thing, picks objects in a 3d environment created with three js for you.

How to use:

First, import Pick Helper. import PickHelper from pickhelper;

Next, create your pick helper. pickHelper = new PickHelper(this.scene, this.camera); or pickHelper = new PickHelper(scene, camera)

Now, use the .pick command to get the mesh your cursor is over. pickHelper.pick(event, this.scene, this.camera, this.mount); or pickHelper.pick(event, scene, camera, mount);

I have no interest on financial gain for this code and all are permitted to use it as they see fit. special thanks to the creator of this tutorial: https://threejsfundamentals.org/threejs/lessons/threejs-picking.html This code is based off their PickHelper class but converted into an object-oriented form for use in React, etc. and all contained within said class.