@yang__yj/pixelstreaming-core 1.0.1 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yang__yj/pixelstreaming-core",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "Frontend library for Unreal Engine 5.3 Pixel Streaming",
5
5
  "main": "dist/lib-pixelstreamingfrontend.js",
6
6
  "module": "dist/lib-pixelstreamingfrontend.esm.js",
@@ -32,6 +32,7 @@
32
32
  "webpack-cli": "^5.0.1"
33
33
  },
34
34
  "dependencies": {
35
+ "element-plus": "^2.14.2",
35
36
  "sdp": "^3.1.0"
36
37
  },
37
38
  "repository": {
@@ -158,25 +158,25 @@ export class TouchController implements ITouchController {
158
158
  // 目前是页面强制横屏 所以触屏的x,y轴都不变,需要转换才能
159
159
  let screen = document.querySelector(".screen");
160
160
  // ue 宽分辨率
161
- let ueWidth = parseInt(
161
+ let ueWidth = Math.floor(
162
162
  screen.getBoundingClientRect().width * window.devicePixelRatio
163
163
  );
164
164
  // ue 高分辨率
165
- let ueHeight = parseInt(
165
+ let ueHeight = Math.floor(
166
166
  screen.getBoundingClientRect().height * window.devicePixelRatio
167
167
  );
168
168
  // 总宽分辨率
169
- let ratioWidth = parseInt(window.screen.width * window.devicePixelRatio);
169
+ let ratioWidth = Math.floor(window.screen.width * window.devicePixelRatio);
170
170
  // 总高分辨率
171
- let ratioHeight = parseInt(window.screen.height * window.devicePixelRatio);
171
+ let ratioHeight = Math.floor(window.screen.height * window.devicePixelRatio);
172
172
  // 计算导航栏的分辨率
173
173
  let headWidth =
174
174
  ratioWidth -
175
- parseInt(document.documentElement.clientWidth * window.devicePixelRatio);
175
+ Math.floor(document.documentElement.clientWidth * window.devicePixelRatio);
176
176
  // 计算导航栏的分辨率
177
177
  let headHeight =
178
178
  ratioHeight -
179
- parseInt(document.documentElement.clientHeight * window.devicePixelRatio);
179
+ Math.floor(document.documentElement.clientHeight * window.devicePixelRatio);
180
180
  // 固定宽
181
181
  let clientWidth = document.querySelector(".screen").clientWidth / ueHeight;
182
182
  // 固定高
@@ -199,13 +199,13 @@ export class TouchController implements ITouchController {
199
199
 
200
200
  x =
201
201
  clientHeight *
202
- (parseInt(touch.clientY * window.devicePixelRatio) -
203
- parseInt((ratioHeight - headHeight - ueHeight) / 2));
202
+ (Math.floor(touch.clientY * window.devicePixelRatio) -
203
+ Math.floor((ratioHeight - headHeight - ueHeight) / 2));
204
204
  y =
205
205
  clientWidth *
206
206
  (ueWidth -
207
- (parseInt(touch.clientX * window.devicePixelRatio) -
208
- parseInt((ratioWidth - ueWidth) / 2)));
207
+ (Math.floor(touch.clientX * window.devicePixelRatio) -
208
+ Math.floor((ratioWidth - ueWidth) / 2)));
209
209
  Logger.Log(
210
210
  Logger.GetStackTrace(),
211
211
  `F${this.fingerIds.get(touch.identifier)}=(${x}, ${y})`,
@@ -250,4 +250,4 @@ export class TouchController implements ITouchController {
250
250
  }
251
251
  }
252
252
  }
253
- }
253
+ }