babylon.quarks 0.24.1 → 0.25.0
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 +39 -0
- package/dist/babylon.quarks.cjs +1 -1
- package/dist/babylon.quarks.cjs.map +1 -1
- package/dist/babylon.quarks.esm.js +1 -1
- package/dist/babylon.quarks.esm.js.map +1 -1
- package/dist/babylon.quarks.umd.min.js +1 -1
- package/dist/babylon.quarks.umd.min.js.map +1 -1
- package/dist/types/index.d.ts +273 -7
- package/package.json +1 -1
- package/src/BatchedRenderer.ts +28 -1
- package/src/ParticleSystem.ts +256 -6
- package/src/QuarksLoader.ts +14 -0
- package/src/QuarksUtil.ts +97 -1
- package/src/SpriteBatch.ts +49 -9
- package/src/TrailBatch.ts +3 -0
- package/src/VFXBatch.ts +198 -1
- package/src/index.ts +21 -2
- package/src/shaders/chunks/surface.ts +188 -0
- package/src/shaders/particle_frag.glsl.ts +3 -11
- package/src/shaders/particle_frag.wgsl.ts +3 -11
- package/src/shaders/particle_physics_frag.glsl.ts +3 -11
- package/src/shaders/particle_physics_frag.wgsl.ts +3 -11
- package/src/shaders/stretched_bb_particle_vert.glsl.ts +12 -0
- package/src/shaders/stretched_bb_particle_vert.wgsl.ts +15 -0
- package/src/shaders/trail_frag.glsl.ts +3 -7
- package/src/shaders/trail_frag.wgsl.ts +3 -7
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,45 @@ All notable changes to the `babylon.quarks` package are documented here.
|
|
|
4
4
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
5
5
|
and the project follows the `quarks.core` 0.x version line.
|
|
6
6
|
|
|
7
|
+
## [0.25.0] — 2026-10-20
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
|
|
11
|
+
- `ParticleSystem.emissionMultiplier` (runtime only, default 1): scales bursts, emission over time
|
|
12
|
+
and over distance, and may go above 1, unlike `setQualityFactor`. The two multiply.
|
|
13
|
+
- `QuarksUtil.getDuration(root)`: seconds until an effect played from the start is over (start
|
|
14
|
+
delay, duration and longest life over playback speed; sub emitter targets a life after their
|
|
15
|
+
parents), or `Infinity` when a system loops.
|
|
16
|
+
- quarks.core `FrameOverLife` options (`fps`, `cycles`, `frameCount`, `loop`, `startFrame`, all
|
|
17
|
+
saved in JSON only when set): Unity's texture sheet FPS mode, several cycles per life, a looping
|
|
18
|
+
or holding frame segment and a per-particle random start frame. Without them the behaviour is
|
|
19
|
+
unchanged and stays in the fused pass.
|
|
20
|
+
- Texture effects on sprites, meshes and trails, GLSL and WGSL, each saved with the material in the
|
|
21
|
+
effect JSON only when set and batched apart when they differ:
|
|
22
|
+
- `ParticleSystem.uvScroll` `[u, v]`: scrolls the map in UV units per second on the renderer's clock.
|
|
23
|
+
- `ParticleSystem.gradientMap`: recolours the map through a ramp texture picked by its red
|
|
24
|
+
channel; the particle colour still tints it.
|
|
25
|
+
- `ParticleSystem.erosion` (`ParticleErosion`: mask, softness, edgeWidth, edgeColor, maskScroll):
|
|
26
|
+
alpha erosion. The particle's alpha decides how much of the shape is left instead of how
|
|
27
|
+
transparent it is, so a `ColorOverLife` alpha curve dissolves it through a noise mask or wipes
|
|
28
|
+
it through a gradient one, with an optional glowing edge.
|
|
29
|
+
- `RenderMode.Beam` (6) with `ParticleSystem.beamEnd` (a point or anything with a world position,
|
|
30
|
+
such as a `TransformNode`, read every frame; runtime only): a quad laid from each particle to
|
|
31
|
+
the end and turned about its length to face the camera, U along it, the size as its width. With
|
|
32
|
+
a sheet and `FrameOverLife` `fps` it flickers like lightning; bounds reach the end.
|
|
33
|
+
- `ParticleSystem.scalingMode` (`'shape'` default | `'hierarchy'`, constructor option, JSON written
|
|
34
|
+
only when `'hierarchy'`): in `'hierarchy'` a world-space system's start speeds scale with the
|
|
35
|
+
emitter's world scale, and `ForceOverLife` and `LimitSpeedOverLife` by its mean, so a scaled
|
|
36
|
+
effect moves in proportion. quarks.core `IParticleSystem.motionScale` carries the factor to
|
|
37
|
+
behaviors; `LimitSpeedOverLife` now learns its system in `initialize`.
|
|
38
|
+
- Example "Texture Effects" showing the texture effects and a beam.
|
|
39
|
+
|
|
40
|
+
### Fixed
|
|
41
|
+
|
|
42
|
+
- A looping system kept firing its bursts on every loop after `endEmit()`, so it never finished.
|
|
43
|
+
Bursts now stop with the rest of the system's own emission; a sub emitter's bursts, which belong
|
|
44
|
+
to parent particles still dying, keep firing.
|
|
45
|
+
|
|
7
46
|
## [0.24.1] — 2026-10-20
|
|
8
47
|
|
|
9
48
|
### Changed
|