XRain.js 717 B

1234567891011121314151617181920
  1. class XRain extends XSubSequence {
  2. constructor(e, t, r) {
  3. super(e, t, r);
  4. this.onLoadedObserverable.addOnce(()=>{
  5. this._particleGroups.forEach(n=>{
  6. const o = n.systems[0];
  7. o.getClassName() == "ParticleSystem" && (o.startPositionFunction = function(a, s) {
  8. const u = 2 * Math.random() * Math.PI
  9. , c = Math.random() * 15 * Math.sin(u)
  10. , h = this.minEmitBox.y
  11. , f = Math.random() * 15 * Math.cos(u);
  12. Vector3.TransformCoordinatesFromFloatsToRef(c, h, f, a, s)
  13. }
  14. )
  15. }
  16. )
  17. }
  18. )
  19. }
  20. }