UNPKG

@animech-public/playcanvas

Version:
2 lines (1 loc) 783 B
var n="\nuniform mat3 spawnBounds;\nuniform float spawnBoundsSphere;\nuniform float spawnBoundsSphereInnerRatio;\nuniform float spawnBoundsLength;\nuniform float spawnBoundsLengthInnerRatio;\nvec3 calcSpawnPosition(vec3 inBounds, float rndFactor) {\n\tfloat rnd4 = fract(rndFactor * 1000.0);\n\tvec3 norm = normalize(inBounds.xyz - vec3(0.5));\n\tnorm.z = abs(norm.z);\n\tfloat r = rnd4 * (1.0 - spawnBoundsSphereInnerRatio) + spawnBoundsSphereInnerRatio;\n#ifndef LOCAL_SPACE\n\treturn emitterPos + spawnBounds * norm * r * spawnBoundsSphere;\n#else\n\treturn spawnBounds * norm * r * spawnBoundsSphere;\n#endif\n}\nvoid addInitialVelocity(inout vec3 localVelocity, vec3 inBounds) {\n\tlocalVelocity += normalize(inBounds - vec3(0.5)) * initialVelocity;\n}\n";export{n as default};