A TypeScript library designed to help with making Beat Saber modcharts

Overview

Welcome to ReMapper!

This is a TypeScript library designed to help with making Beat Saber modcharts.

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
    • 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.

I would advise against using JS for this, because it doesn't properly autocomplete properties on objects, which defeats the purpose as you'd need to refer to documentation to use this package, it's much better to have everything just show up.

TypeScript will by default force you to specify the type (number, array, object.. etc) of every variable, if you don't like this, you can add a file to your project that will ignore this.

You'll likely need to do some exploring with this package to get comfortable. Check out examples and 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

If you want to define implicit any types (explained before), then add tsconfig.json to your project folder:

{
    "include": [
        "./**/*"
    ],
    "exclude": [
        "node_modules"
    ],
    // only include this if you want to have faster map script generation at the cost of ignoring type errors
    // experienced programmers should be fine
    "ts-node": {
        "transpileOnly": true /* Skips type checking for faster startup times */
    },
    "compilerOptions": {
        "target": "ES2015",
        "module": "commonjs",
        "noImplicitAny": false,
        "esModuleInterop": true,
        "moduleResolution": "node",
        "resolveJsonModule": true,
        "allowJs": true,
    }
}

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".

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

For more information on this, read this

Comments
  • Add More ENV Constants

    Add More ENV Constants

    Mirrors are in every environment (except Spooky) and can be used to make really cool effects! So I'd thought to make a constant for it.

    Note: This constant is a plane with one side facing upwards, not a cube. Would be used like a plane from Geometry.

    opened by Nasafrasa 1
  • setSettings() bug

    setSettings() bug

    I get this error when trying to use .setSetting() without having "_settings" or "_customData" properties in my Info.dat.

    if (!(steps[i] in currentObj)) {
                          ^
    TypeError: Cannot use 'in' operator to search for '_playerOptions' in undefined
        at jsonSet (ReMapper\src\general.ts:372:23)
        at Difficulty.updateSets (ReMapper\src\beatmap.ts:193:16)
        at Difficulty.setSetting (ReMapper\src\beatmap.ts:157:14)
    
    opened by MindLaborDev 1
  • Rework how files are collected and upload to quest

    Rework how files are collected and upload to quest

    Not tested.

    Files are expected to be uploaded to QUEST_CUSTOMS_WIP_LEVELS_PATH which as the name suggests, is the WIP song folder.

    • expose adbDeno and three too
    • add constant for Quest WIP folder

    Usage:

    /// works similar to exportToZip
    export async function exportToQuest(excludeDiffs: FILENAME<DIFFS>[] = [], options?: InvokeADBOptions) {
    
    opened by Fernthedev 0
  • Cinema Support + MODS Split

    Cinema Support + MODS Split

    Adds support for adding and manipulating a Cinema Screen! (with docs!!!)

    Example Syntax:

    const screen = new CinemaScreen("YoutubeID", "dQw4w9WgXcQ");
    screen.colorCorrection.brightness = 1.5;
    screen.colorCorrection.saturation = 1.25;
    screen.author = "nasafrasa";
    screen.videoFile = "ImportantVideo";
    screen.height = 100;
    screen.push();
    
    opened by Nasafrasa 0
  • Slightly added/ changed ReadMe & Docs

    Slightly added/ changed ReadMe & Docs

    Added ReMapper Roadmap below readMe. Added latest deno hyperlink under input, inside Documentation.

    Changed Updated remapper input to latest RM version ( Only because its a Minor version update and not a patch )

    opened by UGEcko 0
  • Optimizer rewrite

    Optimizer rewrite

    Adds some optimizers from ErisApps/OhHeck written by me and tested in some maps.

    I highly suggest testing the TypeScript variants and seeing if they are destructive AND efficient.

    PR is NOT tested.

    opened by Fernthedev 0
  • Bump minimist from 1.2.5 to 1.2.6

    Bump minimist from 1.2.5 to 1.2.6

    Bumps minimist from 1.2.5 to 1.2.6.

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Add support for loading relative and absolute map files.

    Add support for loading relative and absolute map files.

    This PR

    Adds

    • The ability to load maps through relative and absolute map files. The active info object will point to the most recently loaded map.

    Changes

    • info will not be properly configured until the load method is called with the path to Info.dat or a difficulty object is contructed.
    opened by Auros 0
  • Mindlabor/unit tests

    Mindlabor/unit tests

    Some basic unit tests. Unit Tests can/should be extended over time. The more the better. For testing run npm install and npm test. Everything should be green then. If something is red, the test has failed and either the code that was tested or the unit test itself broke/don't work correctly. For coverage, reports run npm run coverage (if you have a space in the path to your folder, this won't work, its a bug with the coverage tool, that can be fixed in the future, currently coverage reports aren't that important).

    opened by MindLaborDev 0
  • Unit Tests

    Unit Tests

    Adding unit tests to ensure everything is working would be cool.

    @Swifter1243 You can add me as an assignee and put a "feature" label on this issue :)

    enhancement 
    opened by MindLaborDev 0
  • Mindlabor/settings bug

    Mindlabor/settings bug

    I was working on the #5 Issue, saw that you had already fixed it but decided to continue on my fix as I was already pretty far.

    This should fix the more general issue of jsonGet throwing undefined whenever it didn't find the json value. This can cause a lot of issues when the json is incomplete at start.

    If your diff json doesn't have the _customData key, then diff.requirements, diff.suggestions and diff.settings (and most likely a few other properties) will be undefined. This will cause unexpected Cannot read properties of undefined errors.

    This solution completes non-existent json properties, which should prevent these kindof problems.

    opened by MindLaborDev 0
Releases(3.1.1)
  • 3.1.1(Dec 23, 2022)

    scene.animate([[{
        input: "env",
        transform: {
            pos: [0, 10, 10],
            rot: [29, 20, 30],
            scale: [2, 1, 1]
        }
    }, 1, 10]]);
    
    • Now using repeat for ModelScene animation looping
    • Added various tools for converting to and from threejs classes
    • Added function to combine 2 transforms with matrices
    • Allowed transformations on Text and ModelScene
    • Function for reversing animations
    • Function for mirroring animations
    • Fixed default material for groups allowing a string
    • Fixed materials on diffiulties allowing a string

    Full Changelog: https://github.com/Swifter1243/ReMapper/compare/3.1.0...3.1.1

    Source code(tar.gz)
    Source code(zip)
  • 3.1.0(Dec 19, 2022)

    IMPORTANT: REMAPPER BLENDER EXPORTER REQUIRED UPDATE

    Version 0.04 and above for the exporter (https://github.com/Swifter1243/ReMapper-Blender-Exporter) will be using new proportions. Models exported with 0.03 and below will not be sized correctly.

    image

    adjustFog(x => {
        x.attenuation = 1;
    })
    
    const text = new Text("text");
    text.position = [0, 3, 30];
    
    new ModelScene(new Geometry("Cube", {
        shader: "Standard",
        shaderKeywords: [],
        color: [1, 1, 1]
    })).static(text.toObjects("Thanks for using ReMapper!"));
    
    env = new Environment("MagicDoorSprite");
    env.active = false;
    env.push();
    
    • ModelScene upgrades:
      • Object position can be initialized at the start of the level
      • Animations can now start at a given time after the switch
      • Animations can now be looped
      • Fixed material spam
    • Text class for creating text
    • modelToWall function
    • adjustFog function
    • Fixed fake objects not being serialized
    • Allowed rotation to be a single number on objects
    • Tweaks to the constructors on Arcs and Chains
    • Added lots of new type safety to functions
    • getBoxBounds function
    • fixed NJS and Offset using wrong keys on difficulties
    • worldToWall function
    • Cinema support (Thanks to Nasafrasa!)
    • Cache system now used with getModel
    • Quest map uploading support (Thanks to Fern!)
    • Fixed getJumps using outdated formula
    • arrAppend function
    • Fixed issues with baking function not extending full animation
    • loopAnimation function

    Full Changelog: https://github.com/Swifter1243/ReMapper/compare/3.0.0...3.1.0

    Source code(tar.gz)
    Source code(zip)
  • 3.0.0(Nov 8, 2022)

    REMAPPER NOW USES BEATMAP V3.

    You may use 2.1.0 if you want V2, but I will not be supporting it with new features. It is designed to work with the ChroMapper V3 beta branch. ReMapper was made for beatmap V2, so there will likely be bugs. Please DM me if you experience any.

    Here's what's new:

    • Added jsdoc for pretty much everything
    • Added support for arcs and chains
    • Added support for new lighting and light rotations
    • Added support for new event types (BPM changes, boost events.. etc)
    • Added support for new component system
    • Added support for new geometry shaders
    • Added support for hsvLerp and tweaked Keyframe class to allow for any future flags
    • Allow multiple tracks for Environment objects
    • Fixed a bug with transferVisuals not transferring geometry materials
    • Slight performance increase for ModelScene, preventing redundantly cloning some information internally.
    • Fixed some issues with the jsonPrune function
    • Allow initializing an Event with a type
    • Allow ENV object transforms to be written easier (ENV.BTS.PILLAR.SCALE, ENV.BTS.PILLAR.ANCHOR --> ...ENV.BTS.PILLAR.TRANSFORM)
    • Fixed addProcess and addCondition not returning the LightRemapper
    • Added a few more general use functions
    • Internally transfer customData keys for basic events to their V3 counterparts (this is temporary and will be removed once CM fixes it)

    Full Changelog: https://github.com/Swifter1243/ReMapper/compare/2.1.0...3.0.0

    Source code(tar.gz)
    Source code(zip)
  • 2.1.0(Aug 17, 2022)

    • In situations where you need to provide a path to a file, the extension is no longer required
    • Added options for ModelScene inputs:
      • objects is a function with a callback to the array of ModelObjects that are about to be processed
      • processing is a field that will be watched by the cache function
      • (animation only) static can be used to force the scene to be static
      • (animation & ModelObject[] input only) bake can be used to either force or disable baking object animations
    • LightRemapper overhauled to be more flexible (see examples)
    • Fixed a huge performance problem where notes, walls, events, customEvents, and environment were copied twice internally
    • Aliased properties for settings to replace setSetting()
    • Changed constants that were used as autocomplete helpers to types instead
    • More ENV constants yet again!!
    • Fixed missing types on some Info.dat properties
    • Allowed initializing string on Regex class
    • Minimized saves of RMCache and Info.dat (now only happens on difficulty save)
    • Fixed rotation to be applied after anchor on ModelScene
    • fixed EPSILON use for filterObjects
    • obstacles array on Difficulty changed to walls
    • Allowed lightIDs on off events

    Full Changelog: https://github.com/Swifter1243/ReMapper/compare/2.0.2...2.1.0

    Source code(tar.gz)
    Source code(zip)
  • 2.0.2(Aug 8, 2022)

    • Fixed reduceDecimalsPostProcess which in some cases caused objects to get new keys that shouldn't be there
    • Fixed EVENT constant to have autocompletion
    • Added some minor changes to README for installation oversights

    Full Changelog: https://github.com/Swifter1243/ReMapper/compare/2.0.1...2.0.2

    Source code(tar.gz)
    Source code(zip)
  • 2.0.1(Jul 28, 2022)

    • Geometry stuff in ModelScene is now colored from model data. (Update blender plugin)
    • animateEnvGroup and animateEnvTrack have been updated to utilize a callback function
    • Setup instructions completely changed

    Full Changelog: https://github.com/Swifter1243/ReMapper/compare/2.0.0...2.0.1

    Source code(tar.gz)
    Source code(zip)
  • 2.0.0(Jul 26, 2022)

    ReMapper has moved to Deno, and is now standalone from ScuffedWalls!! Please go over the README and examples as they've been updated.

    New stuff:

    • Everything is generally faster
    • Plugin for exporting models from Blender
    • Geometry support
    • BlenderEnvironment overhaul
      • Renamed to ModelScene
      • Completely new data format
      • Now supports multiple "primary" objects
      • Now supports "rotation" transform
      • Caches Blender data
      • "debugObject" function to test object transforms to fit to a unit cube
    • Caching system
    • Post process functions
    • Automatic decimal reducing
    • Optimizer "active" property
    • More types for keyframes
    • Function for safely iterating keyframes
    • Track class improved
      • "add" function to safely add tracks
      • "remove" function to safely remove tracks
      • "has" function to check if track has a value
      • "array" function to get the value as an array
      • "check" function to check each track for a condition
    • "bakeAnimation" function to generate keyframes from an animation. Useful for doing things such as having objects rotate around points other than their anchor.
    • "isGameplayModded" bool for notes and walls to check if it has been modified with noodle
    • Arrays on difficulty for specific custom events (animateTracks, assignPathAnimations... etc)
    • Arrays for environment stuff and geometry stuff separately ("rawEnvironment" contains both)
    • Additional constant for cube in Billie environment
    • Countless other small tweaks

    Full Changelog: https://github.com/Swifter1243/ReMapper/compare/1.0.11...2.0.0

    Source code(tar.gz)
    Source code(zip)
  • 1.0.11(May 21, 2022)

  • 1.0.10(May 21, 2022)

    • Optimizer rewrite (big thanks to Fern!!). Access optimize options on BlenderEnvironment with optimizeSettings and assignedOptimizeSettings.
    • Fixed some crashes with trying to access things like _customData when it was undefined (thanks to MindLaborDev!).
    • Fixed point definitions not actually working for animations.

    image

    Source code(tar.gz)
    Source code(zip)
  • 1.0.9(May 13, 2022)

    • transferVisuals() function to allow you to move your visuals (environment, lightshow, custom events, point definitions, modded walls.. etc) across difficulties.
    • Fixed exportZip() function crashing when the zip doesn't already exist
    • A few constants for environment stuff in the Gaga environment
    • Tweaks to the README and examples that should clear up some common misconceptions
    • Fixed assignedAccuracy not actually effecting the animation of assigned objects
    • Tweaked animations to use set() instead of add() when using setter for properties
    Source code(tar.gz)
    Source code(zip)
Owner
Swifter
Man.
Swifter
A simple tool to help you connect your favorite controllers / Arduino to various train simulator games on Windows using memory hacks.

A simple tool to help you connect your favorite controllers (e.g. Densha de Go! series) / Arduino to various train simulator games on Windows using memory hacks.

Tongze Wang 2 Feb 7, 2022
A tiny TypeScript library for 2D vector math.

Vecti A tiny TypeScript library for 2D vector math. Documentation Features ?? Addition, subtraction, multiplication and division ✨ Dot, cross and Hada

Jan Müller 17 Nov 30, 2022
Java library for use with Chart.js javascript library

Chart.java Chart.java enables integration with the excellent Chart.js library from within a Java application. Usage example In Java: BarDataset datase

Marceau Dewilde 102 Dec 16, 2022
A port of Phoenix LiveView to Typescript/Javascript

LiveViewJS Front-end framework for back-end developers Credit ?? This is a backend implementation of Phoenix LiveView in Typescript. What the Phoenix

Donnie Flood 512 Jan 9, 2023
JavaScript 3D library.

three.js JavaScript 3D library The aim of the project is to create an easy to use, lightweight, cross-browser, general purpose 3D library. The current

Mr.doob 87.9k Jan 2, 2023
Apache ECharts is a powerful, interactive charting and data visualization library for browser

Apache ECharts Apache ECharts is a free, powerful charting and visualization library offering an easy way of adding intuitive, interactive, and highly

The Apache Software Foundation 53.8k Jan 9, 2023
Javascript Canvas Library, SVG-to-Canvas (& canvas-to-SVG) Parser

Fabric.js Fabric.js is a framework that makes it easy to work with HTML5 canvas element. It is an interactive object model on top of canvas element. I

Fabric.js 23.6k Jan 3, 2023
Redefined chart library built with React and D3

Recharts Introduction Recharts is a Redefined chart library built with React and D3. The main purpose of this library is to help you to write charts i

recharts 19.4k Jan 2, 2023
The JavaScript library for modern SVG graphics.

Snap.svg · A JavaScript SVG library for the modern web. Learn more at snapsvg.io. Follow us on Twitter. Install Bower - bower install snap.svg npm - n

Adobe Web Platform 13.6k Dec 30, 2022
JavaScript Vector Library

Raphaël: Cross-browser vector graphics the easy way Visit the library website for more information: http://raphaeljs.com https://dmitrybaranovskiy.git

Dmitry Baranovskiy 11.2k Jan 3, 2023
A JavaScript library dedicated to graph drawing

sigma.js - v1.2.1 Sigma is a JavaScript library dedicated to graph drawing, mainly developed by @jacomyal and @Yomguithereal. Resources The website pr

Alexis Jacomy 10.3k Jan 3, 2023
A reusable charting library written in d3.js

NVD3 - A reusable D3 charting library Inspired by the work of Mike Bostock's Towards Reusable Charts, and supported by a combined effort of Novus and

Novus 7.2k Jan 3, 2023
:bar_chart: A D3-based reusable chart library

c3 c3 is a D3-based reusable chart library that enables deeper integration of charts into web applications. Follow the link for more information: http

C3.js 9.2k Jan 2, 2023
The lightweight library for manipulating and animating SVG

SVG.js A lightweight library for manipulating and animating SVG, without any dependencies. SVG.js is licensed under the terms of the MIT License. Inst

SVG.js 10k Dec 25, 2022
JavaScript diagramming library for interactive flowcharts, org charts, design tools, planning tools, visual languages.

GoJS, a JavaScript Library for HTML Diagrams GoJS is a JavaScript and TypeScript library for creating and manipulating diagrams, charts, and graphs. S

Northwoods Software Corporation 6.6k Dec 30, 2022
mxGraph is a fully client side JavaScript diagramming library

NOTE 09.11.2020 : Development on mxGraph has now stopped, this repo is effectively end of life. Known forks: https://github.com/jsGraph/mxgraph https:

JGraph 6.5k Dec 30, 2022
A library optimized for concise and principled data graphics and layouts.

MetricsGraphics is a library built for visualizing and laying out time-series data. At around 15kB (gzipped), it provides a simple way to produce comm

Metrics Graphics 7.5k Dec 22, 2022
🔥 JavaScript Library for HTML5 canvas based heatmaps

heatmap.js Dynamic Heatmaps for the Web. How to get started The fastest way to get started is to install heatmap.js with bower. Just run the following

Patrick Wied 5.9k Jan 2, 2023
Cubism.js: A JavaScript library for time series visualization.

Cubism.js Cubism.js is a D3 plugin for visualizing time series. Use Cubism to construct better realtime dashboards, pulling data from Graphite, Cube a

Square 4.9k Jan 3, 2023