Skip to content

Using rectangle or circle as particle causes TypeError due to missing frames property #71

@ghost

Description

Returning a basic rectangle or circle from the spriteFunction in makeParticle() will cause an error. The error is also triggered if you don't provide a sprite function and rely on the default which returns g.circle(). It can be fixed by changing the code on line 2314 of plugins.js from:

      if (particle.frames.length > 0) {
        particle.gotoAndStop(randomInt(0, particle.frames.length - 1));
      }

to

      if (particle.frames && particle.frames.length > 0) {
        particle.gotoAndStop(randomInt(0, particle.frames.length - 1));
      }

This makes it possible to try out particle effects using simple built in primitives.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions