open-index/open-npm huggingface dataset:
npm package: @phasereditor2d/scripts-audio
Description: Audio scripts for Phaser Editor 2D.
Author: Phaser Editor 2D
Latest version: 1.0.8

# Phaser Editor 2D Audio Scripts (library)

This project contains a few Phaser Editor 2D scripts for playing Phaser audios.

These script nodes are very basic and may fit on any Phaser Editor 2D project.

The scripts are coded in TypeScript with ES modules.

## Installing (NPM)

This package depends on the following packages:

- `@phasereditor2d/scripts-core`

To install this in your game you have to install dependencies too:

```
npm install @phasereditor2d/scripts-core
npm install @phasereditor2d/scripts-audio
```

Also, you should add this package to the `phasereditor2d.config.json` file in your project, in the `scripts` section:

```json
{
    "scripts": [
        "@phasereditor2d/scripts-core",
        "@phasereditor2d/scripts-audio",
    ]
}
```

## Installing (vanilla JavaScript)

* Get the files in the [browser](./browser/) folder and copy them into your JavaScript project. It includes Phaser Editor 2D files, JavaScript files, and TypeScript type definitions.
* Add a `script` tag to the `index.html` file to load the `lib/phasereditor2d_scripts_core.js` file.

## Summary

This library provides a couple of actions for playback audio files. As a reminder, an action is executed by an event script or another action.

It also contains user components for configuring the actions.

The actions:

* **Play Audio Action** - Plays the given audio key.
* **Stop Audio Action** - Stops the given audio key.
* **Stop All Audios Action** - Stops all playing audios.
* **Pause All Audios Action** - Pauses all playing audios.
* **Resume All Audios Action** - Resumes all paused audios.

The user components:

* **Audio Loop Config** - To configure the **loop** property in playing action scripts.
* **Audio Volume Config** - To configure the **volume** property in playing action scripts.

## Play Audio Action

*Class: `PlayAudioActionScript`*

This action plays the audio you set in the **Audio Key** property. You can add the **Audio Loop Config** and **Audio Volume Config** components to this script for configuring the sound.

## Stop Audio Action

*Class: `StopAudioActionScript`*

This action stops the audio with the given **Audio Key**.

## Stop All Audios Action

*Class: `StopAllSoundsActionScript`*

This action stops all playing audios.

## Pause All Audios Action

*Class: `PauseAllSoundsActionScript`*

This action pauses all playing sounds.

## Resume All Audios Action

*Class: `ResumeAllSoundsActionScript`*

This action resumes all paused audios.
npm package: @phasereditor2d/scripts-random
Description: Audio scripts for Phaser Editor 2D.
Author: Phaser Editor 2D
Latest version: 1.0.2

# Phaser Editor 2D Random Scripts (library)

This project contains Phaser Editor 2D scripts for configuring random actions.

These script nodes are very basic and may fit on any Phaser Editor 2D project.

The scripts are coded in TypeScript with ES modules.

## Installing (NPM)

This package depends on the following packages:

- `@phasereditor2d/scripts-core`

To install this in your game you have to install dependencies too:

```
npm install @phasereditor2d/scripts-core
npm install @phasereditor2d/scripts-random
```

Also, you should add this package to the `phasereditor2d.config.json` file in your project, in the `scripts` section:

```json
{
    "scripts": [
        "@phasereditor2d/scripts-core",
        "@phasereditor2d/scripts-random"
    ]
}
```

## Installing (vanilla JavaScript)

* Get the files in the [browser](./browser/) folder and copy them into your JavaScript project. It includes Phaser Editor 2D files, JavaScript files, and TypeScript type definitions.
* Add a `script` tag to the `index.html` file to load the `lib/phasereditor2d_scripts_random.js` file.

## Summary

This library provides a few actions for using random values in your game. You can configure the domain of the random values by using the configuration components.

As a reminder, an action is executed by an event script or another action.

The actions:

* **Set Random X Action** - Set a random value to the object's X.
* **Set Random Y Action** - Set a random value to the object's X.

The configuration components:

* **Random Between Config** - To select an integer random value between two numbers.
* **Random Multiple Config** - To select an integer random multiple between two numbers.
* **Random In Array Config** - To pick a random value in an array of options.

## Set Random X Action

*Class: SetRandomXActionScript*

This action sets a random X value to the game object. It requires that you add to this node one of the random configuration components.

It allows 

## Set Random Y Action

*Class: SetRandomYActionScript*

This action sets a random Y value to the game object. It requires that you add to this node one of the random configuration components.

## Random Between Config

This user component contains the configuration for generating a random integer values between the given parameters **Min** and **Max**.

## Random Multiple Config

This user component contains the configuration for generating random integer values between the given parameters **Min** and **Max**, but it is also a multiple of the **Multiple** parameter.

Eg., with a multiple of 10, the possible values between 10 and 30 are 10, 20, and 30.

## Random In Array Config

This user component contains the parameters for picking a random number from an array of options. You can write the array in the **Options** parameters, following a JSON array format. Like this: `[10, 34, 2, 89, 20]`.
npm package: @phasereditor2d/scripts-timer
Description: Audio scripts for Phaser Editor 2D.
Author: Phaser Editor 2D
Latest version: 1.0.5

# Phaser Editor 2D Timer Scripts (library)

This project contains Phaser Editor 2D scripts for using a timer.

These script nodes are very basic and may fit on any Phaser Editor 2D project.

The scripts are coded in TypeScript with ES modules.

## Installing (NPM)

This package depends on the following packages:

- `@phasereditor2d/scripts-core`
- `@phasereditor2d/scripts-random`

To install this in your game you have to install dependencies too:

```
npm install @phasereditor2d/scripts-core
npm install @phasereditor2d/scripts-random
npm install @phasereditor2d/scripts-timer
```

Also, you should add this package to the `phasereditor2d.config.json` file in your project, in the `scripts` section:

```json
{
    "scripts": [
        "@phasereditor2d/scripts-core",
        "@phasereditor2d/scripts-random",
        "@phasereditor2d/scripts-timer"
    ]
}
```

## Installing (vanilla JavaScript)

* Get the files in the [browser](./browser/) folder and copy them into your JavaScript project. It includes Phaser Editor 2D files, JavaScript files, and TypeScript type definitions.
* Add a `script` tag to the `index.html` file to load the `lib/phasereditor2d_scripts_timer.js` file.

## Summary

This library provides a few actions for implementing timers in your game. 

As a reminder, an action is executed by an event script or another action.

The actions:

* **Delay Action** - Delays, then executes the children's scripts.
* **Delay Random Action** - Delays a random time, then executes the children's
* **Emit Tick Action** - Emits a tick at every given delay.
* **Emit Random Tick Action** - Emits a tick always at a random delay.

## Delay Action

*Class: DelayActionScript*

This action delays a given **Delay** time and then executes the children's scripts.

This action allows the **Target Action Config** user component.

## Delay Random Action

*Class: DelayRandomActionScript*

This action delays a random time and then executes the children's scripts.

The delay is a random value generated by any of the random user component configurations in the [@phasereditor2d/scripts-random](https://github.com/PhaserEditor2D/phasereditor2d-scripts-random) library.


This action allows the **Target Action Config** user component.

## Emit Tick Action Script

*Class: EmitTickActionScript*

This action emits a tick at a fixed rate, within the given **Delay**. At every tick, it executes the children's scripts.

This action allows the **Target Action Config** user component.

## Emit Random Tick Action

*Class: EmitRandomTickActionScript*

This action emits a tick at a random rate. At every tick, it executes the children's scripts.

The delay is a random value generated by any of the random user component configurations in the [@phasereditor2d/scripts-random](https://github.com/PhaserEditor2D/phasereditor2d-scripts-random) library.

This action allows the **Target Action Config** user component.
npm package: @phaserjs/editor-scripts-audio
Description: Phaser Editor audio scripts.
Author: Phaser Editor 2D
Latest version: 2.0.2

# Phaser Editor v4 Audio Scripts (library)

**Warning: This project is deprecated. It is now part of the [@phaserjs/editor-scripts-quick](https://www.npmjs.com/package/@phaserjs/editor-scripts-quick) library.**

This project contains a few Phaser Editor scripts for playing Phaser audios.

These script nodes are very basic and may fit on any Phaser Editor project.

The scripts are coded in TypeScript with ES modules.

## Installing (NPM)

This package depends on the following packages:

- `@phaserjs/editor-scripts-core`

To install this in your game you have to install dependencies too:

```
npm install @phaserjs/editor-scripts-core
npm install @phaserjs/editor-scripts-audio
```

Also, you should add this package to the `phasereditor2d.config.json` file in your project, in the `scripts` section:

```json
{
    "scripts": [
        "@phaserjs/editor-scripts-core",
        "@phaserjs/editor-scripts-audio",
    ]
}
```

## Installing (vanilla JavaScript)

* Get the files in the [browser](./browser/) folder and copy them into your JavaScript project. It includes Phaser Editor files, JavaScript files, and TypeScript type definitions.
* Add a `script` tag to the `index.html` file to load the `lib/phasereditor2d_scripts_core.js` file.

## Summary

This library provides a couple of actions for playback audio files. As a reminder, an action is executed by an event script or another action.

It also contains user components for configuring the actions.

The actions:

* **Play Audio Action** - Plays the given audio key.
* **Stop Audio Action** - Stops the given audio key.
* **Stop All Audios Action** - Stops all playing audios.
* **Pause All Audios Action** - Pauses all playing audios.
* **Resume All Audios Action** - Resumes all paused audios.

The user components:

* **Audio Loop Config** - To configure the **loop** property in playing action scripts.
* **Audio Volume Config** - To configure the **volume** property in playing action scripts.

## Play Audio Action

*Class: `PlayAudioActionScript`*

This action plays the audio you set in the **Audio Key** property. You can add the **Audio Loop Config** and **Audio Volume Config** components to this script for configuring the sound.

## Stop Audio Action

*Class: `StopAudioActionScript`*

This action stops the audio with the given **Audio Key**.

## Stop All Audios Action

*Class: `StopAllSoundsActionScript`*

This action stops all playing audios.

## Pause All Audios Action

*Class: `PauseAllSoundsActionScript`*

This action pauses all playing sounds.

## Resume All Audios Action

*Class: `ResumeAllSoundsActionScript`*

This action resumes all paused audios.
npm package: @phaserjs/editor-scripts-base
Description: The base scripts for Phaser Editor.
Author: Phaser Editor
Latest version: 2.0.1

# Basic Phaser Editor script nodes

This project contains the main scripts to use with a Phaser Editor project.

It includes the basic script nodes and user components: `ScriptNode` and `UserComponent` classes.

The scripts are coded in TypeScript with ES modules.

## Installing (NPM)

Install this package in your game:

```
npm install @phaserjs/editor-scripts-base
```

Also, you should add this package to the `phasereditor2d.config.json` file in your project, in the `scripts` section:

```json
{
    "scripts": ["@phaserjs/editor-scripts-base"]
}
```

## Installing (vanilla JS)

* Get the files in the [browser](./browser/) folder and copy them into your JavaScript project. It includes Phaser Editor files and JavaScript files.

## User components

This package provides a couple of general-purpose user components. Including the `UserComponent` class, which is the base class for all user components.

* `UserComponent` - it is a class you can use as the base class for your user components.
* **Action Target** - it provides information to script nodes about what object is the target of an action.

### Base scripts

Contains basic/abstract functionality. Often, you will create prefab variants of them (extend them).

* **ScriptNode** - the base class for all the scripts.

## Target Action component

This user component is a hint to the action-like script nodes about what object is the target of the action. The possible targets are the game object of the script node (the default), or any of the arguments of the `execute(...)` method of the action.

The **Target* property of the component allows these values: `GAME_OBJECT` (default), `ARG_1`, `ARG_2`, `ARG_3`, etc...

If you are implementing a custom action script, you may want to look into the **Target Action** component to determine the object to receive the action. This is an example:

```js
class MyAction {

    execute(...args: any[]) {

        const obj = TargetActionComp.getActionTarget(this, args);

        this.performMyCustomAction(obj);
    }
}
```

## ScriptNode

The base of all the scripts. Probably it is already available in your project (if you generated it with Phaser Editor).

This class provides methods for managing the node's children, and implementing the scene events: `awake`, `start`, and `update`.
npm package: @phaserjs/editor-scripts-random
Description: Audio scripts for Phaser Editor v4.
Author: Phaser Editor 2D
Latest version: 2.0.1

# Phaser Editor v4 Random Scripts (library)

**Warning: This project is deprecated. It is now part of the [@phaserjs/editor-scripts-quick](https://www.npmjs.com/package/@phaserjs/editor-scripts-quick) library.**

This project contains Phaser Editor scripts for configuring random actions.

These script nodes are very basic and may fit on any Phaser Editor project.

The scripts are coded in TypeScript with ES modules.

## Installing (NPM)

This package depends on the following packages:

- `@phaserjs/editor-scripts-core`

To install this in your game you have to install dependencies too:

```
npm install @phaserjs/editor-scripts-core
npm install @phaserjs/editor-scripts-random
```

Also, you should add this package to the `phasereditor2d.config.json` file in your project, in the `scripts` section:

```json
{
    "scripts": [
        "@phaserjs/editor-scripts-core",
        "@phaserjs/editor-scripts-random"
    ]
}
```

## Installing (vanilla JavaScript)

* Get the files in the [browser](./browser/) folder and copy them into your JavaScript project. It includes Phaser Editor files, JavaScript files, and TypeScript type definitions.
* Add a `script` tag to the `index.html` file to load the `lib/phaserjs_editor_scripts_random.js` file.

## Summary

This library provides a few actions for using random values in your game. You can configure the domain of the random values by using the configuration components.

As a reminder, an action is executed by an event script or another action.

The actions:

* **Set Random X Action** - Set a random value to the object's X.
* **Set Random Y Action** - Set a random value to the object's X.

The configuration components:

* **Random Between Config** - To select an integer random value between two numbers.
* **Random Multiple Config** - To select an integer random multiple between two numbers.
* **Random In Array Config** - To pick a random value in an array of options.

## Set Random X Action

*Class: SetRandomXActionScript*

This action sets a random X value to the game object. It requires that you add to this node one of the random configuration components.

It allows 

## Set Random Y Action

*Class: SetRandomYActionScript*

This action sets a random Y value to the game object. It requires that you add to this node one of the random configuration components.

## Random Between Config

This user component contains the configuration for generating random integer values between the given parameters **Min** and **Max**.

## Random Multiple Config

This user component contains the configuration for generating random integer values between the given parameters **Min** and **Max**, but it is also a multiple of the **Multiple** parameters.

Eg., with a multiple of 10, the possible values between 10 and 30 are 10, 20, and 30.

## Random In Array Config

This user component contains the parameters for picking a random number from an array of options. You can write the array in the **Options** parameters, following a JSON array format. Like this: `[10, 34, 2, 89, 20]`.
npm package: @phaserjs/phaser
Description: Phaser 4
Author: Richard Davey
Latest version: 0.2.2

# Phaser 4 Genesis

Rebooting the Phaser universe from scratch.

![Phaser4](logo.png)

Examples can be found in the [Phaser 4 Examples repo](https://github.com/phaserjs/examples).

Developer updates can be found on the [Phaser Patreon](https://www.patreon.com/join/photonstorm).

Get the latest release from npm:

```
npm install @phaserjs/phaser --save-dev
```

Keep updating it. It's changing multiple times per day.

You can find all packages under the [@phaserjs](https://www.npmjs.com/settings/phaserjs/packages) organization.