partridgejiang / Kekule.js

A Javascript cheminformatics toolkit.
http://partridgejiang.github.io/Kekule.js
MIT License
248 stars 61 forks source link

Using ChemWidget.Viewer3D in a React/Webpack/npm or yarn environment #271

Open richardoptibrium opened 2 years ago

richardoptibrium commented 2 years ago

Hi,

I'm trying to see how possible it is to integrate the Kekule 3D viewer into a React component. I can:

import {
    Kekule,
} from 'kekule';

and attempt to:

    Kekule.Widget.autoLauncher.execute(document.getElementById('chemViewer3D'));

But I get: "Three.js not available, try to include it through the Githubissues.

  • Githubissues is a development platform for aggregating issues.