@needle-tools/engine 3.2.1-alpha → 3.2.2-alpha

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@needle-tools/engine",
3
- "version": "3.2.1-alpha",
3
+ "version": "3.2.2-alpha",
4
4
  "description": "Needle Engine is a web-based runtime for 3D apps. It runs on your machine for development with great integrations into editors like Unity or Blender - and can be deployed onto any device! It is flexible, extensible and networking and XR are built-in",
5
5
  "main": "dist/needle-engine.umd.cjs",
6
6
  "type": "module",
@@ -136,7 +136,8 @@ export class RendererData {
136
136
  }
137
137
  }
138
138
 
139
- disableReflection() {
139
+ disableReflection(sourceId? : SourceIdentifier) {
140
+ if(sourceId && sourceId !== this._currentReflectionId) return;
140
141
  const scene = this.context.scene;
141
142
  scene.environment = null;
142
143
  }
@@ -160,6 +160,6 @@ export class SceneLightSettings extends Behaviour {
160
160
  if (this._lightProbeObj) this._lightProbeObj.removeFromParent();
161
161
  if(this._ambientLightObj) this._ambientLightObj.removeFromParent();
162
162
  if (this.sourceId)
163
- this.context.rendererData.disableReflection();
163
+ this.context.rendererData.disableReflection(this.sourceId);
164
164
  }
165
165
  }
@@ -414,6 +414,7 @@ class VelocityBehaviour extends ParticleSystemBaseBehaviour {
414
414
  particle[$gravitySpeed] = 1;
415
415
 
416
416
  particle[$velocityLerpFactor] = Math.random();
417
+ this.system.velocityOverLifetime?.init(particle);
417
418
 
418
419
  this._gravityDirection.set(0, -1, 0);
419
420
  if (this.system.main.simulationSpace === ParticleSystemSimulationSpace.Local)
@@ -463,7 +464,7 @@ class VelocityBehaviour extends ParticleSystemBaseBehaviour {
463
464
  // limit or modify speed
464
465
  const velocity = this.system.velocityOverLifetime;
465
466
  if (velocity.enabled) {
466
- velocity.apply(0, particle.position, particle.velocity, delta, particle.age, particle.life);
467
+ velocity.apply(particle, 0, particle.position, particle.velocity, delta, particle.age, particle.life);
467
468
  }
468
469
 
469
470
  const limitVelocityOverLifetime = this.system.limitVelocityOverLifetime;