ObjectReferenceIndex - cwtickle/danoniplus-docs GitHub Wiki

English | Japanese

| < ID Reference | Object Reference | Object hierarchy > |

Object Reference

This document covers the major objects and functions available via custom JS (through g_customJsObj). In principle, internal-only processes are omitted.


Key Objects

Game Data

  • g_rootObj — Raw chart data (dos data)
  • g_headerObj — Configuration values after parsing the chart header
  • g_keyObj — Key definitions (patterns, placements, colors, shuffle groups, etc.)
  • g_stateObj — Various states during gameplay (speed, gauge, options, etc.)
  • g_scoreObj — Chart placement data (arrows, freeze arrows, motions, etc.)
  • g_detailObj — Detailed chart information (density, speed data, etc.)
  • g_wordObj — Lyrics display state management
  • g_attrObj — Attributes for individual arrows and freeze arrows (position, color, counters, etc.)
  • g_workObj — Dynamic work variables for the main screen (step zone position, scroll direction, etc.)
  • g_resultObj — Result data including judgment counters, score, and combo
  • g_presetObj — Configuration values from the common settings file (danoni_setting.js)
  • g_loadObj — File loading state management

Settings & Options

  • g_settings — Management of various lists and cursor positions on the settings screen
  • g_gaugeOptionObj — Gauge configuration options
  • g_rankObj — Rank conditions and color definitions
  • g_judgObj — Configuration values for judgment windows

UI & Display

Shortcuts & Button Control

Custom Function Hooks

  • g_customJsObj — Insertion points for Custom JS (Title, Main, Results, etc.)
  • g_skinJsObj — Insertion points for Skin JS

Animation & Motion

  • g_animationData — Animation type lists (back, mask, style)
  • g_animationFunc — Animation creation and drawing functions (.make, .draw, .drawMain)
  • g_shuffleFunc — Map of shuffle processing functions (Mirror, Random, etc.)
  • g_motionFunc — Map of motion option processing functions
  • g_playWindowFunc — Map of PlayWindow option processing functions
  • g_stepAreaFunc — Map of StepArea option processing functions
  • g_shakingFunc — Map of Shaking option processing functions
  • g_effectFunc — Map of Effect option processing functions
  • g_frzReturnFunc — Map of FrzReturn option processing functions

Conversions & Constants

  • g_escapeStr — Definition collection of string replacement pairs
  • g_kCd — KeyCode to display name mapping
  • g_kCdN — KeyCode to KeyboardEvent.code mapping
  • g_posObj — Step zone position and travel distance
  • g_diffObj — Correction values for judgment positions and shortcut display locations
  • g_imgObj — Image path management
  • g_typeLists — Constants for arrow types, color changes, etc.
  • g_limitObj — Constants for sizes and font sizes
  • g_templateObj — Default definitions for result formats
  • g_pointAllocation — Score point allocation definitions

Key Functions

Element & Attribute Manipulation

  • $id (_id) — Returns document.getElementById(_id).style
  • multiAppend (_baseObj, ...rest) — Appends multiple child elements at once
  • setAttrs (_baseObj, { ...rest }) — Sets multiple attributes at once
  • convertStrToVal (_str) — Expands {variableName} within strings
  • wUnit (_val, _unitName=px) — Returns a string appended with the specified unit

Value & Type Conversion

Files & Links

Colors & Gradients

Fonts & Text

UI Element Creation

Screen & Sprite Management

  • clearWindow (_redrawFlg, _customDisplayName) — Clears screens and redraws backgrounds
  • createMultipleSprite (_baseName, _num) — Generates layered sprites (e.g., back/maskSprite)
  • makeBgCanvas (_ctx, { w, h }) — Draws the Canvas background

Transform & Coordinate Management

Shortcuts & Key Operations

Notifications & Messages

Time & Frame Conversion

