Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Wierd behaviour on Burst count using rand function #246

@Sandstedt

Description

@Sandstedt

When setting the burst count using the rand() function, the burst behaves wierdly, or random, too random. Sometimes the children are not spread out evenly, sometimes it's like the last childs is still playing. Compare this to when you set either count to, 2, 3, 4, 5 or 6 directly compared to 'rand(2, 6)'.

Example:

const example = new mojs.Burst({
  parent: '#example',
  x: 'rand(-50, 50)',
  y: 'rand(-50, 50)',
  count: 'rand(2, 6)'
});

document.addEventListener( 'click', function (e) {
  example.generate().replay();
});

Bug reproduction pen:
https://codepen.io/sandstedt/pen/Vwjdroy

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugbug to fix

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions