defucilis / funscript-utils

A set of utility scripts to manipulate and generate .funscript files
6 stars 1 forks source link

Funscript Utils A set of TypeScript utilities for working with .funscript files

Installation

npm i funscript-utils

Modules

Types

Contains some useful type definitions for working with funscripts

Funscript

FunscriptMetadata

Action

FunConverter

FunConverter contains functions used to convert funscripts from one format to another.

getFunscriptFromString(funscript: String)

getIntensity(a1: Action, a2: Action)

addFunscriptMetadata(funscript: Funscript)

convertFunscriptToCsv(funscript: Funscript)

FunHalver

FunHalver contains one important function, and a variety of helper functions that it uses.

getHalfSpeedScript(funscript: Funscript, options)

FunMapper

Used to visualize funscripts in various ways.

getColor(intensity: number)

renderHeatmap(canvas: HTMLCanvasElement, script: Funscript, options)

renderActions(canvas: HTMLCanvasElement, script: Funscript)