# \[extension\] advanced particles

**URL:** <https://forum.makecode.com/t/extension-advanced-particles/46444>\
**Category:** Show & Tell\
**Tags:** graphics-and-math, extension\
**Created:** [October 12, 2026, 4:31pm UTC](https://forum.makecode.com/t/extension-advanced-particles/46444 "2026-10-12T16:31:51Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Soleb244](https://avatars.discourse-cdn.com/v4/letter/s/aeb1de/32.png) [@Soleb244](https://forum.makecode.com/u/Soleb244)\
**Post date:** [October 12, 2026, 4:31pm UTC](https://forum.makecode.com/t/extension-advanced-particles/46444/1 "2026-10-12T16:31:51Z")

</div>

my first extension, yay!

**Note:** this extension is currently in **beta testing** , it’s still not finished, so it likely contains lots of bugs.

> **[GitHub - Soleb244/advanced-particles: my first extension](https://github.com/soleb244/advanced-particles)**
>
> my first extension

You should be able to see it if you just type `soleb244/advanced-particles`

It works for me, but there’s something with local extensions or whatever, so I need to test if others can use it too. **If you tested it and it worked, react with :duck: , if it didnt react with a :snake:** please.

As I said, it’s not finished; there are some JS-only features and features that I haven’t coded yet, so here are some planned features:

> **Planned features**
>
> - adding all the other particle and spawner properties to blocks
> - skipframes or minimal-deltaTime for particles to optionally improve performance (you’ll understand when it’s finished)
> - rectangles that do something to all particles within them (accelerate them, destroy them, etc)
> - global functions that affect all particles, for things like explosions
> - custom particles that work with all the other systems but allow you to create your own rendering function
> - updating the organisation of blocks in the editor

If you tested it, please give me feedback

---

<div class="post-metadata">

**Author:** ![Sword\_Studios](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/sword_studios/32/35216_2.png) [@Sword\_Studios](https://forum.makecode.com/u/Sword_Studios)\
**Post date:** [October 13, 2026, 3:31am UTC](https://forum.makecode.com/t/extension-advanced-particles/46444/2 "2026-10-13T03:31:56Z")

</div>

This is such a gret extension man

---

<div class="post-metadata">

**Author:** ![VoxelMaster64](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/voxelmaster64/32/32075_2.png) [@VoxelMaster64](https://forum.makecode.com/u/VoxelMaster64)\
**Post date:** [October 13, 2026, 3:33am UTC](https://forum.makecode.com/t/extension-advanced-particles/46444/3 "2026-10-13T03:33:00Z")

</div>

just looking at your extension i can see some things that could be changed. What i could fins was that instead of this:

```typescript
class Particle {
     x: number // _x keeps it hidden in js when user is coding
     y: number
}

enum ParticleProperty {
    X,
    Y,
    ...
}

function getProperty(particle: Particle, property: ParticleProperty) {
    switch (property) {
        case ParticleProperty.X:
            return particle.x
        case ParticleProperty.Y:
            return particle.y
       ...
    }
} // also create a setter

```

you can actually do:

```typescript
class Particle {
    _x: number // _x so that the get/setters work
    _y: number

    get x() {
        return this._x
    }
    set x(to: number) {
        this._x = to
    }

    get y() {
        return this._y
    }
    set y(to: number) {
        this._y = to
    }
}

```

It keeps the code cleaner and faster, and you you can do `myParticle.x` rather than `getParticleProperty(myParticle, ParticleProperty.X)`! And if you dont know the best way to create the `///%`'s, i recommend looking at the Sprite class, specifially right [here](https://github.com/microsoft/pxt-common-packages/blob/4e894460f0fb988c5df2fc39fb73c0b96709eebe/libs/game/sprite.ts#L113). Note that these get/setters only work inside classes, and not namespaces or interfaces!

---

<div class="post-metadata">

**Author:** ![CodaKnight](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/codaknight/32/33491_2.png) [@CodaKnight](https://forum.makecode.com/u/CodaKnight)\
**Post date:** [October 13, 2026, 3:33am UTC](https://forum.makecode.com/t/extension-advanced-particles/46444/4 "2026-10-13T03:33:40Z")

</div>

Can you give me some examples of how this could be used? It seems that this could be really helpful with some particle effects I’m making. Also, I was wondering how you made have a beta flag when you import the extension because that would be really helpful in some of my extensions!

---

<div class="post-metadata">

**Author:** ![YamJam](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/yamjam/32/29681_2.png) [@YamJam](https://forum.makecode.com/u/YamJam)\
**Post date:** [October 13, 2026, 5:34pm UTC](https://forum.makecode.com/t/extension-advanced-particles/46444/5 "2026-10-13T17:34:59Z")

</div>

Hey man no hate but ts is a scam wdym this is a fire gradient:

 ![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/3X/3/6/365fcad181ac337b78af7c9e7067e8b3f4792de6.png)  
I don’t know if I did something wrong (since I spent like 30 seconds on this).

---

<div class="post-metadata">

**Author:** ![Soleb244](https://avatars.discourse-cdn.com/v4/letter/s/aeb1de/32.png) [@Soleb244](https://forum.makecode.com/u/Soleb244)\
**Post date:** [October 13, 2026, 5:43pm UTC](https://forum.makecode.com/t/extension-advanced-particles/46444/6 "2026-10-13T17:43:55Z")

</div>

The gradient changes the color throughout the lifetime, and you are setting the lifetime to **2000 seconds** (i know its not obvious that they are seconds and not miliseconds, I will fix that) so it would take like 400 seconds before the color changes.

---

<div class="post-metadata">

**Author:** ![Soleb244](https://avatars.discourse-cdn.com/v4/letter/s/aeb1de/32.png) [@Soleb244](https://forum.makecode.com/u/Soleb244)\
**Post date:** [October 13, 2026, 5:44pm UTC](https://forum.makecode.com/t/extension-advanced-particles/46444/7 "2026-10-13T17:44:41Z")

</div>

I thought you could just use myParticle.x in JS without anything added, the function was there mainly for block coding.
