Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@pinkkis/phaser-plugin-pasuuna

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pinkkis/phaser-plugin-pasuuna

phaser-plugin-pasuuna

  • 0.5.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Phaser Plugin for Pasuuna Player

Phaser 3 plugin to use Pasuuna Player in your phaser projects. Plays SoundTracker, ProTracker and FastTracker mods.

MIT Licensed, see LICENSE.md for details. See Pasuuna Player repo for detail on the player itself.

Usage

The plugin is a UMD module, exposed as Pasuuna.PasuunaPlugin on the window object. You can also import it in webpack or something instead.

See the example in the /docs folder for a quick example on how to use it.

  • #loadSongFromCache(key, autoplay) - this takes a key string that is a Phaser cache key. Load mods as a binary in phaser's preloader, and pass the key to pasuuna. Start playback immediately if autoplay is true. Otherwise listen to the songLoaded event before calling #play()
  • #play() - start song from beginning, or if you've set the current pattern index
  • #stop() - stop the song
  • #setVolume(0.75) - set Pasuuna volume, float between 0 - 1
  • #setCurrentPattern(index) - set start point for playback with a pattern index integer.

Events

Available events are under this.pasuuna.eventTypes as an object.

Volume

Pasuuna shares Phaser's AudioContext, but volume controls are separate. So in your game, when controlling global volume, remember to change both implicitly.

Keywords

FAQs

Package last updated on 27 Apr 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc