gemer 1 year ago
parent
commit
242de559bf

+ 14 - 10
miniprogram/components/xr-ar-vio-marker-1/index.js

@@ -18,15 +18,17 @@ Component({
     }) {
       const xrScene = this.scene = detail.value;
       this.mat = new(wx.getXrFrameSystem().Matrix4)();
-      console.log('xr-scene', xrScene);
-      wx.showLoading({
-        title: 'loading...',
-      })
+      console.log('xr-scene', xrScene)
+      this.triggerEvent('ready')
     },
     handleAssetsProgress: function ({
       detail
     }) {
-      console.log('assets progress', detail.value);
+      // console.log('assets progress', detail.value.progress);
+      const progress =
+        Math.floor(detail.value.progress * 100)
+
+      this.triggerEvent('progress', progress)
     },
     handleAssetsLoaded: function ({
       detail
@@ -35,7 +37,7 @@ Component({
       const el = detail.value.target;
       // this.setData({loaded: true});
       this.scene.event.addOnce('touchstart', this.placeNode.bind(this));
-      wx.hideLoading()
+      this.triggerEvent('loaded')
 
     },
     handleARReady: function ({
@@ -59,6 +61,9 @@ Component({
       } else {
         this.scene.ar.placeHere('setitem', true);
         console.error('show-gltf')
+        if (this.video) {
+          this.video.play()
+        }
 
       }
 
@@ -70,14 +75,13 @@ Component({
       const el = detail.value.target;
       console.error('handleGLTFLoaded')
       const gltf = el.getComponent("gltf");
-      const vt = this.scene.assets.getAsset("texture", "video-cat");
+      const video = this.scene.assets.getAsset("video-texture", "cat");
       const newMat = this.scene.assets.getAsset("material", "catMat");
-      console.log('vt', vt)
 
-      for (const mesh of gltf.getPrimitivesByNodeName("video")) {
+      this.video = video
 
+      for (const mesh of gltf.getPrimitivesByNodeName("video")) {
         mesh.material = newMat
-        // mesh.material.setTexture("u_baseColorMap", vt);
       }
     }
   }

+ 3 - 3
miniprogram/components/xr-ar-vio-marker-1/index.wxml

@@ -7,7 +7,7 @@
     <xr-asset-load type="gltf" asset-id="gltf-item" src="https://houseoss.4dkankan.com/mini-ar-test/AR/2/gc99.glb" />
     <xr-asset-load type="gltf" asset-id="butterfly" src="https://mmbizwxaminiprogram-1258344707.cos.ap-guangzhou.myqcloud.com/xr-frame/demo/butterfly/index.glb" />
 
-    <xr-asset-load type="video-texture" asset-id="cat" src="https://houseoss.4dkankan.com/mini-ar-test/AR/2/video.mp4" options="autoPlay:true,loop:true,abortAudio:false,placeHolder:https://houseoss.4dkankan.com/mini-ar-test/AR/2/video.mp4?x-oss-process=video/snapshot,t_0,f_jpg,w_1000,m_fast,ar_auto" />
+    <xr-asset-load type="video-texture" asset-id="cat" src="https://houseoss.4dkankan.com/mini-ar-test/AR/2/video.mp4" options="autoPlay:false,loop:false,abortAudio:false,placeHolder:https://houseoss.4dkankan.com/mini-ar-test/AR/2/video.mp4?x-oss-process=video/snapshot,t_0,f_jpg,w_1000,m_fast,ar_auto" />
 
     <xr-asset-material asset-id="catMat" effect="simple" uniforms="u_baseColorMap: video-cat" />
   </xr-assets>
@@ -19,10 +19,10 @@
     </xr-ar-tracker>
 
     <xr-ar-tracker mode="Plane">
-      <xr-gltf model="anchor"></xr-gltf>
+      <xr-gltf model="anchor" scale="0.2 0.2 0.2"></xr-gltf>
     </xr-ar-tracker>
     <xr-node node-id="setitem" visible="false">
-      <xr-gltf model="gltf-item" scale="0.006 0.006 0.006" rotation="0 -90 0" bind:gltf-loaded="handleGLTFLoaded"></xr-gltf>
+      <xr-gltf model="gltf-item" scale="0.008 0.008 0.008" rotation="0 -90 0" bind:gltf-loaded="handleGLTFLoaded"></xr-gltf>
     </xr-node>
     <xr-camera id="camera" node-id="camera" clear-color="0.925 0.925 0.925 1" background="ar" is-ar-camera></xr-camera>
   </xr-node>

+ 87 - 0
miniprogram/components/xr-ar-vio-marker-2/index.js

@@ -0,0 +1,87 @@
+Component({
+  // behaviors: [require('../common/share-behavior').default],
+  properties: {
+    a: Number,
+  },
+  data: {
+    loaded: false,
+    arReady: false,
+  },
+  lifetimes: {
+    async attached() {
+      console.log('data', this.data)
+    }
+  },
+  methods: {
+    handleReady({
+      detail
+    }) {
+      const xrScene = this.scene = detail.value;
+      this.mat = new(wx.getXrFrameSystem().Matrix4)();
+      console.log('xr-scene', xrScene)
+      this.triggerEvent('ready')
+    },
+    handleAssetsProgress: function ({
+      detail
+    }) {
+      // console.log('assets progress', detail.value.progress);
+      const progress =
+        Math.floor(detail.value.progress * 100)
+      this.triggerEvent('progress', progress)
+    },
+    handleAssetsLoaded: function ({
+      detail
+    }) {
+      console.log('assets loaded', detail.value);
+      const el = detail.value.target;
+      // this.setData({loaded: true});
+      this.scene.event.addOnce('touchstart', this.placeNode.bind(this));
+      this.triggerEvent('loaded')
+
+    },
+    handleARReady: function ({
+      detail
+    }) {
+      console.log('arReady', this.scene.ar.arVersion);
+    },
+    placeNode(event) {
+      const {
+        clientX,
+        clientY
+      } = event.touches[0];
+      const {
+        frameWidth: width,
+        frameHeight: height
+      } = this.scene;
+
+      if (clientY / height > 0.8 && clientX / width < 0.2) {
+        this.scene.getNodeById('setitem').visible = false;
+        this.scene.ar.resetPlane();
+      } else {
+        this.scene.ar.placeHere('setitem', true);
+        console.error('show-gltf')
+        if (this.video) {
+          this.video.play()
+        }
+
+      }
+
+      this.scene.event.addOnce('touchstart', this.placeNode.bind(this));
+    },
+    handleGLTFLoaded({
+      detail
+    }) {
+      const el = detail.value.target;
+      console.error('handleGLTFLoaded')
+      const gltf = el.getComponent("gltf");
+      const video = this.scene.assets.getAsset("video-texture", "cat");
+      const newMat = this.scene.assets.getAsset("material", "catMat");
+
+      this.video = video
+
+      for (const mesh of gltf.getPrimitivesByNodeName("video")) {
+        mesh.material = newMat
+      }
+    }
+  }
+})

+ 5 - 0
miniprogram/components/xr-ar-vio-marker-2/index.json

@@ -0,0 +1,5 @@
+{
+  "component": true,
+  "usingComponents": {},
+  "renderer": "xr-frame"
+}

+ 33 - 0
miniprogram/components/xr-ar-vio-marker-2/index.wxml

@@ -0,0 +1,33 @@
+<xr-scene ar-system="modes:Plane Marker; planeMode: 1" bind:ready="handleReady" bind:ar-ready="handleARReady">
+  <!-- vio + marker 模式下 planeMode 需设置为 1 (只允许水平面识别) -->
+  <xr-assets bind:progress="handleAssetsProgress" bind:loaded="handleAssetsLoaded">
+    <xr-asset-load type="gltf" asset-id="anchor" src="https://mmbizwxaminiprogram-1258344707.cos.ap-guangzhou.myqcloud.com/xr-frame/demo/ar-plane-marker.glb" />
+    <!-- <xr-asset-load type="gltf" asset-id="gltf-item" src="https://mmbizwxaminiprogram-1258344707.cos.ap-guangzhou.myqcloud.com/xr-frame/demo/just_a_girl/index.glb" /> -->
+    <!-- <xr-asset-load type="gltf" asset-id="gltf-item" src="https://houseoss.4dkankan.com/mini-ar-test/AR/1/Dundun_Ani" /> -->
+    <xr-asset-load type="gltf" asset-id="gltf-item" src="https://houseoss.4dkankan.com/mini-ar-test/AR/2/gc99.glb" />
+    <xr-asset-load type="gltf" asset-id="butterfly" src="https://mmbizwxaminiprogram-1258344707.cos.ap-guangzhou.myqcloud.com/xr-frame/demo/butterfly/index.glb" />
+
+    <xr-asset-load type="video-texture" asset-id="cat" src="https://houseoss.4dkankan.com/mini-ar-test/AR/2/video.mp4" options="autoPlay:false,loop:false,abortAudio:false,placeHolder:https://houseoss.4dkankan.com/mini-ar-test/AR/2/video.mp4?x-oss-process=video/snapshot,t_0,f_jpg,w_1000,m_fast,ar_auto" />
+
+    <xr-asset-material asset-id="catMat" effect="simple" uniforms="u_baseColorMap: video-cat" />
+  </xr-assets>
+  <xr-node>
+    <xr-ar-tracker mode="Marker" src="https://mmbizwxaminiprogram-1258344707.cos.ap-guangzhou.myqcloud.com/xr-frame/demo/marker/2dmarker-test.jpg">
+      <xr-gltf model="butterfly" anim-autoplay position="0.2 0 -0.2" scale="0.6 0.6 0.6" rotation="0 -50 0" />
+      <xr-gltf model="butterfly" anim-autoplay position="0.4 0 0.3" scale="0.5 0.5 0.5" rotation="0 -50 0" />
+      <xr-gltf model="butterfly" anim-autoplay position="-0.3 0 0.3" scale="0.4 0.4 0.4" rotation="0 -50 0" />
+    </xr-ar-tracker>
+
+    <xr-ar-tracker mode="Plane">
+      <xr-gltf model="anchor" scale="0.2 0.2 0.2"></xr-gltf>
+    </xr-ar-tracker>
+    <xr-node node-id="setitem" visible="false">
+      <xr-gltf model="gltf-item" scale="0.008 0.008 0.008" rotation="0 -90 0" bind:gltf-loaded="handleGLTFLoaded"></xr-gltf>
+    </xr-node>
+    <xr-camera id="camera" node-id="camera" clear-color="0.925 0.925 0.925 1" background="ar" is-ar-camera></xr-camera>
+  </xr-node>
+  <xr-node node-id="lights">
+    <xr-light type="ambient" color="1 1 1" intensity="1" />
+    <xr-light type="directional" rotation="180 0 0" color="1 1 1" intensity="3" />
+  </xr-node>
+</xr-scene>

+ 1 - 0
miniprogram/components/xr-ar-vio-marker-2/index.wxss

@@ -0,0 +1 @@
+/* xr/index.wxss */

+ 88 - 0
miniprogram/components/xr-ar-vio-marker-3/index.js

@@ -0,0 +1,88 @@
+Component({
+  // behaviors: [require('../common/share-behavior').default],
+  properties: {
+    a: Number,
+  },
+  data: {
+    loaded: false,
+    arReady: false,
+    isPlay: false
+  },
+  lifetimes: {
+    async attached() {
+      console.log('data', this.data)
+    }
+  },
+  methods: {
+    handleReady({
+      detail
+    }) {
+      const xrScene = this.scene = detail.value;
+      this.mat = new(wx.getXrFrameSystem().Matrix4)();
+      console.log('xr-scene', xrScene)
+      this.triggerEvent('ready')
+    },
+    handleAssetsProgress: function ({
+      detail
+    }) {
+      // console.log('assets progress', detail.value.progress);
+      const progress =
+        Math.floor(detail.value.progress * 100)
+      this.triggerEvent('progress', progress)
+    },
+    handleAssetsLoaded: function ({
+      detail
+    }) {
+      console.log('assets loaded', detail.value);
+      const el = detail.value.target;
+      // this.setData({loaded: true});
+      this.scene.event.addOnce('touchstart', this.placeNode.bind(this));
+      this.triggerEvent('loaded')
+
+    },
+    handleARReady: function ({
+      detail
+    }) {
+      console.log('arReady', this.scene.ar.arVersion);
+    },
+    placeNode(event) {
+      const {
+        clientX,
+        clientY
+      } = event.touches[0];
+      const {
+        frameWidth: width,
+        frameHeight: height
+      } = this.scene;
+
+      if (clientY / height > 0.8 && clientX / width < 0.2) {
+        this.scene.getNodeById('setitem').visible = false;
+        this.scene.ar.resetPlane();
+      } else {
+        this.scene.ar.placeHere('setitem', true);
+        console.error('show-gltf')
+        if (!this.isPlay) {
+          this.setData({
+            isPlay: true
+          })
+        }
+      }
+
+      this.scene.event.addOnce('touchstart', this.placeNode.bind(this));
+    },
+    handleGLTFLoaded({
+      detail
+    }) {
+      const el = detail.value.target;
+      // console.error('handleGLTFLoaded')
+      // const gltf = el.getComponent("gltf");
+      // const video = this.scene.assets.getAsset("video-texture", "cat");
+      // const newMat = this.scene.assets.getAsset("material", "catMat");
+      // this.video = video
+
+      // for (const mesh of gltf.getPrimitivesByNodeName("video")) {
+      //   mesh.material = newMat
+      // }
+    }
+  }
+})

+ 5 - 0
miniprogram/components/xr-ar-vio-marker-3/index.json

@@ -0,0 +1,5 @@
+{
+  "component": true,
+  "usingComponents": {},
+  "renderer": "xr-frame"
+}

+ 33 - 0
miniprogram/components/xr-ar-vio-marker-3/index.wxml

@@ -0,0 +1,33 @@
+<xr-scene ar-system="modes:Plane Marker; planeMode: 1" bind:ready="handleReady" bind:ar-ready="handleARReady">
+  <!-- vio + marker 模式下 planeMode 需设置为 1 (只允许水平面识别) -->
+  <xr-assets bind:progress="handleAssetsProgress" bind:loaded="handleAssetsLoaded">
+    <xr-asset-load type="gltf" asset-id="anchor" src="https://mmbizwxaminiprogram-1258344707.cos.ap-guangzhou.myqcloud.com/xr-frame/demo/ar-plane-marker.glb" />
+    <!-- <xr-asset-load type="gltf" asset-id="gltf-item" src="https://mmbizwxaminiprogram-1258344707.cos.ap-guangzhou.myqcloud.com/xr-frame/demo/just_a_girl/index.glb" /> -->
+    <!-- <xr-asset-load type="gltf" asset-id="gltf-item" src="https://houseoss.4dkankan.com/mini-ar-test/AR/1/Dundun_Ani" /> -->
+    <xr-asset-load type="gltf" asset-id="gltf-item" src="https://houseoss.4dkankan.com/mini-ar-test/mtgj.glb" />
+    <xr-asset-load type="gltf" asset-id="butterfly" src="https://mmbizwxaminiprogram-1258344707.cos.ap-guangzhou.myqcloud.com/xr-frame/demo/butterfly/index.glb" />
+
+    <xr-asset-load type="video-texture" asset-id="cat" src="https://houseoss.4dkankan.com/mini-ar-test/AR/2/video.mp4" options="autoPlay:false,loop:false,abortAudio:false,placeHolder:https://houseoss.4dkankan.com/mini-ar-test/AR/2/video.mp4?x-oss-process=video/snapshot,t_0,f_jpg,w_1000,m_fast,ar_auto" />
+
+    <xr-asset-material asset-id="catMat" effect="simple" uniforms="u_baseColorMap: video-cat" />
+  </xr-assets>
+  <xr-node>
+    <xr-ar-tracker mode="Marker" src="https://mmbizwxaminiprogram-1258344707.cos.ap-guangzhou.myqcloud.com/xr-frame/demo/marker/2dmarker-test.jpg">
+      <xr-gltf model="butterfly" anim-autoplay position="0.2 0 -0.2" scale="0.6 0.6 0.6" rotation="0 -50 0" />
+      <xr-gltf model="butterfly" anim-autoplay position="0.4 0 0.3" scale="0.5 0.5 0.5" rotation="0 -50 0" />
+      <xr-gltf model="butterfly" anim-autoplay position="-0.3 0 0.3" scale="0.4 0.4 0.4" rotation="0 -50 0" />
+    </xr-ar-tracker>
+
+    <xr-ar-tracker mode="Plane">
+      <xr-gltf model="anchor" scale="0.2 0.2 0.2"></xr-gltf>
+    </xr-ar-tracker>
+    <xr-node node-id="setitem" visible="false">
+      <xr-gltf model="gltf-item" scale="0.008 0.008 0.008" rotation="-45 0 0"  bind:gltf-loaded="handleGLTFLoaded"></xr-gltf>
+    </xr-node>
+    <xr-camera id="camera" node-id="camera" clear-color="0.925 0.925 0.925 1" background="ar" is-ar-camera></xr-camera>
+  </xr-node>
+  <xr-node node-id="lights">
+    <xr-light type="ambient" color="1 1 1" intensity="1" />
+    <xr-light type="directional" rotation="180 0 0" color="1 1 1" intensity="3" />
+  </xr-node>
+</xr-scene>

+ 1 - 0
miniprogram/components/xr-ar-vio-marker-3/index.wxss

@@ -0,0 +1 @@
+/* xr/index.wxss */

+ 6 - 1
miniprogram/pages/children/children.json

@@ -1,3 +1,8 @@
 {
-  "usingComponents": {}
+  "disableScroll": true,
+  "renderer": "webview",
+  "usingComponents": {
+    "navigation-bar": "/components/navigation-bar/navigation-bar",
+    "xr-ar-vio-marker": "/components/xr-ar-vio-marker-3/index"
+  }
 }

+ 24 - 3
miniprogram/pages/children/children.ts

@@ -1,18 +1,30 @@
-// pages/children/children.ts
 Page({
 
   /**
    * 页面的初始数据
    */
   data: {
-
+    width: 300,
+    height: 300,
+    renderWidth: 300,
+    renderHeight: 300,
+    loaded: false,
+    progress: 0
   },
 
   /**
    * 生命周期函数--监听页面加载
    */
   onLoad() {
-
+    const info = wx.getSystemInfoSync();
+    const width = info.windowWidth;
+    const height = info.windowHeight;
+    const dpi = info.pixelRatio;
+    this.setData({
+      width, height,
+      renderWidth: width * dpi,
+      renderHeight: height * dpi
+    });
   },
 
   /**
@@ -62,5 +74,14 @@ Page({
    */
   onShareAppMessage() {
 
+  },
+  handleLoaded() {
+
+    this.setData({ loaded: true })
+  },
+  handleProgress(event: WechatMiniprogram.TouchEvent) {
+    console.log('progress', event.detail)
+    const val = Number(event.detail) || 0
+    this.setData({ progress: val })
   }
 })

+ 11 - 2
miniprogram/pages/children/children.wxml

@@ -1,2 +1,11 @@
-<!--pages/children/children.wxml-->
-<text>pages/children/children.wxml</text>
+<view class="page">
+  <navigation-bar title="{{'四维AR'}}" back="{{true}}" />
+  <view class="loading" wx:if="{{!loaded}}">
+    <text>素材{{progress}}%载入中</text>
+  </view>
+  <xr-ar-vio-marker disable-scroll id="main-frame" width="{{renderWidth}}" height="{{renderHeight}}" style="width:{{width}}px;height:{{height}}px;top:{{top}}px;left:{{left}}px;display:block;" bind:loaded="handleLoaded" 
+  bind:progress="handleProgress"
+  />
+
+
+</view>

+ 18 - 1
miniprogram/pages/children/children.wxss

@@ -1 +1,18 @@
-/* pages/children/children.wxss */
+/* pages/dunhuang/dunhuang.wxss */
+.page {
+  position: relative;
+}
+
+.loading {
+  width: 100vw;
+  height: 100vh;
+  position: absolute;
+  top: 0;
+  left: 0;
+  z-index: 1000;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  flex-direction: column;
+  background: #ffffff;
+}

+ 11 - 1
miniprogram/pages/dunhuang/dunhuang.ts

@@ -1,4 +1,3 @@
-// pages/dunhuang/dunhuang.ts
 Page({
 
   /**
@@ -9,6 +8,8 @@ Page({
     height: 300,
     renderWidth: 300,
     renderHeight: 300,
+    loaded: false,
+    progress: 0
   },
 
   /**
@@ -73,5 +74,14 @@ Page({
    */
   onShareAppMessage() {
 
+  },
+  handleLoaded() {
+
+    this.setData({ loaded: true })
+  },
+  handleProgress(event: WechatMiniprogram.TouchEvent) {
+    console.log('progress', event.detail)
+    const val = Number(event.detail) || 0
+    this.setData({ progress: val })
   }
 })

+ 7 - 3
miniprogram/pages/dunhuang/dunhuang.wxml

@@ -1,7 +1,11 @@
-<view>
+<view class="page">
   <navigation-bar title="{{'四维AR'}}" back="{{true}}" />
-
-  <xr-ar-vio-marker disable-scroll id="main-frame" width="{{renderWidth}}" height="{{renderHeight}}" style="width:{{width}}px;height:{{height}}px;top:{{top}}px;left:{{left}}px;display:block;" bind:arTrackerState="handleARTrackerState" />
+  <view class="loading" wx:if="{{!loaded}}">
+    <text>素材{{progress}}%载入中</text>
+  </view>
+  <xr-ar-vio-marker disable-scroll id="main-frame" width="{{renderWidth}}" height="{{renderHeight}}" style="width:{{width}}px;height:{{height}}px;top:{{top}}px;left:{{left}}px;display:block;" bind:loaded="handleLoaded" 
+  bind:progress="handleProgress"
+  />
 
 
 </view>

+ 18 - 1
miniprogram/pages/dunhuang/dunhuang.wxss

@@ -1 +1,18 @@
-/* pages/dunhuang/dunhuang.wxss */
+/* pages/dunhuang/dunhuang.wxss */
+.page {
+  position: relative;
+}
+
+.loading {
+  width: 100vw;
+  height: 100vh;
+  position: absolute;
+  top: 0;
+  left: 0;
+  z-index: 1000;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  flex-direction: column;
+  background: #ffffff;
+}

+ 1 - 1
miniprogram/pages/index/index.ts

@@ -81,7 +81,7 @@ Page({
   },
   goToChild() {
     wx.navigateTo({
-      url: "pages/children/children"
+      url: "/pages/children/children"
     })
   }
 })

+ 6 - 1
miniprogram/pages/myth/myth.json

@@ -1,3 +1,8 @@
 {
-  "usingComponents": {}
+  "disableScroll": true,
+  "renderer": "webview",
+  "usingComponents": {
+    "navigation-bar": "/components/navigation-bar/navigation-bar",
+    "xr-ar-vio-marker": "/components/xr-ar-vio-marker-2/index"
+  }
 }

+ 24 - 3
miniprogram/pages/myth/myth.ts

@@ -1,18 +1,30 @@
-// pages/myth/myth.ts
 Page({
 
   /**
    * 页面的初始数据
    */
   data: {
-
+    width: 300,
+    height: 300,
+    renderWidth: 300,
+    renderHeight: 300,
+    loaded: false,
+    progress: 0
   },
 
   /**
    * 生命周期函数--监听页面加载
    */
   onLoad() {
-
+    const info = wx.getSystemInfoSync();
+    const width = info.windowWidth;
+    const height = info.windowHeight;
+    const dpi = info.pixelRatio;
+    this.setData({
+      width, height,
+      renderWidth: width * dpi,
+      renderHeight: height * dpi
+    });
   },
 
   /**
@@ -62,5 +74,14 @@ Page({
    */
   onShareAppMessage() {
 
+  },
+  handleLoaded() {
+
+    this.setData({ loaded: true })
+  },
+  handleProgress(event: WechatMiniprogram.TouchEvent) {
+    console.log('progress', event.detail)
+    const val = Number(event.detail) || 0
+    this.setData({ progress: val })
   }
 })

+ 11 - 2
miniprogram/pages/myth/myth.wxml

@@ -1,2 +1,11 @@
-<!--pages/myth/myth.wxml-->
-<text>pages/myth/myth.wxml</text>
+<view class="page">
+  <navigation-bar title="{{'四维AR'}}" back="{{true}}" />
+  <view class="loading" wx:if="{{!loaded}}">
+    <text>素材{{progress}}%载入中</text>
+  </view>
+  <xr-ar-vio-marker disable-scroll id="main-frame" width="{{renderWidth}}" height="{{renderHeight}}" style="width:{{width}}px;height:{{height}}px;top:{{top}}px;left:{{left}}px;display:block;" bind:loaded="handleLoaded" 
+  bind:progress="handleProgress"
+  />
+
+
+</view>

+ 18 - 1
miniprogram/pages/myth/myth.wxss

@@ -1 +1,18 @@
-/* pages/myth/myth.wxss */
+/* pages/dunhuang/dunhuang.wxss */
+.page {
+  position: relative;
+}
+
+.loading {
+  width: 100vw;
+  height: 100vh;
+  position: absolute;
+  top: 0;
+  left: 0;
+  z-index: 1000;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  flex-direction: column;
+  background: #ffffff;
+}

+ 38 - 38
project.config.json

@@ -1,39 +1,39 @@
-{
-  "description": "项目配置文件",
-  "miniprogramRoot": "miniprogram/",
-  "compileType": "miniprogram",
-  "setting": {
-    "useCompilerPlugins": [
-      "typescript"
-    ],
-    "babelSetting": {
-      "ignore": [],
-      "disablePlugins": [],
-      "outputPath": ""
-    },
-    "coverView": false,
-    "postcss": false,
-    "minified": false,
-    "enhance": true,
-    "showShadowRootInWxmlPanel": false,
-    "packNpmRelationList": [],
-    "ignoreUploadUnusedFiles": true,
-    "compileHotReLoad": false,
-    "skylineRenderEnable": true,
-    "es6": true
-  },
-  "simulatorType": "wechat",
-  "simulatorPluginLibVersion": {},
-  "condition": {},
-  "srcMiniprogramRoot": "miniprogram/",
-  "editorSetting": {
-    "tabIndent": "insertSpaces",
-    "tabSize": 2
-  },
-  "libVersion": "trial",
-  "packOptions": {
-    "ignore": [],
-    "include": []
-  },
-  "appid": "wxd55ee54235e90359"
+{
+  "description": "项目配置文件",
+  "miniprogramRoot": "miniprogram/",
+  "compileType": "miniprogram",
+  "setting": {
+    "useCompilerPlugins": [
+      "typescript"
+    ],
+    "babelSetting": {
+      "ignore": [],
+      "disablePlugins": [],
+      "outputPath": ""
+    },
+    "coverView": false,
+    "postcss": false,
+    "minified": false,
+    "enhance": true,
+    "showShadowRootInWxmlPanel": false,
+    "packNpmRelationList": [],
+    "ignoreUploadUnusedFiles": true,
+    "compileHotReLoad": false,
+    "skylineRenderEnable": true,
+    "es6": true
+  },
+  "simulatorType": "wechat",
+  "simulatorPluginLibVersion": {},
+  "condition": {},
+  "srcMiniprogramRoot": "miniprogram/",
+  "editorSetting": {
+    "tabIndent": "insertSpaces",
+    "tabSize": 2
+  },
+  "libVersion": "trial",
+  "packOptions": {
+    "ignore": [],
+    "include": []
+  },
+  "appid": "wxd55ee54235e90359"
 }

+ 8 - 8
project.private.config.json

@@ -1,9 +1,9 @@
-{
-  "description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
-  "projectname": "mini-ar-demo",
-  "setting": {
-    "compileHotReLoad": true,
-    "skylineRenderEnable": true
-  },
-  "libVersion": "development"
+{
+  "description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
+  "projectname": "mini-ar-demo",
+  "setting": {
+    "compileHotReLoad": true,
+    "skylineRenderEnable": true
+  },
+  "libVersion": "3.4.1"
 }