babylon.quarks 0.24.0 → 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 +52 -5
- 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,52 @@ 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
|
+
|
|
46
|
+
## [0.24.1] — 2026-10-20
|
|
47
|
+
|
|
48
|
+
### Changed
|
|
49
|
+
|
|
50
|
+
- Version aligned with babylon.quarks-editor 0.24.1 and the Unity exporter 0.24.1, which fix
|
|
51
|
+
issues in 0.24.0 (no runtime changes).
|
|
52
|
+
|
|
7
53
|
## [0.24.0] — 2026-10-20
|
|
8
54
|
|
|
9
55
|
### Added
|
|
@@ -43,11 +89,12 @@ and the project follows the `quarks.core` 0.x version line.
|
|
|
43
89
|
on its own generator started from the seed while it steps, and restarts it on `restart()`, so the
|
|
44
90
|
effect plays out identically every time; systems it emits into roll on it too. The editor has a
|
|
45
91
|
"Fixed seed" field; the Unity exporter writes Main → Random Seed when Auto Random Seed is off.
|
|
46
|
-
- `EffectPool`: a pool of copies of one effect for things played many times over.
|
|
47
|
-
parent)` takes an idle copy (or makes one, up to `maxSize`), places it and
|
|
48
|
-
systems have all finished returns to the pool by itself; `stop(copy)` ends
|
|
49
|
-
emission and lets it die out first; `release(copy)` takes it back at once;
|
|
50
|
-
up front. Idle copies stay disabled in the renderer's batches, so acquiring
|
|
92
|
+
- `EffectPool`: a pool of copies of one effect for things played many times over.
|
|
93
|
+
`acquire(position, parent)` takes an idle copy (or makes one, up to `maxSize`), places it and
|
|
94
|
+
plays it; a copy whose systems have all finished returns to the pool by itself; `stop(copy)` ends
|
|
95
|
+
a looping copy's emission and lets it die out first; `release(copy)` takes it back at once;
|
|
96
|
+
`prewarm` makes copies up front. Idle copies stay disabled in the renderer's batches, so acquiring
|
|
97
|
+
allocates nothing.
|
|
51
98
|
- `QuarksUtil.instantiate(root)`: a deep copy of an effect tree, with sub emitter links pointing at
|
|
52
99
|
the copied emitters.
|
|
53
100
|
- `ParticleSystem.sortMode` (constructor option, JSON `sortMode`, written only when not `'none'`):
|