Skip to main content
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.1.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.

This light's color gets applied to all the objects in the scene globally.

This is a superefficent class for geometries because it saves all data in buffers. It reduces memory costs and cpu cycles. But it is not as easy to work with because of all the necessary buffer calculations. It is mainly interesting when working with static objects.

Abstract base class for cameras. This class should always be inherited when you build a new camera.

Object for keeping track of time.

Represents a color. See also ColorUtils.

An extensible curve object which contains methods for interpolation class Curve

JavaScript events for custom objects

This class contains the parameters that define linear fog, i.e., that grows linearly denser with the distance.

This class contains the parameters that define linear fog, i.e., that grows exponentially denser with the distance.

Frustums are used to determine what is inside the camera's field of view. They help speed up the rendering process.

A loader for loading an image. Unlike other loaders, this one emits events instead of using predefined callbacks. So if you're interested in getting notified when things happen, you need to add listeners to the object.

Abstract base class for lights.

Base class for implementing loaders.

Handles and keeps track of loaded and pending data.

Materials describe the appearance of objects. They are defined in a (mostly) renderer-independent way, so you don't have to rewrite materials if you decide to use a different renderer.

( class Matrix3 implements Matrix )

A 4x4 Matrix.

Base class for scene graph objects

Camera with orthographic projection

a 2d path representation, comprising of points, lines, and cubes, similar to the html5 2d canvas api. It extends CurvePath.

Camera with perspective projection.

A class for displaying points. The points are rendered by the WebGLRenderer using gl.POINTS.

Implementation of a quaternion. This is used for rotating things without incurring in the dreaded gimbal lock issue, amongst other advantages.

Scenes allow you to set up what and where is to be rendered by three.js. This is where you place objects, lights and cameras.

Defines a 2d shape plane using paths.

Represents the data source of a texture.

A point light that can cast shadow in one direction.

Class for loading a texture. Unlike other loaders, this one emits events instead of using predefined callbacks. So if you're interested in getting notified when things happen, you need to add listeners to the object.

2D vector.

3D vector. ( class Vector3 implements Vector )

4D vector.

Represents a three-dimensional render target.

This type of render target represents an array of textures.

An object with a series of statistical information about the graphics board memory and the rendering process.

This class originall extended WebGLMultipleRenderTarget However, there are some issues with this method as documented below

The WebGL renderer displays your beautifully crafted scenes using WebGL, if your device supports it. This renderer has way better performance than CanvasRenderer.

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

Add values of one array to another.

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.

Ceils a number to the nearest multiple of another number.

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

Floors a number to the nearest multiple of another number.

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.

Rounds a number to the nearest multiple of another number.

v
three.LinePieces
deprecated
v
three.LineStrip
deprecated

Functions

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

Set the difficulty that objects are being created for.

Edits the base Environment object's fog component. Or spawns an event to animate the fog.

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.

Create a temporary directory with all of the relevant files for the beatmap. Returns all of the files that are in the directory.

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 upload the map files to quest, including only necessary files.

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 information about the bounding box of a box or a bunch of boxes.

Gets the distance between 2 points.

Get jump related info.

Get the objects from a .rmmodel, caches data if model hasn't changed.

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.

Repeat an animation. Can also mirror the animation to connect loops.

Function to represent objects as walls.

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.

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.

Clamps the x to be between a and b.

Smoothly interpolate a number from x toward y in a spring-like manner using the dt to maintain frame rate independent movement.

Returns a value linearly interpolated from two known points based on the given interval - t = 0 will return x and t = 1 will return y.

Linear mapping of x from range [a1, a2] to range [b1, b2].

Returns a value that alternates between 0 and length.

Random float from low to high interval.

Random float from - range / 2 to range / 2 interval.

Random integer from low to high interval.

Random float from 0 to 1 with 16 bits of randomness. Standard Math.random() creates repetitive patterns when applied over larger space.

Deterministic pseudo-random float in the interval [ 0, 1 ].

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. Assumes that position is set to [0,0].

Interfaces

The data type used by ModelScene to define objects.

Event object.

( interface Matrix )

parameters is an object with one or more properties defining the material's appearance.

Shim for OffscreenCanvas.

( interface Vector )

Type Aliases

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

Helper type for complex keyframes.

Array of keyframes which have any amount of values.

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

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

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

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.

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

Helper type for keyframe arrays.

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

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.

Allowed options for providing data to a ModelScene.

Function for an Optimizer.

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

Helper type for raw keyframes.

Keyframe or array of keyframes with any amount of values.

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

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 mods to require.

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

Helper type for single keyframes.

All splines.

Allowed inputs for the "static" method in ModelScene.

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

All mods to suggest.

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.