com.hikky.vketcloudsdk 4.8.10 → 4.8.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Binary file
Binary file
Binary file
Binary file
@@ -630,5 +630,7 @@ namespace HIKKY.VketCloudSDK.Translation
630
630
  Dialog_BuildAndRun_NoWorldSetting,
631
631
  Dialog_BuildAndRun_Close,
632
632
  Dialog_NoPortFound,
633
+ HEOShadow_ShadowCaster,
634
+ HEOShadow_ShadowReceiver,
633
635
  }
634
636
  }
@@ -1,5 +1,5 @@
1
1
  fileFormatVersion: 2
2
- guid: 50266abfdbbeb4237ab90316b2f7d1b5
2
+ guid: 145e84548d5bc47ccad9e014620fde1d
3
3
  NativeFormatImporter:
4
4
  externalObjects: {}
5
5
  mainObjectFileID: 11400000
@@ -1286,3 +1286,7 @@ MonoBehaviour:
1286
1286
  Text: Close
1287
1287
  - Item: Dialog_NoPortFound
1288
1288
  Text: No Available Port Found.
1289
+ - Item: HEOShadow_ShadowCaster
1290
+ Text: Shadow Caster
1291
+ - Item: HEOShadow_ShadowReceiver
1292
+ Text: Shadow Receiver
@@ -1277,3 +1277,7 @@ MonoBehaviour:
1277
1277
  Text: "\u9589\u3058\u308B"
1278
1278
  - Item: Dialog_NoPortFound
1279
1279
  Text: "\u5229\u7528\u53EF\u80FD\u306A\u30DD\u30FC\u30C8\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3002"
1280
+ - Item: HEOShadow_ShadowCaster
1281
+ Text: "\u30B7\u30E3\u30C9\u30A6\u30AD\u30E3\u30B9\u30BF\u30FC"
1282
+ - Item: HEOShadow_ShadowReceiver
1283
+ Text: "\u30B7\u30E3\u30C9\u30A6\u30EC\u30B7\u30FC\u30D0\u30FC"
@@ -626,4 +626,6 @@ Dialog_ClearDataCache_ClearCache_Accept,Accept,同意する
626
626
  Dialog_ClearDataCache_ClearCache_Cancel,Cancel,キャンセル
627
627
  Dialog_BuildAndRun_NoWorldSetting,HEOWorldSetting is not found. Please ensure to place one in the scene.,HEOWorldSettingが見つかりません。シーンに必ず一つ配置してください。
628
628
  Dialog_BuildAndRun_Close,Close,閉じる
629
- Dialog_NoPortFound,No Available Port Found.,利用可能なポートが見つかりません。
629
+ Dialog_NoPortFound,No Available Port Found.,利用可能なポートが見つかりません。
630
+ HEOShadow_ShadowCaster,Shadow Caster,シャドウキャスター
631
+ HEOShadow_ShadowReceiver,Shadow Receiver,シャドウレシーバー
@@ -5,7 +5,7 @@ const g_GUIdebugTab = document.getElementById('GUIdebugTab');
5
5
  const g_GUIdebug = document.getElementById('GUIdebug');
6
6
 
7
7
  var g_WorldID = "vketmp01";
8
- var g_MultiPlay = false;
8
+ var g_MultiPlay = true;
9
9
  var g_Spot = "";
10
10
  var g_ShowWorldSelect = true;
11
11
 
@@ -28,13 +28,8 @@ window.addEventListener('keyup', function(event){
28
28
 
29
29
  }, true);
30
30
 
31
-
32
31
  //
33
32
  Module['postRun'] = function() {
34
- if (g_MultiPlay) {
35
- hel_skyway_main();
36
- }
37
-
38
33
  hel_skyway_start();
39
34
  }
40
35
 
