Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/remapper/src/mod.ts

A framework for Beat Saber map scripting.
Go to Latest
import * as remapper from "https://deno.land/x/remapper@3.0.0/src/mod.ts";

Classes

Animation that can apply to any object.

Bare minimum animation class.

Animation specifically for environment objects.

Animation specifically for note objects.

Animation specifically for wall objects.

Settings for the animation optimizer, starts at default values.

Settings for the "optimizeSimilarPoints" optimizing function, starts at default values.

Settings for the "optimizeSimilarPointsSlope" optimizing function, starts at default values.

Handler to alias settings.

Enums

The mid anchor mode for arcs.

The rotation axis for V3 light rotations.

Note cut directions.

The distribution types for V3 lights.

Basic lighting event actions.

Basic event groups/types.

The filter types for V3 lights.

Interscope car groups.

The colors for V3 lights.

The transitions for V3 lights.

The type for a note.

Rotation basic event values.

The direction of rotation for V3 light rotations.

The easings for V3 light rotations.

The transitions for V3 light rotations.

Variables

Check if an array contains a value.

Get the last element in an array.

Interpolate to find an array between 2 arrays of the same length.

Known transforms for objects with ModelScene. ModelScene is NOT limited to these! You can figure out the transforms for ANY object.

Get the base "Environment" object.

Get the amount of seconds in the script.

Checks if value is an array of keyframes.

Setting presets. You would set these equal to the "rawSettings" property on a difficulty.

The ReMapper cache.

Log a message as ReMapper, displaying seconds.

Functions

Get the active difficulty, ensuring that it is indeed active.

Set the difficulty that objects are being created for.

Targets any environment objects in a group and animates them based on their original transforms.

Targets any environment objects in a track and animates them based on their original transforms.

Get the anchor offset for an object based on various transforms.

Gets arcs between a min and max time..

Add either a number or another array to an array.

Converts an array of classes to Json. Used internally in Difficulty to export to Json.

Divide an array either by a number or another array.

Check if 2 arrays are equal to each other.

Converts an array of Json objects to a class counterpart. Used internally in Difficulty to import Json.

Multiply an array either by a number or another array.

Subtract either a number or another array from an array.

Generate keyframes from an animation. Useful for doing things such as having objects rotate around points other than their anchor.

Assign a track to the base "Environment" object.

Gets bombs between a min and max time.

Store data in the ReMapper cache. Retrieves the same data unless specified parameters are changed.

Gets chains between a min and max time.

Makes a number fit between a min and max value.

Allows you to combine two animations together. Atleast one of them must have only a single keyframe.

Ensures that this value is in the format of an array of keyframes. For example if you input [x,y,z], it would be converted to [[x,y,z,0]].

Creates a new instance of an object, recursively.

Debug the transformations necessary to fit an object to a cube. Use the axis indicators to guide the process.

Create a wall for debugging. Position, rotation, and scale are in world space and can be animations.

Converts a quaternion to a euler rotation.

Gets events between a min and max time.

Automatically zip the map, including only necessary files.

Allows you to filter through an array of objects with a min and max property.

Find value between 0 and 1 from a beginning, length, and a point in time between.

Gets the distance between 2 points.

Get jump related info.

Get the objects from a .rmmodel.

Get the value of keyframes at a given time.

Checks if an object is empty.

Safely iterate through an array of keyframes.

Check if a property in an object exists

If a property doesn't exist through a path of objects, fill objects to get to that property.

Get a property of an object recursively.

Delete empty objects/arrays from an object recursively.

Remove a property of an object recursively, and delete empty objects left behind.

Set a property in an object, add objects if needed.

Interpolates between a start and end value to get a value in between.

Interpolates between a start and end color to get a color in between.

Process a number through an easing.

Interpolates between a start and end rotation to get a rotation in between.

Interpolates between a start and end value to get a value in between. Will wrap around 0-1.

Gets notes between a min and max time.

Optimizes animations, removing unnecessary points.

Parse a file path, allowing extension forcing and getting useful information.

Gives a random number in the given range.

Rotates a point around a mathematical anchor, [0,0,0] by default.

Rotate a vector, starts downwards.

Rounds a number to the nearest multiple of another number.

Sets the decimal place amount on a number.

If possible, isolate an array of keyframes with one keyframe. For example if you input [[x,y,z,0]], it would be converted to [x,y,z].

Sorts an array of objects by a property.

Convert an array of numbers from radians to degrees.

Convert an array of numbers from degrees to radians.

Transfer the visual aspect of maps to other difficulties.

Gets walls between a min and max time.

Calculate the correct position for a wall to line up with a position in the world.

Interfaces

The data type used by ModelScene to define objects.

Type Aliases

Helper type for complex keyframes.

Helper type for keyframe arrays.

Helper type for raw keyframes.

Animation properties.

Allowed inputs for the "animate" method in ModelScene.

Input options for the "animate" method in a ModelScene.

The "BloomFogEnvironment" environment component. Allows both animated and non animated variants.

Color formats.

An array with [r,g,b] or [r,g,b,a].

Keyframe or array of keyframes with 4 values. Allows "hsvLerp". [[r,g,b,a,time]...] or [r,g,b,a]

Array of keyframes with 1 value. [[x, time]...]

Keyframe or array of keyframes with 3 values. [[x,y,z,time]...] or [x,y,z]

Keyframe or array of keyframes with 4 values. [[x,y,z,w,time]...] or [x,y,z,w]

All components on environment objects.

Filename for a difficulty. Extension is optional.

Absolute or relative path to a difficulty. Extension is optional.

All difficulty names.

All easings.

All environment names.

Shaders available for geometry materials.

Geometry shape types.

A material used on a geometry object. Allows difficulty material references.

Objects that are allowed to be spawned with a ModelScene.

The "ILightWithId" environment component. Allows both animated and non animated variants.

Easings and splines.

Type for Json data.

Array of keyframes which have any amount of values.

Any flag that could be in a keyframe. E.g. easings, splines

Keyframe or array of keyframes with any amount of values. Allows point definitions.

Keyframe or array of keyframes with 4 values. Allows "hsvLerp" and point definitions. [[r,g,b,a,time]...] or [r,g,b,a]

Keyframe or array of keyframes with 1 value. [[x, time]...] or [x]

Keyframe or array of keyframes with 3 values. Allows point definitions. [[x,y,z,time]...] or [x,y,z]

Keyframe or array of keyframes with 4 values. Allows point definitions. [[x,y,z,w,time]...] or [x,y,z,w]

Keyframe which is in an array with other keyframes, has any amount of values.

Lookup methods for environment objects.

All mods to require/suggest.

Allowed options for providing data to a ModelScene.

Function for an Optimizer.

All properties allowed for a material used on a geometry object.

Keyframe or array of keyframes with any amount of values.

Array of keyframes with 4 values. [[r,g,b,a,time]...]

Array of keyframes with 3 values. [[x,y,z,time]...]

Array of keyframes with 4 values. [[x,y,z,w,time]...]

Keyframe which isn't in an array with other keyframes, has any amount of values.

All splines.

Allowed inputs for the "static" method in ModelScene.

Input options for the "static" method in a ModelScene.

Time value in a keyframe.

A track or multiple tracks.

The "TubeBloomPrePassLight" environment component. Allows both animated and non animated variants.

An array with 2 numbers.

An array with 3 numbers.

An array with 4 numbers.