AboutColorObject - cwtickle/danoniplus-docs GitHub Wiki

English | Japanese

| < Custom functions specification | Colored objects specification | Local storage specification > |

Colored objects specification

  • Colored objects are the basic images used in the Dancing☆Onigiri (CW Edition) display. Colored objects are the basic group of images used in the Dancing☆Onigiri (CW Edition) display. Normally, these are colored for display.

How to replace a group of colored objects

  • Colored objects can be replaced while maintaining their current state. Create a subfolder of any name under the [img] folder and place the set in it.
  • All of the following files must be present in the subfolder. All files must have the same file extension. It is acceptable to use some of the image files directly under the [img] folder.
File name Description
cursor.svg(png) Cursor image in Key configuration screen
frzbar.svg(png) Freeze-arrow bar, life gauge main unit
borderline.svg(png) An image showing the border position when the quota-based gauge is used.
arrow.svg(png) Arrow main image
arrowShadow.svg(png) For backside drawing of arrows. Used with Freeze Arrow.
c.svg(png) Ascii Art character(C)
giko.svg(png) Ascii Art character(Giko)
iyo.svg(png) Ascii Art character(Iyo)
monar.svg(png) Ascii Art character(Monar)
morara.svg(png) Ascii Art character(Morara)
onigiri.svg(png) Ascii Art character(Onigiri)
aaShadow.svg(png) For backside drawing of Ascii Art characters. Used with Freeze Arrow.
  • After you have the set of files, you can use the images in the above sub-folders in danoni_setting.js (for all works) or imgType (for individual works) to use the images in the above subfolders.

Case: Chart settings

|imgType=classic,png| // subfolder name first, extension second

Case: Common setting file (danoni_setting.js)

g_presetObj.imageSets = [``, `classic,png`];

How to add colored objects (normal)

  • Colored objects can only be added to images that are currently used in the step zone, such as arrows and rice balls.

1. Running on a server

g_presetObj.customImageList = [`ball`];
  • If you want to add an image named "ball" here, for example, you need to prepare the image data with the following name. Place it directly under the "img" folder. If you have specified imgType, please also place it under the subfolder specified by imgType.
Image name Purpose
ball.svg(png) Step zone, single-shot note
ballShadow.svg(png) Step zone, shadow area of single note
ballStepHit.svg(png) Step zone hit object
  • Note that the extension follows the value of g_presetObj.overrideExtension in danoni_setting.js. If not specified, you need to prepare an image in svg format.

2. In case of local (direct file launch)

  • In the case of local (direct file launch), the image will not be displayed using method 1. If you really want to display images even in the case of direct file activation, you need to add the "loadBinary()" function in danoni_localbinary.js.

Example of inserting an svg file (with ball added above)

  • Right-click on the svg file you created, open it in a text editor, copy it and insert it in the comment section below.
function loadBinary() {
    if (location.href.match(`^file`)) {
        // omit
        C_IMG_LIFEBORDER = `data:image/svg+xml,${encodeURIComponent('<svg id="borderline" data-name="borderline" xmlns="http://www.w3.org/2000/ svg" viewBox="0 0 400 160"><path d="M400,160H80L0,80,80.8,0H400Z"/></svg>')}`; }
        // add here
        g_imgObj.ball = `data:image/svg+xml,${encodeURIComponent('/*insert svg body code (for single note)*/')}`;
        g_imgObj.ballShadow = `data:image/svg+xml,${encodeURIComponent('/*insert svg body code (for single note shadow)*/')}`;
        g_imgObj.ballStep = `data:image/svg+xml,${encodeURIComponent('/*insert svg body code (for step zone)*/')}`;
        g_imgObj.ballStepHit = `data:image/svg+xml,${encodeURIComponent('/*insert svg body code (object for step hit)*/')}`;
    }
}

Example of inserting a png file (with ball added above)

  • Copy the base64-converted text of the png file and insert it in the comment section below.
    Please convert from an external site such as "Base64 encoder" for the conversion method.
function loadBinary() {
    if (location.href.match(`^file`)) {
        // omit
        C_IMG_LIFEBORDER = `data:image/svg+xml,${encodeURIComponent('<svg id="borderline" data-name="borderline" xmlns="http://www.w3.org/2000/ svg" viewBox="0 0 400 160"><path d="M400,160H80L0,80,80.8,0H400Z"/></svg>')}`; }
        // add here
        g_imgObj.ball = `data:image/png;base64,/*insert base64 converted code (for single note)*/`;
        g_imgObj.ballShadow = `data:image/png;base64,/*insert base64-converted code (for single-shot note shadow)*/`;
        g_imgObj.ballStep = `data:image/png;base64,/*insert base64-converted code (for step zone)*/`;
        g_imgObj.ballStepHit = `data:image/png;base64,/*insert base64-converted code (for step hit object)*/`;
    }
}

How to add colored objects (using custom Js)

  • There are cases where colored objects are needed, for example, for temporary use as a background/mask.
    In this case, you can use it by setting the path of the target image directly to g_imgObj on the customJs side.
  • Note that this method cannot be used for custom keys.
  • If you want to be able to use it with a local file, you need to specify it in the same way as described above in 2.

Example of custom image specification in customJs

function addImages(){
	g_imgObj.arrowSpecial = `./img/classic/arrow.png`; // specify target image directly
}
g_customJsObj.preTitle.push(addImages); // insert location customJs preTitle (before loading)

Define the chart side (specify "arrowSpecial" defined above)

|backtitle_data=
330,3,[c]arrowSpecial/#ff9999:yellow,,5,200,200,200,0,spinY,120
480,3
|

Related pages

Changelog

Version Change details
v23.0.0 - Changed so that multiple default image sets (ImgType) can be specified.
v22.5.1 - Initial implementation

| < Custom functions specification | Colored objects specification | Local storage specification > |

⚠️ **GitHub.com Fallback** ⚠️