Settings Screen Assistance

  • g_moveSettingWindow (_changePageFlg, _direction) — Navigates between setting screens
  • setDifficulty (_initFlg) — Reconfigures settings when a chart is selected
  • setSetting (_scrollNum, _settingName, { func, unitName, roundNum }) — Updates configuration values
  • setGauge (_scrollNum, _gaugeInitFlg) — Switches gauge configurations
  • gaugeFormat (_mode, _border, _rcv, _dmg, _init, _lifeValFlg) — Formats detailed gauge text
  • getStgDetailName (_name) — Converts settings names for display (references g_lblNameObj.u_*)
  • getKeyName (_key) — Gets the display name for a key label
  • getKeyUnitName (_key) — Gets the key unit name (e.g., "key")
  • makeHighScore (_scoreId) — Updates the high score display
  • changeAppearanceFilter (_num) — Redraws the Appearance filter
  • drawSpeedGraph (_scoreId) — Renders the speed change graph
  • drawDensityGraph (_scoreId) — Renders the density graph
  • makeDifInfo (_scoreId) — Updates the difficulty information label
  • getScoreBaseData (_scoreId) — Fetches base chart data (arrow count, APM, etc.)
  • updateSettingSummary () — Updates the configuration summary display

Judgment & Scoring (Main Screen)

  • judgeArrow (_j) — Processes arrow hit judgments
  • lifeRecovery () — Increases the gauge life
  • lifeDamage (_excessive) — Decreases the gauge life from damage
  • changeLifeColor (_state) — Updates the gauge bar's color and numeric value
  • displayDiff (_difFrame, _fjdg, _justFrames) — Displays Fast/Slow indicators
  • quickRetry (_retryCondition) — Evaluates automatic retry conditions
  • judgeIi / judgeShakin / judgeMatari / judgeShobon / judgeUwan (_difFrame, _j) — Processes individual criteria judgments
  • judgeKita / judgeIknai (_difFrame, _j) — Processes freeze arrow judgments
  • changeHitFrz (_j, _k, _name, _difFrame) — Updates graphics when hitting a freeze arrow
  • changeFailedFrz (_j, _k) — Updates graphics when failing a freeze arrow
  • makeFinishView (_text) — Displays Full Combo / Perfect animations
  • finishViewing () — Checks state when all arrows have reached the target

Sprites & Color Changes (Main Screen)

  • makeArrow (_attrs, _arrowCnt, _name, _color, _shadowColor) — Generates arrows
  • makeFrzArrow (_attrs, _arrowCnt, _name, _normalColor, _barColor, _shadowColor) — Generates freeze arrows
  • makeStepZone (_j, _keyCtrlPtn) — Generates the step zone
  • appearStepZone (_j, _display, _alpha) — Toggles step zone visibility
  • appearKeyTypes (_j, _targets, _alphas) — Controls partial key step zone visibility
  • changeColors (_mkColor, _mkColorCd, _header, _name) — Applies individual or global color changes
  • changeAppearanceBar (_num, _dirPlus) — Updates the appearance filter bar display
  • safeExecuteCustomHooks (_hookName, _funcArray, ...args) — Safely executes custom function hooks

Results

  • makeResultText (_format, { hashTag, musicTitle, ... }) — Formats result text output
  • getSelectedSettingList (_orgShuffleFlg) — Fetches information on currently selected options

General Utilities

  • safeExecuteCustomHooks (_hookName, _funcArray, ...args) — Safely executes functions within g_customJsObj sequentially
  • getHeader (_obj, ..._params) — Fetches header values with priority given to locales
  • getShadowColor (_colorPos, _arrowColor) — Fetches the shadow color for arrows
  • getKeyInfo () — Gets basic configuration info for the current key pattern (keyCtrlPtn, keyNum, etc.)
  • setPlayingShortcut () — Updates shortcut keys active during gameplay
  • getShuffleName () — Gets the active shuffle display name
  • getOrgShuffleFlg () — Checks if shuffle options are set to default
  • getTransKeyName (_spaceFlg) — Gets the display name for alternative key modes
  • getStorageKeyName (_key, _transName, _assistFlg, _mirrorName, _scoreId) — Gets the storage key name for high scores
  • parseStorageData (_keyName, _default) — Parses LocalStorage data
  • getQueryParamVal (_name) — Fetches URL query parameters

| < ID Reference | Object Reference | Object hierarchy > |