Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lironhazan/ng-zzfx
API for: ZzFX - Zuper Zmall Zound Zynth - Micro Edition by Frank Force (Web Audio rocks!) - Let it sound
https://github.com/lironhazan/ng-zzfx
angular game-development ng-zzfx zound zzfx
Last synced: about 1 month ago
JSON representation
API for: ZzFX - Zuper Zmall Zound Zynth - Micro Edition by Frank Force (Web Audio rocks!) - Let it sound
- Host: GitHub
- URL: https://github.com/lironhazan/ng-zzfx
- Owner: LironHazan
- License: mit
- Created: 2020-05-23T15:36:11.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-03-04T19:57:03.000Z (almost 2 years ago)
- Last Synced: 2024-11-05T08:19:12.712Z (about 2 months ago)
- Topics: angular, game-development, ng-zzfx, zound, zzfx
- Language: TypeScript
- Homepage:
- Size: 3.01 MB
- Stars: 6
- Watchers: 2
- Forks: 0
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# NgZzFx 8bit zounds for Angular ;)
[![npm version](https://d25lcipzij17d.cloudfront.net/badge.svg?id=js&type=6&v=0.0.6&x2=0)](https://www.npmjs.com/package/ng-zzfx)
[![License](https://img.shields.io/badge/License-MIT-green.svg)](https://github.com/LironHazan/ng-ZzFx/blob/master/LICENSE)Angular API for: ZzFX - Zuper Zmall Zound Zynth - Micro Edition
[ZzFx.js](https://github.com/KilledByAPixel/ZzFX)
[ZzFX Demo](https://codepen.io/KilledByAPixel/pen/BaowKzv)
MIT License - Copyright 2019 Frank Force
[Angularish demo](https://ecstatic-carson-a46449.netlify.app/)
ng-zzfx is also used in [ng-tetris](https://github.com/melcor76/ng-tetris)
--> [Hit to play!](https://focused-mestorf-930f82.netlify.app/)How to use?
In your component:
```typescript
case1 = [ , , 1675, , .06, .24, 1, 1.82, , , 837, .06];
```
Give your element a sound by adding the directive as follows:In your template:
```
💰```
Or by using the zzfs function wrapper:
```ts
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](https://codepen.io/KilledByAPixel/pen/BaowKzv) Or [custom your own sounds](https://zzfx.3d2k.com)