Closed liuxi150 closed 4 months ago
[!NOTE] Currently processing new changes in this PR. This may take a few minutes, please wait...
Commits
Files that changed from the base of the PR and between 2a5d38cb61d9b476ac2b59cab26f55a46b0fd52d and 253ea8d523b90d9ddd456afcabf4234b3125c5d4.Files ignored due to path filters (1)
* `pnpm-lock.yaml` is excluded by `!pnpm-lock.yaml`Files selected for processing (1)
* packages/effects-core/package.json (1 hunks)_____________________________________________________________________________________________________________________ < The average user doesn't give a damn what happens, as long as (1) it works and (2) it's fast. - Daniel J. Bernstein > --------------------------------------------------------------------------------------------------------------------- \ \ \ \ /\ ( ) .( o ).
The recent update introduces a new disableGLLostEvent
boolean property to the AlipayDowngradeOptions
interface. This property allows conditional handling of the webglcontextlost
event in the setAlipayDowngradeBizId
function. Additionally, the web-packages/demo/src/context-lost-restore.ts
file has been updated to import this function and call it with the new property set to true
.
Files | Change Summary |
---|---|
plugin-packages/alipay-downgrade/src/index.ts |
Added disableGLLostEvent property to AlipayDowngradeOptions and updated setAlipayDowngradeBizId function. |
web-packages/demo/src/context-lost-restore.ts |
Imported setAlipayDowngradeBizId and called it with disableGLLostEvent set to true . |
sequenceDiagram
participant Demo as context-lost-restore.ts
participant Plugin as alipay-downgrade/index.ts
Demo->>Plugin: import { setAlipayDowngradeBizId }
Demo->>Plugin: setAlipayDowngradeBizId('bizid', { disableGLLostEvent: true })
Plugin->>Plugin: Check disableGLLostEvent
alt disableGLLostEvent is true
Plugin->>Plugin: Skip adding webglcontextlost event listener
else disableGLLostEvent is false
Plugin->>Plugin: Add webglcontextlost event listener
end
In the code where pixels gleam,
A new flag set the scene,
To lose or not the WebGL dream,
Conditional and clean.
With options clear and bright,
The canvas stays in sight,
Our code now feels just right. 🌟
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Summary by CodeRabbit
webglcontextlost
event listener in the Alipay downgrade plugin.