Skip to content

Sprite should be defined as a dictionary instead of array #1772

Description

@debuglevel

Feature Proposal

Sprite definition is an array.

new Howl({
  sprite: {
    key1: [50, 100, true]
  },
});

It should be a dictionary instead (or additionally):

new Howl({
  sprite: {
    key1: { offset: 50, duration: 100, loop: true }
  },
});

This would enable IDE assistance and prevent wrong usage (like supplying an end-offset instead of the duration).

Possible Implementation

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions