open-index/open-npm huggingface dataset:
npm package: @nfactorial/playcanvas-tools
Description: Helper module for communicating with the PlayCanvas job server.
Author: nfactorial
Latest version: 0.0.21

# PlayCanvas Tools

This package wraps the PlayCanvas REST API providing scripting support tools for interacting with the playcanvas server.

The GitHub URL for this project is <https://github.com/nfactorial/playcanvas-tools>

## Installation

Install the package using npm with:

```bash
npm install --save @nfactorial/playcanvas-tools
```

## Configuration
By default, PlayCanvas-Tools communicates with the PlayCanvas server located at https://playcanvas.com however
you may change this address  via the HOST_ADDRESS property of the PlayCanvas-Tools library if needed:
```javascript
const PlayCanvasTools = require('@nfactorial/playcanvas-tools');

PlayCanvasTools.HOST_ADDRESS = 'alternate-server.com';
```
PlayCanvas tools communicates via the SSL port 443, if your server expects communication via a different port you
may configure this with the HOST_PORT property:
```javascript
const PlayCanvasTools = require('@nfactorial/playcanvas-tools');

PlayCanvasTools.HOST_PORT = 80;
```
## Usage

Most usage of the PlayCanvas REST API requires an organisation account, within your organisation
create an access token. This is required in order to access the REST API.

### Examples
#### Downloading a Project Package
PlayCanvas Tools provides support for downloading a project package from the playcanvas service using the
asynchronous download method.
```javascript
// Download a Project from PlayCanvas as my_package.zip.
// You will need to know the projectID for your project, and the accessToken.
// The scenes you wish to download should be specified in the [scenes] array.
const PlayCanvasTools = require('@nfactorial/playcanvas-tools');

await PlayCanvasTools.download('my_package.zip', projectId, 'my_project_name', accessToken, [scenes]);
```
npm package: @nfactorial/webgl_helper
Description: Miscellaneous code to aid with WebGL development.
Author: nfactorial
Latest version: 0.0.38

WebGL Helper
============
This is a low-level wrapper around WebGL. It is not intended to be used directly, instead it is expected
that higher-level wrappers will be written that make use of this library.

API and implementation is currently still being worked on, so it's not really recommended that you
use this directly right now.
npm package: @nfails/bpac-js
Description: Print on Brother Thermal-Printer via Nodejs. Some of the Bpac functionality is already available. The Server/Client also has to Install the official bpac-client to work with this library.
Author: Nils Falkenrich
Latest version: 2.0.4

# bpac-js
This is a library to print on Brother Thermal-Printer with nodejs. This works by sending the commands to the official b-PAC-client Component.

## Requierements
### b-Pac Client Component
The official b-PAC Client Component [Brother Download Website](https://support.brother.com/g/s/es/dev/en/bpac/download/index.html) must be installed. 

If the Installation-Location differs from the Default-Location it can happen, that the path to the `bpacHost.exe` has to be set manually in your program.
````ts
BpacConfig.bpacHostPath = "<path to bpacHost.exe>"
````

### Printer Driver
Install the appropriate printer driver for your Brother printer on your system. This can also be found on the official Brother Website.

## Usage
### Install
`npm install @nfails/bpac-js` 

### Example - Export
```ts
import { BpacConfig, BpacDocument, ExportType } from '@nfails/bpac-js';

BpacConfig.bpacHostPath = "<path to bpacHost.exe>"
async function exportFile(lastname: string) {
const doc = await BpacDocument.Open("<path to lbx template>")
const o = await doc.GetObject("objLastName");
await o.setText(lastname);
await doc.Export(ExportType.bexBmp, `./test.bmp`, 100)
await doc.Close()
}

exportFile('TEST').then(() => console.log('success'))
```

### Example - Print
```ts
async function printLabel(lastName) {
  const doc = await BpacDocument.Open("<path to lbx template>")
  const o = await doc.GetObject("objLastName");
  await doc.SetPrinter(<PrinterName>, false);
  await o.setText(lastName);
  await doc.StartPrint("Sample Label");
  await doc.PrintOut(1);
  await doc.EndPrint();
  await doc.Close();
}
```

## Contribute
If you encounter issues or have suggestions, feel free to contribute to the project.