Skyline渲染引擎
[图片][图片]
在app.js里的onLaunch中调用getStorage获取存储的个人信息,进入index页面需要该个人信息数据,在实际的项目中getStorage获取时间不一样,其表现如下: 1、index页面开启skyline模式(开发者工具开启skyline调试),app.js里的getStorage获取时间在100-700ms左右,但index页面onshow会在getStorage之后返回 2、index页面开启webview模式(开发者工具不开启skyline调试),app.js里的getStorage获取时间在100ms左右,但index页面onshow在getStorage之后返回 3、index页面开启webview模式(开发者工具开启skyline调试),app.js里的getStorage获取时间在1-3s左右,index页面onshow在getStorage之前返回 4、index页面开启skyline模式(开发者工具不开启skyline调试),app.js里的getStorage获取时间在700ms左右,index页面onshow在getStorage之前返回 5、在真机模式下,无论是webview还是skyline模式,app.js里的getStorage获取时间100ms左右,index页面onshow都在在getStorage返回之前 使用代码片段时:https://developers.weixin.qq.com/s/9QuKh2mv7oWr 使用代码片段时,时间会快一点,但是index页面onshow与onLaunch里的getStorage执行顺序跟实际项目的顺序是一样的 [图片] [图片] [图片] [图片] [图片]真机模式上和开发者工具表现的又不一样,在真机上console.time(),console.timeEnd()不生效,只能用打印时间出来 在真机skyline模式下,index页面会执行在前,
背景: 在优化页面启动性能时,把某一个独立分包里的一个页面的渲染引擎切换成了 Skyline,目前该页面的安卓性能数据存在丢失的情况。 问题: 经排查,大致范围确定是使用 wx.getPerformance 获取性能数据进行上报时,在 entryType 为 navigation 时,appLaunch 节点没有被触发。(测试时,机型:REDMI,操作系统:Android 11,微信版本:8.0.54,基础库版本:3.6.6 2024.11.24 21:13:21) 页面 page.json: { "renderer": "skyline", // 切换为 webview 后可正常上报 "componentFramework": "glass-easel", "disableScroll": true, "navigationStyle": "custom", "backgroundColor": "#F9F9F9", "backgroundTextStyle": "light", "usingComponents": { "v-price": "../../components/price", "v-loading": "../../components/dkn_loading", "v-collapse": "../../components/collapse", "v-register": "../../components/register", "privacy-contract":"../../components/privacy_contract", "card-gift": "../../components/card_gift", "card-coupon": "../../../commonPackage/checkout_card_coupon" }, "componentPlaceholder": { "v-collapse": "view", "v-register": "view", "privacy-contract": "view", "card-gift": "view", "card-coupon": "view" }, "initialRenderingCache": "static", "rendererOptions": { "skyline": { "defaultDisplayBlock": true, "defaultContentBox": true, "disableABTest": true, "iosVersionBegin": "8.0.34", "iosVersionEnd": "15.255.255", "androidVersionBegin": "8.0.33", "androidVersionEnd": "15.255.255" } }, "trackingTitle": "确认订单", "trackingType": "Checkout" } 性能上报相关逻辑(appLaunch 节点不会执行到): const performanceObserverHandler = entryList => { const entries = entryList.getEntries(); entries.forEach(entry => { const { duration, entryType, name, path, navigationType, startTime, packageName } = entry; switch (entryType) { case 'navigation': if (name === 'appLaunch') { // 获取 duration - (这里不会被执行到) const app_launch_time = duration; // 上报 app_launch_time // report({ xxx }) } else { if (name === 'route') { // const route_time = duration; } } break; case 'render': if (name === 'firstRender') { // const first_render_time = duration; // report({ xxx }) } break; case 'script': // let invoke_scripts_time = (invoke_scripts_time || 0) + duration; // report({ xxx }) break; } }); }; const enablePerformanceMonitoring = () => { try { const performance = wx.getPerformance(); const observer = performance.createObserver(performanceObserverHandler); observer.observe({ entryTypes: ['render', 'script', 'navigation', 'loadPackage'] }); } catch (e) { console.log('doesnt support performance monitoring'); } }; 其他相关信息: 1、因为机型、微信版本、基础库版本等变量过多,不能完全确定是哪一项的问题,目前已测试的情况如下: [图片] 2、微信开发者工具测试时可以正常触发 appLaunch 性能节点,但是上传开发版本后用安卓真机(机型:REDMI,操作系统:Android 11,微信版本:8.0.54,基础库版本:3.6.6 2024.11.24 21:13:21)来测试时无法触发 appLaunch 这个性能节点。 3、当把 page.json 的里 render 从 skyline 切换为 webview 后,用手头的安卓真机(机型:REDMI,操作系统:Android 11,微信版本:8.0.54,基础库版本:3.6.6 2024.11.24 21:13:21)来测试时可以正常触发 appLaunch 性能节点。 4、iOS 没有经过多台设备来测试,但是从性能数据的上报情况来看,和以往的数据上报量差不多。手头的 iOS 设备测试时均能正常上报。
editor编辑的富文本,在skyline模式下,rich-text会忽略掉编辑器编辑的富文本空行,下图对比 skyline渲染 [图片] webview渲染 [图片] 代码片段有明显对比,请问这种怎么解决
页面元素仅有<view /> 第一种 1、skyline配置 :"defaultDisplayBlock": true 实际的大小如下: [图片] [图片] 第二种:2、skyline配置 "defaultContentBox": true 实际的大小如下: [图片][图片]
<swiper> <swiper-item> <horizontal-drag-gesture-handler> <view></view> </horizontal-drag-gesture-handler> </swiper-item> </swiper> 上面这种写法,在模拟器中调试是OK的,内层的水平拖拽可以正常响应。但是真机调试时,内层拖拽不会响应,而是响应swiper的拖拽。
我想知道,web-view实际上是有个url的,那我看文档说可以替换成Skyline去渲染,那怎么把url转到Skyline?难道是要我在写一遍代码么?那不是和普通的wxml和wxss这种一样么?我既然能用普通的wxml和wxss去写,干嘛还要用Skyline?所以url怎么转换成Skyline?
注意就是原封不动的官方模板代码:js-skyline 基础模板 真机调试机型:小米13 [图片][图片]
skyline下面scroll-view的 flex-direction: row 失效? <scroll-view type="list" enhanced="true" show-scrollbar="false" enable-flex="true">
代码:https://github.com/sierraqin/hyacinth 页面:pages/proj853/index 位置:/pages/proj853/index.wxml ,第8行 此问题仅Skyline下存在 image组件显示svg图片时渲染模糊。最开始svg图片是以矢量形式渲染的,无论放大多少倍都极其清晰,但出现问题后,svg疑似是被转换为位图缩略图后被渲染,放大时,不会渲染放大的svg,而是渲染放大后的缩略图。 2024年1月时,svg图片正常显示。2月时,开始陆续有部分安卓用户反馈图片模糊,安卓微信客户端登录微信账号A真机调试时,模糊问题稳定复现,相同手机相同环境,登录微信账号B后问题消失无法复现,切换回之前的微信账号A登录后问题又可以稳定复现,切换到微信账号B后问题又无法复现(可能是在灰度???),此时开发者工具、iOS端均无法复现问题。至9月时,iOS、安卓、开发者工具均出现模糊问题。
我是做了一个组件创建Canvas 这一直获取不到Canvas 咋回事? wx.createSelectorQuery() .in(this) .select('#image-cropper')// 在 WXML 中填入的 id .fields({ node: true, size: true }) .exec((res) => { console.log(res,33333) // Canvas 对象 this.canvas= res[0].node // 渲染上下文 this.ctx = this.canvas.getContext('2d') this.canvas.width=this.data._canvas_width * this.data.export_scale this.canvas.height=this.data._canvas_height * this.data.export_scale this.data.PushImg=this.canvas.createImage() })
如果不配置skyline模式的话 第一次打开就能正常打开不报错。所以怀疑是skyline那里出问题了 报错内容如下: MiniProgramError undefined is not an object (evaluating 'this.waitingForHoverReset.then') TypeError: undefined is not an object (evaluating 'this.waitingForHoverReset.then') at _hoverClassChange (WARenderContext.js:1:225715) at hoverClass (WARenderContext.js:1:1133868) at callAttributeFilter (WAServiceMainContext.js:1:255480) at (WAServiceMainContext.js:1:274630) at (appservice.app.js:7146:4527) at o (WAServiceMainContext.js:1:281837) at createNativeNodeWithInit (WAServiceMainContext.js:1:259542) at createCommonElement (WAServiceMainContext.js:1:281981) at (WAServiceMainContext.js:1:276231) at b (appservice.app.js:7146:4379) at j (appservice.app.js:7146:2140) at handleChildrenCreation (WAServiceMainContext.js:1:275887) at handleChildrenCreationAndInsert (WAServiceMainContext.js:1:277968) at (WAServiceMainContext.js:1:276535) at c (appservice.app.js:7146:2184) at (WAServiceMainContext.js:1:279462) at handleChildrenCreation (WAServiceMainContext.js:1:275887) at handleChildrenCreationAndInsert (WAServiceMainContext.js:1:277968) at (WAServiceMainContext.js:1:279441) at diff (WAServiceMainContext.js:1:271714) at (WAServiceMainContext.js:1:279242) at b (appservice.app.js:7146:2208) at c (share/index.appservice.js:1:412) at handleChildrenUpdate (WAServiceMainContext.js:1:278113) at (WAServiceMainContext.js:1:278906) at a (share/index.appservice.js:1:464) at handleChildrenUpdate (WAServiceMainContext.js:1:278113) at update (WAServiceMainContext.js:1:275448) at updateValues (WAServiceMainContext.js:1:289065) at (WAServiceMainContext.js:1:297159) at applyDataUpdates (WAServiceMainContext.js:1:211619) at setData (WAServiceMainContext.js:1:304410) at (WASubContext.js:1:158100) at P (WASubContext.js:1:152880) at setData (WASubContext.js:1:158079) at (appservice.app.js:7214:73709) at <setTimeout callback function> at (WASubContext.js:1:110313) at (WASubContext.js:1:142858) at p (WAServiceMainContext.js:1:151705) at (WAServiceMainContext.js:1:139654) _onNativeTimer@ global code@
[图片][图片] 左图为webview模式,右图为skyline模式。宽度为是设置的max-width: 220px;
用自定义路由打开新页面,快速拖动就会卡死,简单布局的情况也会 [视频]
微信小程序开启了glass-easel,\n转义失效了
Snapshot支持截取live-pusher的画面吗?
Skyline 模式下 mobx-miniprogram-bindings 只能手工绑定吗?BehaviorWithStore绑定报错 import { createStoreBindings } from "mobx-miniprogram-bindings"; import { store as receiveds } from "./reservations"; const STORE_TYPES = { RECEIVED_RESERVATIONS: "ReceivedReservations", }; const STORE_CONFIGS = { [STORE_TYPES.RECEIVED_RESERVATIONS]: { store: receiveds, fields: ["receiveds"], actions: ["updatedReceived"], }, }; export const handleStores = (context, stores) => { return stores.map((store) => { const config = STORE_CONFIGS[store]; if (!config) { throw new Error(`Unknown store type: ${store}`); } return createStoreBindings(context, config); }); };
https://developers.weixin.qq.com/s/OhUmRlmK7nVE
事情是这样的,我在webview页面里有个样式 [图片] 效果本来是这样子的: [图片] 然后跳转到skyline页面里,就变成这个样子了,应该是white-space:pre; [图片] 求求了,这是我项目中最后一个skyline页面了, 如果再不能实现的话,我就只能忍痛全部退回到webview了。 (心累)极其舍不得丢弃snapshot组件,才一直保留这个skyline页面的。
使用 display: flex-reverse 搭配 padding 时,ios 下边距展示成了双倍的 android(正常) [图片] ios(异常): [图片]
小程序示例
交互动画 tab
https://developers.weixin.qq.com/miniprogram/dev/component/swiper.html#Skyline%20%E7%89%B9%E6%9C%89%E5%B1%9E%E6%80%A7:~:text=%E6%8C%87%E7%A4%BA%E5%99%A8%E6%95%88%E6%9E%9C%E6%BC%94%E7%A4%BA-,Swiper%20%E5%A2%9E%E5%BC%BA%E7%89%B9%E6%80%A7%E7%A4%BA%E4%BE%8B%E4%BB%A3%E7%A0%81,-%E5%9C%A8%E5%BC%80%E5%8F%91%E8%80%85测试示例代码未复现