@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/CHANGELOG.md +4 -0
- package/dist/needle-engine.js +3932 -3881
- package/dist/needle-engine.min.js +74 -74
- package/dist/needle-engine.umd.cjs +86 -86
- package/lib/engine/engine_rendererdata.d.ts +1 -1
- package/lib/engine/engine_rendererdata.js +3 -1
- package/lib/engine/engine_rendererdata.js.map +1 -1
- package/lib/engine/extensions/NEEDLE_lighting_settings.js +1 -1
- package/lib/engine/extensions/NEEDLE_lighting_settings.js.map +1 -1
- package/lib/engine-components/ParticleSystem.js +2 -1
- package/lib/engine-components/ParticleSystem.js.map +1 -1
- package/lib/engine-components/ParticleSystemModules.d.ts +17 -2
- package/lib/engine-components/ParticleSystemModules.js +105 -14
- package/lib/engine-components/ParticleSystemModules.js.map +1 -1
- package/lib/engine-components/SceneSwitcher.d.ts +1 -1
- package/lib/engine-components/SceneSwitcher.js +9 -7
- package/lib/engine-components/SceneSwitcher.js.map +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/engine/engine_rendererdata.ts +2 -1
- package/src/engine/extensions/NEEDLE_lighting_settings.ts +1 -1
- package/src/engine-components/ParticleSystem.ts +2 -1
- package/src/engine-components/ParticleSystemModules.ts +1483 -1400
- package/src/engine-components/SceneSwitcher.ts +9 -7
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@needle-tools/engine",
|
|
3
|
-
"version": "3.2.
|
|
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;
|