# swifter_remapper

> A framework for Beat Saber map scripting.

Latest version **1.0.11** (published 2022-05-21) · MIT license · 0 weekly downloads

## Install

```sh
npm install swifter_remapper
pnpm add swifter_remapper
yarn add swifter_remapper
bun add swifter_remapper
```

## 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 | 1.0.11 |
| Published | 2022-05-21 |
| First published | 2022-03-07 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 435.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Swifter |
| Maintainers | swifter1243 |

## Links

- npm: https://www.npmjs.com/package/swifter_remapper
- npm.io page: https://npm.io/package/swifter_remapper

## Dependencies (4)

- [three](https://npm.io/package/three.md) ^0.136.0
- [node-7z](https://npm.io/package/node-7z.md) ^3.0.0
- [7zip-bin](https://npm.io/package/7zip-bin.md) ^5.1.1
- [js-easing-functions](https://npm.io/package/js-easing-functions.md) ^1.0.3

## Recent versions

- 1.0.11 (latest) — 2022-05-21
- 1.0.10 — 2022-05-21
- 1.0.9 — 2022-05-13
- 1.0.8 — 2022-04-23
- 1.0.7 — 2022-04-15
- 1.0.6 — 2022-04-12
- 1.0.5 — 2022-03-20
- 1.0.4 — 2022-03-15
- 1.0.3 — 2022-03-07
- 1.0.2 — 2022-03-07
- 1.0.1 — 2022-03-07
- 1.0.0 — 2022-03-07

## README

# Welcome to ReMapper!
This is a [TypeScript](https://www.typescriptlang.org/) library designed to help with making Beat Saber modcharts. It is designed to optimize the scripting experience, and reduce code to be very minimal, and sometimes single lines.

Normal way:
```js
map._notes.push({
  _time: 20,
  _lineIndex: 1,
  _lineLayer: 1,
  _type: 1,
  _cutDirection: 3
});
```
ReMapper: `new Note(20, NOTE.RED, NOTE.RIGHT, [1, 1]).push();`

Here are some notable features:
- Wrappers for Notes, Walls, Events, Custom Events, and Environment Objects.
- Class for handling colors (you can make pretty rainbows!!!).
- Wrapper for optimizing and managing animations.
- Blender to Environment stuff w/ [ScuffedWalls](https://github.com/thelightdesigner/ScuffedWalls)
    - Switch environments
    - Supports animations
    - Compatible with any environment piece (including multiple at once!)
- LightID remapping tools.
- Difficulty and Info.dat wrappers.
- Various random useful functions.
- Much more!!!

While this library was designed for TypeScript, it is *technically* useable with JavaScript, but types will save you a lot of time in the long run, and makes everything feel secure.

You'll likely need to do some exploring with this package to get comfortable. Check out [examples](https://github.com/Swifter1243/ReMapper/blob/master/examples.md) and thoroughly read the descriptions of what different things do.

# Installation

Firstly, open a terminal in VSCode (Ctrl + Shift + `) or Command Prompt (Windows Key > Search "cmd")

Run `npm install -g typescript ts-node` in the terminal in order to get started with TypeScript.

Next, get the terminal running inside of your map project folder with `cd "directory here"` (yes quotes are needed)

Finally, install this package with `npm install swifter_remapper`

For faster startup times, you can add this `tsconfig.json` to your project folder:
```jsonc
{
    "include": [
        "./**/*"
    ],
    "exclude": [
        "node_modules"
    ],
    "ts-node": {
        "transpileOnly": true
    },
    "compilerOptions": {
        "target": "ES2015",
        "module": "commonjs",
        "esModuleInterop": true,
        "moduleResolution": "node",
        "resolveJsonModule": true,
        "allowJs": true,
    }
}
```
Only include this if you are ok with ignoring type errors at runtime, but of course they'll still show up in your IDE.

If you want to update the package, you can run `npm uninstall swifter_remapper` and then `npm install swifter_remapper` again.

You would run this script with `ts-node "script name here"`.

# Troubleshooting

If you have an error that looks like this, run the following command in an admin cmd/pwsh instance.

`Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope LocalMachine`
![image](https://media.discordapp.net/attachments/878480179528351775/950766613676834906/unknown.png?width=1025&height=95) 

For more information on this, read [this](https://go.microsoft.com/fwlink/?LinkID=135170)


# Contributing

## Unit Tests
Run `npm test` in main repository folder to run unit tests.

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