first commit
This commit is contained in:
10
hs-web3d-core/.babelrc
Normal file
10
hs-web3d-core/.babelrc
Normal file
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"presets": [
|
||||
[
|
||||
"@bable/env",
|
||||
{
|
||||
"modules": false
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
3
hs-web3d-core/.gitignore
vendored
Normal file
3
hs-web3d-core/.gitignore
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
node_modules
|
||||
.idea
|
||||
.idea/
|
||||
48
hs-web3d-core/Readme.md
Normal file
48
hs-web3d-core/Readme.md
Normal file
@@ -0,0 +1,48 @@
|
||||
## web 可视化 sdk开发文档
|
||||
|
||||
|
||||
|
||||
### 1.安装
|
||||
```
|
||||
//使用yarn安装
|
||||
yarn add hs-web3d-core
|
||||
//使用npm安装
|
||||
npm install hs-web3d-core
|
||||
```
|
||||
### 2.参考demo
|
||||
```
|
||||
var client = null;
|
||||
import {web3DCoreSocket} from './index.esm.js';
|
||||
|
||||
var wsUrl = "ws://192.168.2.201:8089/hs-core"
|
||||
|
||||
const ws = new web3DCoreSocket(wsUrl, {
|
||||
appId: "1",
|
||||
sessionId: "1",
|
||||
})
|
||||
ws.onMessage(data => {
|
||||
console.log(data)
|
||||
|
||||
})
|
||||
$(".changeColor").click(function () {
|
||||
ws.sendToEngin({
|
||||
"code": "21u3i21i21g4i1192982u3",
|
||||
"function": "CubeControl.ChangeColor",
|
||||
"type": "noCallBack",
|
||||
"parameters": {"id": "2", "color": "red"}
|
||||
}
|
||||
)
|
||||
})
|
||||
```
|
||||
|
||||
|
||||
|
||||
### 3.更新日志
|
||||
|
||||
#### version 1.0.2 (2023-05-08)
|
||||
- 简单方法封装
|
||||
|
||||
|
||||
#### version 0.0.1 (2023-03-11)
|
||||
- 初始化
|
||||
|
||||
2
hs-web3d-core/dist/index.cjs.js
vendored
Normal file
2
hs-web3d-core/dist/index.cjs.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
hs-web3d-core/dist/index.cjs.js.map
vendored
Normal file
1
hs-web3d-core/dist/index.cjs.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
2
hs-web3d-core/dist/index.esm.js
vendored
Normal file
2
hs-web3d-core/dist/index.esm.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
hs-web3d-core/dist/index.esm.js.map
vendored
Normal file
1
hs-web3d-core/dist/index.esm.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
2
hs-web3d-core/dist/index.js
vendored
Normal file
2
hs-web3d-core/dist/index.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
hs-web3d-core/dist/index.js.map
vendored
Normal file
1
hs-web3d-core/dist/index.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
7
hs-web3d-core/example/bootstrap.bundle.min.js
vendored
Normal file
7
hs-web3d-core/example/bootstrap.bundle.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
6
hs-web3d-core/example/bootstrap.min.css
vendored
Normal file
6
hs-web3d-core/example/bootstrap.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
1
hs-web3d-core/example/docs/.nojekyll
Normal file
1
hs-web3d-core/example/docs/.nojekyll
Normal file
@@ -0,0 +1 @@
|
||||
TypeDoc added this file to prevent GitHub Pages from using Jekyll. You can turn off this behavior by setting the `githubPages` option to false.
|
||||
78
hs-web3d-core/example/docs/assets/highlight.css
Normal file
78
hs-web3d-core/example/docs/assets/highlight.css
Normal file
@@ -0,0 +1,78 @@
|
||||
:root {
|
||||
--light-hl-0: #008000;
|
||||
--dark-hl-0: #6A9955;
|
||||
--light-hl-1: #001080;
|
||||
--dark-hl-1: #9CDCFE;
|
||||
--light-hl-2: #000000;
|
||||
--dark-hl-2: #D4D4D4;
|
||||
--light-hl-3: #0000FF;
|
||||
--dark-hl-3: #569CD6;
|
||||
--light-hl-4: #AF00DB;
|
||||
--dark-hl-4: #C586C0;
|
||||
--light-hl-5: #A31515;
|
||||
--dark-hl-5: #CE9178;
|
||||
--light-hl-6: #0070C1;
|
||||
--dark-hl-6: #4FC1FF;
|
||||
--light-hl-7: #795E26;
|
||||
--dark-hl-7: #DCDCAA;
|
||||
--light-code-background: #FFFFFF;
|
||||
--dark-code-background: #1E1E1E;
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: light) { :root {
|
||||
--hl-0: var(--light-hl-0);
|
||||
--hl-1: var(--light-hl-1);
|
||||
--hl-2: var(--light-hl-2);
|
||||
--hl-3: var(--light-hl-3);
|
||||
--hl-4: var(--light-hl-4);
|
||||
--hl-5: var(--light-hl-5);
|
||||
--hl-6: var(--light-hl-6);
|
||||
--hl-7: var(--light-hl-7);
|
||||
--code-background: var(--light-code-background);
|
||||
} }
|
||||
|
||||
@media (prefers-color-scheme: dark) { :root {
|
||||
--hl-0: var(--dark-hl-0);
|
||||
--hl-1: var(--dark-hl-1);
|
||||
--hl-2: var(--dark-hl-2);
|
||||
--hl-3: var(--dark-hl-3);
|
||||
--hl-4: var(--dark-hl-4);
|
||||
--hl-5: var(--dark-hl-5);
|
||||
--hl-6: var(--dark-hl-6);
|
||||
--hl-7: var(--dark-hl-7);
|
||||
--code-background: var(--dark-code-background);
|
||||
} }
|
||||
|
||||
:root[data-theme='light'] {
|
||||
--hl-0: var(--light-hl-0);
|
||||
--hl-1: var(--light-hl-1);
|
||||
--hl-2: var(--light-hl-2);
|
||||
--hl-3: var(--light-hl-3);
|
||||
--hl-4: var(--light-hl-4);
|
||||
--hl-5: var(--light-hl-5);
|
||||
--hl-6: var(--light-hl-6);
|
||||
--hl-7: var(--light-hl-7);
|
||||
--code-background: var(--light-code-background);
|
||||
}
|
||||
|
||||
:root[data-theme='dark'] {
|
||||
--hl-0: var(--dark-hl-0);
|
||||
--hl-1: var(--dark-hl-1);
|
||||
--hl-2: var(--dark-hl-2);
|
||||
--hl-3: var(--dark-hl-3);
|
||||
--hl-4: var(--dark-hl-4);
|
||||
--hl-5: var(--dark-hl-5);
|
||||
--hl-6: var(--dark-hl-6);
|
||||
--hl-7: var(--dark-hl-7);
|
||||
--code-background: var(--dark-code-background);
|
||||
}
|
||||
|
||||
.hl-0 { color: var(--hl-0); }
|
||||
.hl-1 { color: var(--hl-1); }
|
||||
.hl-2 { color: var(--hl-2); }
|
||||
.hl-3 { color: var(--hl-3); }
|
||||
.hl-4 { color: var(--hl-4); }
|
||||
.hl-5 { color: var(--hl-5); }
|
||||
.hl-6 { color: var(--hl-6); }
|
||||
.hl-7 { color: var(--hl-7); }
|
||||
pre, code { background: var(--code-background); }
|
||||
58
hs-web3d-core/example/docs/assets/main.js
Normal file
58
hs-web3d-core/example/docs/assets/main.js
Normal file
File diff suppressed because one or more lines are too long
1
hs-web3d-core/example/docs/assets/search.js
Normal file
1
hs-web3d-core/example/docs/assets/search.js
Normal file
File diff suppressed because one or more lines are too long
1367
hs-web3d-core/example/docs/assets/style.css
Normal file
1367
hs-web3d-core/example/docs/assets/style.css
Normal file
File diff suppressed because it is too large
Load Diff
150
hs-web3d-core/example/docs/classes/MapServerController.html
Normal file
150
hs-web3d-core/example/docs/classes/MapServerController.html
Normal file
@@ -0,0 +1,150 @@
|
||||
<!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>MapServerController | hs-web3d-core</title><meta name="description" content="Documentation for hs-web3d-core"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/search.js" id="tsd-search-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os"</script><header class="tsd-page-toolbar">
|
||||
<div class="tsd-toolbar-contents container">
|
||||
<div class="table-cell" id="tsd-search" data-base="..">
|
||||
<div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M15.7824 13.833L12.6666 10.7177C12.5259 10.5771 12.3353 10.499 12.1353 10.499H11.6259C12.4884 9.39596 13.001 8.00859 13.001 6.49937C13.001 2.90909 10.0914 0 6.50048 0C2.90959 0 0 2.90909 0 6.49937C0 10.0896 2.90959 12.9987 6.50048 12.9987C8.00996 12.9987 9.39756 12.4863 10.5008 11.6239V12.1332C10.5008 12.3332 10.5789 12.5238 10.7195 12.6644L13.8354 15.7797C14.1292 16.0734 14.6042 16.0734 14.8948 15.7797L15.7793 14.8954C16.0731 14.6017 16.0731 14.1267 15.7824 13.833ZM6.50048 10.499C4.29094 10.499 2.50018 8.71165 2.50018 6.49937C2.50018 4.29021 4.28781 2.49976 6.50048 2.49976C8.71001 2.49976 10.5008 4.28708 10.5008 6.49937C10.5008 8.70852 8.71314 10.499 6.50048 10.499Z" fill="var(--color-text)"></path></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div>
|
||||
<div class="field">
|
||||
<div id="tsd-toolbar-links"></div></div>
|
||||
<ul class="results">
|
||||
<li class="state loading">Preparing search index...</li>
|
||||
<li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">hs-web3d-core</a></div>
|
||||
<div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><rect x="1" y="3" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="7" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="11" width="14" height="2" fill="var(--color-text)"></rect></svg></a></div></div></header>
|
||||
<div class="container container-main">
|
||||
<div class="col-content">
|
||||
<div class="tsd-page-title">
|
||||
<ul class="tsd-breadcrumb">
|
||||
<li><a href="../modules.html">hs-web3d-core</a></li>
|
||||
<li><a href="MapServerController.html">MapServerController</a></li></ul>
|
||||
<h1>Class MapServerController</h1></div>
|
||||
<section class="tsd-panel tsd-hierarchy">
|
||||
<h4>Hierarchy</h4>
|
||||
<ul class="tsd-hierarchy">
|
||||
<li><span class="target">MapServerController</span></li></ul></section><aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in core/MapServerController.ts:6</li></ul></aside>
|
||||
<section class="tsd-panel-group tsd-index-group">
|
||||
<section class="tsd-panel tsd-index-panel">
|
||||
<details class="tsd-index-content tsd-index-accordion" open><summary class="tsd-accordion-summary tsd-index-summary">
|
||||
<h5 class="tsd-index-heading uppercase" role="button" aria-expanded="false" tabIndex=0><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M1.5 5.50969L8 11.6609L14.5 5.50969L12.5466 3.66086L8 7.96494L3.45341 3.66086L1.5 5.50969Z" fill="var(--color-text)"></path></svg> Index</h5></summary>
|
||||
<div class="tsd-accordion-details">
|
||||
<section class="tsd-index-section">
|
||||
<h3 class="tsd-index-heading">Constructors</h3>
|
||||
<div class="tsd-index-list"><a href="MapServerController.html#constructor" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="#4D7FFF" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12" id="icon-512-path"></rect><path d="M11.898 16.1201C11.098 16.1201 10.466 15.8961 10.002 15.4481C9.53803 15.0001 9.30603 14.3841 9.30603 13.6001V9.64012C9.30603 8.85612 9.53803 8.24012 10.002 7.79212C10.466 7.34412 11.098 7.12012 11.898 7.12012C12.682 7.12012 13.306 7.34812 13.77 7.80412C14.234 8.25212 14.466 8.86412 14.466 9.64012H13.386C13.386 9.14412 13.254 8.76412 12.99 8.50012C12.734 8.22812 12.37 8.09212 11.898 8.09212C11.426 8.09212 11.054 8.22412 10.782 8.48812C10.518 8.75212 10.386 9.13212 10.386 9.62812V13.6001C10.386 14.0961 10.518 14.4801 10.782 14.7521C11.054 15.0161 11.426 15.1481 11.898 15.1481C12.37 15.1481 12.734 15.0161 12.99 14.7521C13.254 14.4801 13.386 14.0961 13.386 13.6001H14.466C14.466 14.3761 14.234 14.9921 13.77 15.4481C13.306 15.8961 12.682 16.1201 11.898 16.1201Z" fill="var(--color-text)" id="icon-512-text"></path></svg><span>constructor</span></a>
|
||||
</div></section>
|
||||
<section class="tsd-index-section">
|
||||
<h3 class="tsd-index-heading">Properties</h3>
|
||||
<div class="tsd-index-list"><a href="MapServerController.html#socket" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="#FF984D" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12" id="icon-1024-path"></rect><path d="M9.354 16V7.24H12.174C12.99 7.24 13.638 7.476 14.118 7.948C14.606 8.412 14.85 9.036 14.85 9.82C14.85 10.604 14.606 11.232 14.118 11.704C13.638 12.168 12.99 12.4 12.174 12.4H10.434V16H9.354ZM10.434 11.428H12.174C12.646 11.428 13.022 11.284 13.302 10.996C13.59 10.7 13.734 10.308 13.734 9.82C13.734 9.324 13.59 8.932 13.302 8.644C13.022 8.356 12.646 8.212 12.174 8.212H10.434V11.428Z" fill="var(--color-text)" id="icon-1024-text"></path></svg><span>socket</span></a>
|
||||
</div></section>
|
||||
<section class="tsd-index-section">
|
||||
<h3 class="tsd-index-heading">Methods</h3>
|
||||
<div class="tsd-index-list"><a href="MapServerController.html#createApiServiceLayer" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="#FF4DB8" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12" id="icon-2048-path"></rect><path d="M9.162 16V7.24H10.578L11.514 10.072C11.602 10.328 11.674 10.584 11.73 10.84C11.794 11.088 11.842 11.28 11.874 11.416C11.906 11.28 11.954 11.088 12.018 10.84C12.082 10.584 12.154 10.324 12.234 10.06L13.122 7.24H14.538V16H13.482V12.82C13.482 12.468 13.49 12.068 13.506 11.62C13.53 11.172 13.558 10.716 13.59 10.252C13.622 9.78 13.654 9.332 13.686 8.908C13.726 8.476 13.762 8.1 13.794 7.78L12.366 12.16H11.334L9.894 7.78C9.934 8.092 9.97 8.456 10.002 8.872C10.042 9.28 10.078 9.716 10.11 10.18C10.142 10.636 10.166 11.092 10.182 11.548C10.206 12.004 10.218 12.428 10.218 12.82V16H9.162Z" fill="var(--color-text)" id="icon-2048-text"></path></svg><span>create<wbr/>Api<wbr/>Service<wbr/>Layer</span></a>
|
||||
<a href="MapServerController.html#debugInfo" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>debug<wbr/>Info</span></a>
|
||||
<a href="MapServerController.html#hideLayer" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>hide<wbr/>Layer</span></a>
|
||||
<a href="MapServerController.html#showLayer" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>show<wbr/>Layer</span></a>
|
||||
</div></section></div></details></section></section>
|
||||
<section class="tsd-panel-group tsd-member-group">
|
||||
<h2>Constructors</h2>
|
||||
<section class="tsd-panel tsd-member"><a id="constructor" class="tsd-anchor"></a>
|
||||
<h3 class="tsd-anchor-link"><span>constructor</span><a href="#constructor" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none" id="icon-anchor-a"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5" id="icon-anchor-b"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5" id="icon-anchor-c"></path></svg></a></h3>
|
||||
<ul class="tsd-signatures">
|
||||
<li class="tsd-signature tsd-anchor-link" id="constructor.new_MapServerController"><span class="tsd-kind-constructor-signature">new <wbr/>Map<wbr/>Server<wbr/>Controller</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">socket</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="MapServerController.html" class="tsd-signature-type tsd-kind-class">MapServerController</a><a href="#constructor.new_MapServerController" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
|
||||
<li class="tsd-description">
|
||||
<div class="tsd-parameters">
|
||||
<h4 class="tsd-parameters-title">Parameters</h4>
|
||||
<ul class="tsd-parameter-list">
|
||||
<li>
|
||||
<h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">socket</span>: <span class="tsd-signature-type">any</span></h5></li></ul></div>
|
||||
<h4 class="tsd-returns-title">Returns <a href="MapServerController.html" class="tsd-signature-type tsd-kind-class">MapServerController</a></h4><aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in core/MapServerController.ts:9</li></ul></aside></li></ul></section></section>
|
||||
<section class="tsd-panel-group tsd-member-group">
|
||||
<h2>Properties</h2>
|
||||
<section class="tsd-panel tsd-member"><a id="socket" class="tsd-anchor"></a>
|
||||
<h3 class="tsd-anchor-link"><span>socket</span><a href="#socket" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
||||
<div class="tsd-signature"><span class="tsd-kind-property">socket</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol"> = null</span></div><aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in core/MapServerController.ts:7</li></ul></aside></section></section>
|
||||
<section class="tsd-panel-group tsd-member-group">
|
||||
<h2>Methods</h2>
|
||||
<section class="tsd-panel tsd-member"><a id="createApiServiceLayer" class="tsd-anchor"></a>
|
||||
<h3 class="tsd-anchor-link"><span>create<wbr/>Api<wbr/>Service<wbr/>Layer</span><a href="#createApiServiceLayer" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
||||
<ul class="tsd-signatures">
|
||||
<li class="tsd-signature tsd-anchor-link" id="createApiServiceLayer.createApiServiceLayer-1"><span class="tsd-kind-call-signature">create<wbr/>Api<wbr/>Service<wbr/>Layer</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">data</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#createApiServiceLayer.createApiServiceLayer-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
|
||||
<li class="tsd-description">
|
||||
<div class="tsd-parameters">
|
||||
<h4 class="tsd-parameters-title">Parameters</h4>
|
||||
<ul class="tsd-parameter-list">
|
||||
<li>
|
||||
<h5><span class="tsd-kind-parameter">data</span>: <span class="tsd-signature-type ">MapLayersOptions</span></h5></li></ul></div>
|
||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in core/MapServerController.ts:23</li></ul></aside></li></ul></section>
|
||||
<section class="tsd-panel tsd-member"><a id="debugInfo" class="tsd-anchor"></a>
|
||||
<h3 class="tsd-anchor-link"><span>debug<wbr/>Info</span><a href="#debugInfo" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
||||
<ul class="tsd-signatures">
|
||||
<li class="tsd-signature tsd-anchor-link" id="debugInfo.debugInfo-1"><span class="tsd-kind-call-signature">debug<wbr/>Info</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#debugInfo.debugInfo-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
|
||||
<li class="tsd-description">
|
||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in core/MapServerController.ts:12</li></ul></aside></li></ul></section>
|
||||
<section class="tsd-panel tsd-member"><a id="hideLayer" class="tsd-anchor"></a>
|
||||
<h3 class="tsd-anchor-link"><span>hide<wbr/>Layer</span><a href="#hideLayer" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
||||
<ul class="tsd-signatures">
|
||||
<li class="tsd-signature tsd-anchor-link" id="hideLayer.hideLayer-1"><span class="tsd-kind-call-signature">hide<wbr/>Layer</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">data</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#hideLayer.hideLayer-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
|
||||
<li class="tsd-description">
|
||||
<div class="tsd-parameters">
|
||||
<h4 class="tsd-parameters-title">Parameters</h4>
|
||||
<ul class="tsd-parameter-list">
|
||||
<li>
|
||||
<h5><span class="tsd-kind-parameter">data</span>: <span class="tsd-signature-type ">MapLayersOptions</span></h5></li></ul></div>
|
||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in core/MapServerController.ts:130</li></ul></aside></li></ul></section>
|
||||
<section class="tsd-panel tsd-member"><a id="showLayer" class="tsd-anchor"></a>
|
||||
<h3 class="tsd-anchor-link"><span>show<wbr/>Layer</span><a href="#showLayer" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
||||
<ul class="tsd-signatures">
|
||||
<li class="tsd-signature tsd-anchor-link" id="showLayer.showLayer-1"><span class="tsd-kind-call-signature">show<wbr/>Layer</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">data</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#showLayer.showLayer-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
|
||||
<li class="tsd-description">
|
||||
<div class="tsd-parameters">
|
||||
<h4 class="tsd-parameters-title">Parameters</h4>
|
||||
<ul class="tsd-parameter-list">
|
||||
<li>
|
||||
<h5><span class="tsd-kind-parameter">data</span>: <span class="tsd-signature-type ">MapLayersOptions</span></h5></li></ul></div>
|
||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in core/MapServerController.ts:55</li></ul></aside></li></ul></section></section></div>
|
||||
<div class="col-sidebar">
|
||||
<div class="page-menu">
|
||||
<div class="tsd-navigation settings">
|
||||
<details class="tsd-index-accordion"><summary class="tsd-accordion-summary">
|
||||
<h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-text)"></path></svg>Settings</h3></summary>
|
||||
<div class="tsd-accordion-details">
|
||||
<div class="tsd-filter-visibility">
|
||||
<h4 class="uppercase">Member Visibility</h4><form>
|
||||
<ul id="tsd-filter-options">
|
||||
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li>
|
||||
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-private" name="private"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Private</span></label></li>
|
||||
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li>
|
||||
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></form></div>
|
||||
<div class="tsd-theme-toggle">
|
||||
<h4 class="uppercase">Theme</h4><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div>
|
||||
<details open class="tsd-index-accordion tsd-page-navigation"><summary class="tsd-accordion-summary">
|
||||
<h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-text)"></path></svg>On This Page</h3></summary>
|
||||
<div class="tsd-accordion-details">
|
||||
<ul>
|
||||
<li><a href="#constructor" class=""><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-512-path"></use><use href="#icon-512-text"></use></svg><span>constructor</span></a></li>
|
||||
<li><a href="#socket" class=""><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>socket</span></a></li>
|
||||
<li><a href="#createApiServiceLayer" class=""><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>create<wbr/>Api<wbr/>Service<wbr/>Layer</span></a></li>
|
||||
<li><a href="#debugInfo" class=""><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>debug<wbr/>Info</span></a></li>
|
||||
<li><a href="#hideLayer" class=""><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>hide<wbr/>Layer</span></a></li>
|
||||
<li><a href="#showLayer" class=""><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>show<wbr/>Layer</span></a></li></ul></div></details></div>
|
||||
<div class="site-menu">
|
||||
<nav class="tsd-navigation"><a href="../modules.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-namespace)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-4-path"></rect><path d="M9.33 16V7.24H10.77L13.446 14.74C13.43 14.54 13.41 14.296 13.386 14.008C13.37 13.712 13.354 13.404 13.338 13.084C13.33 12.756 13.326 12.448 13.326 12.16V7.24H14.37V16H12.93L10.266 8.5C10.282 8.692 10.298 8.936 10.314 9.232C10.33 9.52 10.342 9.828 10.35 10.156C10.366 10.476 10.374 10.784 10.374 11.08V16H9.33Z" fill="var(--color-text)" id="icon-4-text"></path></svg><span>hs-<wbr/>web3d-<wbr/>core</span></a>
|
||||
<ul class="tsd-small-nested-navigation">
|
||||
<li><a href="MapServerController.html" class="current"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-class)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-128-path"></rect><path d="M11.898 16.1201C11.098 16.1201 10.466 15.8961 10.002 15.4481C9.53803 15.0001 9.30603 14.3841 9.30603 13.6001V9.64012C9.30603 8.85612 9.53803 8.24012 10.002 7.79212C10.466 7.34412 11.098 7.12012 11.898 7.12012C12.682 7.12012 13.306 7.34812 13.77 7.80412C14.234 8.25212 14.466 8.86412 14.466 9.64012H13.386C13.386 9.14412 13.254 8.76412 12.99 8.50012C12.734 8.22812 12.37 8.09212 11.898 8.09212C11.426 8.09212 11.054 8.22412 10.782 8.48812C10.518 8.75212 10.386 9.13212 10.386 9.62812V13.6001C10.386 14.0961 10.518 14.4801 10.782 14.7521C11.054 15.0161 11.426 15.1481 11.898 15.1481C12.37 15.1481 12.734 15.0161 12.99 14.7521C13.254 14.4801 13.386 14.0961 13.386 13.6001H14.466C14.466 14.3761 14.234 14.9921 13.77 15.4481C13.306 15.8961 12.682 16.1201 11.898 16.1201Z" fill="var(--color-text)" id="icon-128-text"></path></svg><span>Map<wbr/>Server<wbr/>Controller</span></a></li>
|
||||
<li><a href="SunLightController.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>Sun<wbr/>Light<wbr/>Controller</span></a></li>
|
||||
<li><a href="WaterSurfaceController.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>Water<wbr/>Surface<wbr/>Controller</span></a></li>
|
||||
<li><a href="Web3DCore.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>Web3DCore</span></a></li>
|
||||
<li><a href="web3DCoreSocket.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>web3DCore<wbr/>Socket</span></a></li></ul></nav></div></div></div>
|
||||
<div class="tsd-generator">
|
||||
<p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></div>
|
||||
<div class="overlay"></div></body></html>
|
||||
91
hs-web3d-core/example/docs/classes/SunLightController.html
Normal file
91
hs-web3d-core/example/docs/classes/SunLightController.html
Normal file
@@ -0,0 +1,91 @@
|
||||
<!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>SunLightController | hs-web3d-core</title><meta name="description" content="Documentation for hs-web3d-core"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/search.js" id="tsd-search-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os"</script><header class="tsd-page-toolbar">
|
||||
<div class="tsd-toolbar-contents container">
|
||||
<div class="table-cell" id="tsd-search" data-base="..">
|
||||
<div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M15.7824 13.833L12.6666 10.7177C12.5259 10.5771 12.3353 10.499 12.1353 10.499H11.6259C12.4884 9.39596 13.001 8.00859 13.001 6.49937C13.001 2.90909 10.0914 0 6.50048 0C2.90959 0 0 2.90909 0 6.49937C0 10.0896 2.90959 12.9987 6.50048 12.9987C8.00996 12.9987 9.39756 12.4863 10.5008 11.6239V12.1332C10.5008 12.3332 10.5789 12.5238 10.7195 12.6644L13.8354 15.7797C14.1292 16.0734 14.6042 16.0734 14.8948 15.7797L15.7793 14.8954C16.0731 14.6017 16.0731 14.1267 15.7824 13.833ZM6.50048 10.499C4.29094 10.499 2.50018 8.71165 2.50018 6.49937C2.50018 4.29021 4.28781 2.49976 6.50048 2.49976C8.71001 2.49976 10.5008 4.28708 10.5008 6.49937C10.5008 8.70852 8.71314 10.499 6.50048 10.499Z" fill="var(--color-text)"></path></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div>
|
||||
<div class="field">
|
||||
<div id="tsd-toolbar-links"></div></div>
|
||||
<ul class="results">
|
||||
<li class="state loading">Preparing search index...</li>
|
||||
<li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">hs-web3d-core</a></div>
|
||||
<div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><rect x="1" y="3" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="7" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="11" width="14" height="2" fill="var(--color-text)"></rect></svg></a></div></div></header>
|
||||
<div class="container container-main">
|
||||
<div class="col-content">
|
||||
<div class="tsd-page-title">
|
||||
<ul class="tsd-breadcrumb">
|
||||
<li><a href="../modules.html">hs-web3d-core</a></li>
|
||||
<li><a href="SunLightController.html">SunLightController</a></li></ul>
|
||||
<h1>Class SunLightController</h1></div>
|
||||
<section class="tsd-panel tsd-hierarchy">
|
||||
<h4>Hierarchy</h4>
|
||||
<ul class="tsd-hierarchy">
|
||||
<li><span class="target">SunLightController</span></li></ul></section><aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in core/SunLightController.ts:1</li></ul></aside>
|
||||
<section class="tsd-panel-group tsd-index-group">
|
||||
<section class="tsd-panel tsd-index-panel">
|
||||
<details class="tsd-index-content tsd-index-accordion" open><summary class="tsd-accordion-summary tsd-index-summary">
|
||||
<h5 class="tsd-index-heading uppercase" role="button" aria-expanded="false" tabIndex=0><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M1.5 5.50969L8 11.6609L14.5 5.50969L12.5466 3.66086L8 7.96494L3.45341 3.66086L1.5 5.50969Z" fill="var(--color-text)"></path></svg> Index</h5></summary>
|
||||
<div class="tsd-accordion-details">
|
||||
<section class="tsd-index-section">
|
||||
<h3 class="tsd-index-heading">Constructors</h3>
|
||||
<div class="tsd-index-list"><a href="SunLightController.html#constructor" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="#4D7FFF" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12" id="icon-512-path"></rect><path d="M11.898 16.1201C11.098 16.1201 10.466 15.8961 10.002 15.4481C9.53803 15.0001 9.30603 14.3841 9.30603 13.6001V9.64012C9.30603 8.85612 9.53803 8.24012 10.002 7.79212C10.466 7.34412 11.098 7.12012 11.898 7.12012C12.682 7.12012 13.306 7.34812 13.77 7.80412C14.234 8.25212 14.466 8.86412 14.466 9.64012H13.386C13.386 9.14412 13.254 8.76412 12.99 8.50012C12.734 8.22812 12.37 8.09212 11.898 8.09212C11.426 8.09212 11.054 8.22412 10.782 8.48812C10.518 8.75212 10.386 9.13212 10.386 9.62812V13.6001C10.386 14.0961 10.518 14.4801 10.782 14.7521C11.054 15.0161 11.426 15.1481 11.898 15.1481C12.37 15.1481 12.734 15.0161 12.99 14.7521C13.254 14.4801 13.386 14.0961 13.386 13.6001H14.466C14.466 14.3761 14.234 14.9921 13.77 15.4481C13.306 15.8961 12.682 16.1201 11.898 16.1201Z" fill="var(--color-text)" id="icon-512-text"></path></svg><span>constructor</span></a>
|
||||
</div></section>
|
||||
<section class="tsd-index-section">
|
||||
<h3 class="tsd-index-heading">Methods</h3>
|
||||
<div class="tsd-index-list"><a href="SunLightController.html#changeSunLight" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="#FF4DB8" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12" id="icon-2048-path"></rect><path d="M9.162 16V7.24H10.578L11.514 10.072C11.602 10.328 11.674 10.584 11.73 10.84C11.794 11.088 11.842 11.28 11.874 11.416C11.906 11.28 11.954 11.088 12.018 10.84C12.082 10.584 12.154 10.324 12.234 10.06L13.122 7.24H14.538V16H13.482V12.82C13.482 12.468 13.49 12.068 13.506 11.62C13.53 11.172 13.558 10.716 13.59 10.252C13.622 9.78 13.654 9.332 13.686 8.908C13.726 8.476 13.762 8.1 13.794 7.78L12.366 12.16H11.334L9.894 7.78C9.934 8.092 9.97 8.456 10.002 8.872C10.042 9.28 10.078 9.716 10.11 10.18C10.142 10.636 10.166 11.092 10.182 11.548C10.206 12.004 10.218 12.428 10.218 12.82V16H9.162Z" fill="var(--color-text)" id="icon-2048-text"></path></svg><span>change<wbr/>Sun<wbr/>Light</span></a>
|
||||
</div></section></div></details></section></section>
|
||||
<section class="tsd-panel-group tsd-member-group">
|
||||
<h2>Constructors</h2>
|
||||
<section class="tsd-panel tsd-member"><a id="constructor" class="tsd-anchor"></a>
|
||||
<h3 class="tsd-anchor-link"><span>constructor</span><a href="#constructor" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none" id="icon-anchor-a"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5" id="icon-anchor-b"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5" id="icon-anchor-c"></path></svg></a></h3>
|
||||
<ul class="tsd-signatures">
|
||||
<li class="tsd-signature tsd-anchor-link" id="constructor.new_SunLightController"><span class="tsd-kind-constructor-signature">new <wbr/>Sun<wbr/>Light<wbr/>Controller</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="SunLightController.html" class="tsd-signature-type tsd-kind-class">SunLightController</a><a href="#constructor.new_SunLightController" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
|
||||
<li class="tsd-description">
|
||||
<h4 class="tsd-returns-title">Returns <a href="SunLightController.html" class="tsd-signature-type tsd-kind-class">SunLightController</a></h4></li></ul></section></section>
|
||||
<section class="tsd-panel-group tsd-member-group">
|
||||
<h2>Methods</h2>
|
||||
<section class="tsd-panel tsd-member"><a id="changeSunLight" class="tsd-anchor"></a>
|
||||
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagStatic">Static</code> <span>change<wbr/>Sun<wbr/>Light</span><a href="#changeSunLight" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
||||
<ul class="tsd-signatures">
|
||||
<li class="tsd-signature tsd-anchor-link" id="changeSunLight.changeSunLight-1"><span class="tsd-kind-call-signature">change<wbr/>Sun<wbr/>Light</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">data</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#changeSunLight.changeSunLight-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
|
||||
<li class="tsd-description">
|
||||
<div class="tsd-parameters">
|
||||
<h4 class="tsd-parameters-title">Parameters</h4>
|
||||
<ul class="tsd-parameter-list">
|
||||
<li>
|
||||
<h5><span class="tsd-kind-parameter">data</span>: <span class="tsd-signature-type">any</span></h5></li></ul></div>
|
||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in core/SunLightController.ts:2</li></ul></aside></li></ul></section></section></div>
|
||||
<div class="col-sidebar">
|
||||
<div class="page-menu">
|
||||
<div class="tsd-navigation settings">
|
||||
<details class="tsd-index-accordion"><summary class="tsd-accordion-summary">
|
||||
<h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-text)"></path></svg>Settings</h3></summary>
|
||||
<div class="tsd-accordion-details">
|
||||
<div class="tsd-filter-visibility">
|
||||
<h4 class="uppercase">Member Visibility</h4><form>
|
||||
<ul id="tsd-filter-options">
|
||||
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li>
|
||||
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-private" name="private"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Private</span></label></li>
|
||||
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li>
|
||||
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></form></div>
|
||||
<div class="tsd-theme-toggle">
|
||||
<h4 class="uppercase">Theme</h4><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div>
|
||||
<details open class="tsd-index-accordion tsd-page-navigation"><summary class="tsd-accordion-summary">
|
||||
<h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-text)"></path></svg>On This Page</h3></summary>
|
||||
<div class="tsd-accordion-details">
|
||||
<ul>
|
||||
<li><a href="#constructor" class=""><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-512-path"></use><use href="#icon-512-text"></use></svg><span>constructor</span></a></li>
|
||||
<li><a href="#changeSunLight" class=""><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>change<wbr/>Sun<wbr/>Light</span></a></li></ul></div></details></div>
|
||||
<div class="site-menu">
|
||||
<nav class="tsd-navigation"><a href="../modules.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-namespace)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-4-path"></rect><path d="M9.33 16V7.24H10.77L13.446 14.74C13.43 14.54 13.41 14.296 13.386 14.008C13.37 13.712 13.354 13.404 13.338 13.084C13.33 12.756 13.326 12.448 13.326 12.16V7.24H14.37V16H12.93L10.266 8.5C10.282 8.692 10.298 8.936 10.314 9.232C10.33 9.52 10.342 9.828 10.35 10.156C10.366 10.476 10.374 10.784 10.374 11.08V16H9.33Z" fill="var(--color-text)" id="icon-4-text"></path></svg><span>hs-<wbr/>web3d-<wbr/>core</span></a>
|
||||
<ul class="tsd-small-nested-navigation">
|
||||
<li><a href="MapServerController.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-class)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-128-path"></rect><path d="M11.898 16.1201C11.098 16.1201 10.466 15.8961 10.002 15.4481C9.53803 15.0001 9.30603 14.3841 9.30603 13.6001V9.64012C9.30603 8.85612 9.53803 8.24012 10.002 7.79212C10.466 7.34412 11.098 7.12012 11.898 7.12012C12.682 7.12012 13.306 7.34812 13.77 7.80412C14.234 8.25212 14.466 8.86412 14.466 9.64012H13.386C13.386 9.14412 13.254 8.76412 12.99 8.50012C12.734 8.22812 12.37 8.09212 11.898 8.09212C11.426 8.09212 11.054 8.22412 10.782 8.48812C10.518 8.75212 10.386 9.13212 10.386 9.62812V13.6001C10.386 14.0961 10.518 14.4801 10.782 14.7521C11.054 15.0161 11.426 15.1481 11.898 15.1481C12.37 15.1481 12.734 15.0161 12.99 14.7521C13.254 14.4801 13.386 14.0961 13.386 13.6001H14.466C14.466 14.3761 14.234 14.9921 13.77 15.4481C13.306 15.8961 12.682 16.1201 11.898 16.1201Z" fill="var(--color-text)" id="icon-128-text"></path></svg><span>Map<wbr/>Server<wbr/>Controller</span></a></li>
|
||||
<li><a href="SunLightController.html" class="current"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>Sun<wbr/>Light<wbr/>Controller</span></a></li>
|
||||
<li><a href="WaterSurfaceController.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>Water<wbr/>Surface<wbr/>Controller</span></a></li>
|
||||
<li><a href="Web3DCore.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>Web3DCore</span></a></li>
|
||||
<li><a href="web3DCoreSocket.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>web3DCore<wbr/>Socket</span></a></li></ul></nav></div></div></div>
|
||||
<div class="tsd-generator">
|
||||
<p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></div>
|
||||
<div class="overlay"></div></body></html>
|
||||
@@ -0,0 +1,71 @@
|
||||
<!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>WaterSurfaceController | hs-web3d-core</title><meta name="description" content="Documentation for hs-web3d-core"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/search.js" id="tsd-search-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os"</script><header class="tsd-page-toolbar">
|
||||
<div class="tsd-toolbar-contents container">
|
||||
<div class="table-cell" id="tsd-search" data-base="..">
|
||||
<div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M15.7824 13.833L12.6666 10.7177C12.5259 10.5771 12.3353 10.499 12.1353 10.499H11.6259C12.4884 9.39596 13.001 8.00859 13.001 6.49937C13.001 2.90909 10.0914 0 6.50048 0C2.90959 0 0 2.90909 0 6.49937C0 10.0896 2.90959 12.9987 6.50048 12.9987C8.00996 12.9987 9.39756 12.4863 10.5008 11.6239V12.1332C10.5008 12.3332 10.5789 12.5238 10.7195 12.6644L13.8354 15.7797C14.1292 16.0734 14.6042 16.0734 14.8948 15.7797L15.7793 14.8954C16.0731 14.6017 16.0731 14.1267 15.7824 13.833ZM6.50048 10.499C4.29094 10.499 2.50018 8.71165 2.50018 6.49937C2.50018 4.29021 4.28781 2.49976 6.50048 2.49976C8.71001 2.49976 10.5008 4.28708 10.5008 6.49937C10.5008 8.70852 8.71314 10.499 6.50048 10.499Z" fill="var(--color-text)"></path></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div>
|
||||
<div class="field">
|
||||
<div id="tsd-toolbar-links"></div></div>
|
||||
<ul class="results">
|
||||
<li class="state loading">Preparing search index...</li>
|
||||
<li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">hs-web3d-core</a></div>
|
||||
<div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><rect x="1" y="3" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="7" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="11" width="14" height="2" fill="var(--color-text)"></rect></svg></a></div></div></header>
|
||||
<div class="container container-main">
|
||||
<div class="col-content">
|
||||
<div class="tsd-page-title">
|
||||
<ul class="tsd-breadcrumb">
|
||||
<li><a href="../modules.html">hs-web3d-core</a></li>
|
||||
<li><a href="WaterSurfaceController.html">WaterSurfaceController</a></li></ul>
|
||||
<h1>Class WaterSurfaceController</h1></div>
|
||||
<section class="tsd-panel tsd-hierarchy">
|
||||
<h4>Hierarchy</h4>
|
||||
<ul class="tsd-hierarchy">
|
||||
<li><span class="target">WaterSurfaceController</span></li></ul></section><aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in core/WaterSurfaceController.ts:2</li></ul></aside>
|
||||
<section class="tsd-panel-group tsd-index-group">
|
||||
<section class="tsd-panel tsd-index-panel">
|
||||
<details class="tsd-index-content tsd-index-accordion" open><summary class="tsd-accordion-summary tsd-index-summary">
|
||||
<h5 class="tsd-index-heading uppercase" role="button" aria-expanded="false" tabIndex=0><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M1.5 5.50969L8 11.6609L14.5 5.50969L12.5466 3.66086L8 7.96494L3.45341 3.66086L1.5 5.50969Z" fill="var(--color-text)"></path></svg> Index</h5></summary>
|
||||
<div class="tsd-accordion-details">
|
||||
<section class="tsd-index-section">
|
||||
<h3 class="tsd-index-heading">Constructors</h3>
|
||||
<div class="tsd-index-list"><a href="WaterSurfaceController.html#constructor" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="#4D7FFF" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12" id="icon-512-path"></rect><path d="M11.898 16.1201C11.098 16.1201 10.466 15.8961 10.002 15.4481C9.53803 15.0001 9.30603 14.3841 9.30603 13.6001V9.64012C9.30603 8.85612 9.53803 8.24012 10.002 7.79212C10.466 7.34412 11.098 7.12012 11.898 7.12012C12.682 7.12012 13.306 7.34812 13.77 7.80412C14.234 8.25212 14.466 8.86412 14.466 9.64012H13.386C13.386 9.14412 13.254 8.76412 12.99 8.50012C12.734 8.22812 12.37 8.09212 11.898 8.09212C11.426 8.09212 11.054 8.22412 10.782 8.48812C10.518 8.75212 10.386 9.13212 10.386 9.62812V13.6001C10.386 14.0961 10.518 14.4801 10.782 14.7521C11.054 15.0161 11.426 15.1481 11.898 15.1481C12.37 15.1481 12.734 15.0161 12.99 14.7521C13.254 14.4801 13.386 14.0961 13.386 13.6001H14.466C14.466 14.3761 14.234 14.9921 13.77 15.4481C13.306 15.8961 12.682 16.1201 11.898 16.1201Z" fill="var(--color-text)" id="icon-512-text"></path></svg><span>constructor</span></a>
|
||||
</div></section></div></details></section></section>
|
||||
<section class="tsd-panel-group tsd-member-group">
|
||||
<h2>Constructors</h2>
|
||||
<section class="tsd-panel tsd-member"><a id="constructor" class="tsd-anchor"></a>
|
||||
<h3 class="tsd-anchor-link"><span>constructor</span><a href="#constructor" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none" id="icon-anchor-a"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5" id="icon-anchor-b"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5" id="icon-anchor-c"></path></svg></a></h3>
|
||||
<ul class="tsd-signatures">
|
||||
<li class="tsd-signature tsd-anchor-link" id="constructor.new_WaterSurfaceController"><span class="tsd-kind-constructor-signature">new <wbr/>Water<wbr/>Surface<wbr/>Controller</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="WaterSurfaceController.html" class="tsd-signature-type tsd-kind-class">WaterSurfaceController</a><a href="#constructor.new_WaterSurfaceController" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
|
||||
<li class="tsd-description">
|
||||
<h4 class="tsd-returns-title">Returns <a href="WaterSurfaceController.html" class="tsd-signature-type tsd-kind-class">WaterSurfaceController</a></h4></li></ul></section></section></div>
|
||||
<div class="col-sidebar">
|
||||
<div class="page-menu">
|
||||
<div class="tsd-navigation settings">
|
||||
<details class="tsd-index-accordion"><summary class="tsd-accordion-summary">
|
||||
<h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-text)"></path></svg>Settings</h3></summary>
|
||||
<div class="tsd-accordion-details">
|
||||
<div class="tsd-filter-visibility">
|
||||
<h4 class="uppercase">Member Visibility</h4><form>
|
||||
<ul id="tsd-filter-options">
|
||||
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li>
|
||||
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-private" name="private"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Private</span></label></li>
|
||||
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li>
|
||||
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></form></div>
|
||||
<div class="tsd-theme-toggle">
|
||||
<h4 class="uppercase">Theme</h4><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div>
|
||||
<details open class="tsd-index-accordion tsd-page-navigation"><summary class="tsd-accordion-summary">
|
||||
<h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-text)"></path></svg>On This Page</h3></summary>
|
||||
<div class="tsd-accordion-details">
|
||||
<ul>
|
||||
<li><a href="#constructor" class=""><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-512-path"></use><use href="#icon-512-text"></use></svg><span>constructor</span></a></li></ul></div></details></div>
|
||||
<div class="site-menu">
|
||||
<nav class="tsd-navigation"><a href="../modules.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-namespace)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-4-path"></rect><path d="M9.33 16V7.24H10.77L13.446 14.74C13.43 14.54 13.41 14.296 13.386 14.008C13.37 13.712 13.354 13.404 13.338 13.084C13.33 12.756 13.326 12.448 13.326 12.16V7.24H14.37V16H12.93L10.266 8.5C10.282 8.692 10.298 8.936 10.314 9.232C10.33 9.52 10.342 9.828 10.35 10.156C10.366 10.476 10.374 10.784 10.374 11.08V16H9.33Z" fill="var(--color-text)" id="icon-4-text"></path></svg><span>hs-<wbr/>web3d-<wbr/>core</span></a>
|
||||
<ul class="tsd-small-nested-navigation">
|
||||
<li><a href="MapServerController.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-class)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-128-path"></rect><path d="M11.898 16.1201C11.098 16.1201 10.466 15.8961 10.002 15.4481C9.53803 15.0001 9.30603 14.3841 9.30603 13.6001V9.64012C9.30603 8.85612 9.53803 8.24012 10.002 7.79212C10.466 7.34412 11.098 7.12012 11.898 7.12012C12.682 7.12012 13.306 7.34812 13.77 7.80412C14.234 8.25212 14.466 8.86412 14.466 9.64012H13.386C13.386 9.14412 13.254 8.76412 12.99 8.50012C12.734 8.22812 12.37 8.09212 11.898 8.09212C11.426 8.09212 11.054 8.22412 10.782 8.48812C10.518 8.75212 10.386 9.13212 10.386 9.62812V13.6001C10.386 14.0961 10.518 14.4801 10.782 14.7521C11.054 15.0161 11.426 15.1481 11.898 15.1481C12.37 15.1481 12.734 15.0161 12.99 14.7521C13.254 14.4801 13.386 14.0961 13.386 13.6001H14.466C14.466 14.3761 14.234 14.9921 13.77 15.4481C13.306 15.8961 12.682 16.1201 11.898 16.1201Z" fill="var(--color-text)" id="icon-128-text"></path></svg><span>Map<wbr/>Server<wbr/>Controller</span></a></li>
|
||||
<li><a href="SunLightController.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>Sun<wbr/>Light<wbr/>Controller</span></a></li>
|
||||
<li><a href="WaterSurfaceController.html" class="current"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>Water<wbr/>Surface<wbr/>Controller</span></a></li>
|
||||
<li><a href="Web3DCore.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>Web3DCore</span></a></li>
|
||||
<li><a href="web3DCoreSocket.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>web3DCore<wbr/>Socket</span></a></li></ul></nav></div></div></div>
|
||||
<div class="tsd-generator">
|
||||
<p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></div>
|
||||
<div class="overlay"></div></body></html>
|
||||
340
hs-web3d-core/example/docs/classes/Web3DCore.html
Normal file
340
hs-web3d-core/example/docs/classes/Web3DCore.html
Normal file
@@ -0,0 +1,340 @@
|
||||
<!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>Web3DCore | hs-web3d-core</title><meta name="description" content="Documentation for hs-web3d-core"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/search.js" id="tsd-search-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os"</script><header class="tsd-page-toolbar">
|
||||
<div class="tsd-toolbar-contents container">
|
||||
<div class="table-cell" id="tsd-search" data-base="..">
|
||||
<div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M15.7824 13.833L12.6666 10.7177C12.5259 10.5771 12.3353 10.499 12.1353 10.499H11.6259C12.4884 9.39596 13.001 8.00859 13.001 6.49937C13.001 2.90909 10.0914 0 6.50048 0C2.90959 0 0 2.90909 0 6.49937C0 10.0896 2.90959 12.9987 6.50048 12.9987C8.00996 12.9987 9.39756 12.4863 10.5008 11.6239V12.1332C10.5008 12.3332 10.5789 12.5238 10.7195 12.6644L13.8354 15.7797C14.1292 16.0734 14.6042 16.0734 14.8948 15.7797L15.7793 14.8954C16.0731 14.6017 16.0731 14.1267 15.7824 13.833ZM6.50048 10.499C4.29094 10.499 2.50018 8.71165 2.50018 6.49937C2.50018 4.29021 4.28781 2.49976 6.50048 2.49976C8.71001 2.49976 10.5008 4.28708 10.5008 6.49937C10.5008 8.70852 8.71314 10.499 6.50048 10.499Z" fill="var(--color-text)"></path></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div>
|
||||
<div class="field">
|
||||
<div id="tsd-toolbar-links"></div></div>
|
||||
<ul class="results">
|
||||
<li class="state loading">Preparing search index...</li>
|
||||
<li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">hs-web3d-core</a></div>
|
||||
<div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><rect x="1" y="3" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="7" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="11" width="14" height="2" fill="var(--color-text)"></rect></svg></a></div></div></header>
|
||||
<div class="container container-main">
|
||||
<div class="col-content">
|
||||
<div class="tsd-page-title">
|
||||
<ul class="tsd-breadcrumb">
|
||||
<li><a href="../modules.html">hs-web3d-core</a></li>
|
||||
<li><a href="Web3DCore.html">Web3DCore</a></li></ul>
|
||||
<h1>Class Web3DCore</h1></div>
|
||||
<section class="tsd-panel tsd-hierarchy">
|
||||
<h4>Hierarchy</h4>
|
||||
<ul class="tsd-hierarchy">
|
||||
<li><span class="target">Web3DCore</span></li></ul></section><aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in core/Web3DCore.ts:28</li></ul></aside>
|
||||
<section class="tsd-panel-group tsd-index-group">
|
||||
<section class="tsd-panel tsd-index-panel">
|
||||
<details class="tsd-index-content tsd-index-accordion" open><summary class="tsd-accordion-summary tsd-index-summary">
|
||||
<h5 class="tsd-index-heading uppercase" role="button" aria-expanded="false" tabIndex=0><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M1.5 5.50969L8 11.6609L14.5 5.50969L12.5466 3.66086L8 7.96494L3.45341 3.66086L1.5 5.50969Z" fill="var(--color-text)"></path></svg> Index</h5></summary>
|
||||
<div class="tsd-accordion-details">
|
||||
<section class="tsd-index-section">
|
||||
<h3 class="tsd-index-heading">Constructors</h3>
|
||||
<div class="tsd-index-list"><a href="Web3DCore.html#constructor" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="#4D7FFF" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12" id="icon-512-path"></rect><path d="M11.898 16.1201C11.098 16.1201 10.466 15.8961 10.002 15.4481C9.53803 15.0001 9.30603 14.3841 9.30603 13.6001V9.64012C9.30603 8.85612 9.53803 8.24012 10.002 7.79212C10.466 7.34412 11.098 7.12012 11.898 7.12012C12.682 7.12012 13.306 7.34812 13.77 7.80412C14.234 8.25212 14.466 8.86412 14.466 9.64012H13.386C13.386 9.14412 13.254 8.76412 12.99 8.50012C12.734 8.22812 12.37 8.09212 11.898 8.09212C11.426 8.09212 11.054 8.22412 10.782 8.48812C10.518 8.75212 10.386 9.13212 10.386 9.62812V13.6001C10.386 14.0961 10.518 14.4801 10.782 14.7521C11.054 15.0161 11.426 15.1481 11.898 15.1481C12.37 15.1481 12.734 15.0161 12.99 14.7521C13.254 14.4801 13.386 14.0961 13.386 13.6001H14.466C14.466 14.3761 14.234 14.9921 13.77 15.4481C13.306 15.8961 12.682 16.1201 11.898 16.1201Z" fill="var(--color-text)" id="icon-512-text"></path></svg><span>constructor</span></a>
|
||||
</div></section>
|
||||
<section class="tsd-index-section">
|
||||
<h3 class="tsd-index-heading">Properties</h3>
|
||||
<div class="tsd-index-list"><a href="Web3DCore.html#appId" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="#FF984D" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12" id="icon-1024-path"></rect><path d="M9.354 16V7.24H12.174C12.99 7.24 13.638 7.476 14.118 7.948C14.606 8.412 14.85 9.036 14.85 9.82C14.85 10.604 14.606 11.232 14.118 11.704C13.638 12.168 12.99 12.4 12.174 12.4H10.434V16H9.354ZM10.434 11.428H12.174C12.646 11.428 13.022 11.284 13.302 10.996C13.59 10.7 13.734 10.308 13.734 9.82C13.734 9.324 13.59 8.932 13.302 8.644C13.022 8.356 12.646 8.212 12.174 8.212H10.434V11.428Z" fill="var(--color-text)" id="icon-1024-text"></path></svg><span>app<wbr/>Id?</span></a>
|
||||
<a href="Web3DCore.html#autoReconnect" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>auto<wbr/>Reconnect</span></a>
|
||||
<a href="Web3DCore.html#clientId" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>client<wbr/>Id?</span></a>
|
||||
<a href="Web3DCore.html#delay" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>delay</span></a>
|
||||
<a href="Web3DCore.html#heartbeat" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>heartbeat</span></a>
|
||||
<a href="Web3DCore.html#query" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>query</span></a>
|
||||
<a href="Web3DCore.html#reconnectCount" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>reconnect<wbr/>Count</span></a>
|
||||
<a href="Web3DCore.html#sessionId" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>session<wbr/>Id?</span></a>
|
||||
<a href="Web3DCore.html#socket" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>socket</span></a>
|
||||
<a href="Web3DCore.html#timer" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>timer</span></a>
|
||||
<a href="Web3DCore.html#url" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>url</span></a>
|
||||
<a href="Web3DCore.html#instance" class="tsd-index-link tsd-is-private"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>instance</span></a>
|
||||
</div></section>
|
||||
<section class="tsd-index-section">
|
||||
<h3 class="tsd-index-heading">Methods</h3>
|
||||
<div class="tsd-index-list"><a href="Web3DCore.html#close" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="#FF4DB8" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12" id="icon-2048-path"></rect><path d="M9.162 16V7.24H10.578L11.514 10.072C11.602 10.328 11.674 10.584 11.73 10.84C11.794 11.088 11.842 11.28 11.874 11.416C11.906 11.28 11.954 11.088 12.018 10.84C12.082 10.584 12.154 10.324 12.234 10.06L13.122 7.24H14.538V16H13.482V12.82C13.482 12.468 13.49 12.068 13.506 11.62C13.53 11.172 13.558 10.716 13.59 10.252C13.622 9.78 13.654 9.332 13.686 8.908C13.726 8.476 13.762 8.1 13.794 7.78L12.366 12.16H11.334L9.894 7.78C9.934 8.092 9.97 8.456 10.002 8.872C10.042 9.28 10.078 9.716 10.11 10.18C10.142 10.636 10.166 11.092 10.182 11.548C10.206 12.004 10.218 12.428 10.218 12.82V16H9.162Z" fill="var(--color-text)" id="icon-2048-text"></path></svg><span>close</span></a>
|
||||
<a href="Web3DCore.html#connect" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>connect</span></a>
|
||||
<a href="Web3DCore.html#login" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>login</span></a>
|
||||
<a href="Web3DCore.html#onError" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>on<wbr/>Error</span></a>
|
||||
<a href="Web3DCore.html#onMessage" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>on<wbr/>Message</span></a>
|
||||
<a href="Web3DCore.html#onOpen" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>on<wbr/>Open</span></a>
|
||||
<a href="Web3DCore.html#send" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>send</span></a>
|
||||
<a href="Web3DCore.html#sendToEngin" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>send<wbr/>To<wbr/>Engin</span></a>
|
||||
<a href="Web3DCore.html#sendToWebClient" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>send<wbr/>To<wbr/>Web<wbr/>Client</span></a>
|
||||
<a href="Web3DCore.html#startHeartbeat" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>start<wbr/>Heartbeat</span></a>
|
||||
<a href="Web3DCore.html#getInstance" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>get<wbr/>Instance</span></a>
|
||||
</div></section></div></details></section></section>
|
||||
<section class="tsd-panel-group tsd-member-group">
|
||||
<h2>Constructors</h2>
|
||||
<section class="tsd-panel tsd-member"><a id="constructor" class="tsd-anchor"></a>
|
||||
<h3 class="tsd-anchor-link"><span>constructor</span><a href="#constructor" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none" id="icon-anchor-a"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5" id="icon-anchor-b"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5" id="icon-anchor-c"></path></svg></a></h3>
|
||||
<ul class="tsd-signatures">
|
||||
<li class="tsd-signature tsd-anchor-link" id="constructor.new_Web3DCore"><span class="tsd-kind-constructor-signature">new <wbr/>Web3DCore</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">url</span><span class="tsd-signature-symbol">?</span>, <span class="tsd-kind-parameter">options</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="Web3DCore.html" class="tsd-signature-type tsd-kind-class">Web3DCore</a><a href="#constructor.new_Web3DCore" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
|
||||
<li class="tsd-description">
|
||||
<div class="tsd-parameters">
|
||||
<h4 class="tsd-parameters-title">Parameters</h4>
|
||||
<ul class="tsd-parameter-list">
|
||||
<li>
|
||||
<h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">url</span>: <span class="tsd-signature-type">string</span></h5></li>
|
||||
<li>
|
||||
<h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">options</span>: <span class="tsd-signature-type ">IWSOptions</span></h5></li></ul></div>
|
||||
<h4 class="tsd-returns-title">Returns <a href="Web3DCore.html" class="tsd-signature-type tsd-kind-class">Web3DCore</a></h4><aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in core/Web3DCore.ts:43</li></ul></aside></li></ul></section></section>
|
||||
<section class="tsd-panel-group tsd-member-group">
|
||||
<h2>Properties</h2>
|
||||
<section class="tsd-panel tsd-member"><a id="appId" class="tsd-anchor"></a>
|
||||
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagOptional">Optional</code> <span>app<wbr/>Id</span><a href="#appId" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
||||
<div class="tsd-signature"><span class="tsd-kind-property">app<wbr/>Id</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in core/Web3DCore.ts:39</li></ul></aside></section>
|
||||
<section class="tsd-panel tsd-member"><a id="autoReconnect" class="tsd-anchor"></a>
|
||||
<h3 class="tsd-anchor-link"><span>auto<wbr/>Reconnect</span><a href="#autoReconnect" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
||||
<div class="tsd-signature"><span class="tsd-kind-property">auto<wbr/>Reconnect</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type ">AutoReconnect</span></div><aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in core/Web3DCore.ts:36</li></ul></aside></section>
|
||||
<section class="tsd-panel tsd-member"><a id="clientId" class="tsd-anchor"></a>
|
||||
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagOptional">Optional</code> <span>client<wbr/>Id</span><a href="#clientId" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
||||
<div class="tsd-signature"><span class="tsd-kind-property">client<wbr/>Id</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in core/Web3DCore.ts:41</li></ul></aside></section>
|
||||
<section class="tsd-panel tsd-member"><a id="delay" class="tsd-anchor"></a>
|
||||
<h3 class="tsd-anchor-link"><span>delay</span><a href="#delay" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
||||
<div class="tsd-signature"><span class="tsd-kind-property">delay</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type ">Nullable</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type ">Timeout</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol"> = null</span></div><aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in core/Web3DCore.ts:34</li></ul></aside></section>
|
||||
<section class="tsd-panel tsd-member"><a id="heartbeat" class="tsd-anchor"></a>
|
||||
<h3 class="tsd-anchor-link"><span>heartbeat</span><a href="#heartbeat" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
||||
<div class="tsd-signature"><span class="tsd-kind-property">heartbeat</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type ">Heartbeat</span></div><aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in core/Web3DCore.ts:37</li></ul></aside></section>
|
||||
<section class="tsd-panel tsd-member"><a id="query" class="tsd-anchor"></a>
|
||||
<h3 class="tsd-anchor-link"><span>query</span><a href="#query" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
||||
<div class="tsd-signature"><span class="tsd-kind-property">query</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type ">Record</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">></span></div><aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in core/Web3DCore.ts:38</li></ul></aside></section>
|
||||
<section class="tsd-panel tsd-member"><a id="reconnectCount" class="tsd-anchor"></a>
|
||||
<h3 class="tsd-anchor-link"><span>reconnect<wbr/>Count</span><a href="#reconnectCount" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
||||
<div class="tsd-signature"><span class="tsd-kind-property">reconnect<wbr/>Count</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> = 0</span></div><aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in core/Web3DCore.ts:33</li></ul></aside></section>
|
||||
<section class="tsd-panel tsd-member"><a id="sessionId" class="tsd-anchor"></a>
|
||||
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagOptional">Optional</code> <span>session<wbr/>Id</span><a href="#sessionId" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
||||
<div class="tsd-signature"><span class="tsd-kind-property">session<wbr/>Id</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in core/Web3DCore.ts:40</li></ul></aside></section>
|
||||
<section class="tsd-panel tsd-member"><a id="socket" class="tsd-anchor"></a>
|
||||
<h3 class="tsd-anchor-link"><span>socket</span><a href="#socket" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
||||
<div class="tsd-signature"><span class="tsd-kind-property">socket</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type ">WebSocket</span><span class="tsd-signature-symbol"> = null</span></div><aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in core/Web3DCore.ts:32</li></ul></aside></section>
|
||||
<section class="tsd-panel tsd-member"><a id="timer" class="tsd-anchor"></a>
|
||||
<h3 class="tsd-anchor-link"><span>timer</span><a href="#timer" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
||||
<div class="tsd-signature"><span class="tsd-kind-property">timer</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type ">Nullable</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type ">Timer</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol"> = null</span></div><aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in core/Web3DCore.ts:35</li></ul></aside></section>
|
||||
<section class="tsd-panel tsd-member"><a id="url" class="tsd-anchor"></a>
|
||||
<h3 class="tsd-anchor-link"><span>url</span><a href="#url" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
||||
<div class="tsd-signature"><span class="tsd-kind-property">url</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in core/Web3DCore.ts:31</li></ul></aside></section>
|
||||
<section class="tsd-panel tsd-member tsd-is-private"><a id="instance" class="tsd-anchor"></a>
|
||||
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagStatic">Static</code> <code class="tsd-tag ts-flagPrivate">Private</code> <span>instance</span><a href="#instance" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
||||
<div class="tsd-signature"><span class="tsd-kind-property">instance</span><span class="tsd-signature-symbol">:</span> <a href="Web3DCore.html" class="tsd-signature-type tsd-kind-class">Web3DCore</a></div><aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in core/Web3DCore.ts:29</li></ul></aside></section></section>
|
||||
<section class="tsd-panel-group tsd-member-group">
|
||||
<h2>Methods</h2>
|
||||
<section class="tsd-panel tsd-member"><a id="close" class="tsd-anchor"></a>
|
||||
<h3 class="tsd-anchor-link"><span>close</span><a href="#close" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
||||
<ul class="tsd-signatures">
|
||||
<li class="tsd-signature tsd-anchor-link" id="close.close-1"><span class="tsd-kind-call-signature">close</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#close.close-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
|
||||
<li class="tsd-description">
|
||||
<div class="tsd-comment tsd-typography"><p>关闭连接</p>
|
||||
</div>
|
||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in core/Web3DCore.ts:131</li></ul></aside></li></ul></section>
|
||||
<section class="tsd-panel tsd-member"><a id="connect" class="tsd-anchor"></a>
|
||||
<h3 class="tsd-anchor-link"><span>connect</span><a href="#connect" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
||||
<ul class="tsd-signatures">
|
||||
<li class="tsd-signature tsd-anchor-link" id="connect.connect-1"><span class="tsd-kind-call-signature">connect</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#connect.connect-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
|
||||
<li class="tsd-description">
|
||||
<div class="tsd-comment tsd-typography"><p>连接</p>
|
||||
</div>
|
||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in core/Web3DCore.ts:79</li></ul></aside></li></ul></section>
|
||||
<section class="tsd-panel tsd-member"><a id="login" class="tsd-anchor"></a>
|
||||
<h3 class="tsd-anchor-link"><span>login</span><a href="#login" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
||||
<ul class="tsd-signatures">
|
||||
<li class="tsd-signature tsd-anchor-link" id="login.login-1"><span class="tsd-kind-call-signature">login</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#login.login-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
|
||||
<li class="tsd-description">
|
||||
<div class="tsd-comment tsd-typography"><p>登录</p>
|
||||
</div>
|
||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in core/Web3DCore.ts:210</li></ul></aside></li></ul></section>
|
||||
<section class="tsd-panel tsd-member"><a id="onError" class="tsd-anchor"></a>
|
||||
<h3 class="tsd-anchor-link"><span>on<wbr/>Error</span><a href="#onError" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
||||
<ul class="tsd-signatures">
|
||||
<li class="tsd-signature tsd-anchor-link" id="onError.onError-1"><span class="tsd-kind-call-signature">on<wbr/>Error</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#onError.onError-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
|
||||
<li class="tsd-description">
|
||||
<div class="tsd-comment tsd-typography"><p>监听错误</p>
|
||||
</div>
|
||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in core/Web3DCore.ts:114</li></ul></aside></li></ul></section>
|
||||
<section class="tsd-panel tsd-member"><a id="onMessage" class="tsd-anchor"></a>
|
||||
<h3 class="tsd-anchor-link"><span>on<wbr/>Message</span><a href="#onMessage" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
||||
<ul class="tsd-signatures">
|
||||
<li class="tsd-signature tsd-anchor-link" id="onMessage.onMessage-1"><span class="tsd-kind-call-signature">on<wbr/>Message</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">callback</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#onMessage.onMessage-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
|
||||
<li class="tsd-description">
|
||||
<div class="tsd-comment tsd-typography"><p>监听消息</p>
|
||||
</div>
|
||||
<div class="tsd-parameters">
|
||||
<h4 class="tsd-parameters-title">Parameters</h4>
|
||||
<ul class="tsd-parameter-list">
|
||||
<li>
|
||||
<h5><span class="tsd-kind-parameter">callback</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">...</span><span class="tsd-kind-parameter">data</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">)</span></h5>
|
||||
<ul class="tsd-parameters">
|
||||
<li class="tsd-parameter-signature">
|
||||
<ul class="tsd-signatures">
|
||||
<li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">...</span><span class="tsd-kind-parameter">data</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span></li>
|
||||
<li class="tsd-description">
|
||||
<div class="tsd-parameters">
|
||||
<h4 class="tsd-parameters-title">Parameters</h4>
|
||||
<ul class="tsd-parameter-list">
|
||||
<li>
|
||||
<h5><code class="tsd-tag ts-flagRest">Rest</code> <span class="tsd-signature-symbol">...</span><span class="tsd-kind-parameter">data</span>: <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">[]</span></h5></li></ul></div>
|
||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">any</span></h4></li></ul></li></ul></li></ul></div>
|
||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in core/Web3DCore.ts:142</li></ul></aside></li></ul></section>
|
||||
<section class="tsd-panel tsd-member"><a id="onOpen" class="tsd-anchor"></a>
|
||||
<h3 class="tsd-anchor-link"><span>on<wbr/>Open</span><a href="#onOpen" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
||||
<ul class="tsd-signatures">
|
||||
<li class="tsd-signature tsd-anchor-link" id="onOpen.onOpen-1"><span class="tsd-kind-call-signature">on<wbr/>Open</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#onOpen.onOpen-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
|
||||
<li class="tsd-description">
|
||||
<div class="tsd-comment tsd-typography"><p>监听连接</p>
|
||||
</div>
|
||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in core/Web3DCore.ts:89</li></ul></aside></li></ul></section>
|
||||
<section class="tsd-panel tsd-member"><a id="send" class="tsd-anchor"></a>
|
||||
<h3 class="tsd-anchor-link"><span>send</span><a href="#send" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
||||
<ul class="tsd-signatures">
|
||||
<li class="tsd-signature tsd-anchor-link" id="send.send-1"><span class="tsd-kind-call-signature">send</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">data</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#send.send-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
|
||||
<li class="tsd-description">
|
||||
<div class="tsd-comment tsd-typography"><p>发送消息</p>
|
||||
</div>
|
||||
<div class="tsd-parameters">
|
||||
<h4 class="tsd-parameters-title">Parameters</h4>
|
||||
<ul class="tsd-parameter-list">
|
||||
<li>
|
||||
<h5><span class="tsd-kind-parameter">data</span>: <span class="tsd-signature-type">any</span></h5></li></ul></div>
|
||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in core/Web3DCore.ts:186</li></ul></aside></li></ul></section>
|
||||
<section class="tsd-panel tsd-member"><a id="sendToEngin" class="tsd-anchor"></a>
|
||||
<h3 class="tsd-anchor-link"><span>send<wbr/>To<wbr/>Engin</span><a href="#sendToEngin" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
||||
<ul class="tsd-signatures">
|
||||
<li class="tsd-signature tsd-anchor-link" id="sendToEngin.sendToEngin-1"><span class="tsd-kind-call-signature">send<wbr/>To<wbr/>Engin</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">data</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#sendToEngin.sendToEngin-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
|
||||
<li class="tsd-description">
|
||||
<div class="tsd-comment tsd-typography"><p>发送消息到引擎底座</p>
|
||||
</div>
|
||||
<div class="tsd-parameters">
|
||||
<h4 class="tsd-parameters-title">Parameters</h4>
|
||||
<ul class="tsd-parameter-list">
|
||||
<li>
|
||||
<h5><span class="tsd-kind-parameter">data</span>: <span class="tsd-signature-type">any</span></h5></li></ul></div>
|
||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in core/Web3DCore.ts:160</li></ul></aside></li></ul></section>
|
||||
<section class="tsd-panel tsd-member"><a id="sendToWebClient" class="tsd-anchor"></a>
|
||||
<h3 class="tsd-anchor-link"><span>send<wbr/>To<wbr/>Web<wbr/>Client</span><a href="#sendToWebClient" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
||||
<ul class="tsd-signatures">
|
||||
<li class="tsd-signature tsd-anchor-link" id="sendToWebClient.sendToWebClient-1"><span class="tsd-kind-call-signature">send<wbr/>To<wbr/>Web<wbr/>Client</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">data</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#sendToWebClient.sendToWebClient-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
|
||||
<li class="tsd-description">
|
||||
<div class="tsd-parameters">
|
||||
<h4 class="tsd-parameters-title">Parameters</h4>
|
||||
<ul class="tsd-parameter-list">
|
||||
<li>
|
||||
<h5><span class="tsd-kind-parameter">data</span>: <span class="tsd-signature-type">any</span></h5></li></ul></div>
|
||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in core/Web3DCore.ts:171</li></ul></aside></li></ul></section>
|
||||
<section class="tsd-panel tsd-member"><a id="startHeartbeat" class="tsd-anchor"></a>
|
||||
<h3 class="tsd-anchor-link"><span>start<wbr/>Heartbeat</span><a href="#startHeartbeat" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
||||
<ul class="tsd-signatures">
|
||||
<li class="tsd-signature tsd-anchor-link" id="startHeartbeat.startHeartbeat-1"><span class="tsd-kind-call-signature">start<wbr/>Heartbeat</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#startHeartbeat.startHeartbeat-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
|
||||
<li class="tsd-description">
|
||||
<div class="tsd-comment tsd-typography"><p>开启心跳</p>
|
||||
</div>
|
||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in core/Web3DCore.ts:103</li></ul></aside></li></ul></section>
|
||||
<section class="tsd-panel tsd-member"><a id="getInstance" class="tsd-anchor"></a>
|
||||
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagStatic">Static</code> <span>get<wbr/>Instance</span><a href="#getInstance" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
||||
<ul class="tsd-signatures">
|
||||
<li class="tsd-signature tsd-anchor-link" id="getInstance.getInstance-1"><span class="tsd-kind-call-signature">get<wbr/>Instance</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">url</span><span class="tsd-signature-symbol">?</span>, <span class="tsd-kind-parameter">options</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="Web3DCore.html" class="tsd-signature-type tsd-kind-class">Web3DCore</a><a href="#getInstance.getInstance-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
|
||||
<li class="tsd-description">
|
||||
<div class="tsd-parameters">
|
||||
<h4 class="tsd-parameters-title">Parameters</h4>
|
||||
<ul class="tsd-parameter-list">
|
||||
<li>
|
||||
<h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">url</span>: <span class="tsd-signature-type">string</span></h5></li>
|
||||
<li>
|
||||
<h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">options</span>: <span class="tsd-signature-type ">IWSOptions</span></h5></li></ul></div>
|
||||
<h4 class="tsd-returns-title">Returns <a href="Web3DCore.html" class="tsd-signature-type tsd-kind-class">Web3DCore</a></h4><aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in core/Web3DCore.ts:66</li></ul></aside></li></ul></section></section></div>
|
||||
<div class="col-sidebar">
|
||||
<div class="page-menu">
|
||||
<div class="tsd-navigation settings">
|
||||
<details class="tsd-index-accordion"><summary class="tsd-accordion-summary">
|
||||
<h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-text)"></path></svg>Settings</h3></summary>
|
||||
<div class="tsd-accordion-details">
|
||||
<div class="tsd-filter-visibility">
|
||||
<h4 class="uppercase">Member Visibility</h4><form>
|
||||
<ul id="tsd-filter-options">
|
||||
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li>
|
||||
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-private" name="private"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Private</span></label></li>
|
||||
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li>
|
||||
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></form></div>
|
||||
<div class="tsd-theme-toggle">
|
||||
<h4 class="uppercase">Theme</h4><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div>
|
||||
<details open class="tsd-index-accordion tsd-page-navigation"><summary class="tsd-accordion-summary">
|
||||
<h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-text)"></path></svg>On This Page</h3></summary>
|
||||
<div class="tsd-accordion-details">
|
||||
<ul>
|
||||
<li><a href="#constructor" class=""><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-512-path"></use><use href="#icon-512-text"></use></svg><span>constructor</span></a></li>
|
||||
<li><a href="#appId" class=""><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>app<wbr/>Id</span></a></li>
|
||||
<li><a href="#autoReconnect" class=""><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>auto<wbr/>Reconnect</span></a></li>
|
||||
<li><a href="#clientId" class=""><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>client<wbr/>Id</span></a></li>
|
||||
<li><a href="#delay" class=""><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>delay</span></a></li>
|
||||
<li><a href="#heartbeat" class=""><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>heartbeat</span></a></li>
|
||||
<li><a href="#query" class=""><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>query</span></a></li>
|
||||
<li><a href="#reconnectCount" class=""><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>reconnect<wbr/>Count</span></a></li>
|
||||
<li><a href="#sessionId" class=""><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>session<wbr/>Id</span></a></li>
|
||||
<li><a href="#socket" class=""><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>socket</span></a></li>
|
||||
<li><a href="#timer" class=""><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>timer</span></a></li>
|
||||
<li><a href="#url" class=""><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>url</span></a></li>
|
||||
<li><a href="#instance" class="tsd-is-private"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>instance</span></a></li>
|
||||
<li><a href="#close" class=""><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>close</span></a></li>
|
||||
<li><a href="#connect" class=""><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>connect</span></a></li>
|
||||
<li><a href="#login" class=""><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>login</span></a></li>
|
||||
<li><a href="#onError" class=""><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>on<wbr/>Error</span></a></li>
|
||||
<li><a href="#onMessage" class=""><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>on<wbr/>Message</span></a></li>
|
||||
<li><a href="#onOpen" class=""><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>on<wbr/>Open</span></a></li>
|
||||
<li><a href="#send" class=""><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>send</span></a></li>
|
||||
<li><a href="#sendToEngin" class=""><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>send<wbr/>To<wbr/>Engin</span></a></li>
|
||||
<li><a href="#sendToWebClient" class=""><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>send<wbr/>To<wbr/>Web<wbr/>Client</span></a></li>
|
||||
<li><a href="#startHeartbeat" class=""><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>start<wbr/>Heartbeat</span></a></li>
|
||||
<li><a href="#getInstance" class=""><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>get<wbr/>Instance</span></a></li></ul></div></details></div>
|
||||
<div class="site-menu">
|
||||
<nav class="tsd-navigation"><a href="../modules.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-namespace)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-4-path"></rect><path d="M9.33 16V7.24H10.77L13.446 14.74C13.43 14.54 13.41 14.296 13.386 14.008C13.37 13.712 13.354 13.404 13.338 13.084C13.33 12.756 13.326 12.448 13.326 12.16V7.24H14.37V16H12.93L10.266 8.5C10.282 8.692 10.298 8.936 10.314 9.232C10.33 9.52 10.342 9.828 10.35 10.156C10.366 10.476 10.374 10.784 10.374 11.08V16H9.33Z" fill="var(--color-text)" id="icon-4-text"></path></svg><span>hs-<wbr/>web3d-<wbr/>core</span></a>
|
||||
<ul class="tsd-small-nested-navigation">
|
||||
<li><a href="MapServerController.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-class)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-128-path"></rect><path d="M11.898 16.1201C11.098 16.1201 10.466 15.8961 10.002 15.4481C9.53803 15.0001 9.30603 14.3841 9.30603 13.6001V9.64012C9.30603 8.85612 9.53803 8.24012 10.002 7.79212C10.466 7.34412 11.098 7.12012 11.898 7.12012C12.682 7.12012 13.306 7.34812 13.77 7.80412C14.234 8.25212 14.466 8.86412 14.466 9.64012H13.386C13.386 9.14412 13.254 8.76412 12.99 8.50012C12.734 8.22812 12.37 8.09212 11.898 8.09212C11.426 8.09212 11.054 8.22412 10.782 8.48812C10.518 8.75212 10.386 9.13212 10.386 9.62812V13.6001C10.386 14.0961 10.518 14.4801 10.782 14.7521C11.054 15.0161 11.426 15.1481 11.898 15.1481C12.37 15.1481 12.734 15.0161 12.99 14.7521C13.254 14.4801 13.386 14.0961 13.386 13.6001H14.466C14.466 14.3761 14.234 14.9921 13.77 15.4481C13.306 15.8961 12.682 16.1201 11.898 16.1201Z" fill="var(--color-text)" id="icon-128-text"></path></svg><span>Map<wbr/>Server<wbr/>Controller</span></a></li>
|
||||
<li><a href="SunLightController.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>Sun<wbr/>Light<wbr/>Controller</span></a></li>
|
||||
<li><a href="WaterSurfaceController.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>Water<wbr/>Surface<wbr/>Controller</span></a></li>
|
||||
<li><a href="Web3DCore.html" class="current"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>Web3DCore</span></a></li>
|
||||
<li><a href="web3DCoreSocket.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>web3DCore<wbr/>Socket</span></a></li></ul></nav></div></div></div>
|
||||
<div class="tsd-generator">
|
||||
<p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></div>
|
||||
<div class="overlay"></div></body></html>
|
||||
316
hs-web3d-core/example/docs/classes/web3DCoreSocket.html
Normal file
316
hs-web3d-core/example/docs/classes/web3DCoreSocket.html
Normal file
@@ -0,0 +1,316 @@
|
||||
<!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>web3DCoreSocket | hs-web3d-core</title><meta name="description" content="Documentation for hs-web3d-core"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/search.js" id="tsd-search-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os"</script><header class="tsd-page-toolbar">
|
||||
<div class="tsd-toolbar-contents container">
|
||||
<div class="table-cell" id="tsd-search" data-base="..">
|
||||
<div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M15.7824 13.833L12.6666 10.7177C12.5259 10.5771 12.3353 10.499 12.1353 10.499H11.6259C12.4884 9.39596 13.001 8.00859 13.001 6.49937C13.001 2.90909 10.0914 0 6.50048 0C2.90959 0 0 2.90909 0 6.49937C0 10.0896 2.90959 12.9987 6.50048 12.9987C8.00996 12.9987 9.39756 12.4863 10.5008 11.6239V12.1332C10.5008 12.3332 10.5789 12.5238 10.7195 12.6644L13.8354 15.7797C14.1292 16.0734 14.6042 16.0734 14.8948 15.7797L15.7793 14.8954C16.0731 14.6017 16.0731 14.1267 15.7824 13.833ZM6.50048 10.499C4.29094 10.499 2.50018 8.71165 2.50018 6.49937C2.50018 4.29021 4.28781 2.49976 6.50048 2.49976C8.71001 2.49976 10.5008 4.28708 10.5008 6.49937C10.5008 8.70852 8.71314 10.499 6.50048 10.499Z" fill="var(--color-text)"></path></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div>
|
||||
<div class="field">
|
||||
<div id="tsd-toolbar-links"></div></div>
|
||||
<ul class="results">
|
||||
<li class="state loading">Preparing search index...</li>
|
||||
<li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">hs-web3d-core</a></div>
|
||||
<div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><rect x="1" y="3" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="7" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="11" width="14" height="2" fill="var(--color-text)"></rect></svg></a></div></div></header>
|
||||
<div class="container container-main">
|
||||
<div class="col-content">
|
||||
<div class="tsd-page-title">
|
||||
<ul class="tsd-breadcrumb">
|
||||
<li><a href="../modules.html">hs-web3d-core</a></li>
|
||||
<li><a href="web3DCoreSocket.html">web3DCoreSocket</a></li></ul>
|
||||
<h1>Class web3DCoreSocket</h1></div>
|
||||
<section class="tsd-panel tsd-hierarchy">
|
||||
<h4>Hierarchy</h4>
|
||||
<ul class="tsd-hierarchy">
|
||||
<li><span class="target">web3DCoreSocket</span></li></ul></section><aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in core/web3DCoreSocket.ts:28</li></ul></aside>
|
||||
<section class="tsd-panel-group tsd-index-group">
|
||||
<section class="tsd-panel tsd-index-panel">
|
||||
<details class="tsd-index-content tsd-index-accordion" open><summary class="tsd-accordion-summary tsd-index-summary">
|
||||
<h5 class="tsd-index-heading uppercase" role="button" aria-expanded="false" tabIndex=0><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M1.5 5.50969L8 11.6609L14.5 5.50969L12.5466 3.66086L8 7.96494L3.45341 3.66086L1.5 5.50969Z" fill="var(--color-text)"></path></svg> Index</h5></summary>
|
||||
<div class="tsd-accordion-details">
|
||||
<section class="tsd-index-section">
|
||||
<h3 class="tsd-index-heading">Constructors</h3>
|
||||
<div class="tsd-index-list"><a href="web3DCoreSocket.html#constructor" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="#4D7FFF" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12" id="icon-512-path"></rect><path d="M11.898 16.1201C11.098 16.1201 10.466 15.8961 10.002 15.4481C9.53803 15.0001 9.30603 14.3841 9.30603 13.6001V9.64012C9.30603 8.85612 9.53803 8.24012 10.002 7.79212C10.466 7.34412 11.098 7.12012 11.898 7.12012C12.682 7.12012 13.306 7.34812 13.77 7.80412C14.234 8.25212 14.466 8.86412 14.466 9.64012H13.386C13.386 9.14412 13.254 8.76412 12.99 8.50012C12.734 8.22812 12.37 8.09212 11.898 8.09212C11.426 8.09212 11.054 8.22412 10.782 8.48812C10.518 8.75212 10.386 9.13212 10.386 9.62812V13.6001C10.386 14.0961 10.518 14.4801 10.782 14.7521C11.054 15.0161 11.426 15.1481 11.898 15.1481C12.37 15.1481 12.734 15.0161 12.99 14.7521C13.254 14.4801 13.386 14.0961 13.386 13.6001H14.466C14.466 14.3761 14.234 14.9921 13.77 15.4481C13.306 15.8961 12.682 16.1201 11.898 16.1201Z" fill="var(--color-text)" id="icon-512-text"></path></svg><span>constructor</span></a>
|
||||
</div></section>
|
||||
<section class="tsd-index-section">
|
||||
<h3 class="tsd-index-heading">Properties</h3>
|
||||
<div class="tsd-index-list"><a href="web3DCoreSocket.html#appId" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="#FF984D" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12" id="icon-1024-path"></rect><path d="M9.354 16V7.24H12.174C12.99 7.24 13.638 7.476 14.118 7.948C14.606 8.412 14.85 9.036 14.85 9.82C14.85 10.604 14.606 11.232 14.118 11.704C13.638 12.168 12.99 12.4 12.174 12.4H10.434V16H9.354ZM10.434 11.428H12.174C12.646 11.428 13.022 11.284 13.302 10.996C13.59 10.7 13.734 10.308 13.734 9.82C13.734 9.324 13.59 8.932 13.302 8.644C13.022 8.356 12.646 8.212 12.174 8.212H10.434V11.428Z" fill="var(--color-text)" id="icon-1024-text"></path></svg><span>app<wbr/>Id?</span></a>
|
||||
<a href="web3DCoreSocket.html#autoReconnect" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>auto<wbr/>Reconnect</span></a>
|
||||
<a href="web3DCoreSocket.html#clientId" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>client<wbr/>Id?</span></a>
|
||||
<a href="web3DCoreSocket.html#delay" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>delay</span></a>
|
||||
<a href="web3DCoreSocket.html#heartbeat" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>heartbeat</span></a>
|
||||
<a href="web3DCoreSocket.html#query" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>query</span></a>
|
||||
<a href="web3DCoreSocket.html#reconnectCount" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>reconnect<wbr/>Count</span></a>
|
||||
<a href="web3DCoreSocket.html#sessionId" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>session<wbr/>Id?</span></a>
|
||||
<a href="web3DCoreSocket.html#socket" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>socket</span></a>
|
||||
<a href="web3DCoreSocket.html#timer" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>timer</span></a>
|
||||
<a href="web3DCoreSocket.html#url" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>url</span></a>
|
||||
</div></section>
|
||||
<section class="tsd-index-section">
|
||||
<h3 class="tsd-index-heading">Methods</h3>
|
||||
<div class="tsd-index-list"><a href="web3DCoreSocket.html#close" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="#FF4DB8" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12" id="icon-2048-path"></rect><path d="M9.162 16V7.24H10.578L11.514 10.072C11.602 10.328 11.674 10.584 11.73 10.84C11.794 11.088 11.842 11.28 11.874 11.416C11.906 11.28 11.954 11.088 12.018 10.84C12.082 10.584 12.154 10.324 12.234 10.06L13.122 7.24H14.538V16H13.482V12.82C13.482 12.468 13.49 12.068 13.506 11.62C13.53 11.172 13.558 10.716 13.59 10.252C13.622 9.78 13.654 9.332 13.686 8.908C13.726 8.476 13.762 8.1 13.794 7.78L12.366 12.16H11.334L9.894 7.78C9.934 8.092 9.97 8.456 10.002 8.872C10.042 9.28 10.078 9.716 10.11 10.18C10.142 10.636 10.166 11.092 10.182 11.548C10.206 12.004 10.218 12.428 10.218 12.82V16H9.162Z" fill="var(--color-text)" id="icon-2048-text"></path></svg><span>close</span></a>
|
||||
<a href="web3DCoreSocket.html#connect" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>connect</span></a>
|
||||
<a href="web3DCoreSocket.html#login" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>login</span></a>
|
||||
<a href="web3DCoreSocket.html#onError" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>on<wbr/>Error</span></a>
|
||||
<a href="web3DCoreSocket.html#onMessage" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>on<wbr/>Message</span></a>
|
||||
<a href="web3DCoreSocket.html#onOpen" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>on<wbr/>Open</span></a>
|
||||
<a href="web3DCoreSocket.html#send" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>send</span></a>
|
||||
<a href="web3DCoreSocket.html#sendToEngin" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>send<wbr/>To<wbr/>Engin</span></a>
|
||||
<a href="web3DCoreSocket.html#sendToWebClient" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>send<wbr/>To<wbr/>Web<wbr/>Client</span></a>
|
||||
<a href="web3DCoreSocket.html#startHeartbeat" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>start<wbr/>Heartbeat</span></a>
|
||||
</div></section></div></details></section></section>
|
||||
<section class="tsd-panel-group tsd-member-group">
|
||||
<h2>Constructors</h2>
|
||||
<section class="tsd-panel tsd-member"><a id="constructor" class="tsd-anchor"></a>
|
||||
<h3 class="tsd-anchor-link"><span>constructor</span><a href="#constructor" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none" id="icon-anchor-a"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5" id="icon-anchor-b"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5" id="icon-anchor-c"></path></svg></a></h3>
|
||||
<ul class="tsd-signatures">
|
||||
<li class="tsd-signature tsd-anchor-link" id="constructor.new_web3DCoreSocket"><span class="tsd-kind-constructor-signature">new web3DCore<wbr/>Socket</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">url</span><span class="tsd-signature-symbol">?</span>, <span class="tsd-kind-parameter">options</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="web3DCoreSocket.html" class="tsd-signature-type tsd-kind-class">web3DCoreSocket</a><a href="#constructor.new_web3DCoreSocket" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
|
||||
<li class="tsd-description">
|
||||
<div class="tsd-parameters">
|
||||
<h4 class="tsd-parameters-title">Parameters</h4>
|
||||
<ul class="tsd-parameter-list">
|
||||
<li>
|
||||
<h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">url</span>: <span class="tsd-signature-type">string</span></h5></li>
|
||||
<li>
|
||||
<h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">options</span>: <span class="tsd-signature-type ">IWSOptions</span></h5></li></ul></div>
|
||||
<h4 class="tsd-returns-title">Returns <a href="web3DCoreSocket.html" class="tsd-signature-type tsd-kind-class">web3DCoreSocket</a></h4><aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in core/web3DCoreSocket.ts:41</li></ul></aside></li></ul></section></section>
|
||||
<section class="tsd-panel-group tsd-member-group">
|
||||
<h2>Properties</h2>
|
||||
<section class="tsd-panel tsd-member"><a id="appId" class="tsd-anchor"></a>
|
||||
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagOptional">Optional</code> <span>app<wbr/>Id</span><a href="#appId" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
||||
<div class="tsd-signature"><span class="tsd-kind-property">app<wbr/>Id</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in core/web3DCoreSocket.ts:37</li></ul></aside></section>
|
||||
<section class="tsd-panel tsd-member"><a id="autoReconnect" class="tsd-anchor"></a>
|
||||
<h3 class="tsd-anchor-link"><span>auto<wbr/>Reconnect</span><a href="#autoReconnect" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
||||
<div class="tsd-signature"><span class="tsd-kind-property">auto<wbr/>Reconnect</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type ">AutoReconnect</span></div><aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in core/web3DCoreSocket.ts:34</li></ul></aside></section>
|
||||
<section class="tsd-panel tsd-member"><a id="clientId" class="tsd-anchor"></a>
|
||||
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagOptional">Optional</code> <span>client<wbr/>Id</span><a href="#clientId" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
||||
<div class="tsd-signature"><span class="tsd-kind-property">client<wbr/>Id</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in core/web3DCoreSocket.ts:39</li></ul></aside></section>
|
||||
<section class="tsd-panel tsd-member"><a id="delay" class="tsd-anchor"></a>
|
||||
<h3 class="tsd-anchor-link"><span>delay</span><a href="#delay" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
||||
<div class="tsd-signature"><span class="tsd-kind-property">delay</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type ">Nullable</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type ">Timeout</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol"> = null</span></div><aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in core/web3DCoreSocket.ts:32</li></ul></aside></section>
|
||||
<section class="tsd-panel tsd-member"><a id="heartbeat" class="tsd-anchor"></a>
|
||||
<h3 class="tsd-anchor-link"><span>heartbeat</span><a href="#heartbeat" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
||||
<div class="tsd-signature"><span class="tsd-kind-property">heartbeat</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type ">Heartbeat</span></div><aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in core/web3DCoreSocket.ts:35</li></ul></aside></section>
|
||||
<section class="tsd-panel tsd-member"><a id="query" class="tsd-anchor"></a>
|
||||
<h3 class="tsd-anchor-link"><span>query</span><a href="#query" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
||||
<div class="tsd-signature"><span class="tsd-kind-property">query</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type ">Record</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">></span></div><aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in core/web3DCoreSocket.ts:36</li></ul></aside></section>
|
||||
<section class="tsd-panel tsd-member"><a id="reconnectCount" class="tsd-anchor"></a>
|
||||
<h3 class="tsd-anchor-link"><span>reconnect<wbr/>Count</span><a href="#reconnectCount" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
||||
<div class="tsd-signature"><span class="tsd-kind-property">reconnect<wbr/>Count</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> = 0</span></div><aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in core/web3DCoreSocket.ts:31</li></ul></aside></section>
|
||||
<section class="tsd-panel tsd-member"><a id="sessionId" class="tsd-anchor"></a>
|
||||
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagOptional">Optional</code> <span>session<wbr/>Id</span><a href="#sessionId" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
||||
<div class="tsd-signature"><span class="tsd-kind-property">session<wbr/>Id</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in core/web3DCoreSocket.ts:38</li></ul></aside></section>
|
||||
<section class="tsd-panel tsd-member"><a id="socket" class="tsd-anchor"></a>
|
||||
<h3 class="tsd-anchor-link"><span>socket</span><a href="#socket" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
||||
<div class="tsd-signature"><span class="tsd-kind-property">socket</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type ">WebSocket</span><span class="tsd-signature-symbol"> = null</span></div><aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in core/web3DCoreSocket.ts:30</li></ul></aside></section>
|
||||
<section class="tsd-panel tsd-member"><a id="timer" class="tsd-anchor"></a>
|
||||
<h3 class="tsd-anchor-link"><span>timer</span><a href="#timer" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
||||
<div class="tsd-signature"><span class="tsd-kind-property">timer</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type ">Nullable</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type ">Timer</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol"> = null</span></div><aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in core/web3DCoreSocket.ts:33</li></ul></aside></section>
|
||||
<section class="tsd-panel tsd-member"><a id="url" class="tsd-anchor"></a>
|
||||
<h3 class="tsd-anchor-link"><span>url</span><a href="#url" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
||||
<div class="tsd-signature"><span class="tsd-kind-property">url</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in core/web3DCoreSocket.ts:29</li></ul></aside></section></section>
|
||||
<section class="tsd-panel-group tsd-member-group">
|
||||
<h2>Methods</h2>
|
||||
<section class="tsd-panel tsd-member"><a id="close" class="tsd-anchor"></a>
|
||||
<h3 class="tsd-anchor-link"><span>close</span><a href="#close" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
||||
<ul class="tsd-signatures">
|
||||
<li class="tsd-signature tsd-anchor-link" id="close.close-1"><span class="tsd-kind-call-signature">close</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#close.close-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
|
||||
<li class="tsd-description">
|
||||
<div class="tsd-comment tsd-typography"><p>关闭连接</p>
|
||||
</div>
|
||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in core/web3DCoreSocket.ts:125</li></ul></aside></li></ul></section>
|
||||
<section class="tsd-panel tsd-member"><a id="connect" class="tsd-anchor"></a>
|
||||
<h3 class="tsd-anchor-link"><span>connect</span><a href="#connect" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
||||
<ul class="tsd-signatures">
|
||||
<li class="tsd-signature tsd-anchor-link" id="connect.connect-1"><span class="tsd-kind-call-signature">connect</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#connect.connect-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
|
||||
<li class="tsd-description">
|
||||
<div class="tsd-comment tsd-typography"><p>连接</p>
|
||||
</div>
|
||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in core/web3DCoreSocket.ts:73</li></ul></aside></li></ul></section>
|
||||
<section class="tsd-panel tsd-member"><a id="login" class="tsd-anchor"></a>
|
||||
<h3 class="tsd-anchor-link"><span>login</span><a href="#login" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
||||
<ul class="tsd-signatures">
|
||||
<li class="tsd-signature tsd-anchor-link" id="login.login-1"><span class="tsd-kind-call-signature">login</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#login.login-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
|
||||
<li class="tsd-description">
|
||||
<div class="tsd-comment tsd-typography"><p>登录</p>
|
||||
</div>
|
||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in core/web3DCoreSocket.ts:203</li></ul></aside></li></ul></section>
|
||||
<section class="tsd-panel tsd-member"><a id="onError" class="tsd-anchor"></a>
|
||||
<h3 class="tsd-anchor-link"><span>on<wbr/>Error</span><a href="#onError" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
||||
<ul class="tsd-signatures">
|
||||
<li class="tsd-signature tsd-anchor-link" id="onError.onError-1"><span class="tsd-kind-call-signature">on<wbr/>Error</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#onError.onError-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
|
||||
<li class="tsd-description">
|
||||
<div class="tsd-comment tsd-typography"><p>监听错误</p>
|
||||
</div>
|
||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in core/web3DCoreSocket.ts:108</li></ul></aside></li></ul></section>
|
||||
<section class="tsd-panel tsd-member"><a id="onMessage" class="tsd-anchor"></a>
|
||||
<h3 class="tsd-anchor-link"><span>on<wbr/>Message</span><a href="#onMessage" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
||||
<ul class="tsd-signatures">
|
||||
<li class="tsd-signature tsd-anchor-link" id="onMessage.onMessage-1"><span class="tsd-kind-call-signature">on<wbr/>Message</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">callback</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#onMessage.onMessage-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
|
||||
<li class="tsd-description">
|
||||
<div class="tsd-comment tsd-typography"><p>监听消息</p>
|
||||
</div>
|
||||
<div class="tsd-parameters">
|
||||
<h4 class="tsd-parameters-title">Parameters</h4>
|
||||
<ul class="tsd-parameter-list">
|
||||
<li>
|
||||
<h5><span class="tsd-kind-parameter">callback</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">...</span><span class="tsd-kind-parameter">data</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">)</span></h5>
|
||||
<ul class="tsd-parameters">
|
||||
<li class="tsd-parameter-signature">
|
||||
<ul class="tsd-signatures">
|
||||
<li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">...</span><span class="tsd-kind-parameter">data</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span></li>
|
||||
<li class="tsd-description">
|
||||
<div class="tsd-parameters">
|
||||
<h4 class="tsd-parameters-title">Parameters</h4>
|
||||
<ul class="tsd-parameter-list">
|
||||
<li>
|
||||
<h5><code class="tsd-tag ts-flagRest">Rest</code> <span class="tsd-signature-symbol">...</span><span class="tsd-kind-parameter">data</span>: <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">[]</span></h5></li></ul></div>
|
||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">any</span></h4></li></ul></li></ul></li></ul></div>
|
||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in core/web3DCoreSocket.ts:136</li></ul></aside></li></ul></section>
|
||||
<section class="tsd-panel tsd-member"><a id="onOpen" class="tsd-anchor"></a>
|
||||
<h3 class="tsd-anchor-link"><span>on<wbr/>Open</span><a href="#onOpen" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
||||
<ul class="tsd-signatures">
|
||||
<li class="tsd-signature tsd-anchor-link" id="onOpen.onOpen-1"><span class="tsd-kind-call-signature">on<wbr/>Open</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#onOpen.onOpen-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
|
||||
<li class="tsd-description">
|
||||
<div class="tsd-comment tsd-typography"><p>监听连接</p>
|
||||
</div>
|
||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in core/web3DCoreSocket.ts:83</li></ul></aside></li></ul></section>
|
||||
<section class="tsd-panel tsd-member"><a id="send" class="tsd-anchor"></a>
|
||||
<h3 class="tsd-anchor-link"><span>send</span><a href="#send" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
||||
<ul class="tsd-signatures">
|
||||
<li class="tsd-signature tsd-anchor-link" id="send.send-1"><span class="tsd-kind-call-signature">send</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">data</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#send.send-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
|
||||
<li class="tsd-description">
|
||||
<div class="tsd-comment tsd-typography"><p>发送消息</p>
|
||||
</div>
|
||||
<div class="tsd-parameters">
|
||||
<h4 class="tsd-parameters-title">Parameters</h4>
|
||||
<ul class="tsd-parameter-list">
|
||||
<li>
|
||||
<h5><span class="tsd-kind-parameter">data</span>: <span class="tsd-signature-type">any</span></h5></li></ul></div>
|
||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in core/web3DCoreSocket.ts:180</li></ul></aside></li></ul></section>
|
||||
<section class="tsd-panel tsd-member"><a id="sendToEngin" class="tsd-anchor"></a>
|
||||
<h3 class="tsd-anchor-link"><span>send<wbr/>To<wbr/>Engin</span><a href="#sendToEngin" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
||||
<ul class="tsd-signatures">
|
||||
<li class="tsd-signature tsd-anchor-link" id="sendToEngin.sendToEngin-1"><span class="tsd-kind-call-signature">send<wbr/>To<wbr/>Engin</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">data</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#sendToEngin.sendToEngin-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
|
||||
<li class="tsd-description">
|
||||
<div class="tsd-comment tsd-typography"><p>发送消息到引擎底座</p>
|
||||
</div>
|
||||
<div class="tsd-parameters">
|
||||
<h4 class="tsd-parameters-title">Parameters</h4>
|
||||
<ul class="tsd-parameter-list">
|
||||
<li>
|
||||
<h5><span class="tsd-kind-parameter">data</span>: <span class="tsd-signature-type">any</span></h5></li></ul></div>
|
||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in core/web3DCoreSocket.ts:154</li></ul></aside></li></ul></section>
|
||||
<section class="tsd-panel tsd-member"><a id="sendToWebClient" class="tsd-anchor"></a>
|
||||
<h3 class="tsd-anchor-link"><span>send<wbr/>To<wbr/>Web<wbr/>Client</span><a href="#sendToWebClient" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
||||
<ul class="tsd-signatures">
|
||||
<li class="tsd-signature tsd-anchor-link" id="sendToWebClient.sendToWebClient-1"><span class="tsd-kind-call-signature">send<wbr/>To<wbr/>Web<wbr/>Client</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">data</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#sendToWebClient.sendToWebClient-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
|
||||
<li class="tsd-description">
|
||||
<div class="tsd-parameters">
|
||||
<h4 class="tsd-parameters-title">Parameters</h4>
|
||||
<ul class="tsd-parameter-list">
|
||||
<li>
|
||||
<h5><span class="tsd-kind-parameter">data</span>: <span class="tsd-signature-type">any</span></h5></li></ul></div>
|
||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in core/web3DCoreSocket.ts:165</li></ul></aside></li></ul></section>
|
||||
<section class="tsd-panel tsd-member"><a id="startHeartbeat" class="tsd-anchor"></a>
|
||||
<h3 class="tsd-anchor-link"><span>start<wbr/>Heartbeat</span><a href="#startHeartbeat" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
||||
<ul class="tsd-signatures">
|
||||
<li class="tsd-signature tsd-anchor-link" id="startHeartbeat.startHeartbeat-1"><span class="tsd-kind-call-signature">start<wbr/>Heartbeat</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#startHeartbeat.startHeartbeat-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
|
||||
<li class="tsd-description">
|
||||
<div class="tsd-comment tsd-typography"><p>开启心跳</p>
|
||||
</div>
|
||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in core/web3DCoreSocket.ts:97</li></ul></aside></li></ul></section></section></div>
|
||||
<div class="col-sidebar">
|
||||
<div class="page-menu">
|
||||
<div class="tsd-navigation settings">
|
||||
<details class="tsd-index-accordion"><summary class="tsd-accordion-summary">
|
||||
<h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-text)"></path></svg>Settings</h3></summary>
|
||||
<div class="tsd-accordion-details">
|
||||
<div class="tsd-filter-visibility">
|
||||
<h4 class="uppercase">Member Visibility</h4><form>
|
||||
<ul id="tsd-filter-options">
|
||||
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li>
|
||||
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-private" name="private"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Private</span></label></li>
|
||||
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li>
|
||||
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></form></div>
|
||||
<div class="tsd-theme-toggle">
|
||||
<h4 class="uppercase">Theme</h4><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div>
|
||||
<details open class="tsd-index-accordion tsd-page-navigation"><summary class="tsd-accordion-summary">
|
||||
<h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-text)"></path></svg>On This Page</h3></summary>
|
||||
<div class="tsd-accordion-details">
|
||||
<ul>
|
||||
<li><a href="#constructor" class=""><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-512-path"></use><use href="#icon-512-text"></use></svg><span>constructor</span></a></li>
|
||||
<li><a href="#appId" class=""><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>app<wbr/>Id</span></a></li>
|
||||
<li><a href="#autoReconnect" class=""><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>auto<wbr/>Reconnect</span></a></li>
|
||||
<li><a href="#clientId" class=""><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>client<wbr/>Id</span></a></li>
|
||||
<li><a href="#delay" class=""><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>delay</span></a></li>
|
||||
<li><a href="#heartbeat" class=""><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>heartbeat</span></a></li>
|
||||
<li><a href="#query" class=""><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>query</span></a></li>
|
||||
<li><a href="#reconnectCount" class=""><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>reconnect<wbr/>Count</span></a></li>
|
||||
<li><a href="#sessionId" class=""><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>session<wbr/>Id</span></a></li>
|
||||
<li><a href="#socket" class=""><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>socket</span></a></li>
|
||||
<li><a href="#timer" class=""><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>timer</span></a></li>
|
||||
<li><a href="#url" class=""><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>url</span></a></li>
|
||||
<li><a href="#close" class=""><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>close</span></a></li>
|
||||
<li><a href="#connect" class=""><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>connect</span></a></li>
|
||||
<li><a href="#login" class=""><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>login</span></a></li>
|
||||
<li><a href="#onError" class=""><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>on<wbr/>Error</span></a></li>
|
||||
<li><a href="#onMessage" class=""><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>on<wbr/>Message</span></a></li>
|
||||
<li><a href="#onOpen" class=""><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>on<wbr/>Open</span></a></li>
|
||||
<li><a href="#send" class=""><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>send</span></a></li>
|
||||
<li><a href="#sendToEngin" class=""><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>send<wbr/>To<wbr/>Engin</span></a></li>
|
||||
<li><a href="#sendToWebClient" class=""><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>send<wbr/>To<wbr/>Web<wbr/>Client</span></a></li>
|
||||
<li><a href="#startHeartbeat" class=""><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>start<wbr/>Heartbeat</span></a></li></ul></div></details></div>
|
||||
<div class="site-menu">
|
||||
<nav class="tsd-navigation"><a href="../modules.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-namespace)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-4-path"></rect><path d="M9.33 16V7.24H10.77L13.446 14.74C13.43 14.54 13.41 14.296 13.386 14.008C13.37 13.712 13.354 13.404 13.338 13.084C13.33 12.756 13.326 12.448 13.326 12.16V7.24H14.37V16H12.93L10.266 8.5C10.282 8.692 10.298 8.936 10.314 9.232C10.33 9.52 10.342 9.828 10.35 10.156C10.366 10.476 10.374 10.784 10.374 11.08V16H9.33Z" fill="var(--color-text)" id="icon-4-text"></path></svg><span>hs-<wbr/>web3d-<wbr/>core</span></a>
|
||||
<ul class="tsd-small-nested-navigation">
|
||||
<li><a href="MapServerController.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-class)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-128-path"></rect><path d="M11.898 16.1201C11.098 16.1201 10.466 15.8961 10.002 15.4481C9.53803 15.0001 9.30603 14.3841 9.30603 13.6001V9.64012C9.30603 8.85612 9.53803 8.24012 10.002 7.79212C10.466 7.34412 11.098 7.12012 11.898 7.12012C12.682 7.12012 13.306 7.34812 13.77 7.80412C14.234 8.25212 14.466 8.86412 14.466 9.64012H13.386C13.386 9.14412 13.254 8.76412 12.99 8.50012C12.734 8.22812 12.37 8.09212 11.898 8.09212C11.426 8.09212 11.054 8.22412 10.782 8.48812C10.518 8.75212 10.386 9.13212 10.386 9.62812V13.6001C10.386 14.0961 10.518 14.4801 10.782 14.7521C11.054 15.0161 11.426 15.1481 11.898 15.1481C12.37 15.1481 12.734 15.0161 12.99 14.7521C13.254 14.4801 13.386 14.0961 13.386 13.6001H14.466C14.466 14.3761 14.234 14.9921 13.77 15.4481C13.306 15.8961 12.682 16.1201 11.898 16.1201Z" fill="var(--color-text)" id="icon-128-text"></path></svg><span>Map<wbr/>Server<wbr/>Controller</span></a></li>
|
||||
<li><a href="SunLightController.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>Sun<wbr/>Light<wbr/>Controller</span></a></li>
|
||||
<li><a href="WaterSurfaceController.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>Water<wbr/>Surface<wbr/>Controller</span></a></li>
|
||||
<li><a href="Web3DCore.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>Web3DCore</span></a></li>
|
||||
<li><a href="web3DCoreSocket.html" class="current"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>web3DCore<wbr/>Socket</span></a></li></ul></nav></div></div></div>
|
||||
<div class="tsd-generator">
|
||||
<p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></div>
|
||||
<div class="overlay"></div></body></html>
|
||||
69
hs-web3d-core/example/docs/index.html
Normal file
69
hs-web3d-core/example/docs/index.html
Normal file
@@ -0,0 +1,69 @@
|
||||
<!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>hs-web3d-core</title><meta name="description" content="Documentation for hs-web3d-core"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="assets/style.css"/><link rel="stylesheet" href="assets/highlight.css"/><script defer src="assets/main.js"></script><script async src="assets/search.js" id="tsd-search-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os"</script><header class="tsd-page-toolbar">
|
||||
<div class="tsd-toolbar-contents container">
|
||||
<div class="table-cell" id="tsd-search" data-base=".">
|
||||
<div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M15.7824 13.833L12.6666 10.7177C12.5259 10.5771 12.3353 10.499 12.1353 10.499H11.6259C12.4884 9.39596 13.001 8.00859 13.001 6.49937C13.001 2.90909 10.0914 0 6.50048 0C2.90959 0 0 2.90909 0 6.49937C0 10.0896 2.90959 12.9987 6.50048 12.9987C8.00996 12.9987 9.39756 12.4863 10.5008 11.6239V12.1332C10.5008 12.3332 10.5789 12.5238 10.7195 12.6644L13.8354 15.7797C14.1292 16.0734 14.6042 16.0734 14.8948 15.7797L15.7793 14.8954C16.0731 14.6017 16.0731 14.1267 15.7824 13.833ZM6.50048 10.499C4.29094 10.499 2.50018 8.71165 2.50018 6.49937C2.50018 4.29021 4.28781 2.49976 6.50048 2.49976C8.71001 2.49976 10.5008 4.28708 10.5008 6.49937C10.5008 8.70852 8.71314 10.499 6.50048 10.499Z" fill="var(--color-text)"></path></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div>
|
||||
<div class="field">
|
||||
<div id="tsd-toolbar-links"></div></div>
|
||||
<ul class="results">
|
||||
<li class="state loading">Preparing search index...</li>
|
||||
<li class="state failure">The search index is not available</li></ul><a href="index.html" class="title">hs-web3d-core</a></div>
|
||||
<div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><rect x="1" y="3" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="7" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="11" width="14" height="2" fill="var(--color-text)"></rect></svg></a></div></div></header>
|
||||
<div class="container container-main">
|
||||
<div class="col-content">
|
||||
<div class="tsd-page-title">
|
||||
<h2>hs-web3d-core</h2></div>
|
||||
<div class="tsd-panel tsd-typography"><a id="md:web-可视化--sdk开发文档" class="tsd-anchor"></a><h2><a href="#md:web-可视化--sdk开发文档">web 可视化 sdk开发文档</a></h2><a id="md:1安装" class="tsd-anchor"></a><h3><a href="#md:1安装">1.安装</a></h3><pre><code><span class="hl-0">//使用yarn安装 </span><br/><span class="hl-1">yarn</span><span class="hl-2"> </span><span class="hl-1">add</span><span class="hl-2"> </span><span class="hl-1">hs</span><span class="hl-2">-</span><span class="hl-1">web3d</span><span class="hl-2">-</span><span class="hl-1">core</span><br/><span class="hl-0">//使用npm安装</span><br/><span class="hl-1">npm</span><span class="hl-2"> </span><span class="hl-1">install</span><span class="hl-2"> </span><span class="hl-1">hs</span><span class="hl-2">-</span><span class="hl-1">web3d</span><span class="hl-2">-</span><span class="hl-1">core</span>
|
||||
</code><button>Copy</button></pre>
|
||||
<a id="md:2参考demo" class="tsd-anchor"></a><h3><a href="#md:2参考demo">2.参考demo</a></h3><pre><code><span class="hl-3">var</span><span class="hl-2"> </span><span class="hl-1">client</span><span class="hl-2"> = </span><span class="hl-3">null</span><span class="hl-2">;</span><br/><span class="hl-4">import</span><span class="hl-2"> {</span><span class="hl-1">web3DCoreSocket</span><span class="hl-2">} </span><span class="hl-4">from</span><span class="hl-2"> </span><span class="hl-5">'./index.esm.js'</span><span class="hl-2">;</span><br/><br/><span class="hl-3">var</span><span class="hl-2"> </span><span class="hl-1">wsUrl</span><span class="hl-2"> = </span><span class="hl-5">"ws://192.168.2.201:8089/hs-core"</span><br/><br/><span class="hl-3">const</span><span class="hl-2"> </span><span class="hl-6">ws</span><span class="hl-2"> = </span><span class="hl-3">new</span><span class="hl-2"> </span><span class="hl-7">web3DCoreSocket</span><span class="hl-2">(</span><span class="hl-1">wsUrl</span><span class="hl-2">, {</span><br/><span class="hl-2"> </span><span class="hl-1">appId:</span><span class="hl-2"> </span><span class="hl-5">"1"</span><span class="hl-2">,</span><br/><span class="hl-2"> </span><span class="hl-1">sessionId:</span><span class="hl-2"> </span><span class="hl-5">"1"</span><span class="hl-2">,</span><br/><span class="hl-2">})</span><br/><span class="hl-1">ws</span><span class="hl-2">.</span><span class="hl-7">onMessage</span><span class="hl-2">(</span><span class="hl-1">data</span><span class="hl-2"> </span><span class="hl-3">=></span><span class="hl-2"> {</span><br/><span class="hl-2"> </span><span class="hl-1">console</span><span class="hl-2">.</span><span class="hl-7">log</span><span class="hl-2">(</span><span class="hl-1">data</span><span class="hl-2">)</span><br/><span class="hl-2"> </span><br/><span class="hl-2">})</span><br/><span class="hl-7">$</span><span class="hl-2">(</span><span class="hl-5">".changeColor"</span><span class="hl-2">).</span><span class="hl-7">click</span><span class="hl-2">(</span><span class="hl-3">function</span><span class="hl-2"> () {</span><br/><span class="hl-2"> </span><span class="hl-1">ws</span><span class="hl-2">.</span><span class="hl-7">sendToEngin</span><span class="hl-2">({</span><br/><span class="hl-2"> </span><span class="hl-5">"code"</span><span class="hl-1">:</span><span class="hl-2"> </span><span class="hl-5">"21u3i21i21g4i1192982u3"</span><span class="hl-2">,</span><br/><span class="hl-2"> </span><span class="hl-5">"function"</span><span class="hl-1">:</span><span class="hl-2"> </span><span class="hl-5">"CubeControl.ChangeColor"</span><span class="hl-2">,</span><br/><span class="hl-2"> </span><span class="hl-5">"type"</span><span class="hl-1">:</span><span class="hl-2"> </span><span class="hl-5">"noCallBack"</span><span class="hl-2">,</span><br/><span class="hl-2"> </span><span class="hl-5">"parameters"</span><span class="hl-1">:</span><span class="hl-2"> {</span><span class="hl-5">"id"</span><span class="hl-1">:</span><span class="hl-2"> </span><span class="hl-5">"2"</span><span class="hl-2">, </span><span class="hl-5">"color"</span><span class="hl-1">:</span><span class="hl-2"> </span><span class="hl-5">"red"</span><span class="hl-2">}</span><br/><span class="hl-2"> }</span><br/><span class="hl-2"> )</span><br/><span class="hl-2">})</span>
|
||||
</code><button>Copy</button></pre>
|
||||
<a id="md:3更新日志" class="tsd-anchor"></a><h3><a href="#md:3更新日志">3.更新日志</a></h3><a id="md:version-102-2023-05-08" class="tsd-anchor"></a><h4><a href="#md:version-102-2023-05-08">version 1.0.2 (2023-05-08)</a></h4><ul>
|
||||
<li>简单方法封装</li>
|
||||
</ul>
|
||||
<a id="md:version-001-2023-03-11" class="tsd-anchor"></a><h4><a href="#md:version-001-2023-03-11">version 0.0.1 (2023-03-11)</a></h4><ul>
|
||||
<li>初始化</li>
|
||||
</ul>
|
||||
</div></div>
|
||||
<div class="col-sidebar">
|
||||
<div class="page-menu">
|
||||
<div class="tsd-navigation settings">
|
||||
<details class="tsd-index-accordion"><summary class="tsd-accordion-summary">
|
||||
<h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-text)"></path></svg>Settings</h3></summary>
|
||||
<div class="tsd-accordion-details">
|
||||
<div class="tsd-filter-visibility">
|
||||
<h4 class="uppercase">Member Visibility</h4><form>
|
||||
<ul id="tsd-filter-options">
|
||||
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li>
|
||||
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-private" name="private"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Private</span></label></li>
|
||||
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li>
|
||||
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></form></div>
|
||||
<div class="tsd-theme-toggle">
|
||||
<h4 class="uppercase">Theme</h4><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div>
|
||||
<details open class="tsd-index-accordion tsd-page-navigation"><summary class="tsd-accordion-summary">
|
||||
<h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-text)"></path></svg>On This Page</h3></summary>
|
||||
<div class="tsd-accordion-details">
|
||||
<ul>
|
||||
<li>
|
||||
<ul>
|
||||
<li><a href="#md:web-可视化--sdk开发文档"><span>web 可视化 sdk开发文档</span></a></li>
|
||||
<li>
|
||||
<ul>
|
||||
<li><a href="#md:1安装"><span>1.安装</span></a></li>
|
||||
<li>
|
||||
<ul>
|
||||
<li><a href="#md:2参考demo"><span>2.参考demo</span></a></li>
|
||||
<li><a href="#md:3更新日志"><span>3.更新日志</span></a></li>
|
||||
<li>
|
||||
<ul>
|
||||
<li><a href="#md:version-102-2023-05-08"><span>version 1.0.2 (2023-<wbr/>05-<wbr/>08)</span></a></li>
|
||||
<li><a href="#md:version-001-2023-03-11"><span>version 0.0.1 (2023-<wbr/>03-<wbr/>11)</span></a></li></ul></li></ul></li></ul></li></ul></li></ul></div></details></div>
|
||||
<div class="site-menu">
|
||||
<nav class="tsd-navigation"><a href="modules.html" class="current"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-namespace)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-4-path"></rect><path d="M9.33 16V7.24H10.77L13.446 14.74C13.43 14.54 13.41 14.296 13.386 14.008C13.37 13.712 13.354 13.404 13.338 13.084C13.33 12.756 13.326 12.448 13.326 12.16V7.24H14.37V16H12.93L10.266 8.5C10.282 8.692 10.298 8.936 10.314 9.232C10.33 9.52 10.342 9.828 10.35 10.156C10.366 10.476 10.374 10.784 10.374 11.08V16H9.33Z" fill="var(--color-text)" id="icon-4-text"></path></svg><span>hs-<wbr/>web3d-<wbr/>core</span></a>
|
||||
<ul class="tsd-small-nested-navigation">
|
||||
<li><a href="classes/MapServerController.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-class)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-128-path"></rect><path d="M11.898 16.1201C11.098 16.1201 10.466 15.8961 10.002 15.4481C9.53803 15.0001 9.30603 14.3841 9.30603 13.6001V9.64012C9.30603 8.85612 9.53803 8.24012 10.002 7.79212C10.466 7.34412 11.098 7.12012 11.898 7.12012C12.682 7.12012 13.306 7.34812 13.77 7.80412C14.234 8.25212 14.466 8.86412 14.466 9.64012H13.386C13.386 9.14412 13.254 8.76412 12.99 8.50012C12.734 8.22812 12.37 8.09212 11.898 8.09212C11.426 8.09212 11.054 8.22412 10.782 8.48812C10.518 8.75212 10.386 9.13212 10.386 9.62812V13.6001C10.386 14.0961 10.518 14.4801 10.782 14.7521C11.054 15.0161 11.426 15.1481 11.898 15.1481C12.37 15.1481 12.734 15.0161 12.99 14.7521C13.254 14.4801 13.386 14.0961 13.386 13.6001H14.466C14.466 14.3761 14.234 14.9921 13.77 15.4481C13.306 15.8961 12.682 16.1201 11.898 16.1201Z" fill="var(--color-text)" id="icon-128-text"></path></svg><span>Map<wbr/>Server<wbr/>Controller</span></a></li>
|
||||
<li><a href="classes/SunLightController.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>Sun<wbr/>Light<wbr/>Controller</span></a></li>
|
||||
<li><a href="classes/WaterSurfaceController.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>Water<wbr/>Surface<wbr/>Controller</span></a></li>
|
||||
<li><a href="classes/Web3DCore.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>Web3DCore</span></a></li>
|
||||
<li><a href="classes/web3DCoreSocket.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>web3DCore<wbr/>Socket</span></a></li></ul></nav></div></div></div>
|
||||
<div class="tsd-generator">
|
||||
<p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></div>
|
||||
<div class="overlay"></div></body></html>
|
||||
51
hs-web3d-core/example/docs/modules.html
Normal file
51
hs-web3d-core/example/docs/modules.html
Normal file
@@ -0,0 +1,51 @@
|
||||
<!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>hs-web3d-core</title><meta name="description" content="Documentation for hs-web3d-core"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="assets/style.css"/><link rel="stylesheet" href="assets/highlight.css"/><script defer src="assets/main.js"></script><script async src="assets/search.js" id="tsd-search-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os"</script><header class="tsd-page-toolbar">
|
||||
<div class="tsd-toolbar-contents container">
|
||||
<div class="table-cell" id="tsd-search" data-base=".">
|
||||
<div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M15.7824 13.833L12.6666 10.7177C12.5259 10.5771 12.3353 10.499 12.1353 10.499H11.6259C12.4884 9.39596 13.001 8.00859 13.001 6.49937C13.001 2.90909 10.0914 0 6.50048 0C2.90959 0 0 2.90909 0 6.49937C0 10.0896 2.90959 12.9987 6.50048 12.9987C8.00996 12.9987 9.39756 12.4863 10.5008 11.6239V12.1332C10.5008 12.3332 10.5789 12.5238 10.7195 12.6644L13.8354 15.7797C14.1292 16.0734 14.6042 16.0734 14.8948 15.7797L15.7793 14.8954C16.0731 14.6017 16.0731 14.1267 15.7824 13.833ZM6.50048 10.499C4.29094 10.499 2.50018 8.71165 2.50018 6.49937C2.50018 4.29021 4.28781 2.49976 6.50048 2.49976C8.71001 2.49976 10.5008 4.28708 10.5008 6.49937C10.5008 8.70852 8.71314 10.499 6.50048 10.499Z" fill="var(--color-text)"></path></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div>
|
||||
<div class="field">
|
||||
<div id="tsd-toolbar-links"></div></div>
|
||||
<ul class="results">
|
||||
<li class="state loading">Preparing search index...</li>
|
||||
<li class="state failure">The search index is not available</li></ul><a href="index.html" class="title">hs-web3d-core</a></div>
|
||||
<div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><rect x="1" y="3" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="7" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="11" width="14" height="2" fill="var(--color-text)"></rect></svg></a></div></div></header>
|
||||
<div class="container container-main">
|
||||
<div class="col-content">
|
||||
<div class="tsd-page-title">
|
||||
<h2>hs-web3d-core</h2></div>
|
||||
<section class="tsd-panel-group tsd-index-group">
|
||||
<section class="tsd-panel tsd-index-panel">
|
||||
<h3 class="tsd-index-heading uppercase">Index</h3>
|
||||
<section class="tsd-index-section">
|
||||
<h3 class="tsd-index-heading">Classes</h3>
|
||||
<div class="tsd-index-list"><a href="classes/MapServerController.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-class)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-128-path"></rect><path d="M11.898 16.1201C11.098 16.1201 10.466 15.8961 10.002 15.4481C9.53803 15.0001 9.30603 14.3841 9.30603 13.6001V9.64012C9.30603 8.85612 9.53803 8.24012 10.002 7.79212C10.466 7.34412 11.098 7.12012 11.898 7.12012C12.682 7.12012 13.306 7.34812 13.77 7.80412C14.234 8.25212 14.466 8.86412 14.466 9.64012H13.386C13.386 9.14412 13.254 8.76412 12.99 8.50012C12.734 8.22812 12.37 8.09212 11.898 8.09212C11.426 8.09212 11.054 8.22412 10.782 8.48812C10.518 8.75212 10.386 9.13212 10.386 9.62812V13.6001C10.386 14.0961 10.518 14.4801 10.782 14.7521C11.054 15.0161 11.426 15.1481 11.898 15.1481C12.37 15.1481 12.734 15.0161 12.99 14.7521C13.254 14.4801 13.386 14.0961 13.386 13.6001H14.466C14.466 14.3761 14.234 14.9921 13.77 15.4481C13.306 15.8961 12.682 16.1201 11.898 16.1201Z" fill="var(--color-text)" id="icon-128-text"></path></svg><span>Map<wbr/>Server<wbr/>Controller</span></a>
|
||||
<a href="classes/SunLightController.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>Sun<wbr/>Light<wbr/>Controller</span></a>
|
||||
<a href="classes/WaterSurfaceController.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>Water<wbr/>Surface<wbr/>Controller</span></a>
|
||||
<a href="classes/Web3DCore.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>Web3DCore</span></a>
|
||||
<a href="classes/web3DCoreSocket.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>web3DCore<wbr/>Socket</span></a>
|
||||
</div></section></section></section></div>
|
||||
<div class="col-sidebar">
|
||||
<div class="page-menu">
|
||||
<div class="tsd-navigation settings">
|
||||
<details class="tsd-index-accordion"><summary class="tsd-accordion-summary">
|
||||
<h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-text)"></path></svg>Settings</h3></summary>
|
||||
<div class="tsd-accordion-details">
|
||||
<div class="tsd-filter-visibility">
|
||||
<h4 class="uppercase">Member Visibility</h4><form>
|
||||
<ul id="tsd-filter-options">
|
||||
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li>
|
||||
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-private" name="private"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Private</span></label></li>
|
||||
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li>
|
||||
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></form></div>
|
||||
<div class="tsd-theme-toggle">
|
||||
<h4 class="uppercase">Theme</h4><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div></div>
|
||||
<div class="site-menu">
|
||||
<nav class="tsd-navigation"><a href="modules.html" class="current"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-namespace)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-4-path"></rect><path d="M9.33 16V7.24H10.77L13.446 14.74C13.43 14.54 13.41 14.296 13.386 14.008C13.37 13.712 13.354 13.404 13.338 13.084C13.33 12.756 13.326 12.448 13.326 12.16V7.24H14.37V16H12.93L10.266 8.5C10.282 8.692 10.298 8.936 10.314 9.232C10.33 9.52 10.342 9.828 10.35 10.156C10.366 10.476 10.374 10.784 10.374 11.08V16H9.33Z" fill="var(--color-text)" id="icon-4-text"></path></svg><span>hs-<wbr/>web3d-<wbr/>core</span></a>
|
||||
<ul class="tsd-small-nested-navigation">
|
||||
<li><a href="classes/MapServerController.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>Map<wbr/>Server<wbr/>Controller</span></a></li>
|
||||
<li><a href="classes/SunLightController.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>Sun<wbr/>Light<wbr/>Controller</span></a></li>
|
||||
<li><a href="classes/WaterSurfaceController.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>Water<wbr/>Surface<wbr/>Controller</span></a></li>
|
||||
<li><a href="classes/Web3DCore.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>Web3DCore</span></a></li>
|
||||
<li><a href="classes/web3DCoreSocket.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>web3DCore<wbr/>Socket</span></a></li></ul></nav></div></div></div>
|
||||
<div class="tsd-generator">
|
||||
<p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></div>
|
||||
<div class="overlay"></div></body></html>
|
||||
15
hs-web3d-core/example/example.css
Normal file
15
hs-web3d-core/example/example.css
Normal file
@@ -0,0 +1,15 @@
|
||||
body, html, div {
|
||||
background: rgba(0, 0, 0, 0);
|
||||
}
|
||||
|
||||
.container {
|
||||
background: rgba(0, 0, 0, 0);
|
||||
}
|
||||
|
||||
.containerLeft {
|
||||
width: 500px;
|
||||
}
|
||||
.action-list{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
BIN
hs-web3d-core/example/example.rar
Normal file
BIN
hs-web3d-core/example/example.rar
Normal file
Binary file not shown.
2
hs-web3d-core/example/index.cjs.js
Normal file
2
hs-web3d-core/example/index.cjs.js
Normal file
File diff suppressed because one or more lines are too long
1
hs-web3d-core/example/index.cjs.js.map
Normal file
1
hs-web3d-core/example/index.cjs.js.map
Normal file
File diff suppressed because one or more lines are too long
2
hs-web3d-core/example/index.esm.js
Normal file
2
hs-web3d-core/example/index.esm.js
Normal file
File diff suppressed because one or more lines are too long
1
hs-web3d-core/example/index.esm.js.map
Normal file
1
hs-web3d-core/example/index.esm.js.map
Normal file
File diff suppressed because one or more lines are too long
361
hs-web3d-core/example/index.html
Normal file
361
hs-web3d-core/example/index.html
Normal file
@@ -0,0 +1,361 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link rel="stylesheet" href="./bootstrap.min.css"/>
|
||||
<link rel="stylesheet" href="./example.css"/>
|
||||
<script src="./bootstrap.bundle.min.js"></script>
|
||||
<script src="./jquery-1.8.0.js"></script>
|
||||
<title>例子</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="container text-center">
|
||||
|
||||
<div class="row align-items-start">
|
||||
<div class="col-3">
|
||||
<div class="action-list">
|
||||
<button type="button" class="btn btn-primary debugInfo">打印websocket当前在线用户</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="col">
|
||||
{"code": "21u3i21i21g4i1192982u3","function": "CubeControl.ChangeColor","type": "noCallBack","parameters":
|
||||
{"id": "2","color": "red"}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row align-items-start" style="margin-top:20px">
|
||||
<div class="col-3">
|
||||
<div class="action-list">
|
||||
<button type="button" class="btn btn-primary sendToWeb">web发送给web</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="col">
|
||||
{"code": "21u3i21i21g4i1192982u3","function": "CubeControl.ChangeColor","type": "noCallBack","parameters":
|
||||
{"id": "2","color": "red"}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row align-items-start" style="margin-top:20px">
|
||||
<div class="col-3">
|
||||
<div class="action-list">
|
||||
<button type="button" class="btn btn-primary createApiLayers">创建Api数据图层</button>
|
||||
<button type="button" class="btn btn-primary showLayers">根据type显示Api数据图层</button>
|
||||
<button type="button" class="btn btn-primary hideLayers">根据type隐藏Api数据图层</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="col">
|
||||
{"code": "21u3i21i21g4i1192982u3","function": "CubeControl.ChangeColor","type": "noCallBack","parameters":
|
||||
{"id": "2","color": "red"}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row align-items-start" style="margin-top:20px">
|
||||
<div class="col-3">
|
||||
<div class="action-list">
|
||||
<button type="button" class="btn btn-primary showTerrainLayers">显示Terrain图层</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col">
|
||||
{"code": "21u3i21i21g4i1192982u3","function": "CubeControl.ChangeColor","type": "noCallBack","parameters":
|
||||
{"id": "2","color": "red"}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row align-items-start" style="margin-top:20px">
|
||||
<div class="col-3">
|
||||
<div class="action-list">
|
||||
<button type="button" class="btn btn-primary showWMSLayers">显示WMS图层</button>
|
||||
<button type="button" class="btn btn-primary hideWMSLayers">隐藏WMS图层</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col">
|
||||
{"code": "21u3i21i21g4i1192982u3","function": "CubeControl.ChangeColor","type": "noCallBack","parameters":
|
||||
{"id": "2","color": "red"}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row align-items-start" style="margin-top:20px">
|
||||
<div class="col-3">
|
||||
<div class="action-list">
|
||||
<button type="button" class="btn btn-primary showTMSLayers">显示TMS图层</button>
|
||||
<button type="button" class="btn btn-primary hideTMSLayers">隐藏TMS图层</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col">
|
||||
{"code": "21u3i21i21g4i1192982u3","function": "CubeControl.ChangeColor","type": "noCallBack","parameters":
|
||||
{"id": "2","color": "red"}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row align-items-start" style="margin-top:20px">
|
||||
<div class="col-3">
|
||||
<div class="action-list">
|
||||
<button type="button" class="btn btn-primary show3dTilesLayers">显示3dtile图层</button>
|
||||
<button type="button" class="btn btn-primary hide3dTilesLayers">隐藏3dtile图层</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col">
|
||||
{"code": "21u3i21i21g4i1192982u3","function": "CubeControl.ChangeColor","type": "noCallBack","parameters":
|
||||
{"id": "2","color": "red"}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<script type="module">
|
||||
var client = null;
|
||||
import {web3DCoreSocket, MapServerControlle,Web3DCore,SunLightController} from './index.esm.js';
|
||||
|
||||
var ws_url = localStorage.getItem("ws_url")
|
||||
var appId = localStorage.getItem("appId")
|
||||
var sessionId = localStorage.getItem("sessionId")
|
||||
var clientId = localStorage.getItem("clientId")
|
||||
|
||||
if (ws_url == null) {
|
||||
ws_url = "ws://192.168.2.201:8089/hs-core"
|
||||
appId = "1201"
|
||||
sessionId = "1201"
|
||||
clientId = "main_Page"
|
||||
}
|
||||
|
||||
localStorage.setItem("ws_url", ws_url)
|
||||
localStorage.setItem("appId", appId)
|
||||
localStorage.setItem("sessionId", sessionId)
|
||||
localStorage.setItem("clientId", clientId)
|
||||
|
||||
|
||||
var wsUrl = ws_url
|
||||
|
||||
const ws = new web3DCoreSocket(wsUrl, {
|
||||
appId: appId,
|
||||
sessionId: sessionId,
|
||||
clientId: clientId,
|
||||
})
|
||||
|
||||
|
||||
const mapServerController = new MapServerController(ws)
|
||||
|
||||
// const _ws_instance=Web3DCore.getInstance(wsUrl, {
|
||||
// appId: appId,
|
||||
// sessionId: sessionId,
|
||||
// clientId: clientId,
|
||||
// })
|
||||
//
|
||||
// const mapServerController = new MapServerController(_ws_instance)
|
||||
//
|
||||
|
||||
ws.onMessage(data => {
|
||||
console.log(data)
|
||||
|
||||
//用户点击3D场景中某个物体的时候
|
||||
|
||||
})
|
||||
|
||||
|
||||
$(".debugInfo").click(function () {
|
||||
mapServerController.debugInfo()
|
||||
})
|
||||
|
||||
$(".createApiLayers").click(function () {
|
||||
var data = {
|
||||
"layerId": "xMFDF8sfLJ3NsBwmtN6X8JRfFOzpPk0n",
|
||||
"extendData": {
|
||||
"type": "api",
|
||||
"layerType": "",
|
||||
"icon": "",
|
||||
"requestsType": "get",
|
||||
"requestsContentType": "json",
|
||||
"url": "http://webgl.jszy.xyz/doc/shuiku.json",
|
||||
"headers": "h_1:123;h_2:123",
|
||||
"paramerts": "abc1:abc1;abc2:abc2;abc3:abc3",
|
||||
"postBody": "",
|
||||
"treeStructure": "result;",
|
||||
"fieldMapping": "resCode;resName;resName;stLgtd;stLttd",
|
||||
"fieldType": "string;string;string;number;number"
|
||||
}
|
||||
}
|
||||
mapServerController.createApiServiceLayer(data)
|
||||
})
|
||||
|
||||
|
||||
$(".showTerrainLayers").click(function () {
|
||||
var data = {
|
||||
"layerId": "xMFDF8sfLJ3NsBwmtN6X8JRfFOzpPk0n",
|
||||
"extendData": {
|
||||
"layerType": "Terrain图层名称",
|
||||
"type": "terrain",
|
||||
"icon": "图标路径",
|
||||
"name": "Terrain图层名称",
|
||||
"serverOrFile": true,
|
||||
"url": "http://192.168.1.197:28881/guangdong_terrain/layer.json",
|
||||
'layer': 'ne:countries'
|
||||
}
|
||||
}
|
||||
mapServerController.showLayer(data)
|
||||
})
|
||||
|
||||
|
||||
$(".showLayers").click(function () {
|
||||
var data = {
|
||||
"layerId": "xMFDF8sfLJ3NsBwmtN6X8JRfFOzpPk0n",
|
||||
"extendData": {
|
||||
"type": "api",
|
||||
"layerType": "大型水库",
|
||||
"icon": "图标路径",
|
||||
"requestsType": "get",
|
||||
"requestsContentType": "json",
|
||||
"url": "http://webgl.jszy.xyz/doc/shuiku.json",
|
||||
"headers": "h_1:123;h_2:123",
|
||||
"paramerts": "abc1:abc1;abc2:abc2;abc3:abc3",
|
||||
"postBody": "",
|
||||
"treeStructure": "result;",
|
||||
"fieldMapping": "resCode;resName;resName;stLgtd;stLttd",
|
||||
"fieldType": "string;string;string;number;number"
|
||||
}
|
||||
}
|
||||
mapServerController.showLayer(data)
|
||||
})
|
||||
$(".hideLayers").click(function () {
|
||||
var data = {
|
||||
"layerId": "xMFDF8sfLJ3NsBwmtN6X8JRfFOzpPk0n",
|
||||
"extendData": {
|
||||
"type": "api",
|
||||
"layerType": "大型水库",
|
||||
"icon": "图标路径",
|
||||
"requestsType": "get",
|
||||
"requestsContentType": "json",
|
||||
"url": "http://webgl.jszy.xyz/doc/shuiku.json",
|
||||
"headers": "h_1:123;h_2:123",
|
||||
"paramerts": "abc1:abc1;abc2:abc2;abc3:abc3",
|
||||
"postBody": "",
|
||||
"treeStructure": "result;",
|
||||
"fieldMapping": "resCode;resName;resName;stLgtd;stLttd",
|
||||
"fieldType": "string;string;string;number;number"
|
||||
}
|
||||
}
|
||||
mapServerController.hideLayer(data)
|
||||
})
|
||||
|
||||
|
||||
$(".showWMSLayers").click(function () {
|
||||
var data = {
|
||||
"layerId": "xMFDF8sfLJ3NsBwmtN6X8JRfFOzpPk0n",
|
||||
"extendData": {
|
||||
"layerType": "WMS图层名称",
|
||||
"type": "wms",
|
||||
"icon": "图标路径",
|
||||
"name": "WMS图层名称",
|
||||
"serverOrFile": true,
|
||||
"url": "https://wms.websitehai.com/geoserver/ows?",
|
||||
'layer': 'ne:countries'
|
||||
}
|
||||
}
|
||||
mapServerController.showLayer(data)
|
||||
})
|
||||
$(".hideWMSLayers").click(function () {
|
||||
var data = {
|
||||
"layerId": "xMFDF8sfLJ3NsBwmtN6X8JRfFOzpPk0n",
|
||||
"extendData": {
|
||||
"layerType": "WMS图层名称",
|
||||
"type": "wms",
|
||||
"icon": "图标路径",
|
||||
"name": "WMS图层名称",
|
||||
"serverOrFile": true,
|
||||
"url": "https://wms.websitehai.com/geoserver/ows?",
|
||||
'layer': 'ne:countries'
|
||||
}
|
||||
}
|
||||
mapServerController.hideLayer(data)
|
||||
})
|
||||
|
||||
|
||||
$(".showTMSLayers").click(function () {
|
||||
var data = {
|
||||
"layerId": "xMFDF8sfLJ3NsBwmtN6X8JRfFOzpPk0n",
|
||||
"extendData": {
|
||||
"layerType": "TMS图层名称",
|
||||
"type": "tms",
|
||||
"icon": "图标路径",
|
||||
"name": "TMS图层名称",
|
||||
"serverOrFile": true,
|
||||
"url": "http://192.168.1.197:28881/GuangDongL18/tilemapresource.xml"
|
||||
}
|
||||
}
|
||||
mapServerController.showLayer(data)
|
||||
})
|
||||
|
||||
$(".hideTMSLayers").click(function () {
|
||||
var data = {
|
||||
"layerId": "xMFDF8sfLJ3NsBwmtN6X8JRfFOzpPk0n",
|
||||
"extendData": {
|
||||
"layerType": "TMS图层名称",
|
||||
"type": "tms",
|
||||
"icon": "图标路径",
|
||||
"name": "TMS图层名称",
|
||||
"serverOrFile": true,
|
||||
"url": "http://192.168.1.197:28881/GuangDongL18/tilemapresource.xml"
|
||||
}
|
||||
}
|
||||
mapServerController.hideLayer(data)
|
||||
})
|
||||
|
||||
|
||||
$(".show3dTilesLayers").click(function () {
|
||||
var data = {
|
||||
"layerId": "xMFDF8sfLJ3NsBwmtN6X8JRfFOzpPk0n",
|
||||
"extendData": {
|
||||
"layerType": "3dtiles图层名称",
|
||||
"type": "3dtiles",
|
||||
"icon": "图标路径",
|
||||
"name": "3dtiles图层名称",
|
||||
"serverOrFile": true,
|
||||
"url": "http://192.168.1.188:13432/3dtile/guangzhou/tileset.json"
|
||||
}
|
||||
}
|
||||
mapServerController.showLayer(data)
|
||||
})
|
||||
|
||||
$(".hide3dTilesLayers").click(function () {
|
||||
var data = {
|
||||
"layerId": "xMFDF8sfLJ3NsBwmtN6X8JRfFOzpPk0n",
|
||||
"extendData": {
|
||||
"layerType": "3dtiles图层名称",
|
||||
"type": "3dtiles",
|
||||
"icon": "图标路径",
|
||||
"name": "3dtiles图层名称",
|
||||
"serverOrFile": true,
|
||||
"url": "http://192.168.1.188:13432/3dtile/guangzhou/tileset.json"
|
||||
}
|
||||
}
|
||||
mapServerController.hideLayer(data)
|
||||
})
|
||||
|
||||
// 1201-1201-web-main_Page
|
||||
// 1201-1201-web-page2
|
||||
// 1201-1201-web-page3
|
||||
|
||||
$(".sendToWeb").click(function () {
|
||||
ws.sendToWebClient({
|
||||
"code": "21u3i21i21g4i1192982u3",
|
||||
"function": "CubeControl.ChangeColor",
|
||||
"type": "noCallBack",
|
||||
"parameters": {"key": "我是web发送给web的信息"}
|
||||
}
|
||||
)
|
||||
})
|
||||
|
||||
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
2
hs-web3d-core/example/index.js
Normal file
2
hs-web3d-core/example/index.js
Normal file
File diff suppressed because one or more lines are too long
1
hs-web3d-core/example/index.js.map
Normal file
1
hs-web3d-core/example/index.js.map
Normal file
File diff suppressed because one or more lines are too long
9227
hs-web3d-core/example/jquery-1.8.0.js
vendored
Normal file
9227
hs-web3d-core/example/jquery-1.8.0.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
186
hs-web3d-core/npminstall-debug.log
Normal file
186
hs-web3d-core/npminstall-debug.log
Normal file
@@ -0,0 +1,186 @@
|
||||
{
|
||||
root: 'E:\\workplace\\huashi\\hs-web-core',
|
||||
registry: 'https://registry.npmmirror.com',
|
||||
pkgs: [],
|
||||
production: false,
|
||||
cacheStrict: false,
|
||||
cacheDir: null,
|
||||
env: {
|
||||
npm_config_registry: 'https://registry.npmmirror.com',
|
||||
npm_config_argv: '{"remain":[],"cooked":["--fix-bug-versions","--china","--userconfig=C:\\\\Users\\\\luojie\\\\.cnpmrc","--disturl=https://npmmirror.com/mirrors/node","--registry=https://registry.npmmirror.com"],"original":["--fix-bug-versions","--china","--userconfig=C:\\\\Users\\\\luojie\\\\.cnpmrc","--disturl=https://npmmirror.com/mirrors/node","--registry=https://registry.npmmirror.com"]}',
|
||||
npm_config_user_agent: 'npminstall/7.5.2 npm/? node/v16.19.1 win32 x64',
|
||||
NODE: 'D:\\dev_tools\\nodejs\\node.exe',
|
||||
npm_node_execpath: 'D:\\dev_tools\\nodejs\\node.exe',
|
||||
npm_execpath: 'D:\\dev_tools\\nvm\\v16.19.1\\node_modules\\cnpm\\node_modules\\npminstall\\bin\\install.js',
|
||||
npm_config_userconfig: 'C:\\Users\\luojie\\.cnpmrc',
|
||||
npm_config_disturl: 'https://npmmirror.com/mirrors/node',
|
||||
npm_config_r: 'https://registry.npmmirror.com',
|
||||
NODEJS_ORG_MIRROR: 'https://cdn.npmmirror.com/binaries/node',
|
||||
NVM_NODEJS_ORG_MIRROR: 'https://cdn.npmmirror.com/binaries/node',
|
||||
PHANTOMJS_CDNURL: 'https://cdn.npmmirror.com/binaries/phantomjs',
|
||||
CHROMEDRIVER_CDNURL: 'https://cdn.npmmirror.com/binaries/chromedriver',
|
||||
OPERADRIVER_CDNURL: 'https://cdn.npmmirror.com/binaries/operadriver',
|
||||
CYPRESS_DOWNLOAD_PATH_TEMPLATE: 'https://cdn.npmmirror.com/binaries/cypress/${version}/${platform}-${arch}/cypress.zip',
|
||||
ELECTRON_MIRROR: 'https://cdn.npmmirror.com/binaries/electron/',
|
||||
ELECTRON_BUILDER_BINARIES_MIRROR: 'https://cdn.npmmirror.com/binaries/electron-builder-binaries/',
|
||||
SASS_BINARY_SITE: 'https://cdn.npmmirror.com/binaries/node-sass',
|
||||
SWC_BINARY_SITE: 'https://cdn.npmmirror.com/binaries/node-swc',
|
||||
NWJS_URLBASE: 'https://cdn.npmmirror.com/binaries/nwjs/v',
|
||||
PUPPETEER_DOWNLOAD_HOST: 'https://cdn.npmmirror.com/binaries',
|
||||
PLAYWRIGHT_DOWNLOAD_HOST: 'https://cdn.npmmirror.com/binaries/playwright',
|
||||
SENTRYCLI_CDNURL: 'https://cdn.npmmirror.com/binaries/sentry-cli',
|
||||
SAUCECTL_INSTALL_BINARY_MIRROR: 'https://cdn.npmmirror.com/binaries/saucectl',
|
||||
RE2_DOWNLOAD_MIRROR: 'https://cdn.npmmirror.com/binaries/node-re2',
|
||||
RE2_DOWNLOAD_SKIP_PATH: 'true',
|
||||
npm_config_better_sqlite3_binary_host: 'https://cdn.npmmirror.com/binaries/better-sqlite3',
|
||||
npm_config_keytar_binary_host: 'https://cdn.npmmirror.com/binaries/keytar',
|
||||
npm_config_sharp_binary_host: 'https://cdn.npmmirror.com/binaries/sharp',
|
||||
npm_config_sharp_libvips_binary_host: 'https://cdn.npmmirror.com/binaries/sharp-libvips',
|
||||
npm_config_robotjs_binary_host: 'https://cdn.npmmirror.com/binaries/robotjs',
|
||||
npm_rootpath: 'E:\\workplace\\huashi\\hs-web-core',
|
||||
INIT_CWD: 'E:\\workplace\\huashi\\hs-web-core',
|
||||
npm_config_cache: 'C:\\Users\\luojie\\.npminstall_tarball'
|
||||
},
|
||||
binaryMirrors: {
|
||||
ENVS: {
|
||||
NODEJS_ORG_MIRROR: 'https://cdn.npmmirror.com/binaries/node',
|
||||
NVM_NODEJS_ORG_MIRROR: 'https://cdn.npmmirror.com/binaries/node',
|
||||
PHANTOMJS_CDNURL: 'https://cdn.npmmirror.com/binaries/phantomjs',
|
||||
CHROMEDRIVER_CDNURL: 'https://cdn.npmmirror.com/binaries/chromedriver',
|
||||
OPERADRIVER_CDNURL: 'https://cdn.npmmirror.com/binaries/operadriver',
|
||||
CYPRESS_DOWNLOAD_PATH_TEMPLATE: 'https://cdn.npmmirror.com/binaries/cypress/${version}/${platform}-${arch}/cypress.zip',
|
||||
ELECTRON_MIRROR: 'https://cdn.npmmirror.com/binaries/electron/',
|
||||
ELECTRON_BUILDER_BINARIES_MIRROR: 'https://cdn.npmmirror.com/binaries/electron-builder-binaries/',
|
||||
SASS_BINARY_SITE: 'https://cdn.npmmirror.com/binaries/node-sass',
|
||||
SWC_BINARY_SITE: 'https://cdn.npmmirror.com/binaries/node-swc',
|
||||
NWJS_URLBASE: 'https://cdn.npmmirror.com/binaries/nwjs/v',
|
||||
PUPPETEER_DOWNLOAD_HOST: 'https://cdn.npmmirror.com/binaries',
|
||||
PLAYWRIGHT_DOWNLOAD_HOST: 'https://cdn.npmmirror.com/binaries/playwright',
|
||||
SENTRYCLI_CDNURL: 'https://cdn.npmmirror.com/binaries/sentry-cli',
|
||||
SAUCECTL_INSTALL_BINARY_MIRROR: 'https://cdn.npmmirror.com/binaries/saucectl',
|
||||
RE2_DOWNLOAD_MIRROR: 'https://cdn.npmmirror.com/binaries/node-re2',
|
||||
RE2_DOWNLOAD_SKIP_PATH: 'true',
|
||||
npm_config_better_sqlite3_binary_host: 'https://cdn.npmmirror.com/binaries/better-sqlite3',
|
||||
npm_config_keytar_binary_host: 'https://cdn.npmmirror.com/binaries/keytar',
|
||||
npm_config_sharp_binary_host: 'https://cdn.npmmirror.com/binaries/sharp',
|
||||
npm_config_sharp_libvips_binary_host: 'https://cdn.npmmirror.com/binaries/sharp-libvips',
|
||||
npm_config_robotjs_binary_host: 'https://cdn.npmmirror.com/binaries/robotjs'
|
||||
},
|
||||
'@ali/s2': { host: 'https://cdn.npmmirror.com/binaries/looksgood-s2' },
|
||||
sharp: { replaceHostFiles: [Array], replaceHostMap: [Object] },
|
||||
'@tensorflow/tfjs-node': {
|
||||
replaceHostFiles: [Array],
|
||||
replaceHostRegExpMap: [Object],
|
||||
replaceHostMap: [Object]
|
||||
},
|
||||
cypress: {
|
||||
host: 'https://cdn.npmmirror.com/binaries/cypress',
|
||||
newPlatforms: [Object]
|
||||
},
|
||||
'utf-8-validate': {
|
||||
host: 'https://cdn.npmmirror.com/binaries/utf-8-validate/v{version}'
|
||||
},
|
||||
xprofiler: {
|
||||
remote_path: './xprofiler/v{version}/',
|
||||
host: 'https://cdn.npmmirror.com/binaries'
|
||||
},
|
||||
leveldown: { host: 'https://cdn.npmmirror.com/binaries/leveldown/v{version}' },
|
||||
couchbase: { host: 'https://cdn.npmmirror.com/binaries/couchbase/v{version}' },
|
||||
gl: { host: 'https://cdn.npmmirror.com/binaries/gl/v{version}' },
|
||||
sqlite3: {
|
||||
host: 'https://cdn.npmmirror.com/binaries/sqlite3',
|
||||
remote_path: 'v{version}'
|
||||
},
|
||||
'@journeyapps/sqlcipher': { host: 'https://cdn.npmmirror.com/binaries' },
|
||||
grpc: {
|
||||
host: 'https://cdn.npmmirror.com/binaries',
|
||||
remote_path: '{name}/v{version}'
|
||||
},
|
||||
'grpc-tools': { host: 'https://cdn.npmmirror.com/binaries' },
|
||||
wrtc: {
|
||||
host: 'https://cdn.npmmirror.com/binaries',
|
||||
remote_path: '{name}/v{version}'
|
||||
},
|
||||
fsevents: { host: 'https://cdn.npmmirror.com/binaries/fsevents' },
|
||||
nodejieba: { host: 'https://cdn.npmmirror.com/binaries/nodejieba' },
|
||||
canvas: { host: 'https://cdn.npmmirror.com/binaries/canvas' },
|
||||
'skia-canvas': { host: 'https://cdn.npmmirror.com/binaries/skia-canvas' },
|
||||
'flow-bin': {
|
||||
replaceHost: 'https://github.com/facebook/flow/releases/download/v',
|
||||
host: 'https://cdn.npmmirror.com/binaries/flow/v'
|
||||
},
|
||||
'jpegtran-bin': {
|
||||
replaceHost: [Array],
|
||||
host: 'https://cdn.npmmirror.com/binaries/jpegtran-bin'
|
||||
},
|
||||
'cwebp-bin': {
|
||||
replaceHost: [Array],
|
||||
host: 'https://cdn.npmmirror.com/binaries/cwebp-bin'
|
||||
},
|
||||
'zopflipng-bin': {
|
||||
replaceHost: [Array],
|
||||
host: 'https://cdn.npmmirror.com/binaries/zopflipng-bin'
|
||||
},
|
||||
'optipng-bin': {
|
||||
replaceHost: [Array],
|
||||
host: 'https://cdn.npmmirror.com/binaries/optipng-bin'
|
||||
},
|
||||
mozjpeg: {
|
||||
replaceHost: [Array],
|
||||
host: 'https://cdn.npmmirror.com/binaries/mozjpeg-bin'
|
||||
},
|
||||
gifsicle: {
|
||||
replaceHost: [Array],
|
||||
host: 'https://cdn.npmmirror.com/binaries/gifsicle-bin'
|
||||
},
|
||||
'pngquant-bin': {
|
||||
replaceHost: [Array],
|
||||
host: 'https://cdn.npmmirror.com/binaries/pngquant-bin',
|
||||
replaceHostMap: [Object]
|
||||
},
|
||||
'pngcrush-bin': {
|
||||
replaceHost: [Array],
|
||||
host: 'https://cdn.npmmirror.com/binaries/pngcrush-bin'
|
||||
},
|
||||
'jpeg-recompress-bin': {
|
||||
replaceHost: [Array],
|
||||
host: 'https://cdn.npmmirror.com/binaries/jpeg-recompress-bin'
|
||||
},
|
||||
'advpng-bin': {
|
||||
replaceHost: [Array],
|
||||
host: 'https://cdn.npmmirror.com/binaries/advpng-bin'
|
||||
},
|
||||
'pngout-bin': {
|
||||
replaceHost: [Array],
|
||||
host: 'https://cdn.npmmirror.com/binaries/pngout-bin'
|
||||
},
|
||||
'jpegoptim-bin': {
|
||||
replaceHost: [Array],
|
||||
host: 'https://cdn.npmmirror.com/binaries/jpegoptim-bin'
|
||||
},
|
||||
argon2: { host: 'https://cdn.npmmirror.com/binaries/argon2' },
|
||||
'ali-zeromq': { host: 'https://cdn.npmmirror.com/binaries/ali-zeromq' },
|
||||
'ali-usb_ctl': { host: 'https://cdn.npmmirror.com/binaries/ali-usb_ctl' },
|
||||
'gdal-async': { host: 'https://cdn.npmmirror.com/binaries/node-gdal-async' }
|
||||
},
|
||||
forbiddenLicenses: null,
|
||||
flatten: false,
|
||||
proxy: undefined,
|
||||
prune: false,
|
||||
disableFallbackStore: false,
|
||||
workspacesMap: Map(0) {},
|
||||
enableWorkspace: false,
|
||||
workspaceRoot: 'E:\\workplace\\huashi\\hs-web-core',
|
||||
isWorkspaceRoot: true,
|
||||
isWorkspacePackage: false,
|
||||
strictSSL: true,
|
||||
ignoreScripts: false,
|
||||
ignoreOptionalDependencies: false,
|
||||
detail: false,
|
||||
forceLinkLatest: false,
|
||||
trace: false,
|
||||
engineStrict: false,
|
||||
registryOnly: false,
|
||||
client: false,
|
||||
autoFixVersion: [Function: autoFixVersion]
|
||||
}
|
||||
6031
hs-web3d-core/package-lock.json
generated
Normal file
6031
hs-web3d-core/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
43
hs-web3d-core/package.json
Normal file
43
hs-web3d-core/package.json
Normal file
@@ -0,0 +1,43 @@
|
||||
{
|
||||
"name": "hs-web3d-core",
|
||||
"version": "1.0.7",
|
||||
"description": "web端3D可视化开发sdk 对接ue引擎",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1",
|
||||
"build": "rollup -c",
|
||||
"example": "cd example && live-server",
|
||||
"prepublish": "rollup -c",
|
||||
"serve": "cross-env ENV=development rollup -c -w",
|
||||
"doc": "npx typedoc"
|
||||
},
|
||||
"author": "",
|
||||
"license": "ISC",
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.21.0",
|
||||
"@babel/preset-env": "^7.20.2",
|
||||
"@rollup/plugin-commonjs": "^24.0.1",
|
||||
"@rollup/plugin-node-resolve": "^15.0.1",
|
||||
"@types/events": "^3.0.0",
|
||||
"@types/socket.io-client": "^3.0.0",
|
||||
"@types/uuid": "^9.0.1",
|
||||
"cross-env": "^7.0.3",
|
||||
"rollup": "^2.79.1",
|
||||
"rollup-plugin-babel": "^4.4.0",
|
||||
"rollup-plugin-polyfill-node": "^0.12.0",
|
||||
"rollup-plugin-serve": "^2.0.2",
|
||||
"rollup-plugin-terser": "^7.0.2",
|
||||
"rollup-plugin-ts": "^3.2.0",
|
||||
"socket.io-client": "^4.6.1",
|
||||
"typedoc": "^0.24.7",
|
||||
"typescript": "^4.9.5",
|
||||
"uuid": "^9.0.0",
|
||||
"websocket": "^1.0.34"
|
||||
},
|
||||
"dependencies": {
|
||||
"md5-ts": "^0.1.6"
|
||||
},
|
||||
"directories": {
|
||||
"example": "example"
|
||||
}
|
||||
}
|
||||
65
hs-web3d-core/rollup.config.js
Normal file
65
hs-web3d-core/rollup.config.js
Normal file
@@ -0,0 +1,65 @@
|
||||
import ts from "rollup-plugin-ts"
|
||||
import resolve from '@rollup/plugin-node-resolve';
|
||||
import commonjs from '@rollup/plugin-commonjs';
|
||||
import { terser } from 'rollup-plugin-terser'
|
||||
import nodePolyfills from 'rollup-plugin-polyfill-node'
|
||||
import serve from 'rollup-plugin-serve';
|
||||
import bable from 'rollup-plugin-babel'
|
||||
|
||||
|
||||
export default {
|
||||
input: "./src/index.ts",
|
||||
plugins: [
|
||||
bable({
|
||||
exclude:'node_modules'
|
||||
}),
|
||||
nodePolyfills(),//打包node内置模块,浏览器端使用,如events
|
||||
resolve({ browser: true }),//加载第三方模块
|
||||
commonjs(),//common转esm
|
||||
ts({ tsconfig: "tsconfig.json" }),//typescript support
|
||||
terser(), //minify the code and remove comments
|
||||
process.env.ENV === "development" ? serve({
|
||||
port: 13200,
|
||||
contentBase: ["example", "."], // 静态资源所在目录
|
||||
}) : null
|
||||
],
|
||||
output: [
|
||||
{
|
||||
format: "umd",//umd format
|
||||
file: "dist/index.js", //output
|
||||
name: "UscRtc", //name of umd
|
||||
exports: "named",//remove export default warning
|
||||
sourcemap: true
|
||||
},
|
||||
{
|
||||
format: "esm",//esm format
|
||||
file: "dist/index.esm.js",//output file
|
||||
sourcemap: true
|
||||
},
|
||||
{
|
||||
format: "cjs",//umd format
|
||||
file: "dist/index.cjs.js", //output
|
||||
name: "bundleName", //name of umd
|
||||
exports: "named",//remove export default warning
|
||||
sourcemap: true
|
||||
},
|
||||
{
|
||||
format: "umd",//umd format
|
||||
file: "example/index.js", //打包到示例demo中
|
||||
name: "UscRtc", //name of umd
|
||||
exports: "named",//remove export default warning
|
||||
sourcemap: true
|
||||
},
|
||||
{
|
||||
format: "esm",//esm format
|
||||
file: "example/index.esm.js",//打包到示例demo中
|
||||
sourcemap: true
|
||||
}, {
|
||||
format: "cjs",//umd format
|
||||
file: "example/index.cjs.js", //output
|
||||
name: "bundleName", //name of umd
|
||||
exports: "named",//remove export default warning
|
||||
sourcemap: true
|
||||
},
|
||||
],
|
||||
}
|
||||
7
hs-web3d-core/src/core/CameraController.ts
Normal file
7
hs-web3d-core/src/core/CameraController.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
// 镜头控制类
|
||||
class CameraController{
|
||||
|
||||
}
|
||||
|
||||
|
||||
export default CameraController
|
||||
6
hs-web3d-core/src/core/CubeControl.ts
Normal file
6
hs-web3d-core/src/core/CubeControl.ts
Normal file
@@ -0,0 +1,6 @@
|
||||
//Cube控制类(CubeControl)
|
||||
class CubeControl{
|
||||
|
||||
}
|
||||
|
||||
export default CubeControl;
|
||||
6
hs-web3d-core/src/core/GridMapController.ts
Normal file
6
hs-web3d-core/src/core/GridMapController.ts
Normal file
@@ -0,0 +1,6 @@
|
||||
// 降雨网格类
|
||||
class GridMapController{
|
||||
|
||||
}
|
||||
|
||||
export default GridMapController;
|
||||
200
hs-web3d-core/src/core/MapServerController.ts
Normal file
200
hs-web3d-core/src/core/MapServerController.ts
Normal file
@@ -0,0 +1,200 @@
|
||||
import web3DCoreSocket from "./web3DCoreSocket"
|
||||
import {v4 as uuidv4} from 'uuid';
|
||||
import {IWSOptions, MapLayersOptions} from "../types/index"
|
||||
|
||||
// 地图图层控制类
|
||||
class MapServerController {
|
||||
socket: any | null = null
|
||||
|
||||
constructor(socket?: any) {
|
||||
this.socket = socket;
|
||||
}
|
||||
debugInfo():void{
|
||||
var _data = {
|
||||
appId: this.socket.appId,
|
||||
sessionId: this.socket.sessionId,
|
||||
clientId: this.socket.clientId,
|
||||
action: "100",
|
||||
role: "web",
|
||||
data: ""
|
||||
}
|
||||
this.socket.send(_data)
|
||||
}
|
||||
createApiServiceLayer(data: MapLayersOptions):void{
|
||||
if(data.extendData.type=="api"){
|
||||
var _data = {
|
||||
code: uuidv4(),
|
||||
function: "",
|
||||
type: "noCallBack",
|
||||
parameters: {
|
||||
layerType:data.extendData.layerType,
|
||||
requestsType: "",
|
||||
requestsContentType: "",
|
||||
url: "",
|
||||
headers: "",
|
||||
paramerts: "",
|
||||
treeStructure: "",
|
||||
fieldMapping: "",
|
||||
fieldType: ""
|
||||
}
|
||||
}
|
||||
|
||||
_data.function = "PointController.AddPointsFromServerApi"
|
||||
_data.parameters.requestsType = data.extendData.requestsType
|
||||
_data.parameters.requestsContentType = "json"
|
||||
_data.parameters.url = data.extendData.url
|
||||
_data.parameters.headers = data.extendData.haeder
|
||||
_data.parameters.paramerts = data.extendData.params
|
||||
|
||||
_data.parameters.treeStructure = data.extendData.treeStructure
|
||||
_data.parameters.fieldMapping = data.extendData.fieldMapping
|
||||
_data.parameters.fieldType = data.extendData.fieldType
|
||||
this.socket.sendToEngin(_data)
|
||||
}
|
||||
}
|
||||
showLayer(data: MapLayersOptions): void {
|
||||
switch (data.extendData.type) {
|
||||
case "api":
|
||||
this.socket.sendToEngin({
|
||||
code: uuidv4(),
|
||||
function: "PointController.ShowPointsByType",
|
||||
type: "noCallBack",
|
||||
parameters: {
|
||||
type:data.extendData.layerType
|
||||
}
|
||||
})
|
||||
break;
|
||||
case "terrain":
|
||||
this.socket.sendToEngin({
|
||||
code: uuidv4(),
|
||||
function: "MapServerController.SetTerrainUrl",
|
||||
type: "noCallBack",
|
||||
parameters: {
|
||||
"type": data.extendData.type,
|
||||
"icon": "图标路径",
|
||||
"name": data.extendData.layerType,
|
||||
"serverOrFile": true,
|
||||
"url": data.extendData.url
|
||||
}
|
||||
})
|
||||
break;
|
||||
case "tms":
|
||||
this.socket.sendToEngin({
|
||||
code: uuidv4(),
|
||||
function: "MapServerController.AddTMSLayer",
|
||||
type: "noCallBack",
|
||||
parameters: {
|
||||
"type": data.extendData.type,
|
||||
"icon": "图标路径",
|
||||
"name": data.extendData.layerType,
|
||||
"serverOrFile": true,
|
||||
"url": data.extendData.url
|
||||
}
|
||||
})
|
||||
break;
|
||||
case "wms":
|
||||
this.socket.sendToEngin({
|
||||
code: uuidv4(),
|
||||
function: "MapServerController.AddWMSLayer",
|
||||
type: "noCallBack",
|
||||
parameters: {
|
||||
"type": data.extendData.type,
|
||||
"icon": "图标路径",
|
||||
"name": data.extendData.layerType,
|
||||
"serverOrFile": true,
|
||||
"url": data.extendData.url,
|
||||
'layer':data.extendData.layer
|
||||
}
|
||||
})
|
||||
break;
|
||||
case "3dtiles":
|
||||
this.socket.sendToEngin({
|
||||
code: uuidv4(),
|
||||
function: "MapServerController.Add3DTileLayer",
|
||||
type: "noCallBack",
|
||||
parameters: {
|
||||
"type": data.extendData.type,
|
||||
"icon": "图标路径",
|
||||
"name": data.extendData.layerType,
|
||||
"serverOrFile": true,
|
||||
"url": data.extendData.url,
|
||||
'layer':data.extendData.layer
|
||||
}
|
||||
})
|
||||
break;
|
||||
case "Point":
|
||||
console.log(data.extendData)
|
||||
}
|
||||
|
||||
}
|
||||
hideLayer(data: MapLayersOptions): void {
|
||||
switch (data.extendData.type) {
|
||||
case "api":
|
||||
var _data = {
|
||||
code: uuidv4(),
|
||||
function: "PointController.HiddenPointsByType",
|
||||
type: "noCallBack",
|
||||
parameters: {
|
||||
type:data.extendData.layerType
|
||||
}
|
||||
}
|
||||
this.socket.sendToEngin(_data)
|
||||
break;
|
||||
case "terrain":
|
||||
this.socket.sendToEngin({
|
||||
code: uuidv4(),
|
||||
function: "MapServerController.AddTMSLayer",
|
||||
type: "noCallBack",
|
||||
parameters: {
|
||||
"type": data.extendData.type,
|
||||
"icon": "图标路径",
|
||||
"name": data.extendData.layerType,
|
||||
"serverOrFile": true,
|
||||
"url": data.extendData.url
|
||||
}
|
||||
})
|
||||
break;
|
||||
case "tms":
|
||||
this.socket.sendToEngin({
|
||||
code: uuidv4(),
|
||||
function: "MapServerController.RemoveTMSLayer",
|
||||
type: "noCallBack",
|
||||
parameters: {
|
||||
"name": data.extendData.layerType,
|
||||
}
|
||||
})
|
||||
break;
|
||||
case "wms":
|
||||
this.socket.sendToEngin({
|
||||
code: uuidv4(),
|
||||
function: "MapServerController.RemoveWMSLayer",
|
||||
type: "noCallBack",
|
||||
parameters: {
|
||||
"name": data.extendData.layerType,
|
||||
}
|
||||
})
|
||||
break;
|
||||
case "3dtiles":
|
||||
this.socket.sendToEngin({
|
||||
code: uuidv4(),
|
||||
function: "MapServerController.Remove3DTileLayer",
|
||||
type: "noCallBack",
|
||||
parameters: {
|
||||
"type": data.extendData.type,
|
||||
"icon": "图标路径",
|
||||
"name": data.extendData.layerType,
|
||||
"serverOrFile": true,
|
||||
"url": data.extendData.url,
|
||||
'layer':data.extendData.layer
|
||||
}
|
||||
})
|
||||
break;
|
||||
case "Point":
|
||||
console.log(data.extendData)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
export default MapServerController
|
||||
6
hs-web3d-core/src/core/PointController.ts
Normal file
6
hs-web3d-core/src/core/PointController.ts
Normal file
@@ -0,0 +1,6 @@
|
||||
// 场景点位类
|
||||
class PointController{
|
||||
|
||||
}
|
||||
|
||||
export default PointController;
|
||||
5
hs-web3d-core/src/core/PopUpWindowController.ts
Normal file
5
hs-web3d-core/src/core/PopUpWindowController.ts
Normal file
@@ -0,0 +1,5 @@
|
||||
class PopUpWindowController{
|
||||
|
||||
}
|
||||
|
||||
export default PopUpWindowController;
|
||||
5
hs-web3d-core/src/core/SceneGeometryController.ts
Normal file
5
hs-web3d-core/src/core/SceneGeometryController.ts
Normal file
@@ -0,0 +1,5 @@
|
||||
class SceneGeometryController{
|
||||
|
||||
}
|
||||
|
||||
export default SceneGeometryController;
|
||||
7
hs-web3d-core/src/core/SceneListenController.ts
Normal file
7
hs-web3d-core/src/core/SceneListenController.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
// 场景监听类
|
||||
class SceneListenController{
|
||||
|
||||
}
|
||||
|
||||
|
||||
export default SceneListenController
|
||||
5
hs-web3d-core/src/core/SceneSpecialEffectsController.ts
Normal file
5
hs-web3d-core/src/core/SceneSpecialEffectsController.ts
Normal file
@@ -0,0 +1,5 @@
|
||||
class SceneSpecialEffectsController{
|
||||
|
||||
}
|
||||
|
||||
export default SceneSpecialEffectsController;
|
||||
7
hs-web3d-core/src/core/SunLightController.ts
Normal file
7
hs-web3d-core/src/core/SunLightController.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
class SunLightController{
|
||||
static changeSunLight(data:any){
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
export default SunLightController;
|
||||
6
hs-web3d-core/src/core/WaterSurfaceController.ts
Normal file
6
hs-web3d-core/src/core/WaterSurfaceController.ts
Normal file
@@ -0,0 +1,6 @@
|
||||
// 水面控制类
|
||||
class WaterSurfaceController{
|
||||
|
||||
}
|
||||
|
||||
export default WaterSurfaceController;
|
||||
5
hs-web3d-core/src/core/WeatherController.ts
Normal file
5
hs-web3d-core/src/core/WeatherController.ts
Normal file
@@ -0,0 +1,5 @@
|
||||
class WeatherController{
|
||||
|
||||
}
|
||||
|
||||
export default WeatherController;
|
||||
227
hs-web3d-core/src/core/Web3DCore.ts
Normal file
227
hs-web3d-core/src/core/Web3DCore.ts
Normal file
@@ -0,0 +1,227 @@
|
||||
import {Timeout, Interval, IWSOptions, AutoReconnect, Heartbeat} from "../types/index"
|
||||
|
||||
/**
|
||||
* 允许null的泛型
|
||||
*/
|
||||
type Nullable<T> = T | null
|
||||
/**
|
||||
* 默认url
|
||||
*/
|
||||
const baseURL = 'ws://test/api'
|
||||
/**
|
||||
* 默认重连次数
|
||||
*/
|
||||
const reconnectMaxCount = 3
|
||||
/**
|
||||
* 默认心跳信息
|
||||
*/
|
||||
const message = 'ping'
|
||||
/**
|
||||
* 默认心跳间隔
|
||||
*/
|
||||
const interval = 10000000
|
||||
/**
|
||||
* 默认延时时间
|
||||
*/
|
||||
const timeout = 1000
|
||||
|
||||
class Web3DCore {
|
||||
private static instance:Web3DCore;
|
||||
|
||||
url: string
|
||||
socket: WebSocket | null = null
|
||||
reconnectCount = 0
|
||||
delay: Nullable<Timeout> = null
|
||||
timer: Nullable<Interval> = null
|
||||
autoReconnect: IWSOptions['autoReconnect']
|
||||
heartbeat: IWSOptions['heartbeat']
|
||||
query: IWSOptions['query']
|
||||
appId?: string
|
||||
sessionId?: string
|
||||
clientId?: string
|
||||
|
||||
constructor(url?: string, options?: IWSOptions) {
|
||||
const {
|
||||
autoReconnect = true,
|
||||
query = {},
|
||||
heartbeat = true,
|
||||
appId,
|
||||
clientId,
|
||||
sessionId,
|
||||
} = options || {}
|
||||
this.autoReconnect = autoReconnect
|
||||
this.heartbeat = heartbeat
|
||||
this.appId = appId
|
||||
this.clientId = clientId
|
||||
this.sessionId = sessionId
|
||||
this.query = query
|
||||
// 处理url
|
||||
this.url =
|
||||
url ||
|
||||
baseURL +
|
||||
JSON.stringify({token: "", ...this.query})
|
||||
console.log("==============Web3DCore constructor",new Date().getTime())
|
||||
}
|
||||
|
||||
static getInstance(url?: string, options?: IWSOptions){
|
||||
if(this.instance){
|
||||
return this.instance;
|
||||
}
|
||||
// 开启连接
|
||||
this.instance=new Web3DCore(url,options);
|
||||
this.instance.connect()
|
||||
return this.instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* 连接
|
||||
*/
|
||||
connect(): void {
|
||||
this.close()
|
||||
this.socket = new WebSocket(this.url)
|
||||
this.onError()
|
||||
this.onOpen()
|
||||
}
|
||||
|
||||
/**
|
||||
* 监听连接
|
||||
*/
|
||||
onOpen(): void {
|
||||
if (this.socket) {
|
||||
this.socket.onopen = () => {
|
||||
this.login()
|
||||
this.send('ping')
|
||||
// 开启心跳
|
||||
this.heartbeat && this.startHeartbeat()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 开启心跳
|
||||
*/
|
||||
startHeartbeat(): void {
|
||||
const msg = (this.heartbeat as Heartbeat)?.message || message
|
||||
const int = (this.heartbeat as Heartbeat)?.interval || interval
|
||||
this.timer = setInterval(() => {
|
||||
this.send(msg)
|
||||
}, int)
|
||||
}
|
||||
|
||||
/**
|
||||
* 监听错误
|
||||
*/
|
||||
onError(): void {
|
||||
if (this.socket) {
|
||||
this.socket.onerror = () => {
|
||||
const count =
|
||||
(this.autoReconnect as AutoReconnect)?.reconnectMaxCount ||
|
||||
reconnectMaxCount
|
||||
if (this.autoReconnect && this.reconnectCount < count) {
|
||||
this.reconnectCount++
|
||||
this.connect()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 关闭连接
|
||||
*/
|
||||
close(): void {
|
||||
this.socket && this.socket.close()
|
||||
this.delay && clearTimeout(this.delay)
|
||||
this.timer && clearInterval(this.timer)
|
||||
this.socket = null
|
||||
}
|
||||
|
||||
/**
|
||||
* 监听消息
|
||||
* @param callback
|
||||
*/
|
||||
onMessage(callback: (...data: any[]) => any): void {
|
||||
if (this.socket) {
|
||||
this.socket.onmessage = data => {
|
||||
try {
|
||||
const res = JSON.parse(data.data)
|
||||
res.data=JSON.parse(res.data)
|
||||
callback(res)
|
||||
} catch (err) {
|
||||
callback(data)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 发送消息到引擎底座
|
||||
* @param data
|
||||
*/
|
||||
sendToEngin(data: any): void {
|
||||
var _data = {
|
||||
appId: this.appId,
|
||||
sessionId: this.sessionId,
|
||||
clientId: this.clientId,
|
||||
action: "2",
|
||||
role: "web",
|
||||
data: data
|
||||
}
|
||||
this.send(_data)
|
||||
}
|
||||
sendToWebClient(data: any): void {
|
||||
var _data = {
|
||||
appId: this.appId,
|
||||
sessionId: this.sessionId,
|
||||
clientId: this.clientId,
|
||||
action: "3",
|
||||
role: "web",
|
||||
data: data
|
||||
}
|
||||
this.send(_data)
|
||||
}
|
||||
/**
|
||||
* 发送消息
|
||||
* @param data
|
||||
*/
|
||||
send(data: any): void {
|
||||
console.log("=========== send")
|
||||
console.log(this.socket)
|
||||
if (!this.socket) return
|
||||
// 状态为 `1-开启状态` 直接发送
|
||||
if (this.socket.readyState === this.socket.OPEN) {
|
||||
this.socket.send(JSON.stringify(data))
|
||||
// 状态为 `0-开启状态` 则延后调用
|
||||
} else if (this.socket.readyState === this.socket.CONNECTING) {
|
||||
this.delay = setTimeout(() => {
|
||||
this.socket?.send(JSON.stringify(data))
|
||||
}, timeout)
|
||||
// 状态为 `2-关闭中 3-关闭状态` 则重新连接
|
||||
} else {
|
||||
this.connect()
|
||||
this.delay = setTimeout(() => {
|
||||
this.socket?.send(JSON.stringify(data))
|
||||
}, timeout)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 登录
|
||||
*/
|
||||
login(): void {
|
||||
|
||||
var _data = {
|
||||
appId: this.appId,
|
||||
sessionId: this.sessionId,
|
||||
clientId: this.clientId,
|
||||
action: "1",
|
||||
role: "web",
|
||||
}
|
||||
|
||||
console.error(_data)
|
||||
|
||||
this.send(_data)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
export default Web3DCore
|
||||
220
hs-web3d-core/src/core/web3DCoreSocket.ts
Normal file
220
hs-web3d-core/src/core/web3DCoreSocket.ts
Normal file
@@ -0,0 +1,220 @@
|
||||
import {Timeout, Interval, IWSOptions, AutoReconnect, Heartbeat} from "../types/index"
|
||||
|
||||
/**
|
||||
* 允许null的泛型
|
||||
*/
|
||||
type Nullable<T> = T | null
|
||||
/**
|
||||
* 默认url
|
||||
*/
|
||||
const baseURL = 'ws://test/api'
|
||||
/**
|
||||
* 默认重连次数
|
||||
*/
|
||||
const reconnectMaxCount = 3
|
||||
/**
|
||||
* 默认心跳信息
|
||||
*/
|
||||
const message = 'ping'
|
||||
/**
|
||||
* 默认心跳间隔
|
||||
*/
|
||||
const interval = 10000000
|
||||
/**
|
||||
* 默认延时时间
|
||||
*/
|
||||
const timeout = 1000
|
||||
|
||||
class web3DCoreSocket {
|
||||
url: string
|
||||
socket: WebSocket | null = null
|
||||
reconnectCount = 0
|
||||
delay: Nullable<Timeout> = null
|
||||
timer: Nullable<Interval> = null
|
||||
autoReconnect: IWSOptions['autoReconnect']
|
||||
heartbeat: IWSOptions['heartbeat']
|
||||
query: IWSOptions['query']
|
||||
appId?: string
|
||||
sessionId?: string
|
||||
clientId?: string
|
||||
|
||||
constructor(url?: string, options?: IWSOptions) {
|
||||
const {
|
||||
autoReconnect = true,
|
||||
query = {},
|
||||
heartbeat = true,
|
||||
appId,
|
||||
clientId,
|
||||
sessionId,
|
||||
} = options || {}
|
||||
|
||||
console.log("==============constructor")
|
||||
console.log(options)
|
||||
console.log(appId)
|
||||
|
||||
this.autoReconnect = autoReconnect
|
||||
this.heartbeat = heartbeat
|
||||
this.appId = appId
|
||||
this.clientId = clientId
|
||||
this.sessionId = sessionId
|
||||
this.query = query
|
||||
// 处理url
|
||||
this.url =
|
||||
url ||
|
||||
baseURL +
|
||||
JSON.stringify({token: "", ...this.query})
|
||||
// 开启连接
|
||||
this.connect()
|
||||
}
|
||||
|
||||
/**
|
||||
* 连接
|
||||
*/
|
||||
connect(): void {
|
||||
this.close()
|
||||
this.socket = new WebSocket(this.url)
|
||||
this.onError()
|
||||
this.onOpen()
|
||||
}
|
||||
|
||||
/**
|
||||
* 监听连接
|
||||
*/
|
||||
onOpen(): void {
|
||||
if (this.socket) {
|
||||
this.socket.onopen = () => {
|
||||
this.login()
|
||||
this.send('ping')
|
||||
// 开启心跳
|
||||
this.heartbeat && this.startHeartbeat()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 开启心跳
|
||||
*/
|
||||
startHeartbeat(): void {
|
||||
const msg = (this.heartbeat as Heartbeat)?.message || message
|
||||
const int = (this.heartbeat as Heartbeat)?.interval || interval
|
||||
this.timer = setInterval(() => {
|
||||
this.send(msg)
|
||||
}, int)
|
||||
}
|
||||
|
||||
/**
|
||||
* 监听错误
|
||||
*/
|
||||
onError(): void {
|
||||
if (this.socket) {
|
||||
this.socket.onerror = () => {
|
||||
const count =
|
||||
(this.autoReconnect as AutoReconnect)?.reconnectMaxCount ||
|
||||
reconnectMaxCount
|
||||
if (this.autoReconnect && this.reconnectCount < count) {
|
||||
this.reconnectCount++
|
||||
this.connect()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 关闭连接
|
||||
*/
|
||||
close(): void {
|
||||
this.socket && this.socket.close()
|
||||
this.delay && clearTimeout(this.delay)
|
||||
this.timer && clearInterval(this.timer)
|
||||
this.socket = null
|
||||
}
|
||||
|
||||
/**
|
||||
* 监听消息
|
||||
* @param callback
|
||||
*/
|
||||
onMessage(callback: (...data: any[]) => any): void {
|
||||
if (this.socket) {
|
||||
this.socket.onmessage = data => {
|
||||
try {
|
||||
const res = JSON.parse(data.data)
|
||||
res.data=JSON.parse(res.data)
|
||||
callback(res)
|
||||
} catch (err) {
|
||||
callback(data)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 发送消息到引擎底座
|
||||
* @param data
|
||||
*/
|
||||
sendToEngin(data: any): void {
|
||||
var _data = {
|
||||
appId: this.appId,
|
||||
sessionId: this.sessionId,
|
||||
clientId: this.clientId,
|
||||
action: "2",
|
||||
role: "web",
|
||||
data: data
|
||||
}
|
||||
this.send(_data)
|
||||
}
|
||||
sendToWebClient(data: any): void {
|
||||
var _data = {
|
||||
appId: this.appId,
|
||||
sessionId: this.sessionId,
|
||||
clientId: this.clientId,
|
||||
action: "3",
|
||||
role: "web",
|
||||
data: data
|
||||
}
|
||||
this.send(_data)
|
||||
}
|
||||
/**
|
||||
* 发送消息
|
||||
* @param data
|
||||
*/
|
||||
send(data: any): void {
|
||||
|
||||
if (!this.socket) return
|
||||
// 状态为 `1-开启状态` 直接发送
|
||||
if (this.socket.readyState === this.socket.OPEN) {
|
||||
this.socket.send(JSON.stringify(data))
|
||||
// 状态为 `0-开启状态` 则延后调用
|
||||
} else if (this.socket.readyState === this.socket.CONNECTING) {
|
||||
this.delay = setTimeout(() => {
|
||||
this.socket?.send(JSON.stringify(data))
|
||||
}, timeout)
|
||||
// 状态为 `2-关闭中 3-关闭状态` 则重新连接
|
||||
} else {
|
||||
this.connect()
|
||||
this.delay = setTimeout(() => {
|
||||
this.socket?.send(JSON.stringify(data))
|
||||
}, timeout)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 登录
|
||||
*/
|
||||
login(): void {
|
||||
|
||||
var _data = {
|
||||
appId: this.appId,
|
||||
sessionId: this.sessionId,
|
||||
clientId: this.clientId,
|
||||
action: "1",
|
||||
role: "web",
|
||||
}
|
||||
|
||||
console.error(_data)
|
||||
|
||||
this.send(_data)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
export default web3DCoreSocket
|
||||
21
hs-web3d-core/src/index.ts
Normal file
21
hs-web3d-core/src/index.ts
Normal file
@@ -0,0 +1,21 @@
|
||||
import {DefaultWsOptions} from "./types"
|
||||
import web3DCoreSocket from "./core/web3DCoreSocket"
|
||||
import MapServerController from "./core/MapServerController"
|
||||
import WaterSurfaceController from "./core/WaterSurfaceController"
|
||||
import SunLightController from "./core/SunLightController"
|
||||
import Web3DCore from "./core/Web3DCore"
|
||||
//
|
||||
// export default class web3DCore{
|
||||
// initSocket: any
|
||||
// constructor(config:DefaultWsOptions) {
|
||||
// }
|
||||
// }
|
||||
|
||||
|
||||
export {
|
||||
web3DCoreSocket,
|
||||
Web3DCore,
|
||||
MapServerController,
|
||||
WaterSurfaceController,
|
||||
SunLightController
|
||||
}
|
||||
72
hs-web3d-core/src/types/index.ts
Normal file
72
hs-web3d-core/src/types/index.ts
Normal file
@@ -0,0 +1,72 @@
|
||||
export interface DefaultWsOptions {
|
||||
url?: string,
|
||||
appId:string,
|
||||
sessionId:string,
|
||||
role:string,
|
||||
heartTime?: number,
|
||||
expireTime?: number
|
||||
}
|
||||
|
||||
/**
|
||||
* setTimeout 类型
|
||||
*/
|
||||
export type Timeout = ReturnType<typeof setTimeout>
|
||||
/**
|
||||
* setInterval 类型
|
||||
*/
|
||||
export type Interval = ReturnType<typeof setInterval>
|
||||
|
||||
export type AutoReconnect = {
|
||||
/**
|
||||
*重连尝试次数 默认 3
|
||||
*/
|
||||
reconnectMaxCount?: number
|
||||
}
|
||||
export type Heartbeat = {
|
||||
/**
|
||||
* 心跳信息 默认`ping`
|
||||
*/
|
||||
message: string
|
||||
/**
|
||||
* 心跳间隔时间 默认 `3000` 毫秒
|
||||
*/
|
||||
interval: number
|
||||
}
|
||||
|
||||
export interface IWSOptions {
|
||||
appId:string,
|
||||
sessionId:string,
|
||||
clientId:string,
|
||||
role:string|'web',
|
||||
/**
|
||||
* 是否自动重连 默认`true`
|
||||
*/
|
||||
autoReconnect: boolean | AutoReconnect
|
||||
/**
|
||||
* 心跳 默认 `false`
|
||||
*/
|
||||
heartbeat: boolean | Heartbeat
|
||||
/**
|
||||
* url 携带的参数
|
||||
*/
|
||||
query: Record<string, string>
|
||||
}
|
||||
|
||||
export interface MapLayersExtendData {
|
||||
type:string,
|
||||
layerType:string,
|
||||
layer:string,
|
||||
icon:string,
|
||||
url:string,
|
||||
requestsType:string,
|
||||
haeder:any,
|
||||
params:any,
|
||||
treeStructure:string,
|
||||
fieldMapping:string,
|
||||
fieldType:string,
|
||||
}
|
||||
|
||||
export interface MapLayersOptions {
|
||||
layerId:string,
|
||||
extendData: MapLayersExtendData
|
||||
}
|
||||
14
hs-web3d-core/src/utils/helper.ts
Normal file
14
hs-web3d-core/src/utils/helper.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
/**
|
||||
* 是否是json字符串 如果是直接返回json对象
|
||||
* @param str
|
||||
*/
|
||||
export const isJson = (str: string | object): boolean | object => {
|
||||
if (typeof str === 'object') return str
|
||||
try {
|
||||
let obj = JSON.parse(str)
|
||||
// tslint:disable-next-line:no-extra-boolean-cast
|
||||
return !!(typeof obj === 'object' && obj) ? obj : false
|
||||
} catch (e) {
|
||||
return false
|
||||
}
|
||||
}
|
||||
0
hs-web3d-core/src/utils/index.ts
Normal file
0
hs-web3d-core/src/utils/index.ts
Normal file
0
hs-web3d-core/src/utils/pv.ts
Normal file
0
hs-web3d-core/src/utils/pv.ts
Normal file
15
hs-web3d-core/tsconfig.json
Normal file
15
hs-web3d-core/tsconfig.json
Normal file
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "es2016", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */
|
||||
|
||||
/* Modules */
|
||||
"module": "commonjs", /* Specify what module code is generated. */
|
||||
"esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */
|
||||
// "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */
|
||||
"forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */
|
||||
|
||||
/* Type Checking */
|
||||
"strict": true, /* Enable all strict type-checking options. */
|
||||
"skipLibCheck": true /* Skip type checking all .d.ts files. */
|
||||
}
|
||||
}
|
||||
6
hs-web3d-core/typedoc.json
Normal file
6
hs-web3d-core/typedoc.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"entryPoints": [
|
||||
"./src/index.ts"
|
||||
],
|
||||
"out": "./example/docs"
|
||||
}
|
||||
Reference in New Issue
Block a user