- xr-scene ar-system="modes:Plane" 在华为nova8E启动失败
<xr-scene ar-system="modes:Plane" bind:ready="handleReady"> <xr-env env-data="xr-frame-team-workspace-day" /> <xr-light type="ambient" color="1 1 1" intensity="1" /> <xr-light type="directional" rotation="40 70 0" color="1 1 1" intensity="3" cast-shadow /> <xr-assets 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="Plate" src="{{modelData.path}}" /> </xr-assets> <xr-ar-tracker mode="Plane"> <xr-gltf model="anchor"></xr-gltf> </xr-ar-tracker> <xr-node node-id="setitem"> <xr-gltf model="Plate" node-id='Plate' anim-autoplay position="0 0 0" scale="{{modelData.scale}}" rotation="{{modelData.rotation}}" /> </xr-node> <xr-camera clear-color="0.4 0.8 0.6 1" background="ar" is-ar-camera /> </xr-scene> data: { loaded: false, modelData: { path: 'https://houtaicdn.alva.com.cn/medias/resources/wechat/baikeWebview/gltfModels/Dinosaur/Plate/Plate.gltf', // path: "https://houtaicdn.alva.com.cn/medias/resources/wechat/baikeWebview/gltfModels/HT/42_haiwangxing/42_haiwangxing.gltf" scale: '0.5 0.5 0.5', rotation: '0 0 0' } }, methods: { handleAssetsLoaded: function({detail}) { this.scene.event.add('touchstart', () => { this.scene.ar.placeHere('setitem', true); }); }, handleReady: function ({detail}) { this.scene = detail.value; }, handleShare: function() { const supported = this.scene.share.supported; if (supported) { const options = { type: 'jpg', quality: 0.8 }; const base64 = this.scene.share.captureToDataURL(options); const buffer = this.scene.share.captureToArrayBuffer(options); this.triggerEvent('showPhoto',base64) } } } 华为nova8E 8.0.32微信版本报错(其他手机型号均正常): [xr-frame] <Error: AR system start error(Plane,1,Back): 2000004> Error: AR system start error(Plane,1,Back): 2000004 at https://lib/WAXRFrameRenderContext.js:1:1198904 at https://lib/WAXRFrameRenderContext.js:1:1199489
2023-02-20 - css在真机上有时正常,有时完全失效。开发者工具上的显示一直正常。
https://developers.weixin.qq.com/s/t9sTdGmu7xDI
2022-11-11 - ios webview没法调用摄像头?
网页中使用navigator.mediaDevices.getUserMedia接口调用摄像头,在安卓端可以正常使用,safari浏览器也可以使用,但是使用小程序webview加载网页之后没法调用摄像头。我需要在摄像机画面前面展示3D模型, 而input type=file是调用手机自身相机,会覆盖掉小程序内容。
2021-08-13 - InnerAudioContext短时间内频繁更换音频地址并play()在差手机上会频繁出现多个声音
let listener = null,audioContext = null; const audioList = [ '/Wsp/File/Download/21189778427876858', '/Wsp/File/Download/21122842704905247', '/Wsp/File/Download/21141684725357527', '/Wsp/File/Download/21140548707059953', '/Wsp/File/Download/21141730896281559', '/Wsp/File/Download/21140021231082737' ]; var audioIndex = 0; const maxIndex = audioList.length - 1; // 识别相关 createListener(){ let num = 0,self = this; const context = wx.createCameraContext(); listener = context.onCameraFrame(async function (res) { num++; if (num === 50) { num = 0; if (audioIndex === maxIndex) { audioIndex = 0; } else { audioIndex++; } audioContext.src = 'https://wall.alva.com.cn' + audioList[audioIndex]; audioContext.play(); } }); listener.start(); }, // 音频相关 initAudio(){ let self = this; audioContext = wx.createInnerAudioContext(); // audioContext.loop = true; audioContext.onPlay(() => { self.setData({ audioPlay: true }) }); audioContext.onEnded(() => { console.log('audio onEnded') self.setData({ audioPlay: false }) }); audioContext.onPause(() => { self.setData({ audioPlay: false }); }); }, 期望表现:更换InnerAudioContext的src后,调用play()只播放新地址的音频; 实际结果:有时更换src前的音频和更换src后的音频同时在播放(在好的手机上偶现,非必现,差的手机上(华为P20)复现频率很高)
2021-07-12 - 小程序的placeholder-style属性在ios中不支持animation,安卓端可以支持
wxml: <input type="text" placeholder="请输入您的答案" placeholder-style="animation: input-ani 0.6s forwards;" value="{{value}}"/> css: @keyframes input-ani { 0% { color:#FDF2CE; } 99%{ color:#FDF2CE; } 100% { color: #242424 } }
2021-02-24