Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@VicenteCartas
Copy link
Contributor

Adding all missing properties for ParticleSystem and Node based ParticleSystem.

image image

@bjsplat
Copy link
Collaborator

bjsplat commented Dec 16, 2025

Please make sure to label your PR with "bug", "new feature" or "breaking change" label(s).
To prevent this PR from going to the changelog marked it with the "skip changelog" label.

@bjsplat
Copy link
Collaborator

bjsplat commented Dec 16, 2025

Snapshot stored with reference name:
refs/pull/17559/merge

Test environment:
https://snapshots-cvgtc2eugrd3cgfd.z01.azurefd.net/refs/pull/17559/merge/index.html

To test a playground add it to the URL, for example:

https://snapshots-cvgtc2eugrd3cgfd.z01.azurefd.net/refs/pull/17559/merge/index.html#WGZLGJ#4600

Links to test your changes to core in the published versions of the Babylon tools (does not contain changes you made to the tools themselves):

https://playground.babylonjs.com/?snapshot=refs/pull/17559/merge
https://sandbox.babylonjs.com/?snapshot=refs/pull/17559/merge
https://gui.babylonjs.com/?snapshot=refs/pull/17559/merge
https://nme.babylonjs.com/?snapshot=refs/pull/17559/merge

To test the snapshot in the playground with a playground ID add it after the snapshot query string:

https://playground.babylonjs.com/?snapshot=refs/pull/17559/merge#BCU1XR#0

If you made changes to the sandbox or playground in this PR, additional comments will be generated soon containing links to the dev versions of those tools.

@bjsplat
Copy link
Collaborator

bjsplat commented Dec 16, 2025

You have made possible changes to the playground.
You can test the snapshot here:

https://snapshots-cvgtc2eugrd3cgfd.z01.azurefd.net/PLAYGROUND/refs/pull/17559/merge/

The snapshot playground with the CDN snapshot (only when available):

https://snapshots-cvgtc2eugrd3cgfd.z01.azurefd.net/PLAYGROUND/refs/pull/17559/merge/?snapshot=refs/pull/17559/merge

Note that neither Babylon scenes nor textures are uploaded to the snapshot directory, so some playgrounds won't work correctly.

@bjsplat
Copy link
Collaborator

bjsplat commented Dec 16, 2025

You have changed file(s) that made possible changes to the sandbox.
You can test the sandbox snapshot here:

https://snapshots-cvgtc2eugrd3cgfd.z01.azurefd.net/SANDBOX/refs/pull/17559/merge/

@bjsplat
Copy link
Collaborator

bjsplat commented Dec 16, 2025

@bjsplat
Copy link
Collaborator

bjsplat commented Dec 16, 2025

@bjsplat
Copy link
Collaborator

bjsplat commented Dec 16, 2025

@bjsplat
Copy link
Collaborator

bjsplat commented Dec 16, 2025

