Skip to content

Commit 8b08947

Browse files
deltakoshDavid Catuhe
andauthored
Restrict inspector inputs to particle system when node based (#16745)
Co-authored-by: David Catuhe <[email protected]>
1 parent 5552c0d commit 8b08947

File tree

5 files changed

+443
-401
lines changed

5 files changed

+443
-401
lines changed

packages/dev/core/src/Particles/IParticleSystem.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,11 @@ export interface IParticleSystem {
290290
/** @internal */
291291
_wasDispatched: boolean;
292292

293+
/**
294+
* Returns true if the particle system was generated by a node particle system set
295+
*/
296+
isNodeGenerated: boolean;
297+
293298
/**
294299
* Gets the maximum number of particles active at the same time.
295300
* @returns The max number of active particles.

packages/dev/core/src/Particles/Node/nodeParticleSystemSet.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ import { CreateParticleBlock } from "./Blocks/Emitters/createParticleBlock";
2424
/**
2525
* Defines a set of particle systems defined as a node graph.
2626
* @experimental This API is experimental and may change in future releases.
27-
* #K6F1ZB
27+
* NPE: #K6F1ZB
28+
* PG: #ZT509U
2829
*/
2930
export class NodeParticleSystemSet {
3031
private _systemBlocks: SystemBlock[] = [];

packages/dev/core/src/Particles/baseParticleSystem.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,13 @@ export class BaseParticleSystem implements IClipPlanesHolder {
227227
protected _rootUrl = "";
228228
protected _noiseTexture: Nullable<ProceduralTexture>;
229229

230+
/**
231+
* Returns true if the particle system was generated by a node particle system set
232+
*/
233+
public get isNodeGenerated(): boolean {
234+
return false;
235+
}
236+
230237
/**
231238
* Gets or sets a texture used to add random noise to particle positions
232239
*/

packages/dev/core/src/Particles/particleSystem.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ export class ParticleSystem extends ThinParticleSystem {
7878
/**
7979
* Returns true if the particle system was generated by a node particle system set
8080
*/
81-
public get isNodeGenerated(): boolean {
81+
public override get isNodeGenerated(): boolean {
8282
return this._nodeGenerated;
8383
}
8484

0 commit comments

Comments
 (0)