|
@@ -8,18 +8,7 @@ Component({
|
|
loaded2:false,
|
|
loaded2:false,
|
|
position2:[0,0,0],
|
|
position2:[0,0,0],
|
|
rot:0,
|
|
rot:0,
|
|
- str:"1",
|
|
|
|
-
|
|
|
|
- zhaohuanstate:true,
|
|
|
|
- paizhaostate:false,
|
|
|
|
- luxiangstate:false,
|
|
|
|
- isStartluxiang:true,
|
|
|
|
- isCloseluxiang:false,
|
|
|
|
-
|
|
|
|
- captureState: 0,
|
|
|
|
- recordState: 0,
|
|
|
|
- captureQuality: 0.8,
|
|
|
|
- captureType: 'jpg',
|
|
|
|
|
|
+ str:"1"
|
|
|
|
|
|
},
|
|
},
|
|
lifetimes: {
|
|
lifetimes: {
|
|
@@ -31,7 +20,7 @@ Component({
|
|
handleReady: function ({detail}) {
|
|
handleReady: function ({detail}) {
|
|
const xrScene = this.scene = detail.value;
|
|
const xrScene = this.scene = detail.value;
|
|
console.log('xr-scene', xrScene);
|
|
console.log('xr-scene', xrScene);
|
|
-
|
|
|
|
|
|
+
|
|
this.binglong = {el:this.scene.getElementById('binglong')};
|
|
this.binglong = {el:this.scene.getElementById('binglong')};
|
|
},
|
|
},
|
|
handleAssetsProgress: function({detail}) {
|
|
handleAssetsProgress: function({detail}) {
|
|
@@ -83,7 +72,6 @@ Component({
|
|
console.log('animation Stop');
|
|
console.log('animation Stop');
|
|
},
|
|
},
|
|
handleGLTFLoadedbingLong:function({detail}){
|
|
handleGLTFLoadedbingLong:function({detail}){
|
|
-
|
|
|
|
const el2 = detail.value;
|
|
const el2 = detail.value;
|
|
const el = detail.value.target;
|
|
const el = detail.value.target;
|
|
const animator = el.getComponent("animator");
|
|
const animator = el.getComponent("animator");
|
|
@@ -103,94 +91,21 @@ Component({
|
|
}else{
|
|
}else{
|
|
state = true;
|
|
state = true;
|
|
animator.play("ui_motion_1");
|
|
animator.play("ui_motion_1");
|
|
- // position ="0 -5.5 -40";
|
|
|
|
- }
|
|
|
|
- }, 5000);
|
|
|
|
- },
|
|
|
|
- handleTouchModel: function ({detail}) {
|
|
|
|
- const {target} = detail.value;
|
|
|
|
- const id = target.id;
|
|
|
|
-
|
|
|
|
- wx.showToast({title: `点击了模型: ${id}`});
|
|
|
|
- },
|
|
|
|
- clickZhaoHuan(e){
|
|
|
|
- this.setData({zhaohuanstate:true});
|
|
|
|
- this.setData({paizhaostate:false});
|
|
|
|
- this.setData({luxiangstate:false});
|
|
|
|
- this.setData({isStartluxiang:false});
|
|
|
|
- },
|
|
|
|
- clickPaiZhao(e){
|
|
|
|
- this.setData({zhaohuanstate:false});
|
|
|
|
- this.setData({paizhaostate:true});
|
|
|
|
- this.setData({luxiangstate:false});
|
|
|
|
- this.setData({isStartluxiang:false});
|
|
|
|
-
|
|
|
|
-
|
|
|
|
- },
|
|
|
|
- clickLuXiang(e){
|
|
|
|
- this.setData({luxiangstate:true});
|
|
|
|
- this.setData({zhaohuanstate:false});
|
|
|
|
- this.setData({paizhaostate:false});
|
|
|
|
- },
|
|
|
|
- ClickzhaohuanSS(e){
|
|
|
|
- this.setData({zhaohuanstate:false});
|
|
|
|
- },
|
|
|
|
- Clickpaizhao(e){
|
|
|
|
- this.setData({paizhaostate:false});
|
|
|
|
- // this.capture();
|
|
|
|
- this.scene.share.captureToFriends({
|
|
|
|
- fileType: 'png',
|
|
|
|
- quality: 0.8
|
|
|
|
- });
|
|
|
|
-
|
|
|
|
- //const base64 = scene.share.captureToDataURL();
|
|
|
|
- /*if(supported){
|
|
|
|
- // 判断当前客户端是否支持分享系统
|
|
|
|
- // const supported = scene.share.supported;
|
|
|
|
- await this.scene.share.captureToFriends({
|
|
|
|
- fileType: this.data.captureType,
|
|
|
|
- quality: this.data.captureQuality
|
|
|
|
- });
|
|
|
|
- }*/
|
|
|
|
-
|
|
|
|
- },
|
|
|
|
- Clickstartluxiang(e){
|
|
|
|
-
|
|
|
|
- this.setData({isStartluxiang:true});
|
|
|
|
- this.StartRecord();
|
|
|
|
- },
|
|
|
|
- Clickcloseluxiang(e){
|
|
|
|
-
|
|
|
|
- this.setData({isStartluxiang:false});
|
|
|
|
- this.CloseRecord();
|
|
|
|
- },
|
|
|
|
- /* async capture(){
|
|
|
|
- await this.scene.share.captureToFriends({
|
|
|
|
- fileType: 'png',
|
|
|
|
- quality: 0.8
|
|
|
|
- });
|
|
|
|
- },*/
|
|
|
|
- capture() {
|
|
|
|
- this.scene.share.captureToFriends({
|
|
|
|
- fileType: 'jpg',
|
|
|
|
- quality: 0.8
|
|
|
|
- });
|
|
|
|
- },
|
|
|
|
- async StartRecord(){
|
|
|
|
- await this.scene.share.recordStart({
|
|
|
|
- fps: 30,
|
|
|
|
- width: scene.width,
|
|
|
|
- height: scene.height,
|
|
|
|
- videoBitsPerSecond: 20
|
|
|
|
- });
|
|
|
|
- },
|
|
|
|
- async CloseRecord(){
|
|
|
|
- await this.scene.share.recordFinishToAlbum({
|
|
|
|
- fps: 30,
|
|
|
|
- width: scene.width,
|
|
|
|
- height: scene.height,
|
|
|
|
- videoBitsPerSecond: 20
|
|
|
|
- });
|
|
|
|
- },
|
|
|
|
|
|
+ el2.position =(0 -2.5 -40);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ }, 5000)
|
|
|
|
+ var interval2 = setInterval(function() {
|
|
|
|
+ if(false)
|
|
|
|
+ {
|
|
|
|
+ clearInterval(interval2);
|
|
|
|
+ }
|
|
|
|
+ console.log(5000 +" 毫秒更新");
|
|
|
|
+ binglong.position =(0 -2.5 -40);
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ }, 5000)
|
|
|
|
+
|
|
|
|
+ }
|
|
}
|
|
}
|
|
})
|
|
})
|