brianxu / GPUPicker

a GPU based picking class for ThreeJS lib
MIT License
79 stars 14 forks source link

Importing GPUPicker as a module? #3

Open mikemklee opened 5 years ago

mikemklee commented 5 years ago

Hi, first of all, thank you for creating this module. Your demo looks amazing.

I wanted to use this in my own application, but I am having difficulty including the module.

I am using React to build my application, so I am using the ES6 import/export syntax to include my modules. However, when I try to do something like

import './GPUPicker.js,

I get an error saying that

'GPUPicker' is not exported from 'three' (imported as 'THREE')

I am not sure how familiar you are with React, but I think what is happening is that the THREE instance that my React component is referring to, and the one that GPUPicker is referring to are not the same.

Including the module in a plain-old Githubissues.

  • Githubissues is a development platform for aggregating issues.