فهرست منبع

添加烟花 修改传参id

DGJ 1 سال پیش
والد
کامیت
038ee3fbff

+ 1 - 1
miniprogram/app.json

@@ -1,6 +1,6 @@
 {
   "pages": [
-    "pages/index/index",
+   
     "pages/ar-classic/scene-classic-show/index",
     "pages/ar-classic/scene-classic-showsix/index",
     "pages/ar-classic/scene-classic-saomiao/index",

+ 1 - 1
miniprogram/assets/animation/kun-long-animation.json

@@ -59,7 +59,7 @@
     },
     "parent4": {
       "keyframe": "parent",
-      "duration": 60,
+      "duration": 100,
       "ease": "linear",
       "loop": -1
     },

+ 1 - 1
miniprogram/assets/animation/kun-long-ni-animation.json

@@ -59,7 +59,7 @@
     },
     "parent4": {
       "keyframe": "parent",
-      "duration": 60,
+      "duration": 10,
       "ease": "linear",
       "loop": -1
     },

+ 107 - 4
miniprogram/components/xr-classic-show/index.js

@@ -200,6 +200,109 @@ Component({
       //可以规定多个子发射器的阵列
       tempSystem3.subEmitters = [subEmitter3]
 
+      const fireworkField4 = xrScene.getElementById("firework4");
+      const tempSystem4 = fireworkField4.getComponent('custom-particle')
+      tempSystem4.addSizeGradient(0,0.2);
+      tempSystem4.addSizeGradient(3,1);
+      var myData4 ={}
+      myData4 = {
+        "capacity": 100,
+        "emitRate": 0,  //子发射器不进行每秒发射
+        "burstCount": 100, // 一次爆发200粒子
+        "burstTime": 0.1, // 爆发延时为0
+        "burstCycle": 1, // 发射一次
+        "size":[0.05],
+        "startColor":[1,0.5,0.8,1],
+        "endColor":[1,1,1,0],
+        "emitterType":"SphereShape",
+        "emitterProps": [["radius","0.5"]],
+        "lifeTime":[1], // 粒子生命周期为3秒
+        "stopDuration":[2], // 子发射器生命周期为3秒
+        "speed":"2",
+        "texture":"flarePicture"
+      }
+      var subEmitter4 = tempSystem4.createSubEmitter(myData4)
+      subEmitter4.state = 1 // 设置为1为当粒子消失后出现作用子发射器
+      //可以规定多个子发射器的阵列
+      tempSystem4.subEmitters = [subEmitter4]
+
+      const fireworkField5 = xrScene.getElementById("firework5");
+      const tempSystem5 = fireworkField5.getComponent('custom-particle')
+      tempSystem5.addSizeGradient(0,0.2);
+      tempSystem5.addSizeGradient(3,1);
+      var myData5 ={}
+      myData5 = {
+        "capacity": 100,
+        "emitRate": 0,  //子发射器不进行每秒发射
+        "burstCount": 100, // 一次爆发200粒子
+        "burstTime": 0.1, // 爆发延时为0
+        "burstCycle": 1, // 发射一次
+        "size":[0.05],
+        "startColor":[1,1,0.5,1],
+        "endColor":[1,1,1,0],
+        "emitterType":"SphereShape",
+        "emitterProps": [["radius","0.5"]],
+        "lifeTime":[1], // 粒子生命周期为3秒
+        "stopDuration":[2], // 子发射器生命周期为3秒
+        "speed":"2",
+        "texture":"flarePicture"
+      }
+      var subEmitter5 = tempSystem5.createSubEmitter(myData5)
+      subEmitter5.state = 1 // 设置为1为当粒子消失后出现作用子发射器
+      //可以规定多个子发射器的阵列
+      tempSystem5.subEmitters = [subEmitter5]
+
+      const fireworkField6 = xrScene.getElementById("firework6");
+      const tempSystem6 = fireworkField6.getComponent('custom-particle')
+      tempSystem6.addSizeGradient(0,0.2);
+      tempSystem6.addSizeGradient(3,1);
+      var myData6 ={}
+      myData6= {
+        "capacity": 100,
+        "emitRate": 0,  //子发射器不进行每秒发射
+        "burstCount": 100, // 一次爆发200粒子
+        "burstTime": 0.1, // 爆发延时为0
+        "burstCycle": 1, // 发射一次
+        "size":[0.05],
+        "startColor":[1,0.3,0.1,1],
+        "endColor":[1,1,1,0],
+        "emitterType":"SphereShape",
+        "emitterProps": [["radius","0.5"]],
+        "lifeTime":[1], // 粒子生命周期为3秒
+        "stopDuration":[2], // 子发射器生命周期为3秒
+        "speed":"2",
+        "texture":"flarePicture"
+      }
+      var subEmitter6 = tempSystem6.createSubEmitter(myData6)
+      subEmitter6.state = 1 // 设置为1为当粒子消失后出现作用子发射器
+      //可以规定多个子发射器的阵列
+      tempSystem6.subEmitters = [subEmitter6]
+
+      const fireworkField7 = xrScene.getElementById("firework7");
+      const tempSystem7 = fireworkField7.getComponent('custom-particle')
+      tempSystem7.addSizeGradient(0,0.2);
+      tempSystem7.addSizeGradient(3,1);
+      var myData7 ={}
+      myData7 = {
+        "capacity": 100,
+        "emitRate": 0,  //子发射器不进行每秒发射
+        "burstCount": 100, // 一次爆发200粒子
+        "burstTime": 0.1, // 爆发延时为0
+        "burstCycle": 1, // 发射一次
+        "size":[0.05],
+        "startColor":[1,1,0.5,1],
+        "endColor":[1,1,1,0],
+        "emitterType":"SphereShape",
+        "emitterProps": [["radius","0.5"]],
+        "lifeTime":[1], // 粒子生命周期为3秒
+        "stopDuration":[2], // 子发射器生命周期为3秒
+        "speed":"2",
+        "texture":"flarePicture"
+      }
+      var subEmitter7 = tempSystem7.createSubEmitter(myData7)
+      subEmitter7.state = 1 // 设置为1为当粒子消失后出现作用子发射器
+      //可以规定多个子发射器的阵列
+      tempSystem7.subEmitters = [subEmitter7]
     },
     handleAssetsProgress: function({detail}) {
       this.triggerEvent('assetsProgress', detail.value);
@@ -328,17 +431,17 @@ Component({
     ShowModel(modelIndex){
       console.log(' ShowMoelIndex ',modelIndex);
       switch(modelIndex){
-        case 0:
+        case 1:
           this.setData({luanniaoShow:true});
         
           break;
-        case 1:
+        case 2:
           this.setData({yinglongShow:true});
           break;
-        case 2:
+        case 3:
           this.setData({fuzhuShow:true});
           break;
-        case 3:
+        case 4:
            this.setData({nianshouShow:true});
            break;
       }

+ 51 - 30
miniprogram/components/xr-classic-show/index.wxml

@@ -1,5 +1,5 @@
 <xr-scene ar-system="modes:threeDof ; planeMode: 1;" bind:ready="handleReady" bind:ar-ready="handleARReady">
-  
+   
   <xr-assets bind:progress="handleAssetsProgress" bind:loaded="handleAssetsLoaded">
     <xr-asset-load type="gltf" asset-id="gltf-kun" src="https://wx-model-1317557471.cos.ap-shanghai.myqcloud.com/WXModel/kun_0128.glb" />
 
@@ -17,8 +17,7 @@
 
     <xr-asset-load asset-id="anim" type="keyframe" src="/assets/animation/miku-kawaii-animation.json"/>  
     <xr-asset-load asset-id="anim_kun_long" type="keyframe" src="/assets/animation/kun-long-animation.json"/>  
-    <xr-asset-load asset-id="anim_kun_long_ni" type="keyframe" src="/assets/animation/kun-long-ni-animation.json"/>  
-    <xr-asset-load asset-id="anim_lu" type="keyframe" src="/assets/animation/lu-animation.json"/>  
+    <xr-asset-load asset-id="anim_kun_long_ni" type="keyframe" src="/assets/animation/kun-long-ni-animation.json"/>   
     <xr-asset-load asset-id="anim_nianshou" type="keyframe" src="/assets/animation/nianshou-animation.json"/>  
 
     <xr-asset-load type="texture" asset-id="particle-texture" src="https://mmbizwxaminiprogram-1258344707.cos.ap-guangzhou.myqcloud.com/xr-frame/demo/particles/point.png" />
@@ -31,19 +30,19 @@
     
     
       <xr-gltf 
-    id="denglong" node-id="denglong" scale="1 1 1" position="-0.5 3 -3" rotation="0 -100 0"   model="gltf-denglong" anim-autoplay  />
+    id="denglong" node-id="denglong" scale="1 1 1" position="-15 13 -15" rotation="0 -100 0"   model="gltf-denglong" anim-autoplay  />
 
     <xr-gltf 
-    id="denglong" node-id="denglong" scale="1 1 1" position="-2.5 3 -2" rotation="0 -100 0"   model="gltf-denglong" anim-autoplay  />
+    id="denglong" node-id="denglong" scale="1 1 1" position="15 12 -20" rotation="0 -100 0"   model="gltf-denglong" anim-autoplay  />
 
     <xr-gltf 
-    id="denglong" node-id="denglong" scale="1 1 1" position="2.5 3 -3" rotation="0 -100 0"   model="gltf-denglong" anim-autoplay  />
+    id="denglong" node-id="denglong" scale="1 1 1" position="12 11 -30" rotation="0 -100 0"   model="gltf-denglong" anim-autoplay  />
 
     <xr-gltf 
-    id="denglong" node-id="denglong" scale="1 1 1" position="-0.5 3 -5" rotation="0 -100 0"   model="gltf-denglong" anim-autoplay  />
+    id="denglong" node-id="denglong" scale="1 1 1" position="-5.5 10 -5" rotation="0 -100 0"   model="gltf-denglong" anim-autoplay  />
 
     <xr-gltf 
-    id="denglong" node-id="denglong" scale="1 1 1" position="-0.5 3 5" rotation="0 -100 0"   model="gltf-denglong" anim-autoplay  />
+    id="denglong" node-id="denglong" scale="1 1 1" position="5.5 9 8" rotation="0 -100 0"   model="gltf-denglong" anim-autoplay  />
 
    
 
@@ -73,56 +72,56 @@
 
     </xr-node>
 
-    <xr-node position="40 2 0" anim-keyframe="anim_nianshou" anim-autoplay="clip:parent">
+    <xr-node position="20 0 -20" anim-keyframe="anim_nianshou" anim-autoplay="clip:parent">
       <xr-node position="0 0 -10" rotation="0 0 0">
         <xr-gltf 
-    wx:if="false"
+    wx:if="{{nianshouShow}}"
     id="qiling" node-id="qiling" scale="10 10 10" position="0 0 0" rotation="0 90 0"   model="gltf-qiling" anim-autoplay  />
 
       </xr-node>
     </xr-node>
     
-    <xr-node position="-40 2 0" anim-keyframe="anim_kun_long_ni" anim-autoplay="clip:parent4">
+    <xr-node position="-25 -3 -35" anim-keyframe="anim_kun_long_ni" anim-autoplay="clip:parent4">
       <xr-node position="0 0 -10" rotation="0 0 0">
         <xr-gltf 
-    wx:if="false"
-    id="fuzhu" node-id="fuzhu" scale="0.1 0.1 0.1" position="0 0 0" rotation="0 90 0"   model="gltf-fuzhu" anim-autoplay  />
+    wx:if="{{fuzhuShow}}"
+    id="fuzhu" node-id="fuzhu" scale="0.2 0.2 0.2" position="0 0 0" rotation="0 90 0"   model="gltf-fuzhu" anim-autoplay  />
 
       </xr-node>
     </xr-node>
 
 
-    <xr-node position="-30 4 30" anim-keyframe="anim_kun_long_ni" anim-autoplay="clip:parent3">
-      <xr-node position="0 0 -30" rotation="0 0 0">
+    <xr-node position="30 30 -30" anim-keyframe="anim_kun_long_ni" anim-autoplay="clip:parent3">
+      <xr-node position="0 0 -15" rotation="0 0 0">
         <xr-gltf 
-   
-    id="luanniao" node-id="luanniao" scale="2 2 2" position="0 0 0" rotation="0 180 0"   model="gltf-luanniao" anim-autoplay  />
+        wx:if="{{luanniaoShow}}"
+    id="luanniao" node-id="luanniao" scale="5 5 5" position="0 0 0" rotation="0 180 0"   model="gltf-luanniao" anim-autoplay  />
       </xr-node>
     </xr-node>
 
-    <xr-node position="30 4 30" anim-keyframe="anim" anim-autoplay="clip:parent">
-      <xr-node position="0 0 -30" rotation="0 0 0" anim-keyframe="anim" anim-autoplay="clip:child">
+    <xr-node position="-30 32 -35" anim-keyframe="anim" anim-autoplay="clip:parent">
+      <xr-node position="0 0 -25" rotation="0 0 0" anim-keyframe="anim" anim-autoplay="clip:child">
         <xr-gltf 
-    wx:if="false"
-    id="YinLong" node-id="YinLong" scale="0.03 0.03 0.03" position="0 0 0" rotation="0 90 0"   model="gltf-YinLong" anim-autoplay  />
+    wx:if="{{yinglongShow}}"
+    id="YinLong" node-id="YinLong" scale="0.06 0.06 0.06" position="0 0 0" rotation="0 90 0"   model="gltf-YinLong" anim-autoplay  />
       </xr-node>
     </xr-node>
     
 
-    <xr-node position="0 2 0" anim-keyframe="anim_kun_long_ni" anim-autoplay="clip:parent3">
-      <xr-node position="0 0 30" rotation="0 0 0">
+    <xr-node position="-40 25 -45" anim-keyframe="anim_kun_long_ni" anim-autoplay="clip:parent3">
+      <xr-node position="0 0 10" rotation="0 0 0">
         <xr-gltf id="kun" node-id="kun" scale="0.05 0.05 0.05" position="0 0 0" rotation="0 -90 0"   model="gltf-kun" anim-autoplay />
       </xr-node>
     </xr-node>
 
-    <xr-node position="0 3 0" anim-keyframe="anim_kun_long" anim-autoplay="clip:parent4">
-      <xr-node position="0 0 -40" rotation="0 0 0">
+    <xr-node position="40 29 -45" anim-keyframe="anim_kun_long" anim-autoplay="clip:parent4">
+      <xr-node position="0 0 -20" rotation="0 0 0">
         <xr-gltf id="Jiaolong" node-id="Jiaolong" scale="3 3 3" position="0 0 0" rotation="0 90 0"   model="gltf-Jiaolong" anim-autoplay  />
       </xr-node>
     </xr-node>
 
-      <xr-node position="4.3 10 -15" anim-keyframe="anim" anim-autoplay="clip:parent">
-      <xr-node position="0 0 -5" rotation="0 0 0" anim-keyframe="anim" anim-autoplay="clip:child">
+      <xr-node position="0 25 -45" anim-keyframe="anim" anim-autoplay="clip:parent">
+      <xr-node position="0 0 -10" rotation="0 0 0" anim-keyframe="anim" anim-autoplay="clip:child">
         <xr-gltf position="0 0 0"  scale="0.01 0.01 0.01" rotation="0 180 0" model="gltf-birdslow" anim-keyframe="anim" anim-autoplay></xr-gltf>
       </xr-node>
 
@@ -164,17 +163,37 @@
     </xr-node>-->
 
     <xr-node>
-      <xr-custom-particle id="firework" emitter-type="SphereShape" emitter-props="radius:1,arc:0.5" position="0 13 -20" start-color="1 0 0 1" end-color="1 1 0 1"  burstCount="1" capacity="2" speed="3.4 3.8" size="0" emit-rate="2" life-time="1" angle="0"  
+      <xr-custom-particle id="firework" emitter-type="SphereShape" emitter-props="radius:1,arc:0.5" position="1 20 -30" start-color="1 1 0 1" end-color="1 0 0 1"  burstCount="1" capacity="2" speed="3.4 3.8" size="0" emit-rate="2" life-time="1" angle="0"  
         rotation="0 0 90"
         texture="particle-texture">
     </xr-custom-particle>
 
-    <xr-custom-particle id="firework2" emitter-type="SphereShape" emitter-props="radius:1,arc:0.5" position="0 13 -20" start-color="1 0 0 1" end-color="1 1 0 1"  burstCount="1" capacity="2" speed="3.4 3.8" size="0" emit-rate="2" life-time="1" angle="0"  
+    <xr-custom-particle id="firework2" emitter-type="SphereShape" emitter-props="radius:1,arc:0.5" position="8 12 -25" start-color="1 0 0 1" end-color="1 1 0 1"  burstCount="1" capacity="2" speed="3.4 3.8" size="0" emit-rate="2" life-time="1" angle="0"  
         rotation="0 0 90"
         texture="particle-texture">
     </xr-custom-particle>
 
-    <xr-custom-particle id="firework3" emitter-type="SphereShape" emitter-props="radius:1,arc:0.5" position="0 13 -20" start-color="1 0 0 1" end-color="1 1 0 1"  burstCount="1" capacity="2" speed="3.4 3.8" size="0" emit-rate="2" life-time="1" angle="0"  
+    <xr-custom-particle id="firework3" emitter-type="SphereShape" emitter-props="radius:1,arc:0.5" position="-8 10 -20" start-color="1 1 0 1" end-color="1 0 0 1"  burstCount="1" capacity="2" speed="3.4 3.8" size="0" emit-rate="2" life-time="1" angle="0"  
+        rotation="0 0 90"
+        texture="particle-texture">
+    </xr-custom-particle>
+
+    <xr-custom-particle id="firework4" emitter-type="SphereShape" emitter-props="radius:1,arc:0.5" position="-20 14 -15" start-color="1 0 0 1" end-color="1 1 0 1"  burstCount="1" capacity="2" speed="3.4 3.8" size="0" emit-rate="2" life-time="1" angle="0"  
+        rotation="0 0 90"
+        texture="particle-texture">
+    </xr-custom-particle>
+
+    <xr-custom-particle id="firework5" emitter-type="SphereShape" emitter-props="radius:1,arc:0.5" position="5 15 -15" start-color="1 0 0 1" end-color="1 1 0 1"  burstCount="1" capacity="2" speed="3.4 3.8" size="0" emit-rate="2" life-time="1" angle="0"  
+        rotation="0 0 90"
+        texture="particle-texture">
+    </xr-custom-particle>
+
+    <xr-custom-particle id="firework6" emitter-type="SphereShape" emitter-props="radius:1,arc:0.5" position="15 16 -5" start-color="1 1 0 1" end-color="1 0 0 1"  burstCount="1" capacity="2" speed="3.4 3.8" size="0" emit-rate="2" life-time="1" angle="0"  
+        rotation="0 0 90"
+        texture="particle-texture">
+    </xr-custom-particle>
+
+    <xr-custom-particle id="firework7" emitter-type="SphereShape" emitter-props="radius:1,arc:0.5" position="-15 18 -5" start-color="1 0 0 1" end-color="1 1 0 1"  burstCount="1" capacity="2" speed="3.4 3.8" size="0" emit-rate="2" life-time="1" angle="0"  
         rotation="0 0 90"
         texture="particle-texture">
     </xr-custom-particle>
@@ -194,6 +213,8 @@
   </xr-node>
 
 
+
+
 </xr-scene>
 
 

+ 107 - 4
miniprogram/components/xr-classic-showsix/index.js

@@ -200,6 +200,109 @@ Component({
       //可以规定多个子发射器的阵列
       tempSystem3.subEmitters = [subEmitter3]
 
+      const fireworkField4 = xrScene.getElementById("firework4");
+      const tempSystem4 = fireworkField4.getComponent('custom-particle')
+      tempSystem4.addSizeGradient(0,0.2);
+      tempSystem4.addSizeGradient(3,1);
+      var myData4 ={}
+      myData4 = {
+        "capacity": 100,
+        "emitRate": 0,  //子发射器不进行每秒发射
+        "burstCount": 100, // 一次爆发200粒子
+        "burstTime": 0.1, // 爆发延时为0
+        "burstCycle": 1, // 发射一次
+        "size":[0.05],
+        "startColor":[1,0.5,0.8,1],
+        "endColor":[1,1,1,0],
+        "emitterType":"SphereShape",
+        "emitterProps": [["radius","0.5"]],
+        "lifeTime":[1], // 粒子生命周期为3秒
+        "stopDuration":[2], // 子发射器生命周期为3秒
+        "speed":"2",
+        "texture":"flarePicture"
+      }
+      var subEmitter4 = tempSystem4.createSubEmitter(myData4)
+      subEmitter4.state = 1 // 设置为1为当粒子消失后出现作用子发射器
+      //可以规定多个子发射器的阵列
+      tempSystem4.subEmitters = [subEmitter4]
+
+      const fireworkField5 = xrScene.getElementById("firework5");
+      const tempSystem5 = fireworkField5.getComponent('custom-particle')
+      tempSystem5.addSizeGradient(0,0.2);
+      tempSystem5.addSizeGradient(3,1);
+      var myData5 ={}
+      myData5 = {
+        "capacity": 100,
+        "emitRate": 0,  //子发射器不进行每秒发射
+        "burstCount": 100, // 一次爆发200粒子
+        "burstTime": 0.1, // 爆发延时为0
+        "burstCycle": 1, // 发射一次
+        "size":[0.05],
+        "startColor":[1,1,0.5,1],
+        "endColor":[1,1,1,0],
+        "emitterType":"SphereShape",
+        "emitterProps": [["radius","0.5"]],
+        "lifeTime":[1], // 粒子生命周期为3秒
+        "stopDuration":[2], // 子发射器生命周期为3秒
+        "speed":"2",
+        "texture":"flarePicture"
+      }
+      var subEmitter5 = tempSystem5.createSubEmitter(myData5)
+      subEmitter5.state = 1 // 设置为1为当粒子消失后出现作用子发射器
+      //可以规定多个子发射器的阵列
+      tempSystem5.subEmitters = [subEmitter5]
+
+      const fireworkField6 = xrScene.getElementById("firework6");
+      const tempSystem6 = fireworkField6.getComponent('custom-particle')
+      tempSystem6.addSizeGradient(0,0.2);
+      tempSystem6.addSizeGradient(3,1);
+      var myData6 ={}
+      myData6= {
+        "capacity": 100,
+        "emitRate": 0,  //子发射器不进行每秒发射
+        "burstCount": 100, // 一次爆发200粒子
+        "burstTime": 0.1, // 爆发延时为0
+        "burstCycle": 1, // 发射一次
+        "size":[0.05],
+        "startColor":[1,0.3,0.1,1],
+        "endColor":[1,1,1,0],
+        "emitterType":"SphereShape",
+        "emitterProps": [["radius","0.5"]],
+        "lifeTime":[1], // 粒子生命周期为3秒
+        "stopDuration":[2], // 子发射器生命周期为3秒
+        "speed":"2",
+        "texture":"flarePicture"
+      }
+      var subEmitter6 = tempSystem6.createSubEmitter(myData6)
+      subEmitter6.state = 1 // 设置为1为当粒子消失后出现作用子发射器
+      //可以规定多个子发射器的阵列
+      tempSystem6.subEmitters = [subEmitter6]
+
+      const fireworkField7 = xrScene.getElementById("firework7");
+      const tempSystem7 = fireworkField7.getComponent('custom-particle')
+      tempSystem7.addSizeGradient(0,0.2);
+      tempSystem7.addSizeGradient(3,1);
+      var myData7 ={}
+      myData7 = {
+        "capacity": 100,
+        "emitRate": 0,  //子发射器不进行每秒发射
+        "burstCount": 100, // 一次爆发200粒子
+        "burstTime": 0.1, // 爆发延时为0
+        "burstCycle": 1, // 发射一次
+        "size":[0.05],
+        "startColor":[1,1,0.5,1],
+        "endColor":[1,1,1,0],
+        "emitterType":"SphereShape",
+        "emitterProps": [["radius","0.5"]],
+        "lifeTime":[1], // 粒子生命周期为3秒
+        "stopDuration":[2], // 子发射器生命周期为3秒
+        "speed":"2",
+        "texture":"flarePicture"
+      }
+      var subEmitter7 = tempSystem7.createSubEmitter(myData7)
+      subEmitter7.state = 1 // 设置为1为当粒子消失后出现作用子发射器
+      //可以规定多个子发射器的阵列
+      tempSystem7.subEmitters = [subEmitter7]
     },
     handleAssetsProgress: function({detail}) {
       this.triggerEvent('assetsProgress', detail.value);
@@ -328,17 +431,17 @@ Component({
     ShowModel(modelIndex){
       console.log(' ShowMoelIndex ',modelIndex);
       switch(modelIndex){
-        case 0:
+        case 1:
           this.setData({luanniaoShow:true});
         
           break;
-        case 1:
+        case 2:
           this.setData({yinglongShow:true});
           break;
-        case 2:
+        case 3:
           this.setData({fuzhuShow:true});
           break;
-        case 3:
+        case 4:
            this.setData({nianshouShow:true});
            break;
       }

+ 51 - 30
miniprogram/components/xr-classic-showsix/index.wxml

@@ -1,6 +1,6 @@
 <xr-scene ar-system="modes:Plane ; planeMode: 1;" bind:ready="handleReady" bind:ar-ready="handleARReady">
 
- 
+  
   <xr-assets bind:progress="handleAssetsProgress" bind:loaded="handleAssetsLoaded">
     <xr-asset-load type="gltf" asset-id="gltf-kun" src="https://wx-model-1317557471.cos.ap-shanghai.myqcloud.com/WXModel/kun_0128.glb" />
 
@@ -18,8 +18,7 @@
 
     <xr-asset-load asset-id="anim" type="keyframe" src="/assets/animation/miku-kawaii-animation.json"/>  
     <xr-asset-load asset-id="anim_kun_long" type="keyframe" src="/assets/animation/kun-long-animation.json"/>  
-    <xr-asset-load asset-id="anim_kun_long_ni" type="keyframe" src="/assets/animation/kun-long-ni-animation.json"/>  
-    <xr-asset-load asset-id="anim_lu" type="keyframe" src="/assets/animation/lu-animation.json"/>  
+    <xr-asset-load asset-id="anim_kun_long_ni" type="keyframe" src="/assets/animation/kun-long-ni-animation.json"/>   
     <xr-asset-load asset-id="anim_nianshou" type="keyframe" src="/assets/animation/nianshou-animation.json"/>  
 
     <xr-asset-load type="texture" asset-id="particle-texture" src="https://mmbizwxaminiprogram-1258344707.cos.ap-guangzhou.myqcloud.com/xr-frame/demo/particles/point.png" />
@@ -32,19 +31,19 @@
     
     
       <xr-gltf 
-    id="denglong" node-id="denglong" scale="1 1 1" position="-0.5 3 -3" rotation="0 -100 0"   model="gltf-denglong" anim-autoplay  />
+    id="denglong" node-id="denglong" scale="1 1 1" position="-15 13 -15" rotation="0 -100 0"   model="gltf-denglong" anim-autoplay  />
 
     <xr-gltf 
-    id="denglong" node-id="denglong" scale="1 1 1" position="-2.5 3 -2" rotation="0 -100 0"   model="gltf-denglong" anim-autoplay  />
+    id="denglong" node-id="denglong" scale="1 1 1" position="15 12 -20" rotation="0 -100 0"   model="gltf-denglong" anim-autoplay  />
 
     <xr-gltf 
-    id="denglong" node-id="denglong" scale="1 1 1" position="2.5 3 -3" rotation="0 -100 0"   model="gltf-denglong" anim-autoplay  />
+    id="denglong" node-id="denglong" scale="1 1 1" position="12 11 -30" rotation="0 -100 0"   model="gltf-denglong" anim-autoplay  />
 
     <xr-gltf 
-    id="denglong" node-id="denglong" scale="1 1 1" position="-0.5 3 -5" rotation="0 -100 0"   model="gltf-denglong" anim-autoplay  />
+    id="denglong" node-id="denglong" scale="1 1 1" position="-5.5 10 -5" rotation="0 -100 0"   model="gltf-denglong" anim-autoplay  />
 
     <xr-gltf 
-    id="denglong" node-id="denglong" scale="1 1 1" position="-0.5 3 5" rotation="0 -100 0"   model="gltf-denglong" anim-autoplay  />
+    id="denglong" node-id="denglong" scale="1 1 1" position="5.5 9 8" rotation="0 -100 0"   model="gltf-denglong" anim-autoplay  />
 
    
 
@@ -74,56 +73,56 @@
 
     </xr-node>
 
-    <xr-node position="40 2 0" anim-keyframe="anim_nianshou" anim-autoplay="clip:parent">
+    <xr-node position="20 0 -20" anim-keyframe="anim_nianshou" anim-autoplay="clip:parent">
       <xr-node position="0 0 -10" rotation="0 0 0">
         <xr-gltf 
-    wx:if="false"
+    wx:if="{{nianshouShow}}"
     id="qiling" node-id="qiling" scale="10 10 10" position="0 0 0" rotation="0 90 0"   model="gltf-qiling" anim-autoplay  />
 
       </xr-node>
     </xr-node>
     
-    <xr-node position="-40 2 0" anim-keyframe="anim_kun_long_ni" anim-autoplay="clip:parent4">
+    <xr-node position="-25 -3 -35" anim-keyframe="anim_kun_long_ni" anim-autoplay="clip:parent4">
       <xr-node position="0 0 -10" rotation="0 0 0">
         <xr-gltf 
-    wx:if="false"
-    id="fuzhu" node-id="fuzhu" scale="0.1 0.1 0.1" position="0 0 0" rotation="0 90 0"   model="gltf-fuzhu" anim-autoplay  />
+    wx:if="{{fuzhuShow}}"
+    id="fuzhu" node-id="fuzhu" scale="0.2 0.2 0.2" position="0 0 0" rotation="0 90 0"   model="gltf-fuzhu" anim-autoplay  />
 
       </xr-node>
     </xr-node>
 
 
-    <xr-node position="-30 4 30" anim-keyframe="anim_kun_long_ni" anim-autoplay="clip:parent3">
-      <xr-node position="0 0 -30" rotation="0 0 0">
+    <xr-node position="30 30 -30" anim-keyframe="anim_kun_long_ni" anim-autoplay="clip:parent3">
+      <xr-node position="0 0 -15" rotation="0 0 0">
         <xr-gltf 
-   
-    id="luanniao" node-id="luanniao" scale="2 2 2" position="0 0 0" rotation="0 180 0"   model="gltf-luanniao" anim-autoplay  />
+        wx:if="{{luanniaoShow}}"
+    id="luanniao" node-id="luanniao" scale="5 5 5" position="0 0 0" rotation="0 180 0"   model="gltf-luanniao" anim-autoplay  />
       </xr-node>
     </xr-node>
 
-    <xr-node position="30 4 30" anim-keyframe="anim_kun_long" anim-autoplay="clip:parent4">
-      <xr-node position="0 0 -30" rotation="0 0 0" anim-keyframe="anim" anim-autoplay="clip:child">
+    <xr-node position="-30 32 -35" anim-keyframe="anim" anim-autoplay="clip:parent">
+      <xr-node position="0 0 -25" rotation="0 0 0" anim-keyframe="anim" anim-autoplay="clip:child">
         <xr-gltf 
-    wx:if="false"
-    id="YinLong" node-id="YinLong" scale="0.03 0.03 0.03" position="0 0 0" rotation="0 90 0"   model="gltf-YinLong" anim-autoplay  />
+    wx:if="{{yinglongShow}}"
+    id="YinLong" node-id="YinLong" scale="0.06 0.06 0.06" position="0 0 0" rotation="0 90 0"   model="gltf-YinLong" anim-autoplay  />
       </xr-node>
     </xr-node>
     
 
-    <xr-node position="0 2 0" anim-keyframe="anim_kun_long_ni" anim-autoplay="clip:parent3">
-      <xr-node position="0 0 30" rotation="0 0 0">
+    <xr-node position="-40 25 -45" anim-keyframe="anim_kun_long_ni" anim-autoplay="clip:parent3">
+      <xr-node position="0 0 10" rotation="0 0 0">
         <xr-gltf id="kun" node-id="kun" scale="0.05 0.05 0.05" position="0 0 0" rotation="0 -90 0"   model="gltf-kun" anim-autoplay />
       </xr-node>
     </xr-node>
 
-    <xr-node position="0 3 0" anim-keyframe="anim_kun_long" anim-autoplay="clip:parent4">
-      <xr-node position="0 0 -40" rotation="0 0 0">
+    <xr-node position="40 29 -45" anim-keyframe="anim_kun_long" anim-autoplay="clip:parent4">
+      <xr-node position="0 0 -20" rotation="0 0 0">
         <xr-gltf id="Jiaolong" node-id="Jiaolong" scale="3 3 3" position="0 0 0" rotation="0 90 0"   model="gltf-Jiaolong" anim-autoplay  />
       </xr-node>
     </xr-node>
 
-      <xr-node position="4.3 10 -15" anim-keyframe="anim" anim-autoplay="clip:parent">
-      <xr-node position="0 0 -5" rotation="0 0 0" anim-keyframe="anim" anim-autoplay="clip:child">
+      <xr-node position="0 25 -45" anim-keyframe="anim" anim-autoplay="clip:parent">
+      <xr-node position="0 0 -10" rotation="0 0 0" anim-keyframe="anim" anim-autoplay="clip:child">
         <xr-gltf position="0 0 0"  scale="0.01 0.01 0.01" rotation="0 180 0" model="gltf-birdslow" anim-keyframe="anim" anim-autoplay></xr-gltf>
       </xr-node>
 
@@ -165,17 +164,37 @@
     </xr-node>-->
 
     <xr-node>
-      <xr-custom-particle id="firework" emitter-type="SphereShape" emitter-props="radius:1,arc:0.5" position="0 13 -20" start-color="1 0 0 1" end-color="1 1 0 1"  burstCount="1" capacity="2" speed="3.4 3.8" size="0" emit-rate="2" life-time="1" angle="0"  
+      <xr-custom-particle id="firework" emitter-type="SphereShape" emitter-props="radius:1,arc:0.5" position="1 20 -30" start-color="1 1 0 1" end-color="1 0 0 1"  burstCount="1" capacity="2" speed="3.4 3.8" size="0" emit-rate="2" life-time="1" angle="0"  
         rotation="0 0 90"
         texture="particle-texture">
     </xr-custom-particle>
 
-    <xr-custom-particle id="firework2" emitter-type="SphereShape" emitter-props="radius:1,arc:0.5" position="0 13 -20" start-color="1 0 0 1" end-color="1 1 0 1"  burstCount="1" capacity="2" speed="3.4 3.8" size="0" emit-rate="2" life-time="1" angle="0"  
+    <xr-custom-particle id="firework2" emitter-type="SphereShape" emitter-props="radius:1,arc:0.5" position="8 12 -25" start-color="1 0 0 1" end-color="1 1 0 1"  burstCount="1" capacity="2" speed="3.4 3.8" size="0" emit-rate="2" life-time="1" angle="0"  
         rotation="0 0 90"
         texture="particle-texture">
     </xr-custom-particle>
 
-    <xr-custom-particle id="firework3" emitter-type="SphereShape" emitter-props="radius:1,arc:0.5" position="0 13 -20" start-color="1 0 0 1" end-color="1 1 0 1"  burstCount="1" capacity="2" speed="3.4 3.8" size="0" emit-rate="2" life-time="1" angle="0"  
+    <xr-custom-particle id="firework3" emitter-type="SphereShape" emitter-props="radius:1,arc:0.5" position="-8 10 -20" start-color="1 1 0 1" end-color="1 0 0 1"  burstCount="1" capacity="2" speed="3.4 3.8" size="0" emit-rate="2" life-time="1" angle="0"  
+        rotation="0 0 90"
+        texture="particle-texture">
+    </xr-custom-particle>
+
+    <xr-custom-particle id="firework4" emitter-type="SphereShape" emitter-props="radius:1,arc:0.5" position="-20 14 -15" start-color="1 0 0 1" end-color="1 1 0 1"  burstCount="1" capacity="2" speed="3.4 3.8" size="0" emit-rate="2" life-time="1" angle="0"  
+        rotation="0 0 90"
+        texture="particle-texture">
+    </xr-custom-particle>
+
+    <xr-custom-particle id="firework5" emitter-type="SphereShape" emitter-props="radius:1,arc:0.5" position="5 15 -15" start-color="1 0 0 1" end-color="1 1 0 1"  burstCount="1" capacity="2" speed="3.4 3.8" size="0" emit-rate="2" life-time="1" angle="0"  
+        rotation="0 0 90"
+        texture="particle-texture">
+    </xr-custom-particle>
+
+    <xr-custom-particle id="firework6" emitter-type="SphereShape" emitter-props="radius:1,arc:0.5" position="15 16 -5" start-color="1 1 0 1" end-color="1 0 0 1"  burstCount="1" capacity="2" speed="3.4 3.8" size="0" emit-rate="2" life-time="1" angle="0"  
+        rotation="0 0 90"
+        texture="particle-texture">
+    </xr-custom-particle>
+
+    <xr-custom-particle id="firework7" emitter-type="SphereShape" emitter-props="radius:1,arc:0.5" position="-15 18 -5" start-color="1 0 0 1" end-color="1 1 0 1"  burstCount="1" capacity="2" speed="3.4 3.8" size="0" emit-rate="2" life-time="1" angle="0"  
         rotation="0 0 90"
         texture="particle-texture">
     </xr-custom-particle>
@@ -195,6 +214,8 @@
   </xr-node>
 
 
+
+
 </xr-scene>
 
 

+ 3 - 2
miniprogram/pages/ar-classic/scene-classic-show/index.js

@@ -45,9 +45,9 @@ Page({
     current:0,
     products:[],
     modelImg:[
+      'https://wx-model-1317557471.cos.ap-shanghai.myqcloud.com/WXImage/%E9%80%89%E6%8B%A9%E7%A5%9E%E5%85%BD-%E5%A4%AB%E8%AF%B8%E9%A2%84%E8%A7%88%E5%9B%BE.png',
       'https://wx-model-1317557471.cos.ap-shanghai.myqcloud.com/WXImage/%E9%80%89%E6%8B%A9%E7%A5%9E%E5%85%BD-%E9%B8%BE%E9%B8%9F%E9%A2%84%E8%A7%88%E5%9B%BE.png',
       'https://wx-model-1317557471.cos.ap-shanghai.myqcloud.com/WXImage/%E8%A7%A3%E9%94%81%E7%A5%9E%E5%85%BD-%E5%BA%94%E9%BE%99%E9%A2%84%E8%A7%88%E5%9B%BE2.png',
-      'https://wx-model-1317557471.cos.ap-shanghai.myqcloud.com/WXImage/%E9%80%89%E6%8B%A9%E7%A5%9E%E5%85%BD-%E5%A4%AB%E8%AF%B8%E9%A2%84%E8%A7%88%E5%9B%BE.png',
       'https://wx-model-1317557471.cos.ap-shanghai.myqcloud.com/WXImage/%E9%80%89%E6%8B%A9%E7%A5%9E%E5%85%BD-%E7%8B%BB%E7%8C%8A%E9%A2%84%E8%A7%88%E5%9B%BE.png',
     ],
     log:"123",
@@ -95,8 +95,9 @@ Page({
                   var formattedNumber = products2[i].price/100;
                   formattedNumber = parseFloat(formattedNumber).toFixed(2);
                   products2[i].price = formattedNumber;
+                  var modelShowIndex =  products2[i]["id"];
                   if(products2[i].activate){
-                    that.setData({uiShowIndex:i});
+                    that.setData({uiShowIndex:modelShowIndex});
                   }
                 }
                 that.setData({products:products2});      

+ 4 - 2
miniprogram/pages/ar-classic/scene-classic-showsix/index.js

@@ -45,9 +45,9 @@ Page({
     current:0,
     products:[],
     modelImg:[
+      'https://wx-model-1317557471.cos.ap-shanghai.myqcloud.com/WXImage/%E9%80%89%E6%8B%A9%E7%A5%9E%E5%85%BD-%E5%A4%AB%E8%AF%B8%E9%A2%84%E8%A7%88%E5%9B%BE.png',
       'https://wx-model-1317557471.cos.ap-shanghai.myqcloud.com/WXImage/%E9%80%89%E6%8B%A9%E7%A5%9E%E5%85%BD-%E9%B8%BE%E9%B8%9F%E9%A2%84%E8%A7%88%E5%9B%BE.png',
       'https://wx-model-1317557471.cos.ap-shanghai.myqcloud.com/WXImage/%E8%A7%A3%E9%94%81%E7%A5%9E%E5%85%BD-%E5%BA%94%E9%BE%99%E9%A2%84%E8%A7%88%E5%9B%BE2.png',
-      'https://wx-model-1317557471.cos.ap-shanghai.myqcloud.com/WXImage/%E9%80%89%E6%8B%A9%E7%A5%9E%E5%85%BD-%E5%A4%AB%E8%AF%B8%E9%A2%84%E8%A7%88%E5%9B%BE.png',
       'https://wx-model-1317557471.cos.ap-shanghai.myqcloud.com/WXImage/%E9%80%89%E6%8B%A9%E7%A5%9E%E5%85%BD-%E7%8B%BB%E7%8C%8A%E9%A2%84%E8%A7%88%E5%9B%BE.png',
     ],
     log:"123",
@@ -60,6 +60,7 @@ Page({
      this.bgm.src = 'https://wx-model-1317557471.cos.ap-shanghai.myqcloud.com/WXBGM.MP3';
      this.bgm.play();
      this.bgm.loop=true;
+      
   },
   onShow(){
     this.setData({log:'OnShow'});
@@ -94,8 +95,9 @@ Page({
                   var formattedNumber = products2[i].price/100;
                   formattedNumber = parseFloat(formattedNumber).toFixed(2);
                   products2[i].price = formattedNumber;
+                  var modelShowIndex =  products2[i]["id"];
                   if(products2[i].activate){
-                    that.setData({uiShowIndex:i});
+                    that.setData({uiShowIndex:modelShowIndex});
                   }
                 }
                 that.setData({products:products2});