@ridp/threejs 0.2.0 → 1.1.0

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.
Files changed (82) hide show
  1. package/dist/ImageLoader-CB_URfeZ.js +860 -0
  2. package/dist/ImageLoader-DwvBWW6h.cjs +5 -0
  3. package/dist/common-BHi3qsZW.cjs +15 -0
  4. package/dist/{common-DESmndxO.js → common-fbJUHqlj.js} +1 -1
  5. package/dist/hooks.cjs +1 -1
  6. package/dist/hooks.js +7 -9
  7. package/dist/threejs.cjs +1 -1
  8. package/dist/threejs.js +17 -15
  9. package/dist/useGLTFLoader-DHxBLucO.js +5629 -0
  10. package/dist/useGLTFLoader-DM3-7jdq.cjs +4 -0
  11. package/dist/utils.cjs +1 -1
  12. package/dist/utils.js +15 -12
  13. package/esdoc/ast/source/.external-ecmascript.js.json +2802 -0
  14. package/esdoc/ast/source/hooks/index.js.json +739 -0
  15. package/esdoc/ast/source/hooks/useGLTFLoader.js.json +9111 -0
  16. package/esdoc/ast/source/hooks/useObb.js.json +16463 -0
  17. package/esdoc/ast/source/hooks/useRaycaster.js.json +15556 -0
  18. package/esdoc/ast/source/hooks/useThreeJs.js.json +52887 -0
  19. package/esdoc/ast/source/index.js.json +570 -0
  20. package/esdoc/ast/source/instance/IDBCache.js.json +40978 -0
  21. package/esdoc/ast/source/instance/index.js.json +232 -0
  22. package/esdoc/ast/source/utils/ImageLoader.js.json +7037 -0
  23. package/esdoc/ast/source/utils/common.js.json +5134 -0
  24. package/esdoc/ast/source/utils/css3dHelper.js.json +9101 -0
  25. package/esdoc/ast/source/utils/disposeObject.js.json +5978 -0
  26. package/esdoc/ast/source/utils/helper.js.json +10522 -0
  27. package/esdoc/ast/source/utils/index.js.json +908 -0
  28. package/esdoc/badge.svg +17 -0
  29. package/esdoc/class/src/instance/IDBCache.js~IDBCache.html +1299 -0
  30. package/esdoc/coverage.json +86 -0
  31. package/esdoc/css/github.css +83 -0
  32. package/esdoc/css/identifiers.css +37 -0
  33. package/esdoc/css/manual.css +134 -0
  34. package/esdoc/css/prettify-tomorrow.css +132 -0
  35. package/esdoc/css/search.css +84 -0
  36. package/esdoc/css/source.css +55 -0
  37. package/esdoc/css/style.css +608 -0
  38. package/esdoc/css/test.css +58 -0
  39. package/esdoc/file/src/hooks/index.js.html +79 -0
  40. package/esdoc/file/src/hooks/useGLTFLoader.js.html +146 -0
  41. package/esdoc/file/src/hooks/useObb.js.html +149 -0
  42. package/esdoc/file/src/hooks/useRaycaster.js.html +153 -0
  43. package/esdoc/file/src/hooks/useThreeJs.js.html +362 -0
  44. package/esdoc/file/src/index.js.html +78 -0
  45. package/esdoc/file/src/instance/IDBCache.js.html +312 -0
  46. package/esdoc/file/src/instance/index.js.html +76 -0
  47. package/esdoc/file/src/utils/ImageLoader.js.html +118 -0
  48. package/esdoc/file/src/utils/common.js.html +102 -0
  49. package/esdoc/file/src/utils/css3dHelper.js.html +131 -0
  50. package/esdoc/file/src/utils/disposeObject.js.html +114 -0
  51. package/esdoc/file/src/utils/helper.js.html +138 -0
  52. package/esdoc/file/src/utils/index.js.html +80 -0
  53. package/esdoc/function/index.html +2019 -0
  54. package/esdoc/identifiers.html +738 -0
  55. package/esdoc/image/badge.svg +17 -0
  56. package/esdoc/image/esdoc-logo-mini-black.png +0 -0
  57. package/esdoc/image/esdoc-logo-mini.png +0 -0
  58. package/esdoc/image/manual-badge.svg +17 -0
  59. package/esdoc/image/search.png +0 -0
  60. package/esdoc/index.html +153 -0
  61. package/esdoc/index.json +2051 -0
  62. package/esdoc/inject/css/0-cus-style.css +1 -0
  63. package/esdoc/lint.json +1 -0
  64. package/esdoc/script/inherited-summary.js +28 -0
  65. package/esdoc/script/inner-link.js +32 -0
  66. package/esdoc/script/manual.js +12 -0
  67. package/esdoc/script/patch-for-local.js +8 -0
  68. package/esdoc/script/prettify/Apache-License-2.0.txt +202 -0
  69. package/esdoc/script/prettify/prettify.js +46 -0
  70. package/esdoc/script/pretty-print.js +25 -0
  71. package/esdoc/script/search.js +117 -0
  72. package/esdoc/script/search_index.js +572 -0
  73. package/esdoc/script/test-summary.js +54 -0
  74. package/esdoc/source.html +213 -0
  75. package/esdoc/variable/index.html +225 -0
  76. package/package.json +13 -3
  77. package/readme.md +93 -0
  78. package/dist/common-nMt4tIRA.cjs +0 -15
  79. package/dist/disposeObject-BuI3II7v.cjs +0 -1
  80. package/dist/disposeObject-CmFSSgi7.js +0 -616
  81. package/dist/useGLTFLoader-BAoIZjEX.js +0 -2645
  82. package/dist/useGLTFLoader-CGOxhEOO.cjs +0 -6
