Browse Source

feat: 升级SDK

master
jiannibang 3 years ago
parent
commit
27c3329dd0
  1. 2
      pages/index/VPASSDK-1.2.4.js
  2. 14
      pages/index/config.js
  3. 19
      pages/index/index.js
  4. 2
      pages/index/index.wxml
  5. BIN
      wasm/module_basic.wasm

2
pages/index/VPASSDK-1.2.2.js → pages/index/VPASSDK-1.2.4.js

File diff suppressed because one or more lines are too long

14
pages/index/config.js

@ -65,19 +65,19 @@ module.exports = {
map_id: 193, map_id: 193,
poi_id: 37, poi_id: 37,
floor_id: "F3", floor_id: "F3",
scale: 9.508664270440235,
scale: 9.698837555834046,
transform_matrix: [ transform_matrix: [
-0.6620496975562061,
-0.7494599327547353,
0.008235364381916726,
0.9999660890627279,
0, 0,
-0.7494599327547353,
0.6620496975562061,
0.9999660890627279,
-0.008235364381916726,
0, 0,
0, 0,
0, 0,
1, 1,
-565.90923423,
-428.06520392,
-741.12613319,
3286.64504679,
0, 0,
], ],
is_park: 0, is_park: 0,

19
pages/index/index.js

@ -1,4 +1,4 @@
import * as VPASSDK from "./VPASSDK-1.2.2.js";
import * as VPASSDK from "./VPASSDK-1.2.4.js";
import { createScopedThreejs } from "threejs-miniprogram"; import { createScopedThreejs } from "threejs-miniprogram";
import { registerGLTFLoader } from "../../loader/gltfLoader"; import { registerGLTFLoader } from "../../loader/gltfLoader";
var THREE; var THREE;
@ -77,23 +77,6 @@ Page({
console.log("点击屏幕x, y:", detail.x, detail.y); console.log("点击屏幕x, y:", detail.x, detail.y);
}, },
touchMove(event) {
if (this.SDK) this.SDK.getScreenCoordinate(event.touches[0]);
},
touchCancel(event) {
if (this.SDK) this.SDK.touchCancel();
},
touchStart() {
console.log("touch Start");
if (this.SDK) this.SDK.touchStart();
},
touchEnd() {
console.log("touch End");
if (this.SDK) this.SDK.touchCancel();
},
setSelectMall() { setSelectMall() {
this.setData({ selectMall: true }); this.setData({ selectMall: true });
}, },

2
pages/index/index.wxml

@ -1,7 +1,7 @@
<view> <view>
<camera wx:if="{{resolution}}" mode="scanCode" device-position="back" flash="{{flash}}" frame-size="{{frameSize}}" style="z-index:0;position:fixed;top:0;width:100%;height:100%;" binderror="handleNoCamera" resolution="{{resolution}}"> <camera wx:if="{{resolution}}" mode="scanCode" device-position="back" flash="{{flash}}" frame-size="{{frameSize}}" style="z-index:0;position:fixed;top:0;width:100%;height:100%;" binderror="handleNoCamera" resolution="{{resolution}}">
</camera> </camera>
<canvas bindtap="clickScreen" bindtouchmove="touchMove" bindtouchcancel="touchCancel" bindtouchstart="touchStart" bindtouchend="touchEnd" style="z-index:1;position:fixed;top:0;width:100%;height:100%;" type="webgl" id="webgl" canvas-id="webgl"></canvas>
<canvas bindtap="clickScreen" style="z-index:1;position:fixed;top:0;width:100%;height:100%;" type="webgl" id="webgl" canvas-id="webgl"></canvas>
</view> </view>
<view> <view>

BIN
wasm/module_basic.wasm

Binary file not shown.
Loading…
Cancel
Save