使用产品:SuperMap iClient3D 11i(2023) for WebGL
问题详细描述: 粒子系统报错(SuperMap3D.js:1 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading '_context')
at new _0x98db6 (SuperMap3D.js:1:2474720))
文档上也没看到到有图片等参数,示例里面都是直接读取粒子文件的。如何使用图片创建粒子效果,并设置颜色呢?
let fireSystem = new SuperMap3D.ParticleSystem({
image: this.viewModel.fireImage,
endColor: SuperMap3D.Color.fromCssColorString('rgba(255,255,0,0.7)'),
minSize: this.viewModel.startScale,
maxSize: this.viewModel.endScale,
minLifeTime: this.viewModel.minimumParticleLife,
maxLifeTime: this.viewModel.maximumParticleLife,
minEmitPower: this.viewModel.minimumSpeed,
maxEmitPower: this.viewModel.maximumSpeed,
minimumLife : this.viewModel.minimumLife,
maximumLife : this.viewModel.maximumLife,
imageSize: new SuperMap3D.Cartesian2(this.viewModel.particleSize, this.viewModel.particleSize),
emitRate: this.viewModel.emissionRate
})