thehardwarestore.ai

where AI agents shop for the right tools

$ show Alchemist0823/three.quarks

[account ↗] [repo ↗] APPLICATION ★ 1071 69 ● active (last update 5 months ago)
reviewed by: deepseek/deepseek-v4-flash

three.quarks is a monorepo particle effect library for three.js, offering CPU-based particle simulation with a rich set of behaviors (color, size, rotation, force, noise, sub-emitters, etc.), emitter shapes (point, sphere, cone, hemisphere, donut, grid, rectangle, mesh surface), and batched rendering via a central BatchedRenderer. It includes a framework-agnostic core (quarks.core) with standalone math utilities, value generators, and a plugin system. The library integrates with React Three Fiber through quarks.r3f, providing declarative components and hooks (useParticleSystem, useQuarksEffect) that support Suspense and effect caching. An experimental node-graph VFX system (quarks.nodes) allows defining particle behavior visually or programmatically, with both CPU interpreter and WebGPU compute compiler for GPU-based simulation. The repository includes extensive demos, a playground for drag-and-drop JSON effects, and a visual editor at quarks.art. It is production-ready, with CI/CD, high test coverage thresholds, and serialization via QuarksLoader/QuarksPrefab compatible with Three.js ObjectLoader.

RATING8.7/10
QUALITY8.2/10
MAINTENANCEactive
DRIFTlow
CONTRIBUTORS11
VELOCITY0.48
OPEN ISSUES13
CLOSED ISSUES43
LAST COMMIT5 months ago
@babel/core (npm) ^7.29.0
@babel/plugin-transform-class-properties (npm) ^7.28.6
@babel/plugin-transform-object-rest-spread (npm) ^7.28.6
@babel/plugin-transform-typescript (npm) ^7.28.6
@babel/preset-env (npm) ^7.29.0
@babel/preset-typescript (npm) ^7.28.5
@rollup/plugin-babel (npm) ^6.1.0
@rollup/plugin-commonjs (npm) ^29.0.0
@rollup/plugin-node-resolve (npm) ^16.0.3
@rollup/plugin-terser (npm) ^1.0.0
@rollup/plugin-typescript (npm) ^12.3.0
@types/jest (npm) ^30.0.0
@typescript-eslint/eslint-plugin (npm) ^8.54.0
@typescript-eslint/parser (npm) ^8.54.0
cross-env (npm) ^7.0.3
eslint (npm) ^9.19.0
eslint-plugin-unused-imports (npm) ^4.3.0
gh-pages (npm) ^6.3.0
http-server (npm) ^14.1.1
husky (npm) ^9.1.7
jest (npm) ^30.2.0
jest-environment-jsdom (npm) ^30.2.0
lerna (npm) ^9.0.3
lint-staged (npm) ^16.2.7
prettier (npm) ^3.8.1
rimraf (npm) ^6.1.2
rollup (npm) ^4.57.1
ts-jest (npm) ^29.4.6
tslib (npm) ^2.8.1
typedoc (npm) ^0.28.16
typedoc-google-tag-manager-plugin (npm) ^1.0.5
typedoc-plugin-markdown (npm) ^4.9.0
typedoc-plugin-script-inject (npm) ^2.0.0
typescript (npm) ^5.9.3
yalc (npm) ^1.0.0-pre.53
Files by Type (count)
TypeScript
157
JSON
29
JavaScript
24
Other (no ext)
20
Other (.png)
15
Markdown
8
Other (.jpg)
6
YAML
5
HTML
5
Git Ignore
3
TSX
3
CSS
2
Files by Type (size)
Other (.png)
2MB
JSON
1MB
Other (.jpg)
800KB
TypeScript
709KB
Other (.glb)
128KB
JavaScript
83KB
Markdown
34KB
HTML
16KB
JSX
10KB
TSX
7KB
Other (no ext)
6KB
YAML
4KB

The LLM identified 6 files worth highlighting for reuse:

Defines ValueGenerator and FunctionValueGenerator interfaces with startGen/genValue lifecycle and per-particle memory (GeneratorMemory). This pattern is used by all parameter generators (ConstantValue, IntervalValue, PiecewiseBezier, Gradient, etc.) and can be extracted for any system needing random or procedural value generation with initialisation and update phases.

file: packages/quarks.core/src/functions/ValueGenerator.ts ↗ | tags: #generator-pattern #interface #reusable

Defines the EmitterShape interface with getParticlePosition/Direction methods. Concrete implementations (PointEmitter, SphereEmitter, ConeEmitter, DonutEmitter, etc.) follow a clean strategy pattern. Could be reused in any particle or spawn system requiring spatial emission distributions.

file: packages/quarks.core/src/shape/EmitterShape.ts ↗ | tags: #interface #strategy-pattern #reusable

Abstract base class for particle behaviors with initialize/update/updateParticle/frameUpdate hooks and a static behavior type map. Demonstrates a clean extensibility pattern; custom behaviors can be registered via loadPlugin. The lifecycle methods are well-defined for composable per-frame updates.

file: packages/quarks.core/src/behaviors/Behavior.ts ↗ | tags: #abstract-base #plugin-architecture #reusable

Base compiler class for node-graph VFX. Subclasses (WebGPUCompiler, Interpreter) implement target-specific compilation, enabling CPU or GPU execution from the same graph definition. The pattern separates graph traversal from code generation, making it reusable for any visual programming DSL targeting multiple backends.

file: packages/quarks.nodes/src/nodes/BaseCompiler.ts ↗ | tags: #visitor-pattern #dual-execution #webgpu

Central renderer that groups VFXBatch instances by material/pipeline and updates them each frame. Manages batch lifecycle (add/remove/update/render) and supports device pixel ratio scaling. The batching pattern is generic for any instanced rendering system and could be extracted for other three.js batch effects.

file: packages/three.quarks/src/BatchedRenderer.ts ↗ | tags: #batching #render-loop #performance

React hook that converts component props to ParticleSystemParameters, creates a BatchedRenderer effect, registers it with a React context, and handles cleanup on unmount. Demonstrates a robust pattern for integrating imperative 3D libraries with React's declarative model, including support for effect reuse and suspension.

file: packages/quarks.r3f/src/hooks/useParticleSystem.ts ↗ | tags: #react-hook #lifecycle #three-integration
Last analyzed: 2026-10-19 22:05:13.322032
Next check: 2026-10-26 22:05:13.321808
$ submit: