Socket
Socket
Sign inDemoInstall

ng-zzfx

Package Overview
Dependencies
1
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    ng-zzfx

Angular API for: ZzFX - Zuper Zmall Zound Zynth - Micro Edition by Frank Force


Version published
Maintainers
1
Install size
176 kB
Created

Readme

Source

NgZzFx 8bit zounds for Angular ;)

npm version License

Angular API for: ZzFX - Zuper Zmall Zound Zynth - Micro Edition

ZzFx.js

ZzFX Demo

MIT License - Copyright 2019 Frank Force

Angularish demo

In your component:

  case1 = [ , , 1675, , .06, .24, 1, 1.82, , , 837, .06];

Give your element a sound by adding the directive as follows:

In your template:

  <div zoundfx trigger="click" [zound]="case1">💰</div>

Or by using the zzfs function wrapper:


  playSound: ZzFxFn;
  case4 = [1.5,.5,270,,.1,,1,1.5,,,,,,,,.1,.01];

  ngOnInit() {
    this.playSound = Zoundfx.start(0.2);
  }

  onClick() {
    this.playSound(this.case4);
  }

API

Directive inputs:

  • vol = 0.1; // Volume % should be a number from 0 to 1;
  • trigger = 'onclick'; // String, a name of any event you want to react to
  • zound: number[]; // See example Or custom your own sounds

Keywords

FAQs

Last updated on 24 May 2020

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc