- 请问现在小程序到底能不能打开app?
这是去年说回收打开app能力的公告: https://developers.weixin.qq.com/community/develop/doc/000c04d94c0588744a2cf4d9c5bc09 这个是开发文档 https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/launchApp.html 请问是又可以的意思吗?
2022-02-09 - three.js模型触摸旋转怎么加速?
项目例子: https://github.com/wechat-miniprogram/threejs-miniprogram/tree/master/example 例子里手指触摸canvas模型是可以旋转的,但是在手机上觉得旋转角度太小感觉很慢,怎么写可以加大角度呢?
2021-07-14 - three.js模型开发者工具显示,真机预览无法显示?
function init() { camera = new THREE.PerspectiveCamera(45, canvas.width / canvas.height, 0.25, 100); camera.position.set(-5, 3, 10); camera.lookAt(new THREE.Vector3(0, 2, 0)); scene = new THREE.Scene(); clock = new THREE.Clock(); // lights var light = new THREE.HemisphereLight(0xffffff, 0x444444); light.position.set(0, 20, 0); scene.add(light); light = new THREE.DirectionalLight(0xffffff); light.position.set(0, 20, 10); scene.add(light); // model var loader = new THREE.GLTFLoader(); wx.showLoading({ title: '模型加载中', mask: true }) loader.load('https://threejs.org/examples/models/gltf/RobotExpressive/RobotExpressive.glb', function (gltf) { wx.hideLoading() console.log('load modal success') model = gltf.scene; model.scale.set(4,4,4) scene.add(model); createGUI(model, gltf.animations) }, undefined, function (e) { console.error(e); wx.hideLoading() wx.showToast({ title: '模型加载出错', icon:'error' }) }); renderer = new THREE.WebGLRenderer({ antialias: true }); renderer.setPixelRatio(wx.getSystemInfoSync().pixelRatio); renderer.setSize(canvas.width, canvas.height); renderer.gammaOutput = true; renderer.gammaFactor = 2.2; const { OrbitControls } = registerOrbit(THREE) controls = new OrbitControls(camera, renderer.domElement); camera.position.set(5, 5, 10); controls.update(); } 以上是主要加载模型代码,在开发者工具是完全正常的,真机(iPhone8 plus)有时候无法显示,有时候打开调试模式,真机就能显示,有时候又不行,社区其他人也反馈过多个类似的问题,盼回复
2021-07-02 - aggregate 怎么筛选今天的数据?
createTime:"2021-6-24 20:12:42" 数据里有字段createTime, 可以aggregate 一次查询出来吗
2021-06-29 - animation调用多个step,在ios没有过渡动画?
animation.translateY(-300).scale(3,3).step() animation.translateY(-500).step() 在开发者工具是可以的,但在真机ios没有了过渡动画,官方是不打算处理这个问题吗,这个问题我在其他帖子也看到过,但是没看到有处理结果 https://developers.weixin.qq.com/community/develop/doc/0006e8189fcfe87af75a6877d5bc00
2021-06-15 - animation动画可以动态设置延时吗?
animation.translateY(-700).step() //延时200 animation.translateY(-800).step() //延时400 animation.translateY(-900).step() 我们知道animation 在创建的时候,可以设置delay的值,请问这个值可以动态设置吗,我希望每个动作之间有不同的延时 另外anmation完成动画的回调,怎么弄?
2021-06-04 - wx.createOffscreenCanvas 不支持真机调试吗?
项目导入了tensorflow.js,在app.js 设置了以下代码 //app.js var fetchWechat = require('fetch-wechat'); var tf = require('@tensorflow/tfjs-core'); var webgl = require('@tensorflow/tfjs-backend-webgl'); var plugin = requirePlugin('tfjsPlugin'); App({ onLaunch() { plugin.configPlugin({ // polyfill fetch function fetchFunc: fetchWechat.fetchFunc(), // inject tfjs runtime tf, // inject webgl backend webgl, // provide webgl canvas canvas: wx.createOffscreenCanvas() }); tf.tensor([1, 2, 3, 4]).print() } }) //index.js Page({ onLoad() { const camera = wx.createCameraContext(this) let count = 0 const listener = camera.onCameraFrame(frame=>{ count++ if(count===4) { console.log(frame) count = 0 } }) listener.start() }, }) 由于在开发者工具模式下没法打开camera(不知道为啥不支持,真麻烦),于是按提示开启真机调试,但是却发生了以下错误,请官方人员帮忙查看,感谢 (unknown) SystemError (appServiceSDKScriptError) Cannot read property 'createOffscreenCanvas' of undefined TypeError: Cannot read property 'createOffscreenCanvas' of undefined at eval (eval at n.call.document (http://127.0.0.1:45717/remote-debug/runtime.js?devtools_ignore=true:1:13107), <anonymous>:2:2104670) at a (eval at n.call.document (http://127.0.0.1:45717/remote-debug/runtime.js?devtools_ignore=true:1:13107), <anonymous>:2:2105306) at Object.n (eval at n.call.document (http://127.0.0.1:45717/remote-debug/runtime.js?devtools_ignore=true:1:13107), <anonymous>:2:2104139) at Object.l.<computed> (eval at n.call.document (http://127.0.0.1:45717/remote-debug/runtime.js?devtools_ignore=true:1:13107), <anonymous>:2:2101353) at Object.eval (eval at n.call.document (http://127.0.0.1:45717/remote-debug/runtime.js?devtools_ignore=true:1:13107), <anonymous>:2:1780471) at Object.eval (eval at n.call.document (http://127.0.0.1:45717/remote-debug/runtime.js?devtools_ignore=true:1:13107), <anonymous>:2:3258311) at < at wx.createOffscreenCanvas> at Object.eval (eval at n.call.document (http://127.0.0.1:45717/remote-debug/runtime.js?devtools_ignore=true:1:13107), <anonymous>:2:122632) at wA.onLaunch (weapp:///app.js:18:18) at wA.eval (eval at n.call.document (http://127.0.0.1:45717/remote-debug/runtime.js?devtools_ignore=true:1:13107), <anonymous>:2:3575772) errorReport (unknown) MiniProgramError Cannot assign to read only property 'btoa' of object '[object Window]' TypeError: Cannot assign to read only property 'btoa' of object '[object Window]' at e ([__wxPluginCode__]:1116:45) at Object.exports.setupWechatPlatform ([__wxPluginCode__]:1116:1599) at Object.exports.configPlugin ([__wxPluginCode__]:1072:148) at wA.onLaunch (weapp:///app.js:10:12) at wA.eval (eval at n.call.document (http://127.0.0.1:45717/remote-debug/runtime.js?devtools_ignore=true:1:13107), <anonymous>:2:3575772) at new wA (eval at n.call.document (http://127.0.0.1:45717/remote-debug/runtime.js?devtools_ignore=true:1:13107), <anonymous>:2:3576529) at Function.eval (eval at n.call.document (http://127.0.0.1:45717/remote-debug/runtime.js?devtools_ignore=true:1:13107), <anonymous>:2:3576841) at eval (eval at n.call.document (http://127.0.0.1:45717/remote-debug/runtime.js?devtools_ignore=true:1:13107), <anonymous>:2:3563396) at eval (weapp:///app.js:8:1) at require (eval at n.call.document (http://127.0.0.1:45717/remote-debug/runtime.js?devtools_ignore=true:1:13107), <anonymous>:2:3619027)
2021-04-14 - 云函数聚合查询使用limit限制返回个数,同时又想同步得到数据总数,应该怎么操作呢?
const list = await db.collection('participate') .aggregate() .match({ coverId: coverId }) .sort({ _id:-1 }) // 要跳过多少数据 .skip(pageSize * (page - 1)) .limit(pageSize) .end() 使用云函数开发,要实现分页功能,但同时又需要获取当前coverId的数据总数,请问能用聚合实现吗,或者有其他方案吗,感谢
2021-02-06 - 云函数使用聚合,使用limit的同时怎么返回数据总数?
const list = await db.collection('participate') .aggregate() .match({ coverId: coverId }) .sort({ _id: -1 }) // 要跳过多少数据 .skip(pageSize * (page - 1)) .limit(pageSize) .end() 数据太多,所以用limit做分页加载,但同时又想知道数据的总数,想要同时返回,应该怎么操作呢,使用count可以,但是怎么结合呢
2021-02-06 - 有人遇到在安卓ROS系统调用微信分享的图标出现问题吗?
最近在适配最新的安卓ROS系统,在显示微信分享到好友或朋友圈的时候,图标显示的是我们应用的图标,正常应该是微信自己的图标的,我们也手动设置了,该代码在ROS之前都是正常显示的,求大神解答,项目比较紧急!
2020-10-26