@@ -0,0 +1,131 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <base data-ice="baseUrl" href="../../../">
6
+ <title data-ice="title">src/utils/css3dHelper.js | @ridp/threejs</title>
7
+ <link type="text/css" rel="stylesheet" href="css/style.css">
8
+ <link type="text/css" rel="stylesheet" href="css/prettify-tomorrow.css">
9
+ <script src="script/prettify/prettify.js"></script>
10
+ <script src="script/manual.js"></script>
11
+ <link rel="stylesheet" href="./inject/css/0-cus-style.css"></head>
12
+ <body class="layout-container" data-ice="rootContainer">
13
+
14
+ <header>
15
+ <a href="./">Home</a>
16
+
17
+ <a href="identifiers.html">Reference</a>
18
+ <a href="source.html">Source</a>
19
+
20
+ <div class="search-box">
21
+ <span>
22
+ <img src="./image/search.png">
23
+ <span class="search-input-edge"></span><input class="search-input"><span class="search-input-edge"></span>
24
+ </span>
25
+ <ul class="search-result"></ul>
26
+ </div>
27
+ </header>
28
+
29
+ <nav class="navigation" data-ice="nav"><div>
30
+ <ul>
31
+
32
+ <li data-ice="doc"><a data-ice="dirPath" class="nav-dir-path" href="identifiers.html#hooks">hooks</a><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-useGLTFLoader">useGLTFLoader</a></span></span></li>
33
+ <li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-useObb">useObb</a></span></span></li>
34
+ <li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-useRaycaster">useRaycaster</a></span></span></li>
35
+ <li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-useThreeJs">useThreeJs</a></span></span></li>
36
+ <li data-ice="doc"><span data-ice="kind" class="kind-variable">V</span><span data-ice="name"><span><a href="variable/index.html#static-variable-intersectColor">intersectColor</a></span></span></li>
37
+ <li data-ice="doc"><span data-ice="kind" class="kind-variable">V</span><span data-ice="name"><span><a href="variable/index.html#static-variable-obbObjects">obbObjects</a></span></span></li>
38
+ <li data-ice="doc"><a data-ice="dirPath" class="nav-dir-path" href="identifiers.html#instance">instance</a><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/instance/IDBCache.js~IDBCache.html">IDBCache</a></span></span></li>
39
+ <li data-ice="doc"><a data-ice="dirPath" class="nav-dir-path" href="identifiers.html#utils">utils</a><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-ImageLoader">ImageLoader</a></span></span></li>
40
+ <li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-initEnvImage">initEnvImage</a></span></span></li>
41
+ <li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-getCommonParent">getCommonParent</a></span></span></li>
42
+ <li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-createInfoPlane">createInfoPlane</a></span></span></li>
43
+ <li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-createTagPlane">createTagPlane</a></span></span></li>
44
+ <li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-disposeThreeObject">disposeThreeObject</a></span></span></li>
45
+ <li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-createArrowHelper">createArrowHelper</a></span></span></li>
46
+ <li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-createAxesHelper">createAxesHelper</a></span></span></li>
47
+ <li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-createBox3Helper">createBox3Helper</a></span></span></li>
48
+ <li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-createCameraHelper">createCameraHelper</a></span></span></li>
49
+ <li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-createGridHelper">createGridHelper</a></span></span></li>
50
+ <li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-createMapControls">createMapControls</a></span></span></li>
51
+ <li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-createOrbitControl">createOrbitControl</a></span></span></li>
52
+ <li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-createRaycaster">createRaycaster</a></span></span></li>
53
+ <li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-createStats">createStats</a></span></span></li>
54
+ </ul>
55
+ </div>
56
+ </nav>
57
+
58
+ <div class="content" data-ice="content"><h1 data-ice="title">src/utils/css3dHelper.js</h1>
59
+ <pre class="source-code line-number raw-source-code"><code class="prettyprint linenums" data-ice="content">import { CSS3DSprite } from &quot;three/examples/jsm/Addons.js&quot;;
60
+
61
+ /**
62
+ * &#x521B;&#x5EFA; CSS3DSprite &#x4FE1;&#x606F;&#x9762;&#x677F;
63
+ * @param { string } id &#x5143;&#x7D20;ID
64
+ * @param { [ number, number, number ]} scale &#x7F29;&#x653E;
65
+ * @returns new CSS3DSprite()
66
+ *
67
+ * &#x6CE8;&#x610F;: html&#x5143;&#x7D20;&#x4E0D;&#x80FD;&#x8BBE;&#x7F6E;&#x6A21;&#x677F;&#x4E3A;&#x7ED3;&#x5BF9;&#x5B9A;&#x4F4D;!!!
68
+ */
69
+ export function createInfoPlane(id, scale = [0.3, 0.3, 0.3]) {
70
+ const el = document.querySelector(`#${id}`);
71
+ if (!el) {
72
+ console.log(&quot; &#x83B7;&#x53D6; infoPlane &#x5143;&#x7D20;&#x5931;&#x8D25; (id) =====&gt; :&quot;, id);
73
+ return;
74
+ }
75
+ const _el = el.cloneNode(true);
76
+ _el.style.display = &quot;block&quot;;
77
+
78
+ const plane = new CSS3DSprite(_el);
79
+ plane.visible = false;
80
+ plane.scale.set(...scale);
81
+ return plane;
82
+ }
83
+ export function createTagPlane(text, scale) {
84
+ const el = tagBlock(text);
85
+ el.style.display = &quot;block&quot;;
86
+ const plane = new CSS3DSprite(el);
87
+ plane.visible = false;
88
+ plane.scale.set(scale, scale, scale);
89
+ return plane;
90
+ }
91
+
92
+ const tagBlock = (text) =&gt; {
93
+ const el = document.createElement(&quot;div&quot;);
94
+ el.style.cssText = `
95
+ border-radius: 50px;
96
+ border: 2px solid rgba(255, 255, 255, 0.5);
97
+ background-color: rgba(15, 20, 22, 0.562);
98
+ justify-content: flex-start;
99
+ align-items: center;
100
+ padding: 20px 30px;
101
+ display: flex;
102
+ transform-origin: center 0;`;
103
+ const textSpan = document.createElement(&quot;span&quot;);
104
+ textSpan.style.cssText = `
105
+ font-size: 40px;
106
+ line-height: 1;
107
+ white-space: nowrap;
108
+ color: #fff;
109
+ font-weight: 700;
110
+ `;
111
+ textSpan.innerText = text;
112
+ el.appendChild(textSpan);
113
+ return el;
114
+ };
115
+ </code></pre>
116
+
117
+ </div>
118
+
119
+ <footer class="footer">
120
+ Generated by <a href="https://esdoc.org">ESDoc<span data-ice="esdocVersion">(1.1.0)</span><img src="./image/esdoc-logo-mini-black.png"></a>
121
+ </footer>
122
+
123
+ <script src="script/search_index.js"></script>
124
+ <script src="script/search.js"></script>
125
+ <script src="script/pretty-print.js"></script>
126
+ <script src="script/inherited-summary.js"></script>
127
+ <script src="script/test-summary.js"></script>
128
+ <script src="script/inner-link.js"></script>
129
+ <script src="script/patch-for-local.js"></script>
130
+ </body>
131
+ </html>
@@ -0,0 +1,114 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <base data-ice="baseUrl" href="../../../">
6
+ <title data-ice="title">src/utils/disposeObject.js | @ridp/threejs</title>
7
+ <link type="text/css" rel="stylesheet" href="css/style.css">
8
+ <link type="text/css" rel="stylesheet" href="css/prettify-tomorrow.css">
9
+ <script src="script/prettify/prettify.js"></script>
10
+ <script src="script/manual.js"></script>
11
+ <link rel="stylesheet" href="./inject/css/0-cus-style.css"></head>
12
+ <body class="layout-container" data-ice="rootContainer">
13
+
14
+ <header>
15
+ <a href="./">Home</a>
16
+
17
+ <a href="identifiers.html">Reference</a>
18
+ <a href="source.html">Source</a>
19
+
20
+ <div class="search-box">
21
+ <span>
22
+ <img src="./image/search.png">
23
+ <span class="search-input-edge"></span><input class="search-input"><span class="search-input-edge"></span>
24
+ </span>
25
+ <ul class="search-result"></ul>
26
+ </div>
27
+ </header>
28
+
29
+ <nav class="navigation" data-ice="nav"><div>
30
+ <ul>
31
+
32
+ <li data-ice="doc"><a data-ice="dirPath" class="nav-dir-path" href="identifiers.html#hooks">hooks</a><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-useGLTFLoader">useGLTFLoader</a></span></span></li>
33
+ <li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-useObb">useObb</a></span></span></li>
34
+ <li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-useRaycaster">useRaycaster</a></span></span></li>
35
+ <li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-useThreeJs">useThreeJs</a></span></span></li>
36
+ <li data-ice="doc"><span data-ice="kind" class="kind-variable">V</span><span data-ice="name"><span><a href="variable/index.html#static-variable-intersectColor">intersectColor</a></span></span></li>
37
+ <li data-ice="doc"><span data-ice="kind" class="kind-variable">V</span><span data-ice="name"><span><a href="variable/index.html#static-variable-obbObjects">obbObjects</a></span></span></li>
38
+ <li data-ice="doc"><a data-ice="dirPath" class="nav-dir-path" href="identifiers.html#instance">instance</a><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/instance/IDBCache.js~IDBCache.html">IDBCache</a></span></span></li>
39
+ <li data-ice="doc"><a data-ice="dirPath" class="nav-dir-path" href="identifiers.html#utils">utils</a><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-ImageLoader">ImageLoader</a></span></span></li>
40
+ <li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-initEnvImage">initEnvImage</a></span></span></li>
41
+ <li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-getCommonParent">getCommonParent</a></span></span></li>
42
+ <li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-createInfoPlane">createInfoPlane</a></span></span></li>
43
+ <li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-createTagPlane">createTagPlane</a></span></span></li>
44
+ <li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-disposeThreeObject">disposeThreeObject</a></span></span></li>
45
+ <li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-createArrowHelper">createArrowHelper</a></span></span></li>
46
+ <li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-createAxesHelper">createAxesHelper</a></span></span></li>
47
+ <li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-createBox3Helper">createBox3Helper</a></span></span></li>
48
+ <li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-createCameraHelper">createCameraHelper</a></span></span></li>
49
+ <li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-createGridHelper">createGridHelper</a></span></span></li>
50
+ <li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-createMapControls">createMapControls</a></span></span></li>
51
+ <li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-createOrbitControl">createOrbitControl</a></span></span></li>
52
+ <li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-createRaycaster">createRaycaster</a></span></span></li>
53
+ <li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-createStats">createStats</a></span></span></li>
54
+ </ul>
55
+ </div>
56
+ </nav>
57
+
58
+ <div class="content" data-ice="content"><h1 data-ice="title">src/utils/disposeObject.js</h1>
59
+ <pre class="source-code line-number raw-source-code"><code class="prettyprint linenums" data-ice="content">/**
60
+ * &#x9012;&#x5F52;&#x91CA;&#x653E;THREE.js&#x5BF9;&#x8C61; / &#x6750;&#x8D28;
61
+ * @param { Object3D } object
62
+ */
63
+ export const disposeThreeObject = (object) =&gt; {
64
+ if (object.geometry) {
65
+ object.geometry.dispose();
66
+ }
67
+
68
+ if (object.material) {
69
+ // &#x5982;&#x679C;&#x6750;&#x8D28;&#x662F;&#x4E00;&#x4E2A;&#x6570;&#x7EC4;&#xFF08;&#x4F8B;&#x5982;&#x591A;&#x6750;&#x8D28;&#x5BF9;&#x8C61;&#xFF09;&#xFF0C;&#x9700;&#x8981;&#x904D;&#x5386;&#x6570;&#x7EC4;&#x5E76;&#x91CA;&#x653E;&#x6BCF;&#x4E2A;&#x6750;&#x8D28;
70
+ if (Array.isArray(object.material)) {
71
+ object.material.forEach((material) =&gt; {
72
+ disposeMaterial(material);
73
+ });
74
+ } else {
75
+ disposeMaterial(object.material);
76
+ }
77
+ }
78
+
79
+ // &#x9012;&#x5F52;&#x91CA;&#x653E;&#x5B50;&#x5BF9;&#x8C61;
80
+ if (object.children) {
81
+ object.children.forEach((child) =&gt; disposeThreeObject(child));
82
+ }
83
+ };
84
+
85
+ /**
86
+ * &#x91CA;&#x653E;THREE.js&#x6750;&#x8D28;
87
+ * @param { Material } material
88
+ */
89
+ function disposeMaterial(material) {
90
+ // &#x91CA;&#x653E;&#x6750;&#x8D28;&#x7684;&#x7EB9;&#x7406;
91
+ for (const key in material) {
92
+ if (material[key] &amp;&amp; material[key].isTexture) {
93
+ material[key].dispose();
94
+ }
95
+ }
96
+ material.dispose();
97
+ }
98
+ </code></pre>
99
+
100
+ </div>
101
+
102
+ <footer class="footer">
103
+ Generated by <a href="https://esdoc.org">ESDoc<span data-ice="esdocVersion">(1.1.0)</span><img src="./image/esdoc-logo-mini-black.png"></a>
104
+ </footer>
105
+
106
+ <script src="script/search_index.js"></script>
107
+ <script src="script/search.js"></script>
108
+ <script src="script/pretty-print.js"></script>
109
+ <script src="script/inherited-summary.js"></script>
110
+ <script src="script/test-summary.js"></script>
111
+ <script src="script/inner-link.js"></script>
112
+ <script src="script/patch-for-local.js"></script>
113
+ </body>
114
+ </html>
@@ -0,0 +1,138 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <base data-ice="baseUrl" href="../../../">
6
+ <title data-ice="title">src/utils/helper.js | @ridp/threejs</title>
7
+ <link type="text/css" rel="stylesheet" href="css/style.css">
8
+ <link type="text/css" rel="stylesheet" href="css/prettify-tomorrow.css">
9
+ <script src="script/prettify/prettify.js"></script>
10
+ <script src="script/manual.js"></script>
11
+ <link rel="stylesheet" href="./inject/css/0-cus-style.css"></head>
12
+ <body class="layout-container" data-ice="rootContainer">
13
+
14
+ <header>
15
+ <a href="./">Home</a>
16
+
17
+ <a href="identifiers.html">Reference</a>
18
+ <a href="source.html">Source</a>
19
+
20
+ <div class="search-box">
21
+ <span>
22
+ <img src="./image/search.png">
23
+ <span class="search-input-edge"></span><input class="search-input"><span class="search-input-edge"></span>
24
+ </span>
25
+ <ul class="search-result"></ul>
26
+ </div>
27
+ </header>
28
+
29
+ <nav class="navigation" data-ice="nav"><div>
30
+ <ul>
31
+
32
+ <li data-ice="doc"><a data-ice="dirPath" class="nav-dir-path" href="identifiers.html#hooks">hooks</a><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-useGLTFLoader">useGLTFLoader</a></span></span></li>
33
+ <li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-useObb">useObb</a></span></span></li>
34
+ <li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-useRaycaster">useRaycaster</a></span></span></li>
35
+ <li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-useThreeJs">useThreeJs</a></span></span></li>
36
+ <li data-ice="doc"><span data-ice="kind" class="kind-variable">V</span><span data-ice="name"><span><a href="variable/index.html#static-variable-intersectColor">intersectColor</a></span></span></li>
37
+ <li data-ice="doc"><span data-ice="kind" class="kind-variable">V</span><span data-ice="name"><span><a href="variable/index.html#static-variable-obbObjects">obbObjects</a></span></span></li>
38
+ <li data-ice="doc"><a data-ice="dirPath" class="nav-dir-path" href="identifiers.html#instance">instance</a><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/instance/IDBCache.js~IDBCache.html">IDBCache</a></span></span></li>
39
+ <li data-ice="doc"><a data-ice="dirPath" class="nav-dir-path" href="identifiers.html#utils">utils</a><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-ImageLoader">ImageLoader</a></span></span></li>
40
+ <li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-initEnvImage">initEnvImage</a></span></span></li>
41
+ <li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-getCommonParent">getCommonParent</a></span></span></li>
42
+ <li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-createInfoPlane">createInfoPlane</a></span></span></li>
43
+ <li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-createTagPlane">createTagPlane</a></span></span></li>
44
+ <li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-disposeThreeObject">disposeThreeObject</a></span></span></li>
45
+ <li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-createArrowHelper">createArrowHelper</a></span></span></li>
46
+ <li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-createAxesHelper">createAxesHelper</a></span></span></li>
47
+ <li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-createBox3Helper">createBox3Helper</a></span></span></li>
48
+ <li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-createCameraHelper">createCameraHelper</a></span></span></li>
49
+ <li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-createGridHelper">createGridHelper</a></span></span></li>
50
+ <li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-createMapControls">createMapControls</a></span></span></li>
51
+ <li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-createOrbitControl">createOrbitControl</a></span></span></li>
52
+ <li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-createRaycaster">createRaycaster</a></span></span></li>
53
+ <li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-createStats">createStats</a></span></span></li>
54
+ </ul>
55
+ </div>
56
+ </nav>
57
+
58
+ <div class="content" data-ice="content"><h1 data-ice="title">src/utils/helper.js</h1>
59
+ <pre class="source-code line-number raw-source-code"><code class="prettyprint linenums" data-ice="content">import {
60
+ BoxHelper,
61
+ GridHelper,
62
+ Raycaster,
63
+ Vector2,
64
+ AxesHelper,
65
+ Vector3,
66
+ ArrowHelper,
67
+ CameraHelper,
68
+ } from &quot;three&quot;;
69
+ import { OrbitControls } from &quot;three/addons/controls/OrbitControls.js&quot;;
70
+ import { MapControls } from &quot;three/addons/controls/MapControls.js&quot;;
71
+ import Stats from &quot;three/addons/libs/stats.module.js&quot;;
72
+
73
+ export function createCameraHelper(camera) {
74
+ return new CameraHelper(camera);
75
+ }
76
+
77
+ export function createGridHelper(size = 150, ...args) {
78
+ return new GridHelper(size, size / 10, ...args);
79
+ }
80
+
81
+ export function createBox3Helper(model) {
82
+ return new BoxHelper(model, 0xffff00);
83
+ }
84
+
85
+ export function createOrbitControl(camera, dom) {
86
+ return new OrbitControls(camera, dom);
87
+ }
88
+
89
+ export function createMapControls(camera, dom) {
90
+ return new MapControls(camera, dom);
91
+ }
92
+
93
+ export function createRaycaster() {
94
+ const raycaster = new Raycaster();
95
+ const pointer = new Vector2(0, 0);
96
+ return {
97
+ raycaster,
98
+ pointer,
99
+ };
100
+ }
101
+
102
+ export function createAxesHelper(size = 10) {
103
+ return new AxesHelper(size);
104
+ }
105
+
106
+ export function createArrowHelper(
107
+ dir = new Vector3(1, 1, 1),
108
+ ori = new Vector3(10, 10, 10),
109
+ length = 5,
110
+ hex = 0xffff00
111
+ ) {
112
+ dir.normalize();
113
+ return new ArrowHelper(dir, ori, length, hex);
114
+ }
115
+
116
+ export function createStats() {
117
+ const stats = new Stats();
118
+ stats.dom.style.cssText =
119
+ &quot;position:absolute;top:0;left:0;cursor:pointer;opacity:0.9;z-index:10000&quot;;
120
+ return stats;
121
+ }
122
+ </code></pre>
123
+
124
+ </div>
125
+
126
+ <footer class="footer">
127
+ Generated by <a href="https://esdoc.org">ESDoc<span data-ice="esdocVersion">(1.1.0)</span><img src="./image/esdoc-logo-mini-black.png"></a>
128
+ </footer>
129
+
130
+ <script src="script/search_index.js"></script>
131
+ <script src="script/search.js"></script>
132
+ <script src="script/pretty-print.js"></script>
133
+ <script src="script/inherited-summary.js"></script>
134
+ <script src="script/test-summary.js"></script>
135
+ <script src="script/inner-link.js"></script>
136
+ <script src="script/patch-for-local.js"></script>
137
+ </body>
138
+ </html>
@@ -0,0 +1,80 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <base data-ice="baseUrl" href="../../../">
6
+ <title data-ice="title">src/utils/index.js | @ridp/threejs</title>
7
+ <link type="text/css" rel="stylesheet" href="css/style.css">
8
+ <link type="text/css" rel="stylesheet" href="css/prettify-tomorrow.css">
9
+ <script src="script/prettify/prettify.js"></script>
10
+ <script src="script/manual.js"></script>
11
+ <link rel="stylesheet" href="./inject/css/0-cus-style.css"></head>
12
+ <body class="layout-container" data-ice="rootContainer">
13
+
14
+ <header>
15
+ <a href="./">Home</a>
16
+
17
+ <a href="identifiers.html">Reference</a>
18
+ <a href="source.html">Source</a>
19
+
20
+ <div class="search-box">
21
+ <span>
22
+ <img src="./image/search.png">
23
+ <span class="search-input-edge"></span><input class="search-input"><span class="search-input-edge"></span>
24
+ </span>
25
+ <ul class="search-result"></ul>
26
+ </div>
27
+ </header>
28
+
29
+ <nav class="navigation" data-ice="nav"><div>
30
+ <ul>
31
+
32
+ <li data-ice="doc"><a data-ice="dirPath" class="nav-dir-path" href="identifiers.html#hooks">hooks</a><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-useGLTFLoader">useGLTFLoader</a></span></span></li>
33
+ <li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-useObb">useObb</a></span></span></li>
34
+ <li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-useRaycaster">useRaycaster</a></span></span></li>
35
+ <li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-useThreeJs">useThreeJs</a></span></span></li>
36
+ <li data-ice="doc"><span data-ice="kind" class="kind-variable">V</span><span data-ice="name"><span><a href="variable/index.html#static-variable-intersectColor">intersectColor</a></span></span></li>
37
+ <li data-ice="doc"><span data-ice="kind" class="kind-variable">V</span><span data-ice="name"><span><a href="variable/index.html#static-variable-obbObjects">obbObjects</a></span></span></li>
38
+ <li data-ice="doc"><a data-ice="dirPath" class="nav-dir-path" href="identifiers.html#instance">instance</a><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/src/instance/IDBCache.js~IDBCache.html">IDBCache</a></span></span></li>
39
+ <li data-ice="doc"><a data-ice="dirPath" class="nav-dir-path" href="identifiers.html#utils">utils</a><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-ImageLoader">ImageLoader</a></span></span></li>
40
+ <li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-initEnvImage">initEnvImage</a></span></span></li>
41
+ <li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-getCommonParent">getCommonParent</a></span></span></li>
42
+ <li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-createInfoPlane">createInfoPlane</a></span></span></li>
43
+ <li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-createTagPlane">createTagPlane</a></span></span></li>
44
+ <li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-disposeThreeObject">disposeThreeObject</a></span></span></li>
45
+ <li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-createArrowHelper">createArrowHelper</a></span></span></li>
46
+ <li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-createAxesHelper">createAxesHelper</a></span></span></li>
47
+ <li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-createBox3Helper">createBox3Helper</a></span></span></li>
48
+ <li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-createCameraHelper">createCameraHelper</a></span></span></li>
49
+ <li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-createGridHelper">createGridHelper</a></span></span></li>
50
+ <li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-createMapControls">createMapControls</a></span></span></li>
51
+ <li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-createOrbitControl">createOrbitControl</a></span></span></li>
52
+ <li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-createRaycaster">createRaycaster</a></span></span></li>
53
+ <li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-createStats">createStats</a></span></span></li>
54
+ </ul>
55
+ </div>
56
+ </nav>
57
+
58
+ <div class="content" data-ice="content"><h1 data-ice="title">src/utils/index.js</h1>
59
+ <pre class="source-code line-number raw-source-code"><code class="prettyprint linenums" data-ice="content">export * from &quot;./helper.js&quot;;
60
+ export * from &quot;./css3dHelper.js&quot;;
61
+ export * from &quot;./disposeObject.js&quot;;
62
+ export * from &quot;./common.js&quot;;
63
+ export * from &quot;./ImageLoader.js&quot;;
64
+ </code></pre>
65
+
66
+ </div>
67
+
68
+ <footer class="footer">
69
+ Generated by <a href="https://esdoc.org">ESDoc<span data-ice="esdocVersion">(1.1.0)</span><img src="./image/esdoc-logo-mini-black.png"></a>
70
+ </footer>
71
+
72
+ <script src="script/search_index.js"></script>
73
+ <script src="script/search.js"></script>
74
+ <script src="script/pretty-print.js"></script>
75
+ <script src="script/inherited-summary.js"></script>
76
+ <script src="script/test-summary.js"></script>
77
+ <script src="script/inner-link.js"></script>
78
+ <script src="script/patch-for-local.js"></script>
79
+ </body>
80
+ </html>