@ridp/threejs 1.1.6 → 1.2.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.
- package/dist/{common-BHi3qsZW.cjs → common-C1rNPPkt.cjs} +2 -2
- package/dist/{common-fbJUHqlj.js → common-D1_IztgM.js} +1 -1
- package/dist/hooks.cjs +1 -1
- package/dist/hooks.js +1 -1
- package/dist/modelSerialize-5oJb1ka7.js +965 -0
- package/dist/modelSerialize-Ds_2KBaA.cjs +5 -0
- package/dist/threejs.cjs +1 -1
- package/dist/threejs.js +185 -25
- package/dist/useGLTFLoader-2awW2QaH.cjs +4 -0
- package/dist/{useGLTFLoader-DusnFN5B.js → useGLTFLoader-BBGTGOYm.js} +1800 -1952
- package/dist/utils.cjs +1 -1
- package/dist/utils.js +9 -7
- package/esdoc/ast/source/.external-ecmascript.js.json +2801 -2801
- package/esdoc/ast/source/hooks/index.js.json +738 -738
- package/esdoc/ast/source/hooks/useGLTFLoader.js.json +9110 -9110
- package/esdoc/ast/source/hooks/useObb.js.json +16462 -16462
- package/esdoc/ast/source/hooks/useRaycaster.js.json +15555 -15555
- package/esdoc/ast/source/hooks/useThreeJs.js.json +52886 -52886
- package/esdoc/ast/source/index.js.json +569 -569
- package/esdoc/ast/source/instance/IDBCache.js.json +40977 -40977
- package/esdoc/ast/source/instance/index.js.json +231 -231
- package/esdoc/ast/source/utils/ImageLoader.js.json +7036 -7036
- package/esdoc/ast/source/utils/common.js.json +5133 -5133
- package/esdoc/ast/source/utils/css3dHelper.js.json +9100 -9100
- package/esdoc/ast/source/utils/disposeObject.js.json +5977 -5977
- package/esdoc/ast/source/utils/helper.js.json +10521 -10521
- package/esdoc/ast/source/utils/index.js.json +907 -907
- package/esdoc/badge.svg +17 -17
- package/esdoc/class/src/instance/IDBCache.js~IDBCache.html +1299 -1299
- package/esdoc/coverage.json +85 -85
- package/esdoc/css/github.css +83 -83
- package/esdoc/css/identifiers.css +37 -37
- package/esdoc/css/manual.css +134 -134
- package/esdoc/css/prettify-tomorrow.css +132 -132
- package/esdoc/css/search.css +84 -84
- package/esdoc/css/source.css +55 -55
- package/esdoc/css/style.css +608 -608
- package/esdoc/css/test.css +58 -58
- package/esdoc/file/src/hooks/index.js.html +75 -75
- package/esdoc/file/src/hooks/useGLTFLoader.js.html +75 -75
- package/esdoc/file/src/hooks/useObb.js.html +75 -75
- package/esdoc/file/src/hooks/useRaycaster.js.html +75 -75
- package/esdoc/file/src/hooks/useThreeJs.js.html +75 -75
- package/esdoc/file/src/index.js.html +75 -75
- package/esdoc/file/src/instance/IDBCache.js.html +75 -75
- package/esdoc/file/src/instance/index.js.html +75 -75
- package/esdoc/file/src/utils/ImageLoader.js.html +75 -75
- package/esdoc/file/src/utils/common.js.html +75 -75
- package/esdoc/file/src/utils/css3dHelper.js.html +75 -75
- package/esdoc/file/src/utils/disposeObject.js.html +75 -75
- package/esdoc/file/src/utils/helper.js.html +75 -75
- package/esdoc/file/src/utils/index.js.html +75 -75
- package/esdoc/function/index.html +2019 -2019
- package/esdoc/identifiers.html +738 -738
- package/esdoc/image/badge.svg +17 -17
- package/esdoc/image/manual-badge.svg +17 -17
- package/esdoc/index.html +153 -153
- package/esdoc/index.json +2050 -2050
- package/esdoc/script/inherited-summary.js +28 -28
- package/esdoc/script/inner-link.js +32 -32
- package/esdoc/script/manual.js +12 -12
- package/esdoc/script/patch-for-local.js +8 -8
- package/esdoc/script/prettify/Apache-License-2.0.txt +202 -202
- package/esdoc/script/prettify/prettify.js +46 -46
- package/esdoc/script/pretty-print.js +25 -25
- package/esdoc/script/search.js +117 -117
- package/esdoc/script/search_index.js +571 -571
- package/esdoc/script/test-summary.js +54 -54
- package/esdoc/source.html +213 -213
- package/esdoc/variable/index.html +225 -225
- package/package.json +3 -2
- package/dist/ImageLoader-CB_URfeZ.js +0 -860
- package/dist/ImageLoader-DwvBWW6h.cjs +0 -5
- package/dist/useGLTFLoader-BiveFkS6.cjs +0 -4
package/esdoc/image/badge.svg
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="104" height="20">
|
|
2
|
-
<script/>
|
|
3
|
-
<linearGradient id="a" x2="0" y2="100%">
|
|
4
|
-
<stop offset="0" stop-color="#bbb" stop-opacity=".1"/>
|
|
5
|
-
<stop offset="1" stop-opacity=".1"/>
|
|
6
|
-
</linearGradient>
|
|
7
|
-
<rect rx="3" width="104" height="20" fill="#555"/>
|
|
8
|
-
<rect rx="3" x="64" width="40" height="20" fill="@color@"/>
|
|
9
|
-
<path fill="@color@" d="M64 0h4v20h-4z"/>
|
|
10
|
-
<rect rx="3" width="104" height="20" fill="url(#a)"/>
|
|
11
|
-
<g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="11">
|
|
12
|
-
<text x="32" y="15" fill="#010101" fill-opacity=".3">document</text>
|
|
13
|
-
<text x="32" y="14">document</text>
|
|
14
|
-
<text x="84" y="15" fill="#010101" fill-opacity=".3">@ratio@</text>
|
|
15
|
-
<text x="84" y="14">@ratio@</text>
|
|
16
|
-
</g>
|
|
17
|
-
</svg>
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="104" height="20">
|
|
2
|
+
<script/>
|
|
3
|
+
<linearGradient id="a" x2="0" y2="100%">
|
|
4
|
+
<stop offset="0" stop-color="#bbb" stop-opacity=".1"/>
|
|
5
|
+
<stop offset="1" stop-opacity=".1"/>
|
|
6
|
+
</linearGradient>
|
|
7
|
+
<rect rx="3" width="104" height="20" fill="#555"/>
|
|
8
|
+
<rect rx="3" x="64" width="40" height="20" fill="@color@"/>
|
|
9
|
+
<path fill="@color@" d="M64 0h4v20h-4z"/>
|
|
10
|
+
<rect rx="3" width="104" height="20" fill="url(#a)"/>
|
|
11
|
+
<g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="11">
|
|
12
|
+
<text x="32" y="15" fill="#010101" fill-opacity=".3">document</text>
|
|
13
|
+
<text x="32" y="14">document</text>
|
|
14
|
+
<text x="84" y="15" fill="#010101" fill-opacity=".3">@ratio@</text>
|
|
15
|
+
<text x="84" y="14">@ratio@</text>
|
|
16
|
+
</g>
|
|
17
|
+
</svg>
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="102" height="20">
|
|
2
|
-
<script/>
|
|
3
|
-
<linearGradient id="a" x2="0" y2="100%">
|
|
4
|
-
<stop offset="0" stop-color="#bbb" stop-opacity=".1"/>
|
|
5
|
-
<stop offset="1" stop-opacity=".1"/>
|
|
6
|
-
</linearGradient>
|
|
7
|
-
<rect rx="3" width="102" height="20" fill="#555"/>
|
|
8
|
-
<rect rx="3" x="52" width="50" height="20" fill="@color@"/>
|
|
9
|
-
<path fill="@color@" d="M52 0h4v20h-4z"/>
|
|
10
|
-
<rect rx="3" width="102" height="20" fill="url(#a)"/>
|
|
11
|
-
<g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="11">
|
|
12
|
-
<text x="26" y="15" fill="#010101" fill-opacity=".3">manual</text>
|
|
13
|
-
<text x="26" y="14">manual</text>
|
|
14
|
-
<text x="77" y="15" fill="#010101" fill-opacity=".3">@value@</text>
|
|
15
|
-
<text x="77" y="14">@value@</text>
|
|
16
|
-
</g>
|
|
17
|
-
</svg>
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="102" height="20">
|
|
2
|
+
<script/>
|
|
3
|
+
<linearGradient id="a" x2="0" y2="100%">
|
|
4
|
+
<stop offset="0" stop-color="#bbb" stop-opacity=".1"/>
|
|
5
|
+
<stop offset="1" stop-opacity=".1"/>
|
|
6
|
+
</linearGradient>
|
|
7
|
+
<rect rx="3" width="102" height="20" fill="#555"/>
|
|
8
|
+
<rect rx="3" x="52" width="50" height="20" fill="@color@"/>
|
|
9
|
+
<path fill="@color@" d="M52 0h4v20h-4z"/>
|
|
10
|
+
<rect rx="3" width="102" height="20" fill="url(#a)"/>
|
|
11
|
+
<g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="11">
|
|
12
|
+
<text x="26" y="15" fill="#010101" fill-opacity=".3">manual</text>
|
|
13
|
+
<text x="26" y="14">manual</text>
|
|
14
|
+
<text x="77" y="15" fill="#010101" fill-opacity=".3">@value@</text>
|
|
15
|
+
<text x="77" y="14">@value@</text>
|
|
16
|
+
</g>
|
|
17
|
+
</svg>
|
package/esdoc/index.html
CHANGED
|
@@ -1,153 +1,153 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html>
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="utf-8">
|
|
5
|
-
<base data-ice="baseUrl">
|
|
6
|
-
<title data-ice="title">Home | @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"><div data-ice="index" class="github-markdown"><h1 id="-ridp-threejs">@ridp/threejs</h1><h2 id="hooks">Hooks</h2><ul>
|
|
59
|
-
<li><p>useThreeJs
|
|
60
|
-
声明: </p>
|
|
61
|
-
<pre><code class="lang-javascript"><code class="source-code prettyprint"> /**
|
|
62
|
-
*
|
|
63
|
-
* @param {String} selector ID '#xxxx'
|
|
64
|
-
* @param {Object} option - 初始化参数
|
|
65
|
-
* @property {Boolean} option.css3d - 模型
|
|
66
|
-
* @returns any
|
|
67
|
-
*/
|
|
68
|
-
function useThreeJs(selector, option)</code>
|
|
69
|
-
</code></pre>
|
|
70
|
-
<p> 使用: </p>
|
|
71
|
-
<pre><code class="lang-javascript"><code class="source-code prettyprint"> import { useThreeJs } from '@ridp/threejs'
|
|
72
|
-
|
|
73
|
-
const { scene, camera, renderer, control, domWidth, domHeight, isReady, addAnimate, frameArea } = useThreeJs("#InsId", )
|
|
74
|
-
</code>
|
|
75
|
-
</code></pre>
|
|
76
|
-
<hr>
|
|
77
|
-
<p>返回变量: </p>
|
|
78
|
-
<ul>
|
|
79
|
-
<li><p>scene</p>
|
|
80
|
-
<pre><code class="lang-javascript"><code class="source-code prettyprint"> THREE.Scene
|
|
81
|
-
</code>
|
|
82
|
-
</code></pre>
|
|
83
|
-
</li>
|
|
84
|
-
<li>camera: <pre><code class="lang-javascript"><code class="source-code prettyprint"> THREE.PerspectiveCamera </code>
|
|
85
|
-
</code></pre>
|
|
86
|
-
</li>
|
|
87
|
-
<li>renderer<pre><code class="lang-javascript"><code class="source-code prettyprint"> const renderer = new WebGLRenderer({
|
|
88
|
-
antialias: true,
|
|
89
|
-
alpha: true,
|
|
90
|
-
precision: "mediump",
|
|
91
|
-
logarithmicDepthBuffer: true,
|
|
92
|
-
})</code>
|
|
93
|
-
</code></pre>
|
|
94
|
-
</li>
|
|
95
|
-
<li>control<pre><code class="lang-javascript"><code class="source-code prettyprint"> THREE.OrbitControls</code>
|
|
96
|
-
</code></pre>
|
|
97
|
-
</li>
|
|
98
|
-
<li>domWidth<pre><code class="lang-javascript"><code class="source-code prettyprint"> ref(Number)</code>
|
|
99
|
-
</code></pre>
|
|
100
|
-
</li>
|
|
101
|
-
<li>domHeight<pre><code class="lang-javascript"><code class="source-code prettyprint"> ref(Number)</code>
|
|
102
|
-
</code></pre>
|
|
103
|
-
</li>
|
|
104
|
-
<li>isReady <pre><code class="lang-javascript"><code class="source-code prettyprint"> ref(Boolean)</code>
|
|
105
|
-
</code></pre>
|
|
106
|
-
</li>
|
|
107
|
-
</ul>
|
|
108
|
-
<hr>
|
|
109
|
-
<p>返回方法: </p>
|
|
110
|
-
<ul>
|
|
111
|
-
<li><p>addAnimate </p>
|
|
112
|
-
<pre><code class="lang-javascript"><code class="source-code prettyprint"> /**
|
|
113
|
-
* 循环帧中添加执行函数
|
|
114
|
-
* @param {*} animate
|
|
115
|
-
*/
|
|
116
|
-
function addAnimate(animate): void
|
|
117
|
-
</code>
|
|
118
|
-
</code></pre>
|
|
119
|
-
</li>
|
|
120
|
-
<li><p>frameArea </p>
|
|
121
|
-
<pre><code class="lang-javascript"><code class="source-code prettyprint"> /**物体视窗自动适应
|
|
122
|
-
*
|
|
123
|
-
* @param {Object3D} model
|
|
124
|
-
* @param {Number} scale
|
|
125
|
-
* @param {Camera} camera
|
|
126
|
-
* @param {OrbitControls} controls
|
|
127
|
-
* @param {Vector3} offset
|
|
128
|
-
*/
|
|
129
|
-
function frameArea(model, scale, camera, controls, offset): void</code>
|
|
130
|
-
</code></pre>
|
|
131
|
-
</li>
|
|
132
|
-
</ul>
|
|
133
|
-
</li>
|
|
134
|
-
<li>useRaycaster</li>
|
|
135
|
-
<li>useObb</li>
|
|
136
|
-
<li>useGLTFLoader</li>
|
|
137
|
-
</ul>
|
|
138
|
-
<h1 id="instance-实例">Instance 实例</h1><h1 id="utils-工具">Utils 工具</h1></div>
|
|
139
|
-
</div>
|
|
140
|
-
|
|
141
|
-
<footer class="footer">
|
|
142
|
-
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>
|
|
143
|
-
</footer>
|
|
144
|
-
|
|
145
|
-
<script src="script/search_index.js"></script>
|
|
146
|
-
<script src="script/search.js"></script>
|
|
147
|
-
<script src="script/pretty-print.js"></script>
|
|
148
|
-
<script src="script/inherited-summary.js"></script>
|
|
149
|
-
<script src="script/test-summary.js"></script>
|
|
150
|
-
<script src="script/inner-link.js"></script>
|
|
151
|
-
<script src="script/patch-for-local.js"></script>
|
|
152
|
-
</body>
|
|
153
|
-
</html>
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html>
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8">
|
|
5
|
+
<base data-ice="baseUrl">
|
|
6
|
+
<title data-ice="title">Home | @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"><div data-ice="index" class="github-markdown"><h1 id="-ridp-threejs">@ridp/threejs</h1><h2 id="hooks">Hooks</h2><ul>
|
|
59
|
+
<li><p>useThreeJs
|
|
60
|
+
声明: </p>
|
|
61
|
+
<pre><code class="lang-javascript"><code class="source-code prettyprint"> /**
|
|
62
|
+
*
|
|
63
|
+
* @param {String} selector ID '#xxxx'
|
|
64
|
+
* @param {Object} option - 初始化参数
|
|
65
|
+
* @property {Boolean} option.css3d - 模型
|
|
66
|
+
* @returns any
|
|
67
|
+
*/
|
|
68
|
+
function useThreeJs(selector, option)</code>
|
|
69
|
+
</code></pre>
|
|
70
|
+
<p> 使用: </p>
|
|
71
|
+
<pre><code class="lang-javascript"><code class="source-code prettyprint"> import { useThreeJs } from '@ridp/threejs'
|
|
72
|
+
|
|
73
|
+
const { scene, camera, renderer, control, domWidth, domHeight, isReady, addAnimate, frameArea } = useThreeJs("#InsId", )
|
|
74
|
+
</code>
|
|
75
|
+
</code></pre>
|
|
76
|
+
<hr>
|
|
77
|
+
<p>返回变量: </p>
|
|
78
|
+
<ul>
|
|
79
|
+
<li><p>scene</p>
|
|
80
|
+
<pre><code class="lang-javascript"><code class="source-code prettyprint"> THREE.Scene
|
|
81
|
+
</code>
|
|
82
|
+
</code></pre>
|
|
83
|
+
</li>
|
|
84
|
+
<li>camera: <pre><code class="lang-javascript"><code class="source-code prettyprint"> THREE.PerspectiveCamera </code>
|
|
85
|
+
</code></pre>
|
|
86
|
+
</li>
|
|
87
|
+
<li>renderer<pre><code class="lang-javascript"><code class="source-code prettyprint"> const renderer = new WebGLRenderer({
|
|
88
|
+
antialias: true,
|
|
89
|
+
alpha: true,
|
|
90
|
+
precision: "mediump",
|
|
91
|
+
logarithmicDepthBuffer: true,
|
|
92
|
+
})</code>
|
|
93
|
+
</code></pre>
|
|
94
|
+
</li>
|
|
95
|
+
<li>control<pre><code class="lang-javascript"><code class="source-code prettyprint"> THREE.OrbitControls</code>
|
|
96
|
+
</code></pre>
|
|
97
|
+
</li>
|
|
98
|
+
<li>domWidth<pre><code class="lang-javascript"><code class="source-code prettyprint"> ref(Number)</code>
|
|
99
|
+
</code></pre>
|
|
100
|
+
</li>
|
|
101
|
+
<li>domHeight<pre><code class="lang-javascript"><code class="source-code prettyprint"> ref(Number)</code>
|
|
102
|
+
</code></pre>
|
|
103
|
+
</li>
|
|
104
|
+
<li>isReady <pre><code class="lang-javascript"><code class="source-code prettyprint"> ref(Boolean)</code>
|
|
105
|
+
</code></pre>
|
|
106
|
+
</li>
|
|
107
|
+
</ul>
|
|
108
|
+
<hr>
|
|
109
|
+
<p>返回方法: </p>
|
|
110
|
+
<ul>
|
|
111
|
+
<li><p>addAnimate </p>
|
|
112
|
+
<pre><code class="lang-javascript"><code class="source-code prettyprint"> /**
|
|
113
|
+
* 循环帧中添加执行函数
|
|
114
|
+
* @param {*} animate
|
|
115
|
+
*/
|
|
116
|
+
function addAnimate(animate): void
|
|
117
|
+
</code>
|
|
118
|
+
</code></pre>
|
|
119
|
+
</li>
|
|
120
|
+
<li><p>frameArea </p>
|
|
121
|
+
<pre><code class="lang-javascript"><code class="source-code prettyprint"> /**物体视窗自动适应
|
|
122
|
+
*
|
|
123
|
+
* @param {Object3D} model
|
|
124
|
+
* @param {Number} scale
|
|
125
|
+
* @param {Camera} camera
|
|
126
|
+
* @param {OrbitControls} controls
|
|
127
|
+
* @param {Vector3} offset
|
|
128
|
+
*/
|
|
129
|
+
function frameArea(model, scale, camera, controls, offset): void</code>
|
|
130
|
+
</code></pre>
|
|
131
|
+
</li>
|
|
132
|
+
</ul>
|
|
133
|
+
</li>
|
|
134
|
+
<li>useRaycaster</li>
|
|
135
|
+
<li>useObb</li>
|
|
136
|
+
<li>useGLTFLoader</li>
|
|
137
|
+
</ul>
|
|
138
|
+
<h1 id="instance-实例">Instance 实例</h1><h1 id="utils-工具">Utils 工具</h1></div>
|
|
139
|
+
</div>
|
|
140
|
+
|
|
141
|
+
<footer class="footer">
|
|
142
|
+
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>
|
|
143
|
+
</footer>
|
|
144
|
+
|
|
145
|
+
<script src="script/search_index.js"></script>
|
|
146
|
+
<script src="script/search.js"></script>
|
|
147
|
+
<script src="script/pretty-print.js"></script>
|
|
148
|
+
<script src="script/inherited-summary.js"></script>
|
|
149
|
+
<script src="script/test-summary.js"></script>
|
|
150
|
+
<script src="script/inner-link.js"></script>
|
|
151
|
+
<script src="script/patch-for-local.js"></script>
|
|
152
|
+
</body>
|
|
153
|
+
</html>
|