Open richardoptibrium opened 4 years ago
Please check the attachment App.js, a modification from your sample.zip. With the latest dist files in this repository (not published to npm yet), you can use Kekule.Render.registerExternalModule
to explicit notify the existence of Three.js to Kekule. Perhaps it may resolve your issues.
btw., to display the caption of a viewer, you need to set property showCaption
to true:
chemViewer.setCaption('Hooray!').setShowCaption(true);
Please check the attachment App.js, a modification from your sample.zip. With the latest dist files in this repository (not published to npm yet), you can use
Kekule.Render.registerExternalModule
to explicit notify the existence of Three.js to Kekule. Perhaps it may resolve your issues. btw., to display the caption of a viewer, you need to set propertyshowCaption
to true:chemViewer.setCaption('Hooray!').setShowCaption(true);
Thank you. When will they be published to npm?
@richardoptibrium, the next release published on NPM should be shipped with more function updates, and it may requires some time. At present, if using the npm version of Kekule.js, you can still use the "require() + window.THREE" way.
I'm running the same piece of code, in isolation and in a larger application. I run both in the same browser (Chrome Version 80.0.3987.132 (Official Build) (64-bit)). The small sample app runs fine, but the larger app shows the following in the console:
The kekule code is the same, the browser is the same, Just the app at fault is larger than the sample. I'm afraid I cannot provide the large app but here is the sample: sample.zip
Molecule displays in the sample (but caption doesn't), no molecule in the large app.