Skip to content

Commit

Permalink
split code to multiple package and reduce three.quarks size
Browse files Browse the repository at this point in the history
  • Loading branch information
Alchemist0823 committed Jun 22, 2024
1 parent d526459 commit fb5f7dc
Show file tree
Hide file tree
Showing 147 changed files with 22,455 additions and 473 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
uses: actions/upload-pages-artifact@v2
with:
# Upload entire repository
path: './examples'
path: './packages/three.quarks/examples'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,37 +4,37 @@ Go back to [README](./README.md)

### Code Structure

**ParticleEmitter** [./src/ParticleEmitter.ts](./src/ParticleEmitter.ts)
**ParticleEmitter** [./packages/three.quarks/src/ParticleEmitter.ts](./packages/three.quarks/src/ParticleEmitter.ts)

A particle emitter is a threejs `Object3D` that used as a reference point to emit particles.
It can be attached to any `Object3D` in the scene.

**ParticleSystem** [./src/ParticleSystem.ts](./src/ParticleSystem.ts)
**ParticleSystem** [./packages/three.quarks/src/ParticleSystem.ts](./packages/three.quarks/src/ParticleSystem.ts)

The class represents each individual particle system instance.
It simulates all the particle or trails in the system.

**BatchedRenderer** [./src/BatchedRenderer.ts](./src/BatchedRenderer.ts)
**BatchedRenderer** [./packages/three.quarks/src/BatchedRenderer.ts](./packages/three.quarks/src/BatchedRenderer.ts)

The class represents the batch renderer. a three.js scene should only have one batchedRenderer
It keeps references of all particle systems and rendering batch.
It batches all particle systems that has the same rendering pipeline to a single VFXBatch.

**QuarksLoader** [./src/QuarksLoader.ts](./src/QuarksLoader.ts)
**QuarksLoader** [./packages/three.quarks/src/QuarksLoader.ts](./packages/three.quarks/src/QuarksLoader.ts)

QuarksLoader is a loader that loads quarks particle system from a json file. the json format is
compatible with three.js's json format.

**functions** [./src/functions/](./src/functions/)
**functions** [./packages/quarks.core/src/functions/](./packages/quarks.core/src/functions/)

A folder contains all the functions or value types that can be used as parameters of a particle system.

**shape** [./src/shape/](./src/shape/)
**shape** [./packages/quarks.core/src/shape/](./packages/quarks.core/src/shape/)

A folder contains all the predefined emitter shapes that can be used in a particle system.

**nodes** [./src/nodes/](./src/nodes/)
A new node driven VFX system that is under development.
**behaviors** [./packages/quarks.core/src/behaviors/](./packages/quarks.core/src/behaviors/)

**behaviors** [./src/behaviors/](./src/behaviors/)
A folder contains all the predefined behaviors that can be attached on a particle system.
An example would be SizeOverLife which means the size of the particle changes over its life time.

6 changes: 3 additions & 3 deletions packages/three.quarks/README.md → README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
## Background
[three.quarks](https://github.com/Alchemist0823/three.quarks) is a high-performance general-purpose particle
system library with a WYSIWYG visual editor
[three.quarks-editor](https://github.com/Alchemist0823/three.quarks-editor) for it. It runs on
[three.quarks-editor](https://quarks.art/create) for it. It runs on
top of the well-known WebGL library called [three.js](https://threejs.org).

## Roadmap
Expand Down Expand Up @@ -71,7 +71,7 @@ by adding their own Behavior.
npm install three.quarks
```

### Check [examples](examples) folder
### Check [examples](./packages/three.quarks/examples) folder

Add particle system to the scene

Expand Down Expand Up @@ -187,7 +187,7 @@ three.quarks-editor can help you preview a set of particle system at once.


### Tests
Check [test](test) folder
Check [test](./packages/three.quarks/test) folder

More examples will come up later.

Expand Down
Loading

0 comments on commit fb5f7dc

Please sign in to comment.