@babylonjs/core
Version:
Getting started? Play directly with the Babylon.js API using our [playground](https://playground.babylonjs.com/). It also contains a lot of samples to learn how to use it.
16 lines • 655 B
JavaScript
import { NodeParticleBuildState } from "../../nodeParticleBuildState.js";
/**
* @internal
* Tools for managing particle triggers and sub-emitter systems.
*/
export function _TriggerSubEmitter(template, scene, location) {
const newState = new NodeParticleBuildState();
newState.scene = scene;
const clone = template.createSystem(newState);
clone.canStart = () => true; // Allow the cloned system to start
clone.emitter = location.clone(); // Set the emitter to the particle's position
clone.disposeOnStop = true; // Clean up the system when it stops
clone.start();
return clone;
}
//# sourceMappingURL=triggerTools.js.map