# a3-phaser-functionality-extension

> Collection of Phaser Mixins (Extension) script for common uses

Latest version **3.0.0** (published 2021-11-17) · MIT license · 0 weekly downloads

## Install

```sh
npm install a3-phaser-functionality-extension
pnpm add a3-phaser-functionality-extension
yarn add a3-phaser-functionality-extension
bun add a3-phaser-functionality-extension
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 3.0.0 |
| Published | 2021-11-17 |
| First published | 2021-01-13 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 41.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | as3mbus |
| Maintainers | as3mbus |

## Links

- npm: https://www.npmjs.com/package/a3-phaser-functionality-extension
- npm.io page: https://npm.io/package/a3-phaser-functionality-extension

## Dependencies (1)

- [phaser](https://npm.io/package/phaser.md) ^3.24.1

## Recent versions

- 3.0.0 (latest) — 2021-11-17
- 2.1.0 — 2021-11-17
- 2.0.0 — 2021-11-17
- 1.3.0 — 2021-11-16
- 1.2.0 — 2021-06-11
- 1.1.0 — 2021-06-08
- 1.0.0 — 2021-01-13

## README

# A3-Phaser-Object-ext

![version](https://img.shields.io/badge/Version-3.0.0-brightgreen)
[![npm version](https://badge.fury.io/js/a3-phaser-functionality-extension.svg)](https://badge.fury.io/js/a3-phaser-functionality-extension)

Basic phaser functionality extension that add additional function to phaser components.

> Documentation is scarce as i myself still learning and hope to get some feedback 
> 
> jsdoc should serve enough docs for now

## Installation:

```shell
# git
npm install git+https://gategit.agate.id/billy.firman/a3-phaser-object-ext
# npm registry
npm install a3-phaser-functionality-extension
```

## Usage

## Extension

```js
import {SizeExtension} from "a3-phaser-object-ext";
// global Scope (applied to entire game)
Object.assign(Phaser.GameObjects.Image.prototype, SizeExtension);
// object scope (only applied to assigned object)
const image = new Image(30, 20);
Object.assign(image, SizeExtension);
// example use
image.setMaxPreferredDisplaySize(200, 300);
```

## Graphic Fill

```js
const img = this.add.sprite(0, 0, UIAsset.result_home_button.key)
img.setPosition(this.scale.width * .5)

const radialFill = new RadialFill(this);

radialFill.assignFillAnchor(img, img.displayWidth, -90, true)
radialFill.setVisible(false)
img.setMask(radialFill.createGeometryMask());

radialFill.fillValue = .15;
```

---
_Source: https://npm.io/package/a3-phaser-functionality-extension · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