@sebavan sebavan enabled auto-merge (squash) December 16, 2025 15:31
}}
/>
) : (
<TextPropertyLine label="Source" value="No meshes in scene." />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@georginahalpern for the ChooseTexture component, what do we do if there are no textures in teh scene?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the scenario is supported, it looks like this
image

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#17568 has been merged so this can be updated to use the nodeSelector component in a later iteration or PR

@bjsplat
Copy link
Collaborator

bjsplat commented Dec 17, 2025

@bjsplat
Copy link
Collaborator

bjsplat commented Dec 17, 2025

@bjsplat
Copy link
Collaborator

bjsplat commented Dec 17, 2025

@bjsplat
Copy link
Collaborator

bjsplat commented Dec 17, 2025

Please make sure to label your PR with "bug", "new feature" or "breaking change" label(s).
To prevent this PR from going to the changelog marked it with the "skip changelog" label.

@bjsplat
Copy link
Collaborator

bjsplat commented Dec 17, 2025

Please make sure to label your PR with "bug", "new feature" or "breaking change" label(s).
To prevent this PR from going to the changelog marked it with the "skip changelog" label.

@bjsplat
Copy link
Collaborator

bjsplat commented Dec 17, 2025

Snapshot stored with reference name:
refs/pull/17559/merge

Test environment:
https://snapshots-cvgtc2eugrd3cgfd.z01.azurefd.net/refs/pull/17559/merge/index.html

To test a playground add it to the URL, for example:

https://snapshots-cvgtc2eugrd3cgfd.z01.azurefd.net/refs/pull/17559/merge/index.html#WGZLGJ#4600

Links to test your changes to core in the published versions of the Babylon tools (does not contain changes you made to the tools themselves):

https://playground.babylonjs.com/?snapshot=refs/pull/17559/merge
https://sandbox.babylonjs.com/?snapshot=refs/pull/17559/merge
https://gui.babylonjs.com/?snapshot=refs/pull/17559/merge
https://nme.babylonjs.com/?snapshot=refs/pull/17559/merge

To test the snapshot in the playground with a playground ID add it after the snapshot query string:

https://playground.babylonjs.com/?snapshot=refs/pull/17559/merge#BCU1XR#0

If you made changes to the sandbox or playground in this PR, additional comments will be generated soon containing links to the dev versions of those tools.

@bjsplat
Copy link
Collaborator

bjsplat commented Dec 17, 2025

You have changed file(s) that made possible changes to the sandbox.
You can test the sandbox snapshot here:

https://snapshots-cvgtc2eugrd3cgfd.z01.azurefd.net/SANDBOX/refs/pull/17559/merge/

@bjsplat
Copy link
Collaborator

bjsplat commented Dec 17, 2025

You have made possible changes to the playground.
You can test the snapshot here:

https://snapshots-cvgtc2eugrd3cgfd.z01.azurefd.net/PLAYGROUND/refs/pull/17559/merge/

The snapshot playground with the CDN snapshot (only when available):

https://snapshots-cvgtc2eugrd3cgfd.z01.azurefd.net/PLAYGROUND/refs/pull/17559/merge/?snapshot=refs/pull/17559/merge

Note that neither Babylon scenes nor textures are uploaded to the snapshot directory, so some playgrounds won't work correctly.

@bjsplat
Copy link
Collaborator

bjsplat commented Dec 17, 2025

@bjsplat
Copy link
Collaborator

bjsplat commented Dec 17, 2025

@bjsplat
Copy link
Collaborator

bjsplat commented Dec 17, 2025

@bjsplat
Copy link
Collaborator

bjsplat commented Dec 17, 2025

Comment on lines 210 to 217
const windowAsAny = window as any;
if (windowAsAny.Playground && oldId) {
// Update Playground code when snippet id is hard-coded.
windowAsAny.Playground.onRequestCodeChangeObservable.notifyObservers({
regex: new RegExp(`ParticleHelper.ParseFromSnippetAsync\\("${oldId}`, "g"),
replace: `ParticleHelper.ParseFromSnippetAsync("${system.snippetId}`,
});
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know we have this pattern a handful of times in Inspector v1, but I think for v2 we don't want to propagate this pattern. Instead, we should probably have a service that fires this event, and then Playground can add a service that consumes this service, registers for the event, and does its own code patching. We could try to do that with this PR, or we could just add a comment saying we should do this and don't propagate this pattern. Let me have a look and see how much work it would be to do this.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ryantrem should we merge and addreess later or is it better to do the change now ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@VicenteCartas and I chatted and thought we would just exclude it from the first pass, but open to other perspectives as well.

@bjsplat
Copy link
Collaborator

bjsplat commented Dec 17, 2025

You have made possible changes to the playground.
You can test the snapshot here:

https://snapshots-cvgtc2eugrd3cgfd.z01.azurefd.net/PLAYGROUND/refs/pull/17559/merge/

The snapshot playground with the CDN snapshot (only when available):

https://snapshots-cvgtc2eugrd3cgfd.z01.azurefd.net/PLAYGROUND/refs/pull/17559/merge/?snapshot=refs/pull/17559/merge

Note that neither Babylon scenes nor textures are uploaded to the snapshot directory, so some playgrounds won't work correctly.

@bjsplat
Copy link
Collaborator

bjsplat commented Dec 17, 2025

You have changed file(s) that made possible changes to the sandbox.
You can test the sandbox snapshot here:

https://snapshots-cvgtc2eugrd3cgfd.z01.azurefd.net/SANDBOX/refs/pull/17559/merge/

@bjsplat
Copy link
Collaborator

bjsplat commented Dec 17, 2025

@bjsplat
Copy link
Collaborator

bjsplat commented Dec 17, 2025

@bjsplat
Copy link
Collaborator

bjsplat commented Dec 17, 2025

@bjsplat
Copy link
Collaborator

bjsplat commented Dec 17, 2025

@VicenteCartas VicenteCartas marked this pull request as draft December 17, 2025 21:03
@VicenteCartas
Copy link
Contributor Author

Moving it to draft, I will complete after the holidays.

* @param props Component props.
* @returns Render property lines.
*/
export const ParticleSystemEmitterProperties: FunctionComponent<{ particleSystem: ParticleSystem; selectionService: ISelectionService }> = (props) => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there is a lot going on in this file, i'd maybe recommend separating the attractors / emitters/ etc properties into their own files to reduce cognitive overload

};
}),
]}
onChange={(value) => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think this can be updated to use entitySelectorPropertyLine so that u don't have to manuallly create the key / value mapping logic

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants