icn3d 3.11.7 → 3.12.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -32,10 +32,25 @@ Usage
32
32
 
33
33
  * <b>Use icn3d as a 3D Viewer with React</b>
34
34
 
35
- You can specify jQuery and three.js in your HTML file by following the source code of [example.html](https://www.ncbi.nlm.nih.gov/Structure/icn3d/example.html), then import "icn3d" in your React JavaScript file as shown below:
35
+ You can first specify the "dependencies.js" file as follows:
36
+
37
+ import * as THREE from 'icn3d/three'
38
+ import $ from 'jquery'
39
+ import 'jquery-ui-bundle';
40
+
41
+ import 'jquery-ui-bundle/jquery-ui.min.css';
42
+
43
+ global.THREE = THREE
44
+ global.$ = $
45
+ global.jQuery = $
36
46
 
47
+ Then specify the "icn3d-viewer.js" file as follows:
48
+
37
49
  import React, { useEffect } from "react";
38
- import * as icn3d from "icn3d/module";
50
+ import './dependencies';
51
+
52
+ import * as icn3d from 'icn3d/module'
53
+ import * from 'icn3d/css'
39
54
 
40
55
  function Icn3dViewer() {
41
56
  useEffect(() => {