Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/remapper/src/beatmap.ts>Difficulty

A framework for Beat Saber map scripting.
Go to Latest
class Difficulty
import { Difficulty } from "https://deno.land/x/remapper@2.1.0/src/beatmap.ts";

Constructors

new
Difficulty(input: DIFFPATH, output?: DIFFPATH)

Creates a difficulty. Can be used to access various information and the map data. Will set the active difficulty to this.

Properties

private
postProcesses: Map<unknown[] | undefined, PostProcessFn<unknown>[]>
boostColorLeft: Vec3
boostColorRight: Vec3
colorLeft: Vec3
colorRight: Vec3
customData
customEvents: CustomEventInternals.BaseEvent[]
diffRank: number
diffSet: Record<string, any>
diffSetMap: Record<string, any>
diffSetName: string
editorOffset: number
editorOldOffset: number
events: EventInternals.AbstractEvent[]
fileName: string
geoMaterials: Record<string, GeometryMaterial>
information: string[]
json: Record<string, any>
label: string
lightColorLeft: Vec3
lightColorRight: Vec3
mapFile: DIFFPATH
name: string
NJS: number
notes: Note[]
obstacleColor: Vec3
offset: number
pointDefinitions: Record<string, any>[]
rawEnvironment: EnvironmentInternals.BaseEnvironment[]
rawSettings: Record<string, any>
relativeMapFile: DIFFNAME
requirements: string[]
readonly
settings: Proxy
suggestions: string[]
version: string
walls: Wall[]
warnings: string[]
waypoints: any[]

Methods

private
colorArrayToTuple(array: Vec3)
private
pruneInput(
object: Record<string, any>,
property: string,
value: any,
)
abstractEvents(fn: (arr: CustomEventInternals.AbstractEvent[]) => void)
addPostProcess<T>(object: T[] | undefined, fn: PostProcessFn<T>)
animateTracks(fn: (arr: CustomEventInternals.AnimateTrack[]) => void)
assignFogTracks(fn: (arr: CustomEventInternals.AssignFogTrack[]) => void)
assignPathAnimations(fn: (arr: CustomEventInternals.AssignPathAnimation[]) => void)
assignPlayerToTracks(fn: (arr: CustomEventInternals.AssignPlayerToTrack[]) => void)
assignTrackParents(fn: (arr: CustomEventInternals.AssignTrackParent[]) => void)
doPostProcess<T = unknown>(object?: T[] | undefined)
environment(fn: (arr: Environment[]) => void)
geometry(fn: (arr: Geometry[]) => void)
require(requirement: MODS, required?)

Add/remove a requirement from the difficulty.

save(diffName?: DIFFPATH)

Saves the difficulty.

suggest(suggestion: MODS, suggested?)

Add/remove a suggestion from the difficulty.