Skip to content

Commit

Permalink
fix: fixed editor properties, missing themes for now
Browse files Browse the repository at this point in the history
  • Loading branch information
matteobruni committed Sep 24, 2020
1 parent 30b4ac9 commit 8598460
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 14 deletions.
Expand Up @@ -43,6 +43,10 @@ export class NumberOptionsEditor extends EditorBase {
await particles.refresh();
});

this.group.addProperty("max", "Max", EditorType.number).change(async () => {
await particles.refresh();
});

this.group.addProperty("value", "Value", EditorType.number).change(async () => {
await particles.refresh();
});
Expand Down
Expand Up @@ -16,6 +16,7 @@ import { TwinkleOptionsEditor } from "./Twinkle/TwinkleOptionsEditor";
import { EditorBase } from "../../../EditorBase";
import { LifeOptionsEditor } from "./Life/LifeOptionsEditor";
import { BounceOptionsEditor } from "./Bounce/BounceOptionsEditor";
import { EditorType } from "object-gui";

export class ParticlesOptionsEditor extends EditorBase {
public group!: EditorGroup;
Expand Down Expand Up @@ -43,6 +44,7 @@ export class ParticlesOptionsEditor extends EditorBase {
this.addSize();
this.addStroke();
this.addTwinkle();
this.addProperties();
}

private addBounce(): void {
Expand Down Expand Up @@ -128,4 +130,12 @@ export class ParticlesOptionsEditor extends EditorBase {

options.addToGroup(this.group);
}

private addProperties(): void {
const particles = this.particles;

this.group.addProperty("reduceDuplicates", "Reduce Duplicates", EditorType.boolean).change(async () => {
await particles.refresh();
});
}
}
28 changes: 14 additions & 14 deletions core/main/markdown/Options/Particles.md
@@ -1,16 +1,16 @@
# Particles

| key | option type | notes |
| ------------ | ----------- | ----------------------------------------------------------------------- |
| `collisions` | `object` | See Particles Collisions documentation {@link ICollisions | here} |
| `color` | `object` | See Particles Color documentation {@link IAnimatableColor | here} |
| `links` | `object` | See Particles Links documentation {@link ILinks | here} |
| `move` | `object` | See Particles Move documentation {@link IMove | here} |
| `number` | `object` | See Particles Number documentation {@link INumber | here} |
| `opacity` | `object` | See Particles Opacity documentation {@link IOpacity | here} |
| `rotate` | `object` | See Particles Rotate documentation {@link IRotate | here} |
| `shadow` | `object` | See Shape documentation {@link IShadow | here} |
| `shape` | `object` | See Shape documentation {@link IShape | here} |
| `size` | `object` | See Particles Size documentation {@link ISize | here} |
| `stroke` | `object` | See Particles Stroke documentation {@link IStroke | here} |
| `twinkle` | `object` | See Particles Twinkle documentation {@link ITwinkle | here} |
| key | option type | notes |
| ------------ | ----------- | ------------------------------------------------------------------ |
| `collisions` | `object` | See Particles Collisions documentation {@link ICollisions | here} |
| `color` | `object` | See Particles Color documentation {@link IAnimatableColor | here} |
| `links` | `object` | See Particles Links documentation {@link ILinks | here} |
| `move` | `object` | See Particles Move documentation {@link IMove | here} |
| `number` | `object` | See Particles Number documentation {@link IParticlesNumber | here} |
| `opacity` | `object` | See Particles Opacity documentation {@link IOpacity | here} |
| `rotate` | `object` | See Particles Rotate documentation {@link IRotate | here} |
| `shadow` | `object` | See Shape documentation {@link IShadow | here} |
| `shape` | `object` | See Shape documentation {@link IShape | here} |
| `size` | `object` | See Particles Size documentation {@link ISize | here} |
| `stroke` | `object` | See Particles Stroke documentation {@link IStroke | here} |
| `twinkle` | `object` | See Particles Twinkle documentation {@link ITwinkle | here} |

0 comments on commit 8598460

Please sign in to comment.