@@ -156,3 +151,48 @@ function hel_action_bridge(name, text) {
156
151
  hel_action_bridge_add(hel_action_bridge);
157
152
 
158
153
 
154
+ //---------------------------------------------------------------------
155
+ // チャットログのバッジ表示(オーバーライド)
156
+ //
157
+ // ※hel_skyway_add_text_chat()で標準のバッジ表示を行ってる
158
+ // ※hel_if_displayChatBadge()は、基本はコメント状態でOK。
159
+ // ※もし特別なバッジ表示したい場合は、コメントを外してコードを記述する。
160
+ //---------------------------------------------------------------------
161
+ //function hel_if_displayChatBadge()
162
+ //{
163
+ //}
164
+
165
+
166
+ // Vketアカウント連携
167
+ function hel_account_isloggedin()
168
+ {
169
+ const loggedin = hel_out_isLoggedIn();
170
+
171
+ console.log(loggedin ? "loggedin" : "logoff");
172
+
173
+ return loggedin;
174
+ }
175
+
176
+ async function hel_account_setusernamefromaccount()
177
+ {
178
+ // プロフィール取得
179
+ await hel_out_getProfile(window.localStorage.getItem('access-token'))
180
+
181
+ // 名前取得
182
+ const name = window.localStorage.getItem('name');
183
+
184
+ console.log("name : " + name);
185
+
186
+ // 名前を登録する
187
+ hel_skyway_set_user_name(name);
188
+ }
189
+
190
+ function hel_account_openuseofterms()
191
+ {
192
+ window.open("https://account.vket.com/terms#common", '_blank');
193
+ }
194
+
195
+ function hel_account_openprivacypolicy()
196
+ {
197
+ window.open("https://account.vket.com/terms#privacy", '_blank');
198
+ }
@@ -0,0 +1,153 @@
1
+
2
+ // const
3
+ const isTest = window.location.hostname.includes('test') || window.location.hostname.includes('localhost')
4
+ const vketAccountClientId = isTest ? '44xje89RZ1JG_usrvrsdZVMXA-jgM0_P34EffNN-2fk' : ''
5
+ const vketAccountURL = isTest ? 'https://account.hikky.dev' : 'https://account.vket.com'
6
+
7
+ //
8
+ async function hel_out_initializeAccount() {
9
+ const params = new URLSearchParams(window.location.search)
10
+ // code, state がない場合処理終了
11
+ if (!params.has('code') || !params.has('state')) {
12
+ // eslint-disable-next-line no-console
13
+ console.log('no code or state found.')
14
+ return
15
+ }
16
+ // state, ルーム情報がない場合処理終了
17
+ if (!window.localStorage.getItem('state')) {
18
+ // eslint-disable-next-line no-console
19
+ console.log('no state found.')
20
+ return
21
+ }
22
+
23
+ // state がおかしい
24
+ if (window.localStorage.getItem('state') != params.get('state')) {
25
+ // eslint-disable-next-line no-console
26
+ console.error(
27
+ `state does not match.`,
28
+ window.localStorage.getItem('state'),
29
+ params.get('state')
30
+ )
31
+ hel_out_removeStorage()
32
+ return
33
+ }
34
+
35
+ // ログイン実施
36
+ const response = await hel_out_issueRefreshToken(params.get('code'))
37
+ hel_out_updateToken(response)
38
+ // 一時データ削除
39
+ window.localStorage.removeItem('state')
40
+ // プロフィール取得
41
+ hel_out_getProfile(window.localStorage.getItem('access-token'))
42
+ }
43
+
44
+ function hel_out_isLoggedIn(refresh = true) {
45
+ if (!window.localStorage.getItem('refresh-token')) {
46
+ hel_out_removeStorage()
47
+ return false
48
+ }
49
+ const tokenCreatedAt = window.localStorage.getItem('token-created-at')
50
+ const tokenExpiresIn = window.localStorage.getItem('token-expires-in')
51
+ const expiresAt = Number(tokenCreatedAt) * 1000 + Number(tokenExpiresIn) * 1000
52
+ if (!expiresAt || new Date(expiresAt) < new Date()) {
53
+ // 有効期限切れ
54
+ hel_out_removeStorage()
55
+ return false
56
+ }
57
+ if (refresh) {
58
+ hel_out_getIdToken()
59
+ }
60
+
61
+ return true
62
+ }
63
+
64
+ function hel_out_removeStorage() {
65
+ console.log('hel_out_removeStorage')
66
+ window.localStorage.removeItem('state')
67
+ window.localStorage.removeItem('refresh-token')
68
+ window.localStorage.removeItem('token-expires-in')
69
+ window.localStorage.removeItem('token-created-at')
70
+ window.localStorage.removeItem('access-token')
71
+ window.localStorage.removeItem('id-token')
72
+ window.localStorage.removeItem('vket_id')
73
+ }
74
+
75
+ async function hel_out_getIdToken() {
76
+ const response = await hel_out_refreshRefreshToken(
77
+ window.localStorage.getItem('refresh-token')
78
+ )
79
+ hel_out_updateToken(response)
80
+ return response.id_token
81
+ }
82
+
83
+ async function hel_out_issueRefreshToken(code) {
84
+ const formData = new FormData()
85
+ formData.append('grant_type', 'authorization_code')
86
+ formData.append('client_id', vketAccountClientId)
87
+ formData.append('redirect_uri', window.location.href.split('?')[0])
88
+ formData.append('code', code)
89
+
90
+ const response = await fetch(`${vketAccountURL}/oauth/token`, {
91
+ method: 'POST',
92
+ body: formData
93
+ })
94
+ if (!response.ok) {
95
+ // eslint-disable-next-line no-console
96
+ console.error('failed to issue refresh token. status', response.status)
97
+ return
98
+ }
99
+
100
+ const json = await response.json()
101
+ return json
102
+ }
103
+
104
+ async function hel_out_refreshRefreshToken(refreshToken) {
105
+ const formData = new FormData()
106
+ formData.append('grant_type', 'refresh_token')
107
+ formData.append('client_id', vketAccountClientId)
108
+ formData.append('redirect_uri', window.location.href.split('?')[0])
109
+ formData.append('refresh_token', refreshToken)
110
+
111
+ const response = await fetch(`${vketAccountURL}/oauth/token`, {
112
+ method: 'POST',
113
+ body: formData
114
+ })
115
+ if (!response.ok) {
116
+ // eslint-disable-next-line no-console
117
+ console.error('failed to refresh refresh token. status', response.status)
118
+ return
119
+ }
120
+
121
+ const json = await response.json()
122
+ return json
123
+ }
124
+
125
+ async function hel_out_getProfile(accessToken) {
126
+ const response = await fetch(`${vketAccountURL}/api/v1/me`, {
127
+ headers: {
128
+ Authorization: `Bearer ${accessToken}`,
129
+ Accept: 'application/json',
130
+ }
131
+ })
132
+ if (!response.ok) {
133
+ // eslint-disable-next-line no-console
134
+ console.error('failed to refresh refresh token. status', response.status)
135
+ return
136
+ }
137
+
138
+ const json = await response.json()
139
+ window.localStorage.setItem('name', json.name)
140
+ window.localStorage.setItem('name_en', json.name_en)
141
+ window.localStorage.setItem('vket_id', json.vket_id)
142
+
143
+ console.log("profile : " + JSON.stringify(json));
144
+ }
145
+
146
+ function hel_out_updateToken(response) {
147
+ window.localStorage.setItem('refresh-token', response.refresh_token)
148
+ window.localStorage.setItem('token-expires-in', response.expires_in)
149
+ window.localStorage.setItem('token-created-at', response.created_at)
150
+ window.localStorage.setItem('access-token', response.access_token)
151
+ window.localStorage.setItem('id-token', response.id_token)
152
+ }
153
+
@@ -0,0 +1,79 @@
1
+ <!doctype html>
2
+ <html lang="ja">
3
+
4
+ <head>
5
+ <meta charset="utf-8">
6
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
7
+ <meta name="viewport" content="width=device-width, user-scalable=no" />
8
+ <title>License List</title>
9
+ </head>
10
+
11
+ <body>
12
+ <h1>License List</h1>
13
+
14
+ <p>
15
+ Emscripten<br>
16
+ <a href="https://github.com/emscripten-core/emscripten" target="_blank">https://github.com/emscripten-core/emscripten</a>
17
+ <pre>
18
+ Copyright (c) 2010-2014 Emscripten authors, see AUTHORS file.
19
+
20
+ Permission is hereby granted, free of charge, to any person obtaining a copy
21
+ of this software and associated documentation files (the "Software"), to deal
22
+ in the Software without restriction, including without limitation the rights
23
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
24
+ copies of the Software, and to permit persons to whom the Software is
25
+ furnished to do so, subject to the following conditions:
26
+
27
+ The above copyright notice and this permission notice shall be included in
28
+ all copies or substantial portions of the Software.
29
+
30
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
31
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
32
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
33
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
34
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
35
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
36
+ THE SOFTWARE.
37
+ </pre>
38
+ </p>
39
+ <br>
40
+ <p>
41
+ Open Dynamics Engine<br>
42
+ <a href="http://www.ode.org/" target="_blank">http://www.ode.org/</a>
43
+ <pre>
44
+ Open Dynamics Engine
45
+ Copyright (c) 2001-2007, Russell L. Smith.
46
+ All rights reserved.
47
+
48
+ Redistribution and use in source and binary forms, with or without
49
+ modification, are permitted provided that the following conditions
50
+ are met:
51
+
52
+ Redistributions of source code must retain the above copyright notice,
53
+ this list of conditions and the following disclaimer.
54
+
55
+ Redistributions in binary form must reproduce the above copyright notice,
56
+ this list of conditions and the following disclaimer in the documentation
57
+ and/or other materials provided with the distribution.
58
+
59
+ Neither the names of ODE's copyright owner nor the names of its
60
+ contributors may be used to endorse or promote products derived from
61
+ this software without specific prior written permission.
62
+
63
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
64
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
65
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
66
+ FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
67
+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
68
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
69
+ TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
70
+ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
71
+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
72
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
73
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
74
+ </pre>
75
+ </p>
76
+
77
+ </body>
78
+ </html>
79
+
@@ -227,6 +227,7 @@
227
227
  <script type="text/javascript" src="data/heliodor_pre.js"></script>
228
228
  <script type="text/javascript" src="data/heliodor_room.js"></script>
229
229
  <script type="text/javascript" src="data/heliodor.js"></script>
230
+ <script type="text/javascript" src="data/heliodor_vketaccount.js"></script>
230
231
  <script type="text/javascript" src="data/heliodor_front.js"></script>
231
232
  <script type="text/javascript" src="data/heliodor_chatgpt.js"></script>
232
233
  <script src="https://cdn.jsdelivr.net/npm/hls.js@latest"></script>
@@ -0,0 +1,29 @@
1
+ <!doctype html>
2
+ <html lang="ja">
3
+
4
+ <head>
5
+ <meta charset="utf-8">
6
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
7
+ <title>スクリーンショット</title>
8
+
9
+ <script>
10
+ </script>
11
+
12
+ </head>
13
+
14
+ <style>
15
+
16
+ * {
17
+ margin: 0;
18
+ padding: 0;
19
+ }
20
+
21
+ </style>
22
+
23
+ <body>
24
+ <img id="imgSS" style="width:100%;">
25
+ <script>
26
+ document.getElementById('imgSS').src = window.localStorage["ssBase64"];
27
+ </script>
28
+ </body>
29
+ </html>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "com.hikky.vketcloudsdk",
3
- "version": "4.8.10",
3
+ "version": "4.8.12",
4
4
  "displayName": "Vket Cloud SDK",
5
5
  "description": "This is the SDK for creating the world in VketCloud.",
6
6
  "unity": "2019.4",