File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
packages/vrender-animate/src/custom/disappear Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -94,7 +94,7 @@ export class HybridEffectBase extends DisappearAnimateBase {
9494 let result : HTMLCanvasElement | null = null ;
9595
9696 // 根据用户配置决定渲染策略
97- if ( this . params ?. options ?. useWebGL ) {
97+ if ( this . params ?. options ?. useWebGL !== false ) {
9898 // 用户允许使用WebGL,按照父类的自动判别逻辑
9999 // 优先尝试WebGL实现
100100 if ( this . supportsWebGL ( ) ) {
Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ export interface ParticleConfig {
77 count ?: number ; // 粒子数量
88 size ?: number ; // 粒子大小
99 strength ?: number ; // 力场强度
10+ useWebGL : boolean ;
1011}
1112// 粒子数据结构
1213export interface ParticleData {
@@ -41,7 +42,8 @@ export class Particle extends HybridEffectBase {
4142 effectType : params ?. options ?. effectType || 'gravity' , //'explode' | 'vortex' | 'gravity'; // 粒子效果类型
4243 count : params ?. options ?. count || 4000 ,
4344 size : params ?. options ?. size || 20 ,
44- strength : params ?. options ?. strength || 1.5
45+ strength : params ?. options ?. strength || 1.5 ,
46+ useWebGL : params ?. options ?. useWebGL !== undefined ? params . options . useWebGL : true // 是否使用WebGL实现
4547 } ;
4648 }
4749
You can’t perform that action at this time.
0 commit comments