From a01042af6af63ff93cb8f25fd8960900a8e59a3d Mon Sep 17 00:00:00 2001 From: OLDREDSTONE Date: Fri, 12 Dec 2025 15:24:30 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E5=AE=9E=E9=AA=8C=E3=80=91=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E5=AF=B9=20rdview2=20=E7=9A=84=E6=94=AF=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.html | 212 ++++--- rdviewAssets/assets.json | 253 ++++++++ rdviewAssets/assets.png | Bin 0 -> 7459 bytes script/Extensions.js | 1176 ++++++++++++++++++++++++++++++++++++++ script/rdview2.js | 84 +++ 5 files changed, 1644 insertions(+), 81 deletions(-) create mode 100644 rdviewAssets/assets.json create mode 100644 rdviewAssets/assets.png create mode 100644 script/Extensions.js create mode 100644 script/rdview2.js diff --git a/index.html b/index.html index d6f1472..dfbf132 100644 --- a/index.html +++ b/index.html @@ -1,29 +1,31 @@ + + + 节奏医生编辑器教程 + + + + + + + + + + + + - - - 节奏医生编辑器教程 - - - - - - - - - - - - - - -
加载中...
- - + - - - - - - - - - - - - \ No newline at end of file + loadRDView(); + const originalCodeRenderer = $docsify.markdown + ?.renderer?.code; + $docsify = { + ...$docsify, + ...{ + markdown: { + renderer: { + code: function (code, lang) { + if ( + lang.trim().startsWith( + "rdview2", + ) + ) { + const langParts = lang + .trim().split(" "); + const width = + parseInt( + langParts[1], + ) || 8; + const height = + parseInt( + langParts[2], + ) || 4; + const scale = + (parseFloat( + langParts[3], + ) || 1) * 2; + return `
`; + } else if ( + lang.trim().startsWith( + "rdview", + ) + ) { + return RDViewRender( + lang, + code, + ); + } + return originalCodeRenderer + ? originalCodeRenderer( + code, + lang, + ) + : `
${
+                                        escapeHtml(code)
+                                    }
`; + }, + image: function (src, title, alt) { + return `
${alt}${ + alt ? `

${alt}

` : "" + }
`; + }, + }, + }, + switchLightDarkMode: { + useSwitchMode: true, + top: 130, + right: 26, + svgColor: "#7d7b75", + }, + search: { + noData: { + "/": "没有找到结果!", + }, + paths: "auto", + placeholder: { + "/": "搜索", + }, + hideOtherSidebarContent: true, + }, + }, + }; + + + + + + + + + + + + + + diff --git a/rdviewAssets/assets.json b/rdviewAssets/assets.json new file mode 100644 index 0000000..0bad0ca --- /dev/null +++ b/rdviewAssets/assets.json @@ -0,0 +1,253 @@ +{ "frames": [ + { + "filename": "0.ase", + "frame": { "x": 0, "y": 0, "w": 327, "h": 160 }, + "rotated": false, + "trimmed": false, + "spriteSourceSize": { "x": 0, "y": 0, "w": 327, "h": 160 }, + "sourceSize": { "w": 327, "h": 160 }, + "duration": 100 + } + ], + "meta": { + "app": "https://www.aseprite.org/", + "version": "1.3.16-beta3-x64", + "image": "assets.png", + "format": "RGBA8888", + "size": { "w": 327, "h": 160 }, + "scale": "1", + "slices": [ + { "name": "event_SpinningRows", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 246, "y": 56, "w": 14, "h": 14 } }] }, + { "name": "event_SetMainWindow", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 246, "y": 42, "w": 14, "h": 14 } }] }, + { "name": "event_RenameWindow", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 246, "y": 28, "w": 14, "h": 14 } }] }, + { "name": "event_DesktopColor_0", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 249, "y": 20, "w": 8, "h": 5 }, "pivot": {"x": -3, "y": -6 } }] }, + { "name": "event_DesktopColor", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 232, "y": 28, "w": 14, "h": 14 } }] }, + { "name": "event_HideWindow", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 232, "y": 14, "w": 14, "h": 14 } }] }, + { "name": "event_ReorderWindows_3", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 162, "y": 84, "w": 14, "h": 14 } }] }, + { "name": "event_ReorderWindows_2", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 162, "y": 70, "w": 14, "h": 14 } }] }, + { "name": "event_ReorderWindows_1", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 162, "y": 56, "w": 14, "h": 14 } }] }, + { "name": "event_ReorderWindows_0", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 162, "y": 42, "w": 14, "h": 14 } }] }, + { "name": "event_ReorderWindows", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 162, "y": 42, "w": 14, "h": 56 } }] }, + { "name": "event_ReorderRooms_3", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 148, "y": 84, "w": 14, "h": 14 } }] }, + { "name": "event_ReorderRooms_2", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 148, "y": 70, "w": 14, "h": 14 } }] }, + { "name": "event_ReorderRooms_1", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 148, "y": 56, "w": 14, "h": 14 } }] }, + { "name": "event_ReorderRooms_0", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 148, "y": 42, "w": 14, "h": 14 } }] }, + { "name": "event_CustomFlash_0", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 190, "y": 56, "w": 14, "h": 14 } }] }, + { "name": "event_MacroEvent", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 78, "y": 84, "w": 14, "h": 14 } }] }, + { "name": "event_ForwardEvent", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 64, "y": 84, "w": 14, "h": 14 } }] }, + { "name": "event_ForwardDecorationEvent", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 106, "y": 70, "w": 14, "h": 14 } }] }, + { "name": "event_ForwardRowEvent", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 92, "y": 70, "w": 14, "h": 14 } }] }, + { "name": "event_SetWindowContent", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 78, "y": 56, "w": 14, "h": 14 } }] }, + { "name": "event_WindowResize", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 64, "y": 56, "w": 14, "h": 14 } }] }, + { "name": "event_Tile", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 120, "y": 56, "w": 14, "h": 14 } }] }, + { "name": "event_Blend", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 50, "y": 56, "w": 14, "h": 14 } }] }, + { "name": "event_ReorderSprite", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 106, "y": 56, "w": 14, "h": 14 } }] }, + { "name": "event_ShakeScreenCustom", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 232, "y": 42, "w": 14, "h": 14 } }] }, + { "name": "event_ReorderRow", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 92, "y": 56, "w": 14, "h": 14 } }] }, + { "name": "event_NarrateRowInfo", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 176, "y": 84, "w": 14, "h": 14 } }] }, + { "name": "event_ReadNarration", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 190, "y": 0, "w": 14, "h": 14 } }] }, + { "name": "tab_icon_sounds", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 35, "y": 0, "w": 15, "h": 13 } }] }, + { "name": "tab_color_sounds", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 22, "y": 39, "w": 2, "h": 13 } }] }, + { "name": "content_1", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 80, "y": 106, "w": 5, "h": 5 }, "center": {"x": 2, "y": 2, "w": 1, "h": 1 } }] }, + { "name": "tab_icon_rows", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 0, "y": 13, "w": 15, "h": 13 } }] }, + { "name": "tab_icon_actions", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 0, "y": 26, "w": 15, "h": 13 } }] }, + { "name": "tab_icon_rooms", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 0, "y": 39, "w": 15, "h": 13 } }] }, + { "name": "tab_icon_decorations", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 0, "y": 52, "w": 15, "h": 13 } }] }, + { "name": "tab_icon_windows", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 0, "y": 65, "w": 15, "h": 13 } }] }, + { "name": "tab_color_rows", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 24, "y": 39, "w": 2, "h": 13 } }] }, + { "name": "tab_color_actions", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 26, "y": 39, "w": 2, "h": 13 } }] }, + { "name": "tab_color_rooms", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 28, "y": 39, "w": 2, "h": 13 } }] }, + { "name": "tab_color_decorations", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 30, "y": 39, "w": 2, "h": 13 } }] }, + { "name": "tab_color_windows", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 32, "y": 39, "w": 2, "h": 13 } }] }, + { "name": "tab_color_unknown", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 34, "y": 39, "w": 2, "h": 13 } }] }, + { "name": "tab_icon_unknown", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 0, "y": 78, "w": 15, "h": 13 } }] }, + { "name": "content_2", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 85, "y": 105, "w": 7, "h": 7 }, "center": {"x": 3, "y": 3, "w": 1, "h": 1 } }] }, + { "name": "event_Comment", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 50, "y": 84, "w": 14, "h": 14 } }] }, + { "name": "event_ReorderRooms", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 148, "y": 42, "w": 14, "h": 56 } }] }, + { "name": "event_SetCrotchetsPerBar", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 78, "y": 0, "w": 14, "h": 14 } }] }, + { "name": "event_PlaySong", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 50, "y": 0, "w": 28, "h": 14 } }] }, + { "name": "event_PlaySound", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 190, "y": 70, "w": 14, "h": 14 } }] }, + { "name": "event_SetBeatsPerMinute", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 218, "y": 42, "w": 14, "h": 14 } }] }, + { "name": "event_SetClapSounds", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 176, "y": 42, "w": 14, "h": 14 } }] }, + { "name": "event_SetHeartExplodeVolume", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 134, "y": 84, "w": 14, "h": 14 } }] }, + { "name": "event_SetHeartExplodeInterval", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 134, "y": 0, "w": 14, "h": 14 } }] }, + { "name": "event_SetGameSound", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 148, "y": 0, "w": 14, "h": 14 } }] }, + { "name": "event_SetBeatSound", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 162, "y": 0, "w": 14, "h": 14 } }] }, + { "name": "event_SetCountingSound", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 176, "y": 0, "w": 14, "h": 14 } }] }, + { "name": "event_SetOneshotWave", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 78, "y": 14, "w": 14, "h": 14 } }] }, + { "name": "event_AddFreeTimeBeat", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 225, "y": 0, "w": 7, "h": 14 } }] }, + { "name": "event_PulseFreeTimeBeat", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 232, "y": 0, "w": 7, "h": 12 } }] }, + { "name": "event_SetTheme", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 50, "y": 28, "w": 14, "h": 14 } }] }, + { "name": "event_SetVFXPreset", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 190, "y": 84, "w": 14, "h": 14 } }] }, + { "name": "event_SetForeground", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 134, "y": 70, "w": 14, "h": 14 } }] }, + { "name": "event_SetBackgroundColor", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 134, "y": 42, "w": 14, "h": 14 } }] }, + { "name": "event_SetSpeed", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 204, "y": 84, "w": 14, "h": 14 } }] }, + { "name": "event_Flash", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 190, "y": 42, "w": 14, "h": 14 } }] }, + { "name": "event_CustomFlash", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 204, "y": 42, "w": 14, "h": 14 } }] }, + { "name": "event_NewWindowDance", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 50, "y": 70, "w": 14, "h": 14 } }] }, + { "name": "event_MoveCamera", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 176, "y": 56, "w": 14, "h": 14 } }] }, + { "name": "event_PulseCamera", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 120, "y": 42, "w": 14, "h": 14 } }] }, + { "name": "event_TextExplosion", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 134, "y": 28, "w": 14, "h": 14 } }] }, + { "name": "event_ShowDialogue", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 148, "y": 28, "w": 14, "h": 14 } }] }, + { "name": "event_ShowStatusSign", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 162, "y": 28, "w": 14, "h": 14 } }] }, + { "name": "event_AdvanceText", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 218, "y": 0, "w": 7, "h": 14 } }] }, + { "name": "event_TintRows", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 92, "y": 0, "w": 14, "h": 14 } }] }, + { "name": "event_Tint", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 106, "y": 0, "w": 14, "h": 14 } }] }, + { "name": "event_TagAction", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 162, "y": 14, "w": 14, "h": 14 } }] }, + { "name": "event_Stutter", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 78, "y": 42, "w": 14, "h": 14 } }] }, + { "name": "event_ShowHands", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 78, "y": 70, "w": 14, "h": 14 } }] }, + { "name": "event_ShakeScreen", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 204, "y": 14, "w": 14, "h": 14 } }] }, + { "name": "event_SetVisible", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 106, "y": 42, "w": 14, "h": 14 } }] }, + { "name": "event_SetRoomPerspective", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 64, "y": 42, "w": 14, "h": 14 } }] }, + { "name": "event_SetRoomContentMode", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 120, "y": 70, "w": 14, "h": 14 } }] }, + { "name": "event_SetPlayStyle", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 148, "y": 14, "w": 14, "h": 14 } }] }, + { "name": "event_SetHandOwner", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 134, "y": 14, "w": 14, "h": 14 } }] }, + { "name": "event_PaintHands", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 120, "y": 1, "w": 14, "h": 14 } }] }, + { "name": "event_PlayExpression", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 106, "y": 84, "w": 14, "h": 14 } }] }, + { "name": "event_MoveRoom", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 50, "y": 42, "w": 14, "h": 14 } }] }, + { "name": "event_MaskRoom", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 78, "y": 28, "w": 14, "h": 14 } }] }, + { "name": "event_MoveRow", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 204, "y": 70, "w": 14, "h": 14 } }] }, + { "name": "event_InvertColors", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 218, "y": 14, "w": 14, "h": 14 } }] }, + { "name": "event_HideRow", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 92, "y": 42, "w": 14, "h": 14 } }] }, + { "name": "event_FlipScreen_1", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 218, "y": 70, "w": 14, "h": 14 } }] }, + { "name": "event_FinishLevel", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 190, "y": 28, "w": 14, "h": 14 } }] }, + { "name": "event_ChangePlayersRows", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 176, "y": 28, "w": 14, "h": 14 } }] }, + { "name": "event_BassDrop", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 190, "y": 14, "w": 14, "h": 14 } }] }, + { "name": "event_CallCustomMethod", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 176, "y": 14, "w": 14, "h": 14 } }] }, + { "name": "event_PlayAnimation", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 92, "y": 84, "w": 14, "h": 14 } }] }, + { "name": "event_Move", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 176, "y": 70, "w": 14, "h": 14 } }] }, + { "name": "event_FadeRoom", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 64, "y": 28, "w": 14, "h": 14 } }] }, + { "name": "event_Unknown", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 64, "y": 70, "w": 14, "h": 14 } }] }, + { "name": "themes", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 15, "y": 39, "w": 7, "h": 13 } }] }, + { "name": "event_beat_pulse", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 50, "y": 98, "w": 3, "h": 14 }, "pivot": {"x": 1, "y": 0 } }] }, + { "name": "event_beat_hit", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 53, "y": 98, "w": 5, "h": 14 }, "pivot": {"x": 2, "y": 0 } }] }, + { "name": "event_beat_x", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 84, "y": 98, "w": 9, "h": 7 } }] }, + { "name": "char_0021", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 54, "y": 112, "w": 2, "h": 8 } }] }, + { "name": "char_0022", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 56, "y": 112, "w": 4, "h": 8 } }] }, + { "name": "char_0023", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 60, "y": 112, "w": 6, "h": 8 } }] }, + { "name": "char_0024", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 66, "y": 112, "w": 5, "h": 8 } }] }, + { "name": "char_0025", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 71, "y": 112, "w": 6, "h": 8 } }] }, + { "name": "char_0026", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 77, "y": 112, "w": 6, "h": 8 } }] }, + { "name": "char_0027", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 83, "y": 112, "w": 2, "h": 8 } }] }, + { "name": "char_0028", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 85, "y": 112, "w": 3, "h": 8 } }] }, + { "name": "char_0029", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 88, "y": 112, "w": 3, "h": 8 } }] }, + { "name": "char_002a", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 91, "y": 112, "w": 4, "h": 8 } }] }, + { "name": "char_002b", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 95, "y": 112, "w": 4, "h": 8 } }] }, + { "name": "char_002c", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 99, "y": 112, "w": 3, "h": 8 } }] }, + { "name": "char_002d", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 102, "y": 112, "w": 4, "h": 8 } }] }, + { "name": "char_002e", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 106, "y": 112, "w": 2, "h": 8 } }] }, + { "name": "char_002f", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 108, "y": 112, "w": 6, "h": 8 } }] }, + { "name": "char_0030", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 50, "y": 120, "w": 5, "h": 8 } }] }, + { "name": "char_0031", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 55, "y": 120, "w": 3, "h": 8 } }] }, + { "name": "char_0032", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 58, "y": 120, "w": 5, "h": 8 } }] }, + { "name": "char_0033", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 63, "y": 120, "w": 5, "h": 8 } }] }, + { "name": "char_0034", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 68, "y": 120, "w": 5, "h": 8 } }] }, + { "name": "char_0035", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 73, "y": 120, "w": 5, "h": 8 } }] }, + { "name": "char_0036", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 78, "y": 120, "w": 5, "h": 8 } }] }, + { "name": "char_0037", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 83, "y": 120, "w": 5, "h": 8 } }] }, + { "name": "char_0038", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 88, "y": 120, "w": 5, "h": 8 } }] }, + { "name": "char_0039", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 93, "y": 120, "w": 5, "h": 8 } }] }, + { "name": "char_003a", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 98, "y": 120, "w": 2, "h": 8 } }] }, + { "name": "char_003b", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 100, "y": 120, "w": 2, "h": 8 } }] }, + { "name": "char_003c", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 102, "y": 120, "w": 4, "h": 8 } }] }, + { "name": "char_003d", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 106, "y": 120, "w": 4, "h": 8 } }] }, + { "name": "char_003e", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 110, "y": 120, "w": 4, "h": 8 } }] }, + { "name": "char_003f", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 114, "y": 120, "w": 5, "h": 8 } }] }, + { "name": "char_0040", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 50, "y": 128, "w": 6, "h": 8 } }] }, + { "name": "char_0041", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 56, "y": 128, "w": 5, "h": 8 } }] }, + { "name": "char_0042", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 61, "y": 128, "w": 5, "h": 8 } }] }, + { "name": "char_0043", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 66, "y": 128, "w": 4, "h": 8 } }] }, + { "name": "char_0044", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 70, "y": 128, "w": 5, "h": 8 } }] }, + { "name": "char_0045", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 75, "y": 128, "w": 4, "h": 8 } }] }, + { "name": "char_0046", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 79, "y": 128, "w": 4, "h": 8 } }] }, + { "name": "char_0047", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 83, "y": 128, "w": 5, "h": 8 } }] }, + { "name": "char_0048", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 88, "y": 128, "w": 5, "h": 8 } }] }, + { "name": "char_0049", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 93, "y": 128, "w": 4, "h": 8 } }] }, + { "name": "char_004a", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 97, "y": 128, "w": 5, "h": 8 } }] }, + { "name": "char_004b", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 102, "y": 128, "w": 5, "h": 8 } }] }, + { "name": "char_004c", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 107, "y": 128, "w": 4, "h": 8 } }] }, + { "name": "char_004d", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 111, "y": 128, "w": 6, "h": 8 } }] }, + { "name": "char_004e", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 117, "y": 128, "w": 5, "h": 8 } }] }, + { "name": "char_004f", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 122, "y": 128, "w": 5, "h": 8 } }] }, + { "name": "char_0050", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 50, "y": 136, "w": 5, "h": 8 } }] }, + { "name": "char_0051", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 55, "y": 136, "w": 5, "h": 8 } }] }, + { "name": "char_0052", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 60, "y": 136, "w": 5, "h": 8 } }] }, + { "name": "char_0053", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 65, "y": 136, "w": 5, "h": 8 } }] }, + { "name": "char_0054", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 70, "y": 136, "w": 4, "h": 8 } }] }, + { "name": "char_0055", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 74, "y": 136, "w": 5, "h": 8 } }] }, + { "name": "char_0056", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 79, "y": 136, "w": 5, "h": 8 } }] }, + { "name": "char_0057", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 84, "y": 136, "w": 6, "h": 8 } }] }, + { "name": "char_0058", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 90, "y": 136, "w": 5, "h": 8 } }] }, + { "name": "char_0059", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 95, "y": 136, "w": 5, "h": 8 } }] }, + { "name": "char_005a", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 100, "y": 136, "w": 4, "h": 8 } }] }, + { "name": "char_005b", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 104, "y": 136, "w": 3, "h": 8 } }] }, + { "name": "char_005c", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 107, "y": 136, "w": 6, "h": 8 } }] }, + { "name": "char_005d", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 113, "y": 136, "w": 3, "h": 8 } }] }, + { "name": "char_005e", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 116, "y": 136, "w": 4, "h": 8 } }] }, + { "name": "char_005f", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 120, "y": 136, "w": 5, "h": 8 } }] }, + { "name": "char_0060", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 50, "y": 144, "w": 3, "h": 8 } }] }, + { "name": "char_0061", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 53, "y": 144, "w": 5, "h": 8 } }] }, + { "name": "char_0062", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 58, "y": 144, "w": 5, "h": 8 } }] }, + { "name": "char_0063", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 63, "y": 144, "w": 4, "h": 8 } }] }, + { "name": "char_0064", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 67, "y": 144, "w": 5, "h": 8 } }] }, + { "name": "char_0065", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 72, "y": 144, "w": 5, "h": 8 } }] }, + { "name": "char_0066", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 77, "y": 144, "w": 4, "h": 8 } }] }, + { "name": "char_0067", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 81, "y": 144, "w": 5, "h": 8 } }] }, + { "name": "char_0068", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 86, "y": 144, "w": 5, "h": 8 } }] }, + { "name": "char_0069", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 91, "y": 144, "w": 2, "h": 8 } }] }, + { "name": "char_006a", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 93, "y": 144, "w": 3, "h": 8 } }] }, + { "name": "char_006b", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 96, "y": 144, "w": 5, "h": 8 } }] }, + { "name": "char_006c", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 101, "y": 144, "w": 2, "h": 8 } }] }, + { "name": "char_006d", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 103, "y": 144, "w": 6, "h": 8 } }] }, + { "name": "char_006e", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 109, "y": 144, "w": 5, "h": 8 } }] }, + { "name": "char_006f", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 114, "y": 144, "w": 5, "h": 8 } }] }, + { "name": "char_0070", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 50, "y": 152, "w": 5, "h": 8 } }] }, + { "name": "char_0071", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 55, "y": 152, "w": 5, "h": 8 } }] }, + { "name": "char_0072", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 60, "y": 152, "w": 4, "h": 8 } }] }, + { "name": "char_0073", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 64, "y": 152, "w": 5, "h": 8 } }] }, + { "name": "char_0074", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 69, "y": 152, "w": 4, "h": 8 } }] }, + { "name": "char_0075", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 73, "y": 152, "w": 5, "h": 8 } }] }, + { "name": "char_0076", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 78, "y": 152, "w": 5, "h": 8 } }] }, + { "name": "char_0077", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 83, "y": 152, "w": 6, "h": 8 } }] }, + { "name": "char_0078", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 89, "y": 152, "w": 4, "h": 8 } }] }, + { "name": "char_0079", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 93, "y": 152, "w": 5, "h": 8 } }] }, + { "name": "char_007a", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 98, "y": 152, "w": 5, "h": 8 } }] }, + { "name": "char_007b", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 103, "y": 152, "w": 4, "h": 8 } }] }, + { "name": "char_007c", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 107, "y": 152, "w": 2, "h": 8 } }] }, + { "name": "char_007d", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 109, "y": 152, "w": 4, "h": 8 } }] }, + { "name": "char_007e", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 113, "y": 152, "w": 5, "h": 8 } }] }, + { "name": "char_0020", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 50, "y": 112, "w": 4, "h": 8 } }] }, + { "name": "event_tag", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 239, "y": 0, "w": 6, "h": 6 } }] }, + { "name": "event_tag_0", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 239, "y": 6, "w": 6, "h": 6 } }] }, + { "name": "event_beat_loop", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 75, "y": 98, "w": 9, "h": 8 }, "pivot": {"x": 5, "y": 4 } }] }, + { "name": "event_beat_cross", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 92, "y": 108, "w": 3, "h": 3 }, "pivot": {"x": 1, "y": -6 } }] }, + { "name": "event_beat_hit_burn", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 63, "y": 98, "w": 7, "h": 14 }, "pivot": {"x": 3, "y": 0 } }] }, + { "name": "event_beat_synco", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 93, "y": 98, "w": 9, "h": 7 } }] }, + { "name": "event_beat_hit_freeze", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 58, "y": 98, "w": 5, "h": 14 }, "pivot": {"x": 2, "y": 0 } }] }, + { "name": "event_beat_skip", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 70, "y": 98, "w": 5, "h": 14 } }] }, + { "name": "event_beat_area", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 95, "y": 105, "w": 3, "h": 4 }, "center": {"x": 0, "y": 1, "w": 2, "h": 2 } }] }, + { "name": "event_beat_line", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 102, "y": 98, "w": 9, "h": 7 } }] }, + { "name": "event_CustomFlash_1", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 204, "y": 56, "w": 14, "h": 14 } }] }, + { "name": "event_FlipScreen_0", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 232, "y": 56, "w": 14, "h": 14 } }] }, + { "name": "event_FlipScreen", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 218, "y": 56, "w": 14, "h": 14 } }] }, + { "name": "event_FlipScreen_2", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 232, "y": 70, "w": 14, "h": 14 } }] }, + { "name": "event_FloatingText_0", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 204, "y": 28, "w": 14, "h": 14 } }] }, + { "name": "event_FloatingText_1", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 218, "y": 28, "w": 14, "h": 14 } }] }, + { "name": "event_PaintHands_0", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 120, "y": 14, "w": 14, "h": 14 } }] }, + { "name": "event_PaintHands_1", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 120, "y": 28, "w": 14, "h": 14 } }] }, + { "name": "event_SetBackgroundColor_0", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 134, "y": 56, "w": 14, "h": 14 } }] }, + { "name": "event_SetBackgroundColor_1", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 137, "y": 60, "w": 8, "h": 6 }, "pivot": {"x": -3, "y": -4 } }] }, + { "name": "event_SetForeground_1", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 137, "y": 74, "w": 7, "h": 5 }, "pivot": {"x": -3, "y": -4 } }] }, + { "name": "event_Tint_0", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 106, "y": 14, "w": 14, "h": 14 } }] }, + { "name": "event_Tint_1", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 106, "y": 28, "w": 14, "h": 14 } }] }, + { "name": "event_TintRows_0", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 92, "y": 14, "w": 14, "h": 14 } }] }, + { "name": "event_TintRows_1", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 92, "y": 28, "w": 14, "h": 14 } }] }, + { "name": "event_ShowRooms_1", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 162, "y": 98, "w": 28, "h": 28 } }] }, + { "name": "event_ShowRooms_0", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 134, "y": 98, "w": 28, "h": 28 } }] }, + { "name": "event_ChangeCharacter", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 120, "y": 84, "w": 14, "h": 14 } }] }, + { "name": "event_SetRowXs", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 50, "y": 14, "w": 28, "h": 14 } }] }, + { "name": "event_outline", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 75, "y": 106, "w": 5, "h": 5 }, "center": {"x": 2, "y": 2, "w": 1, "h": 1 } }] }, + { "name": "event_back", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 92, "y": 105, "w": 3, "h": 3 }, "center": {"x": 1, "y": 1, "w": 1, "h": 1 } }] } + ] + } +} diff --git a/rdviewAssets/assets.png b/rdviewAssets/assets.png new file mode 100644 index 0000000000000000000000000000000000000000..028437289ecd91c8cf7f7f3d6d22d8d1858cb389 GIT binary patch literal 7459 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 e3T3o6v}%bdywNuO;kUn@01Xvg= this.left && point.x <= this.right && point.y >= this.top && point.y <= this.bottom; + } +}; +var Color = class _Color { + red; + green; + blue; + alpha; + constructor(r, g, b, a) { + if (typeof r === "string") { + if (r.startsWith("#")) { + r = r.substring(1); + } + r = r.trim(); + switch (r.length) { + case 3: + r = r.split("").map((c) => c + c).join(""); + break; + case 4: + r = "ff" + r.split("").map((c) => c + c).join(""); + break; + case 6: + r = "ff" + r; + break; + case 8: + break; + default: + r = "ffffffff"; + } + const u = parseInt(r, 16); + this.alpha = u >> 24 & 255; + this.red = u >> 16 & 255; + this.green = u >> 8 & 255; + this.blue = u & 255; + return; + } + if (r !== void 0 && g === void 0 && b === void 0 && a === void 0) { + this.alpha = r >> 24 & 255; + this.red = r >> 16 & 255; + this.green = r >> 8 & 255; + this.blue = r & 255; + return; + } + if (r !== void 0 && g !== void 0 && b !== void 0 && a === void 0) { + this.red = r; + this.green = g; + this.blue = b; + this.alpha = 255; + return; + } + this.red = r ?? 0; + this.green = g ?? 0; + this.blue = b ?? 0; + this.alpha = a ?? 0; + } + toUint32() { + return ((this.alpha & 255) << 24 | (this.red & 255) << 16 | (this.green & 255) << 8 | this.blue & 255) >>> 0; + } + clone() { + return new _Color(this.red, this.green, this.blue, this.alpha); + } +}; +var Paint = class { + color = new Color(255, 255, 255, 255); +}; +var SliceInfo = class { + bounds = new Rect(); + center = new Rect(); + pivot = new Point(); + scale = 1; + get isNinePatch() { + return !this.center.isEmpty; + } +}; +var AssetManager = class _AssetManager { + static AssetFilePath = "assets.png"; + static SlicesFilePath = "assets.json"; + static DirectoryPath = "."; + static assetFile = null; + static slices = /* @__PURE__ */ new Map(); + static _isLoaded = false; + constructor(dirpath) { + _AssetManager.DirectoryPath = dirpath; + _AssetManager.initialize(); + } + static get isLoaded() { + return this._isLoaded; + } + static async loadAssetFile() { + const pngPath = _AssetManager.DirectoryPath + "/" + this.AssetFilePath; + return await new Promise((resolve, reject) => { + const img = new Image(); + img.onload = () => resolve(img); + img.onerror = (e) => reject(new Error(`Failed to load asset file: ${pngPath}`)); + img.src = pngPath; + }); + } + static async loadSlices() { + if (this._isLoaded) { + return /* @__PURE__ */ new Map(); + } + const jsonPath = _AssetManager.DirectoryPath + "/" + this.SlicesFilePath; + const response = await fetch(jsonPath); + const json = await response.json(); + const slices = json["meta"]["slices"]; + const sliceInfos = /* @__PURE__ */ new Map(); + for (const slice of slices) { + const name = slice["name"]; + const keys = slice["keys"]; + const sliceInfo = new SliceInfo(); + for (const key of keys) { + const bounds = key["bounds"]; + sliceInfo.bounds.left = bounds["x"]; + sliceInfo.bounds.top = bounds["y"]; + sliceInfo.bounds.right = bounds["x"] + bounds["w"]; + sliceInfo.bounds.bottom = bounds["y"] + bounds["h"]; + const center = key["center"]; + if (center) { + sliceInfo.center.left = center["x"]; + sliceInfo.center.top = center["y"]; + sliceInfo.center.right = center["x"] + center["w"]; + sliceInfo.center.bottom = center["y"] + center["h"]; + } + const pivot = key["pivot"]; + if (pivot) { + sliceInfo.pivot.x = pivot["x"]; + sliceInfo.pivot.y = pivot["y"]; + } + const data = key["data"]; + if (data) { + } + sliceInfos.set(name, sliceInfo); + } + } + return sliceInfos; + } + static async initialize() { + if (this._isLoaded) { + return; + } + this.assetFile = await this.loadAssetFile(); + this.slices = await this.loadSlices(); + this._isLoaded = true; + } +}; + +// RhythmBase.View/Assets/Consts.ts +var Tab = /* @__PURE__ */ function(Tab2) { + Tab2["Sounds"] = "sounds"; + Tab2["Rows"] = "rows"; + Tab2["Actions"] = "actions"; + Tab2["Decorations"] = "decorations"; + Tab2["Rooms"] = "rooms"; + Tab2["Windows"] = "windows"; + Tab2["Unknown"] = "unknown"; + return Tab2; +}({}); +var EventType = /* @__PURE__ */ function(EventType2) { + EventType2["AddClassicBeat"] = "AddClassicBeat"; + EventType2["AddFreeTimeBeat"] = "AddFreeTimeBeat"; + EventType2["AddOneshotBeat"] = "AddOneshotBeat"; + EventType2["AdvanceText"] = "AdvanceText"; + EventType2["BassDrop"] = "BassDrop"; + EventType2["Blend"] = "Blend"; + EventType2["CallCustomMethod"] = "CallCustomMethod"; + EventType2["ChangeCharacter"] = "ChangeCharacter"; + EventType2["ChangePlayersRows"] = "ChangePlayersRows"; + EventType2["Comment"] = "Comment"; + EventType2["CustomFlash"] = "CustomFlash"; + EventType2["DesktopColor"] = "DesktopColor"; + EventType2["FadeRoom"] = "FadeRoom"; + EventType2["FinishLevel"] = "FinishLevel"; + EventType2["Flash"] = "Flash"; + EventType2["FlipScreen"] = "FlipScreen"; + EventType2["FloatingText"] = "FloatingText"; + EventType2["ForwardDecorationEvent"] = "ForwardDecorationEvent"; + EventType2["ForwardEvent"] = "ForwardEvent"; + EventType2["ForwardRowEvent"] = "ForwardRowEvent"; + EventType2["HideRow"] = "HideRow"; + EventType2["HideWindow"] = "HideWindow"; + EventType2["InvertColors"] = "InvertColors"; + EventType2["MacroEvent"] = "MacroEvent"; + EventType2["MaskRoom"] = "MaskRoom"; + EventType2["Move"] = "Move"; + EventType2["MoveCamera"] = "MoveCamera"; + EventType2["MoveRoom"] = "MoveRoom"; + EventType2["MoveRow"] = "MoveRow"; + EventType2["NarrateRowInfo"] = "NarrateRowInfo"; + EventType2["NewWindowDance"] = "NewWindowDance"; + EventType2["PaintHands"] = "PaintHands"; + EventType2["PlayAnimation"] = "PlayAnimation"; + EventType2["PlayExpression"] = "PlayExpression"; + EventType2["PlaySong"] = "PlaySong"; + EventType2["PlaySound"] = "PlaySound"; + EventType2["PulseCamera"] = "PulseCamera"; + EventType2["PulseFreeTimeBeat"] = "PulseFreeTimeBeat"; + EventType2["ReadNarration"] = "ReadNarration"; + EventType2["RenameWindow"] = "RenameWindow"; + EventType2["ReorderRooms"] = "ReorderRooms"; + EventType2["ReorderRow"] = "ReorderRow"; + EventType2["ReorderSprite"] = "ReorderSprite"; + EventType2["ReorderWindows"] = "ReorderWindows"; + EventType2["SayReadyGetSetGo"] = "SayReadyGetSetGo"; + EventType2["SetBackgroundColor"] = "SetBackgroundColor"; + EventType2["SetBeatSound"] = "SetBeatSound"; + EventType2["SetBeatsPerMinute"] = "SetBeatsPerMinute"; + EventType2["SetClapSounds"] = "SetClapSounds"; + EventType2["SetCountingSound"] = "SetCountingSound"; + EventType2["SetCrotchetsPerBar"] = "SetCrotchetsPerBar"; + EventType2["SetForeground"] = "SetForeground"; + EventType2["SetGameSound"] = "SetGameSound"; + EventType2["SetHandOwner"] = "SetHandOwner"; + EventType2["SetHeartExplodeInterval"] = "SetHeartExplodeInterval"; + EventType2["SetHeartExplodeVolume"] = "SetHeartExplodeVolume"; + EventType2["SetMainWindow"] = "SetMainWindow"; + EventType2["SetOneshotWave"] = "SetOneshotWave"; + EventType2["SetPlayStyle"] = "SetPlayStyle"; + EventType2["SetRoomContentMode"] = "SetRoomContentMode"; + EventType2["SetRoomPerspective"] = "SetRoomPerspective"; + EventType2["SetRowXs"] = "SetRowXs"; + EventType2["SetSpeed"] = "SetSpeed"; + EventType2["SetTheme"] = "SetTheme"; + EventType2["SetVFXPreset"] = "SetVFXPreset"; + EventType2["SetVisible"] = "SetVisible"; + EventType2["SetWindowContent"] = "SetWindowContent"; + EventType2["ShakeScreen"] = "ShakeScreen"; + EventType2["ShakeScreenCustom"] = "ShakeScreenCustom"; + EventType2["ShowDialogue"] = "ShowDialogue"; + EventType2["ShowHands"] = "ShowHands"; + EventType2["ShowRooms"] = "ShowRooms"; + EventType2["ShowStatusSign"] = "ShowStatusSign"; + EventType2["ShowSubdivisionsRows"] = "ShowSubdivisionsRows"; + EventType2["SpinningRows"] = "SpinningRows"; + EventType2["Stutter"] = "Stutter"; + EventType2["TagAction"] = "TagAction"; + EventType2["TextExplosion"] = "TextExplosion"; + EventType2["Tile"] = "Tile"; + EventType2["Tint"] = "Tint"; + EventType2["TintRows"] = "TintRows"; + EventType2["WindowResize"] = "WindowResize"; + return EventType2; +}({}); +var EventAttriblte = /* @__PURE__ */ function(EventAttriblte2) { + EventAttriblte2[EventAttriblte2["None"] = 0] = "None"; + EventAttriblte2[EventAttriblte2["DurationEvent"] = 1] = "DurationEvent"; + EventAttriblte2[EventAttriblte2["RoomEvent"] = 2] = "RoomEvent"; + return EventAttriblte2; +}({}); +var EventInfo = class { + defaultTab; + durationKey = "duration"; + attr; + get isDurationEvent() { + return (this.attr & EventAttriblte.DurationEvent) !== 0; + } + get isRoomEvent() { + return (this.attr & EventAttriblte.RoomEvent) !== 0; + } + constructor(tab, enumAttriblte, durationKey) { + this.defaultTab = tab; + this.attr = enumAttriblte ?? EventAttriblte.None; + if (durationKey !== void 0) { + this.durationKey = durationKey; + } + } +}; +var WordInfo = class { + phrase; + length; + constructor(phrase, length) { + this.phrase = phrase; + this.length = length; + } +}; +var WordInfos = { + SayReaDyGetSetGoNew: new WordInfo("Rea, Dy, Get, Set, Go!", 4), + SayReaDyGetSetOne: new WordInfo("Rea, Dy, Get, Set, One!", 4), + SayGetSetGo: new WordInfo("Get, Set, Go!", 2), + SayGetSetOne: new WordInfo("Get, Set, One!", 2), + JustSayRea: new WordInfo("Rea", 0), + JustSayDy: new WordInfo("Dy", 0), + JustSayGet: new WordInfo("Get", 0), + JustSaySet: new WordInfo("Set", 0), + JustSayAnd: new WordInfo("And", 0), + JustSayGo: new WordInfo("Go!", 0), + JustSayStop: new WordInfo("Stop", 0), + JustSayAndStop: new WordInfo("And Stop!", 0), + SaySwitch: new WordInfo("Switch", 0), + SayWatch: new WordInfo("Watch", 0), + SayListen: new WordInfo("Listen", 0), + Count1: new WordInfo("1", 0), + Count2: new WordInfo("2", 0), + Count3: new WordInfo("3", 0), + Count4: new WordInfo("4", 0), + Count5: new WordInfo("5", 0), + Count6: new WordInfo("6", 0), + Count7: new WordInfo("7", 0), + Count8: new WordInfo("8", 0), + Count9: new WordInfo("9", 0), + Count10: new WordInfo("10", 0), + SayReadyGetSetGo: new WordInfo("Ready, Get, Set, Go!", 4), + JustSayReady: new WordInfo("Ready", 0) +}; +var EventInfos = { + AddClassicBeat: new EventInfo(Tab.Rows), + AddFreeTimeBeat: new EventInfo(Tab.Rows), + AddOneshotBeat: new EventInfo(Tab.Rows), + AdvanceText: new EventInfo(Tab.Actions, EventAttriblte.DurationEvent), + BassDrop: new EventInfo(Tab.Actions), + Blend: new EventInfo(Tab.Decorations), + CallCustomMethod: new EventInfo(Tab.Actions), + ChangeCharacter: new EventInfo(Tab.Actions), + ChangePlayersRows: new EventInfo(Tab.Actions), + Comment: new EventInfo(Tab.Unknown), + CustomFlash: new EventInfo(Tab.Actions, EventAttriblte.DurationEvent), + DesktopColor: new EventInfo(Tab.Windows, EventAttriblte.DurationEvent), + FadeRoom: new EventInfo(Tab.Rooms, EventAttriblte.DurationEvent), + FinishLevel: new EventInfo(Tab.Actions), + Flash: new EventInfo(Tab.Actions), + FlipScreen: new EventInfo(Tab.Actions), + FloatingText: new EventInfo(Tab.Actions, EventAttriblte.DurationEvent), + ForwardDecorationEvent: new EventInfo(Tab.Decorations), + ForwardEvent: new EventInfo(Tab.Unknown), + ForwardRowEvent: new EventInfo(Tab.Rows), + HideRow: new EventInfo(Tab.Actions), + HideWindow: new EventInfo(Tab.Windows), + InvertColors: new EventInfo(Tab.Actions), + MacroEvent: new EventInfo(Tab.Unknown), + MaskRoom: new EventInfo(Tab.Rooms), + Move: new EventInfo(Tab.Decorations, EventAttriblte.DurationEvent), + MoveCamera: new EventInfo(Tab.Actions, EventAttriblte.DurationEvent), + MoveRoom: new EventInfo(Tab.Rooms, EventAttriblte.DurationEvent), + MoveRow: new EventInfo(Tab.Rows, EventAttriblte.DurationEvent), + NarrateRowInfo: new EventInfo(Tab.Sounds), + NewWindowDance: new EventInfo(Tab.Actions, EventAttriblte.DurationEvent), + PaintHands: new EventInfo(Tab.Actions, EventAttriblte.DurationEvent), + PlayAnimation: new EventInfo(Tab.Decorations), + PlayExpression: new EventInfo(Tab.Actions), + PlaySong: new EventInfo(Tab.Sounds), + PlaySound: new EventInfo(Tab.Sounds), + PulseCamera: new EventInfo(Tab.Actions), + PulseFreeTimeBeat: new EventInfo(Tab.Rows), + ReadNarration: new EventInfo(Tab.Sounds), + RenameWindow: new EventInfo(Tab.Windows), + ReorderRooms: new EventInfo(Tab.Rooms), + ReorderRow: new EventInfo(Tab.Rows), + ReorderSprite: new EventInfo(Tab.Decorations), + ReorderWindows: new EventInfo(Tab.Windows), + SayReadyGetSetGo: new EventInfo(Tab.Sounds), + SetBackgroundColor: new EventInfo(Tab.Actions, EventAttriblte.DurationEvent), + SetBeatSound: new EventInfo(Tab.Sounds), + SetBeatsPerMinute: new EventInfo(Tab.Sounds), + SetClapSounds: new EventInfo(Tab.Sounds), + SetCountingSound: new EventInfo(Tab.Sounds), + SetCrotchetsPerBar: new EventInfo(Tab.Sounds), + SetForeground: new EventInfo(Tab.Actions, EventAttriblte.DurationEvent), + SetGameSound: new EventInfo(Tab.Sounds), + SetHandOwner: new EventInfo(Tab.Actions), + SetHeartExplodeInterval: new EventInfo(Tab.Sounds), + SetHeartExplodeVolume: new EventInfo(Tab.Sounds), + SetMainWindow: new EventInfo(Tab.Windows), + SetOneshotWave: new EventInfo(Tab.Rows), + SetPlayStyle: new EventInfo(Tab.Actions), + SetRoomContentMode: new EventInfo(Tab.Rooms), + SetRoomPerspective: new EventInfo(Tab.Rooms, EventAttriblte.DurationEvent), + SetRowXs: new EventInfo(Tab.Rows), + SetSpeed: new EventInfo(Tab.Actions, EventAttriblte.DurationEvent), + SetTheme: new EventInfo(Tab.Actions, EventAttriblte.DurationEvent), + SetVFXPreset: new EventInfo(Tab.Actions, EventAttriblte.DurationEvent), + SetVisible: new EventInfo(Tab.Decorations), + SetWindowContent: new EventInfo(Tab.Windows, EventAttriblte.DurationEvent), + ShakeScreen: new EventInfo(Tab.Actions), + ShakeScreenCustom: new EventInfo(Tab.Actions, EventAttriblte.DurationEvent), + ShowDialogue: new EventInfo(Tab.Actions), + ShowHands: new EventInfo(Tab.Actions), + ShowRooms: new EventInfo(Tab.Rooms, EventAttriblte.DurationEvent), + ShowStatusSign: new EventInfo(Tab.Actions, EventAttriblte.DurationEvent), + ShowSubdivisionsRows: new EventInfo(Tab.Actions), + SpinningRows: new EventInfo(Tab.Actions, EventAttriblte.DurationEvent), + Stutter: new EventInfo(Tab.Actions), + TagAction: new EventInfo(Tab.Actions), + TextExplosion: new EventInfo(Tab.Actions), + Tile: new EventInfo(Tab.Decorations, EventAttriblte.DurationEvent), + Tint: new EventInfo(Tab.Decorations, EventAttriblte.DurationEvent), + TintRows: new EventInfo(Tab.Actions, EventAttriblte.DurationEvent), + WindowResize: new EventInfo(Tab.Actions, EventAttriblte.DurationEvent) +}; + +// RhythmBase.View/Extensions.ts +var PatchStyle = /* @__PURE__ */ function(PatchStyle2) { + PatchStyle2[PatchStyle2["Repeat"] = 0] = "Repeat"; + PatchStyle2[PatchStyle2["Strentch"] = 1] = "Strentch"; + return PatchStyle2; +}(PatchStyle || {}); +var IconStyle = class { + Enabled; + Active = false; + Hover = false; + Scale = 2; +}; +var Extensions = class { + static lineHeight = 6; + static charHeight = 8; + static iconSize = 14; + static evtag = "event_tag"; + static evbarea = "event_beat_area"; + static asm = new AssetManager("./rdviewAssets"); + constructor() { + AssetManager.initialize(); + } + static DrawSlice(canvas, src, dest, scale = 1, style = PatchStyle.Strentch, color) { + const ctx = canvas; + if (!ctx) return; + if (!AssetManager.slices.has(src)) { + return; + } + const info = AssetManager.slices.get(src); + if (dest instanceof Point) { + const destRect = new Rect(dest.x - info.pivot.x * scale, dest.y - info.pivot.y * scale, info.bounds.width * scale, info.bounds.height * scale); + if (color) { + if (color.alpha === 0) { + return destRect; + } + this.drawSliceWithColor(ctx, info, destRect, color); + } else { + this.drawSliceNormal(ctx, info, destRect); + } + return destRect; + } else { + if (info.isNinePatch) { + this.DrawNinePatch(canvas, info, dest, color, scale, style); + } else { + if (color) { + this.drawSliceWithColor(ctx, info, dest, color); + } else { + this.drawSliceNormal(ctx, info, dest); + } + } + } + } + static drawSliceNormal(ctx, info, destRect) { + const bitmap = AssetManager.assetFile; + if (!bitmap) return; + ctx.imageSmoothingEnabled = false; + ctx.drawImage(bitmap, info.bounds.x, info.bounds.y, info.bounds.width, info.bounds.height, destRect.x, destRect.y, destRect.width, destRect.height); + } + static drawSliceWithColor(ctx, info, destRect, color) { + const bitmap = AssetManager.assetFile; + if (!bitmap) return; + if (color.alpha === 0) { + return; + } + const tr = color.red / 255; + const tg = color.green / 255; + const tb = color.blue / 255; + const ta = color.alpha / 255; + ctx.save(); + const tempCanvas = typeof document !== "undefined" ? document.createElement("canvas") : {}; + tempCanvas.width = info.bounds.width; + tempCanvas.height = info.bounds.height; + const tempCtx = tempCanvas.getContext("2d"); + tempCtx.imageSmoothingEnabled = false; + tempCtx.drawImage(bitmap, info.bounds.x, info.bounds.y, info.bounds.width, info.bounds.height, 0, 0, info.bounds.width, info.bounds.height); + const imageData = tempCtx.getImageData(0, 0, info.bounds.width, info.bounds.height); + const data = imageData.data; + for (let i = 0; i < data.length; i += 4) { + const originalAlpha = data[i + 3]; + const gray = data[i] * 0.2126 + data[i + 1] * 0.7152 + data[i + 2] * 0.0722; + data[i] = gray * tr; + data[i + 1] = gray * tg; + data[i + 2] = gray * tb; + data[i + 3] = originalAlpha * ta; + } + tempCtx.putImageData(imageData, 0, 0); + ctx.imageSmoothingEnabled = false; + ctx.globalAlpha = 1; + ctx.drawImage(tempCanvas, 0, 0, info.bounds.width, info.bounds.height, destRect.x, destRect.y, destRect.width, destRect.height); + ctx.restore(); + } + static DrawNinePatch(canvas, info, dest, color, scale = 1, style = PatchStyle.Strentch) { + const ctx = canvas; + if (!ctx) return; + const bitmap = AssetManager.assetFile; + if (!bitmap) return; + const srcBounds = info.bounds; + const destRect = dest; + const centerBounds = info.center; + const sx0 = srcBounds.left; + const sx3 = srcBounds.right; + const sy0 = srcBounds.top; + const sy3 = srcBounds.bottom; + const sx1 = sx0 + centerBounds.left; + const sx2 = sx0 + centerBounds.right; + const sy1 = sy0 + centerBounds.top; + const sy2 = sy0 + centerBounds.bottom; + const swLeft = sx1 - sx0; + const swCenter = sx2 - sx1; + const swRight = sx3 - sx2; + const shTop = sy1 - sy0; + const shCenter = sy2 - sy1; + const shBottom = sy3 - sy2; + const dwLeft = swLeft * scale; + let dwRight = swRight * scale; + let dwCenter = destRect.width - dwLeft - dwRight; + if (dwCenter < 0) { + const scaleX = destRect.width / Math.max(1, swLeft + swRight); + dwRight = Math.max(0, destRect.width - Math.round(swLeft * scaleX)); + dwCenter = 0; + } + const dhTop = shTop * scale; + let dhBottom = shBottom * scale; + let dhCenter = destRect.height - dhTop - dhBottom; + if (dhCenter < 0) { + const scaleY = destRect.height / Math.max(1, shTop + shBottom); + dhBottom = Math.max(0, destRect.height - Math.round(shTop * scaleY)); + dhCenter = 0; + } + const srcXs = [ + sx0, + sx1, + sx2, + sx3 + ]; + const srcYs = [ + sy0, + sy1, + sy2, + sy3 + ]; + const dx0 = destRect.left; + const dx1 = dx0 + dwLeft; + const dx2 = dx1 + dwCenter; + const dx3 = destRect.right; + const dy0 = destRect.top; + const dy1 = dy0 + dhTop; + const dy2 = dy1 + dhCenter; + const dy3 = destRect.bottom; + const dstXs = [ + dx0, + dx1, + dx2, + dx3 + ]; + const dstYs = [ + dy0, + dy1, + dy2, + dy3 + ]; + for (let row = 0; row < 3; row++) { + for (let col = 0; col < 3; col++) { + const sLeft = srcXs[col]; + const sTop = srcYs[row]; + const sRight = srcXs[col + 1]; + const sBottom = srcYs[row + 1]; + const sW = sRight - sLeft; + const sH = sBottom - sTop; + if (sW <= 0 || sH <= 0) continue; + const dLeft = dstXs[col]; + const dTop = dstYs[row]; + const dRight = dstXs[col + 1]; + const dBottom = dstYs[row + 1]; + const dW = dRight - dLeft; + const dH = dBottom - dTop; + if (dW <= 0 || dH <= 0) continue; + if (style === PatchStyle.Repeat) { + for (let y = dTop; y < dBottom; y += sH * scale) { + const th = Math.min(sH, (dBottom - y) / scale); + for (let x = dLeft; x < dRight; x += sW * scale) { + const tw = Math.min(sW, (dRight - x) / scale); + var sRect = new Rect(sLeft, sTop, tw, th); + var dRect = new Rect(x, y, tw * scale, th * scale); + if (color && color.alpha > 0) { + this.drawSliceWithColor(ctx, { + bounds: sRect, + pivot: new Point(0, 0), + isNinePatch: false, + center: new Rect(), + scale: 1 + }, dRect, color); + } else { + this.drawSliceNormal(ctx, { + bounds: sRect, + pivot: new Point(0, 0), + isNinePatch: false, + center: new Rect(), + scale: 1 + }, dRect); + } + } + } + } else { + if (color && color.alpha > 0) { + this.drawSliceWithColor(ctx, { + bounds: new Rect(sLeft, sTop, sW, sH), + pivot: new Point(0, 0), + isNinePatch: false, + center: new Rect(), + scale: 1 + }, new Rect(dLeft, dTop, dW, dH), color); + } else { + ctx.imageSmoothingEnabled = false; + ctx.drawImage(bitmap, sLeft, sTop, sW, sH, dLeft, dTop, dW, dH); + } + } + } + } + } + static MeasureRDFontText(canvas, text, scale = 1) { + let len = 0; + for (let i = 0; i < text.length; i++) { + const c = text.charAt(i); + if (c === "\n") { + len = 0; + } else { + const info = AssetManager.slices.get(`char_${c.charCodeAt(0).toString(16).padStart(4, "0")}`); + if (info) { + len += info.bounds.width * scale; + } + } + } + return len; + } + static DrawRDFontText(canvas, text, dest, color, scale = 1) { + const start = dest.clone(); + const result = new Rect(); + start.y -= this.lineHeight * scale; + for (let i = 0; i < text.length; i++) { + const c = text.charAt(i); + if (c === "\n") { + start.x = dest.x; + start.y += this.lineHeight * scale; + continue; + } else { + const charcode = c.charCodeAt(0).toString(16).padStart(4, "0"); + const area = this.DrawSlice(canvas, `char_${charcode}`, start, scale, PatchStyle.Strentch, color); + result.union(area); + start.x += area.width * scale; + } + } + return result; + } + static DrawEventIcon(canvas, evt, dest, style) { + let destRect = new Rect(); + const key = `event_${evt.type}`; + const evttype = evt.type; + const info = AssetManager.slices.get(key) ?? AssetManager.slices.get("event_Unknown") ?? (() => { + throw new Error("information not found."); + }); + if (!(info instanceof SliceInfo)) { + return new Rect(); + } + const pulse = "event_beat_pulse"; + const hit = "event_beat_hit"; + const hitf = "event_beat_hit_freeze"; + const hitb = "event_beat_hit_burn"; + const beatcross = "event_beat_cross"; + const beatx = "event_beat_x"; + const beatsynco = "event_beat_synco"; + const beatline = "event_beat_line"; + const beatcolor = new Color(4284539717); + const evtInfo = EventInfos[evt.type]; + evt.tab = evt.tab ?? evtInfo.defaultTab; + switch (evt.type) { + case EventType.AddClassicBeat: + { + const tick = evt.tick ?? 1; + const swing = evt.swing === 0 ? 1 : evt.swing; + const hold = evt.hold ?? 0; + const syncoswing = evt.syncoSwing ?? 0; + const syncobeat = evt.syncoBeat ?? -1; + const classicbeatlength = evt.length ?? 7; + destRect = new Rect(dest.x, dest.y, this.iconSize * style.Scale * (tick * (classicbeatlength - 1 - (syncoswing ?? 0))), this.iconSize * style.Scale); + if (hold > 0) { + this.DrawSlice(canvas, this.evbarea, new Rect(dest.x + destRect.width, dest.y, this.iconSize * style.Scale * hold, this.iconSize * style.Scale), style.Scale, PatchStyle.Repeat, new Color(style.Active ? 4291839731 : 4286462352)); + } + this.DrawBack(canvas, destRect.clone(), this.WithState(this.ColorOf(evt.tab), style.Active, style.Enabled ?? evt.active ?? true), style); + if (style.Hover) { + for (let i = 0; i < classicbeatlength - 1; i++) { + this.DrawSlice(canvas, pulse, new Point(dest.x + this.iconSize * style.Scale * (tick * (i + i % 2 * (1 - (swing ?? 1)) - (i <= (syncobeat ?? -1) ? 0 : syncoswing ?? 0))), dest.y), style.Scale); + } + } + this.DrawSlice(canvas, hit, new Point(dest.x + style.Scale * (this.iconSize * (tick * (classicbeatlength - 1 - (syncoswing ?? 0))) - 1), dest.y), style.Scale); + } + break; + case EventType.AddFreeTimeBeat: + { + const hold = (evt.hold ?? 0) - info.bounds.width / this.iconSize; + destRect = new Rect(dest.x, dest.y, info.bounds.width * style.Scale, info.bounds.height * style.Scale); + this.DrawBack(canvas, destRect.clone(), this.WithState(beatcolor.clone(), style.Active, style.Enabled ?? evt.active ?? true), style); + this.DrawRDFontText(canvas, ((evt.pulse ?? 0) + 1).toString(), new Point(dest.x + 1.5 * style.Scale, dest.y + 10 * style.Scale), new Color(4294967295), style.Scale); + if ((evt.pulse ?? 0) == 6) { + this.DrawSlice(canvas, hit, new Point(dest.x, dest.y), style.Scale); + } + if (hold > 0) { + this.DrawSlice(canvas, this.evbarea, new Rect(dest.x + destRect.width, dest.y, this.iconSize * style.Scale * hold, info.bounds.height * style.Scale), style.Scale, PatchStyle.Repeat, new Color(style.Active ? 4284539717 : 4281299234)); + } + } + break; + case EventType.AddOneshotBeat: + { + const tick = evt.tick ?? 1; + const interval = evt.interval ?? 1; + const loop = Math.floor(evt.loops ?? 0); + const subdiv = evt.subdivisions ?? 1; + const freezeBurnMode = evt.freezeBurnMode ?? "Wave"; + const delay = freezeBurnMode === "Freezeshot" ? evt.delay ?? 0 : 0; + destRect = new Rect(dest.x, dest.y, this.iconSize * style.Scale * (loop * interval + tick + delay), this.iconSize * style.Scale); + this.DrawBack(canvas, destRect.clone(), this.WithState(this.ColorOf(evt.tab), style.Active, style.Enabled ?? evt.active ?? true), style); + const subdivwidth = this.iconSize * style.Scale * (subdiv - 1) / subdiv * tick; + if (subdiv > 1) { + this.DrawSlice(canvas, this.evbarea, new Rect(dest.x + destRect.width, dest.y, subdivwidth, info.bounds.height * style.Scale), style.Scale, PatchStyle.Repeat, new Color(4279480353)); + } + if (evt.skipshot ?? false) { + this.DrawSlice(canvas, this.evbarea, new Rect(dest.x + destRect.width + subdivwidth, dest.y, style.Scale * this.iconSize * interval - subdivwidth, info.bounds.height * style.Scale), style.Scale, PatchStyle.Repeat, new Color(4291115835)); + } + if (style.Hover) { + for (let l = 0; l <= loop; l++) { + for (let i = 0; i < subdiv; i++) { + this.DrawSlice(canvas, pulse, new Point(dest.x + this.iconSize * style.Scale * (l * interval + i * tick / subdiv), dest.y), style.Scale); + } + } + } + for (let l = 0; l <= loop; l++) { + for (let i = 0; i < subdiv; i++) { + this.DrawSlice(canvas, hit, new Point(dest.x + style.Scale * (this.iconSize * (l * interval + delay + tick + i * tick / subdiv) - 1), dest.y), style.Scale); + } + } + const off = interval - tick; + if (freezeBurnMode !== "Wave") { + let posx = dest.x - off * style.Scale * this.iconSize; + this.DrawSlice(canvas, beatcross, new Point(posx, dest.y), style.Scale); + switch (freezeBurnMode) { + case "Freezeshot": + posx += delay * style.Scale * this.iconSize; + this.DrawSlice(canvas, beatcross, new Point(posx, dest.y), style.Scale); + for (let l = 0; l <= loop; l++) { + this.DrawSlice(canvas, hitf, new Point(dest.x + style.Scale * (this.iconSize * (l * interval + tick) - 1), dest.y), style.Scale); + } + break; + case "Burnshot": + posx -= tick * style.Scale * this.iconSize; + this.DrawSlice(canvas, beatcross, new Point(posx, dest.y), style.Scale); + for (let l = 0; l <= loop; l++) { + this.DrawSlice(canvas, hitb, new Point(dest.x + style.Scale * (this.iconSize * (l * interval + tick) - 1), dest.y), style.Scale); + } + break; + default: + break; + } + } + if (style.Active && style.Hover) { + this.DrawSlice(canvas, "event_beat_loop", new Point(destRect.right, destRect.top), style.Scale); + } + } + break; + case EventType.Comment: + { + const commentColor = new Color(evt.color); + console.log(evt.color, commentColor); + destRect = new Rect(dest.x, dest.y, info.bounds.width * style.Scale, info.bounds.height * style.Scale); + this.DrawBack(canvas, destRect.clone(), this.WithState(commentColor, style.Active, style.Enabled ?? evt.active ?? true), style); + this.DrawSlice(canvas, key, dest, style.Scale); + } + break; + case EventType.DesktopColor: + { + destRect = new Rect(dest.x, dest.y, info.bounds.width * style.Scale, info.bounds.height * 4 * style.Scale); + this.DrawBack(canvas, destRect.clone(), this.WithState(this.ColorOf(evt.tab), style.Active, style.Enabled ?? evt.active ?? true), style); + const endColor = new Color(evt.endColor); + this.DrawSlice(canvas, `${key}_0`, new Point(dest.x, dest.y + info.bounds.height * style.Scale), style.Scale, PatchStyle.Strentch, endColor); + this.DrawSlice(canvas, key, new Point(dest.x, dest.y + info.bounds.height * style.Scale), style.Scale); + } + break; + case EventType.PulseFreeTimeBeat: + { + const hold = (evt.hold ?? 0) - info.bounds.width / this.iconSize; + destRect = new Rect(dest.x, dest.y, info.bounds.width * style.Scale, info.bounds.height * style.Scale); + this.DrawBack(canvas, destRect.clone(), this.WithState(beatcolor.clone(), style.Active, style.Enabled ?? evt.active ?? true), style); + let actionText; + switch (evt.action) { + case "Increment": + actionText = ">"; + break; + case "Decrement": + actionText = "<"; + break; + case "Remove": + actionText = "x"; + break; + case "Custom": + default: + actionText = ((evt.customPulse ?? 0) + 1).toString(); + break; + } + this.DrawRDFontText(canvas, actionText, new Point(dest.x + 1.5 * style.Scale, dest.y + 8 * style.Scale), new Color(4294967295), style.Scale); + if (evt.action === "Custom" && (evt.customPulse ?? 0) === 7) { + this.DrawSlice(canvas, hit, new Rect(dest.x - 2 * style.Scale, dest.y, 5 * style.Scale, info.bounds.height * style.Scale), style.Scale, PatchStyle.Strentch); + } + if (hold > 0) { + this.DrawSlice(canvas, this.evbarea, new Rect(dest.x + destRect.width, dest.y, this.iconSize * style.Scale * hold, info.bounds.height * style.Scale), style.Scale, PatchStyle.Repeat, new Color(style.Active ? 4291839731 : 4286462352)); + } + } + break; + case EventType.ReorderRooms: + { + destRect = new Rect(dest.x, dest.y, this.iconSize * style.Scale, this.iconSize * 4 * style.Scale); + this.DrawBack(canvas, destRect.clone(), this.WithState(this.ColorOf(evt.tab), style.Active, style.Enabled ?? evt.active ?? true), style); + let currentDest = dest.clone(); + if (evt.order && Array.isArray(evt.order)) { + for (const r of evt.order) { + this.DrawSlice(canvas, `${key}_${r}`, currentDest.clone(), style.Scale); + currentDest.y += this.iconSize * style.Scale; + } + } + } + break; + case EventType.ReorderWindows: + { + destRect = new Rect(dest.x, dest.y, this.iconSize * style.Scale, this.iconSize * 4 * style.Scale); + this.DrawBack(canvas, destRect.clone(), this.WithState(this.ColorOf(evt.tab), style.Active, style.Enabled ?? evt.active ?? true), style); + let currentDest = dest.clone(); + if (evt.order && Array.isArray(evt.order)) { + for (const r of evt.order) { + this.DrawSlice(canvas, `${key}_${r}`, currentDest.clone(), style.Scale); + currentDest.y += this.iconSize * style.Scale; + } + } + } + break; + case EventType.SayReadyGetSetGo: + { + const wordInfo = WordInfos[evt.phraseToSay]; + const len = wordInfo.length * evt.tick + 1; + destRect = new Rect(dest.x, dest.y, len * this.iconSize * style.Scale, this.iconSize * style.Scale); + this.DrawBack(canvas, destRect.clone(), this.WithState(this.ColorOf(evt.tab), style.Active, style.Enabled ?? evt.active ?? true), style); + const stringToJion = wordInfo.phrase.split(" "); + let stringToDraw = [ + stringToJion[0] + ]; + let lw = this.MeasureRDFontText(canvas, stringToJion[0]); + const sw = this.MeasureRDFontText(canvas, " "); + for (let i = 1; i < stringToJion.length; i++) { + const part = stringToJion[i]; + const w = this.MeasureRDFontText(canvas, part); + if (lw + sw + w > (len * this.iconSize - 2) * style.Scale) { + lw = w; + stringToDraw.push(part); + } else { + lw += sw + w; + stringToDraw[stringToDraw.length - 1] += " " + part; + } + } + stringToDraw.splice(3); + const c = stringToDraw.length; + const top = dest.y + (this.iconSize - this.charHeight * c / 2) * style.Scale / 2; + for (let i = 0; i < c; i++) { + const line = stringToDraw[i]; + const p = new Point(dest.x + (len * this.iconSize * style.Scale - this.MeasureRDFontText(canvas, line, style.Scale / 2)) / 2, top + (i * this.charHeight + this.lineHeight) * style.Scale / 2); + this.DrawRDFontText(canvas, line, p, new Color(4294967295), style.Scale / 2); + } + } + break; + case EventType.SetRowXs: + { + destRect = new Rect(dest.x, dest.y, info.bounds.width * style.Scale, info.bounds.height * style.Scale); + this.DrawBack(canvas, destRect.clone(), this.WithState(this.ColorOf(evt.tab), style.Active, style.Enabled ?? evt.active ?? true), style); + const width = info.bounds.width * style.Scale / 6; + const beatxInfo = AssetManager.slices.get(beatx); + if (!beatxInfo) break; + const iconwidth = beatxInfo.bounds.width; + const s = width / iconwidth; + let left = 0; + const top = this.iconSize * style.Scale / 2 - beatxInfo.bounds.height * s / 2; + if (evt.pattern) { + const pattern = evt.pattern; + for (const p of pattern) { + const patternKey = p === "x" ? beatx : beatline; + this.DrawSlice(canvas, patternKey, new Rect(dest.x + left, dest.y + top, width, beatxInfo.bounds.height * s), style.Scale, PatchStyle.Strentch); + left += width; + } + } + if ((evt.syncoBeat ?? -1) >= 0) { + this.DrawSlice(canvas, beatsynco, new Rect(dest.x + width * (evt.syncoBeat ?? 0), dest.y + top, width, beatxInfo.bounds.height * s), style.Scale, PatchStyle.Strentch); + } + } + break; + case EventType.ShowRooms: + { + destRect = new Rect(dest.x, dest.y, this.iconSize * style.Scale, this.iconSize * 4 * style.Scale); + this.DrawBack(canvas, destRect.clone(), this.WithState(this.ColorOf(evt.tab), style.Active, style.Enabled ?? evt.active ?? true), style); + if (evt.rooms && Array.isArray(evt.rooms)) { + for (let i = 0; i < 4; i++) { + const roomState = evt.rooms[i] ? "1" : "0"; + this.DrawSlice(canvas, `${key}_${roomState}`, new Point(dest.x, dest.y + i * this.iconSize * style.Scale), style.Scale / 2); + } + } + } + break; + default: + destRect = new Rect(dest.x, dest.y, info.bounds.width * style.Scale, info.bounds.height * style.Scale); + this.DrawBack(canvas, destRect.clone(), this.WithState(this.ColorOf(evt.tab), style.Active, style.Enabled ?? evt.active ?? true), style); + switch (evt.type) { + case EventType.CustomFlash: + { + this.DrawSlice(canvas, `${key}_0`, dest, style.Scale, PatchStyle.Strentch, new Color(evt.startColor ?? 0)); + this.DrawSlice(canvas, `${key}_1`, dest, style.Scale, PatchStyle.Strentch, new Color(evt.endColor ?? 0)); + } + break; + case EventType.FlipScreen: + { + let suffix = ""; + const flipX = evt.flipX ?? false; + const flipY = evt.flipY ?? false; + if (flipX && flipY) { + suffix = "_2"; + } else if (flipX && !flipY) { + suffix = "_1"; + } else if (!flipX && flipY) { + suffix = "_0"; + } + this.DrawSlice(canvas, key + suffix, dest, style.Scale); + } + break; + case EventType.FloatingText: + { + this.DrawSlice(canvas, `${key}_0`, dest, style.Scale, PatchStyle.Strentch, new Color(evt.color ?? 0)); + this.DrawSlice(canvas, `${key}_1`, dest, style.Scale, PatchStyle.Strentch, new Color(evt.outlineColor ?? 0)); + } + break; + case EventType.MoveRoom: + { + canvas.save(); + const degree = evt.angle ?? 0; + const scaleWidth = evt.scale?.width ?? 0; + const scaleHeight = evt.scale?.height ?? 0; + if (scaleWidth === 0 || scaleHeight === 0) { + canvas.restore(); + break; + } + const pleft = (evt.pivot?.x ?? 0) / 100; + const ptop = 1 - (evt.pivot?.y ?? 0) / 100; + const uniform = Math.sqrt(scaleWidth * scaleWidth + scaleHeight * scaleHeight); + const w = scaleWidth / uniform; + const h = scaleHeight / uniform; + canvas.translate(dest.x + destRect.width / 2, dest.y + destRect.height / 2); + canvas.rotate(-degree * Math.PI / 180); + canvas.scale(w, h); + this.DrawSlice(canvas, key, new Point(-destRect.width / 2, -destRect.height / 2), style.Scale); + if (!(pleft < 0 || pleft > 1 || ptop < 0 || ptop > 1)) { + canvas.fillStyle = "rgb(255, 0, 0)"; + canvas.fillRect((pleft - 0.5) * destRect.width - 1, (ptop - 0.5) * destRect.height - 1, 2, 2); + } + canvas.restore(); + } + break; + case EventType.PaintHands: + { + this.DrawSlice(canvas, key, dest, style.Scale, PatchStyle.Strentch, new Color(evt.tintColor ?? 0)); + const border = evt.border ?? "None"; + if (border === "Outline") { + this.DrawSlice(canvas, `${key}_0`, dest, style.Scale, PatchStyle.Strentch, new Color(evt.borderColor ?? 0)); + } else if (border === "Glow") { + this.DrawSlice(canvas, `${key}_1`, dest, style.Scale, PatchStyle.Strentch, new Color(evt.borderColor ?? 0)); + } + } + break; + case EventType.SetBackgroundColor: + { + this.DrawSlice(canvas, key, dest, style.Scale); + const bgType = evt.backgroundType ?? "Color"; + if (bgType === "Color") { + this.DrawSlice(canvas, `${key}_0`, dest, style.Scale, PatchStyle.Strentch, new Color(evt.color ?? 0)); + } else if (bgType === "Image") { + this.DrawSlice(canvas, `${key}_0`, dest, style.Scale, PatchStyle.Strentch, new Color(4294967295)); + } + } + break; + case EventType.SetCrotchetsPerBar: + { + const cpb = evt.crotchetsPerBar ?? 4; + this.DrawSlice(canvas, key, dest, style.Scale); + this.DrawRDFontText(canvas, cpb > 9 ? "-" : cpb.toString(), new Point(dest.x + 2 * style.Scale, dest.y + 7 * style.Scale), new Color(4278190080), style.Scale); + this.DrawRDFontText(canvas, "4", new Point(dest.x + 8 * style.Scale, dest.y + 12 * style.Scale), new Color(4278190080), style.Scale); + } + break; + case EventType.SetForeground: + { + this.DrawSlice(canvas, key, dest, style.Scale); + } + break; + case EventType.Tint: + { + this.DrawSlice(canvas, key, dest, style.Scale, PatchStyle.Strentch, new Color(evt.tintColor ?? 0)); + const border = evt.border ?? "None"; + if (border === "Outline") { + this.DrawSlice(canvas, `${key}_0`, dest, style.Scale, PatchStyle.Strentch, new Color(evt.borderColor ?? 0)); + } else if (border === "Glow") { + this.DrawSlice(canvas, `${key}_1`, dest, style.Scale, PatchStyle.Strentch, new Color(evt.borderColor ?? 0)); + } + } + break; + case EventType.TintRows: + { + this.DrawSlice(canvas, key, dest, style.Scale, PatchStyle.Strentch, new Color(evt.tintColor ?? 0)); + const border = evt.border ?? "None"; + if (border === "Outline") { + this.DrawSlice(canvas, `${key}_0`, dest, style.Scale, PatchStyle.Strentch, new Color(evt.borderColor ?? 0)); + } else if (border === "Glow") { + this.DrawSlice(canvas, `${key}_1`, dest, style.Scale, PatchStyle.Strentch, new Color(evt.borderColor ?? 0)); + } + } + break; + default: + this.drawSliceNormal(canvas, info, destRect); + break; + } + break; + } + if (evtInfo.isDurationEvent) { + evt.duration = 2; + } + if (evt.duration && evt.duration > 0 && style.Active) { + const duration = evt[evtInfo.durationKey]; + const durWidth = style.Scale * this.iconSize * duration - destRect.width; + const c = this.ColorOf(evt.tab); + c.alpha = style.Active ? 192 : 91; + if (durWidth > 0) { + this.DrawSlice(canvas, this.evbarea, new Rect(dest.x + destRect.width, dest.y, durWidth, destRect.height), style.Scale, PatchStyle.Repeat, c); + } + } + return destRect; + } + static ColorOf(tab) { + switch (tab) { + case "sounds": + return new Color(4292355123); + case "rows": + return new Color(4281094105); + case "actions": + return new Color(4291118003); + case "decorations": + return new Color(4278240345); + case "rooms": + return new Color(4292392978); + case "windows": + return new Color(4283479511); + default: + return new Color(4286874756); + } + } + static DrawBack(canvas, destRect, color, style) { + const outline = "event_outline"; + const back = "event_back"; + this.DrawSlice(canvas, outline, destRect, style.Scale, PatchStyle.Strentch, new Color(style.Active ? 4294967295 : 4289243304)); + destRect.inflate(-style.Scale, -style.Scale); + this.DrawSlice(canvas, back, destRect, style.Scale, PatchStyle.Strentch, color); + } + static WithState(color, active, enabled) { + const c = enabled ? color.clone() : new Color(4286874756); + c.alpha = active ? 192 : 91; + return c; + } +}; +export { + AssetManager, + Color, + Extensions, + IconStyle, + Paint, + Point, + Rect, + SliceInfo +}; diff --git a/script/rdview2.js b/script/rdview2.js new file mode 100644 index 0000000..b8ac205 --- /dev/null +++ b/script/rdview2.js @@ -0,0 +1,84 @@ +import { Extensions, IconStyle } from "/script/Extensions.js"; +function rend() { + const codeBlocks = document.querySelectorAll("canvas.rdview2-canvas"); + codeBlocks.forEach((block) => { + const width = block.getAttribute("data-width") || 8; + const height = block.getAttribute("data-height") || 4; + const scale = block.getAttribute("data-scale") || 2; + const data = block.getAttribute("data"); + const ctx = block.getContext("2d"); + block.width = width * scale * 14; + block.height = height * scale * 14; + if (!data) { + return; + } + const jsonData = JSON.parse(`[${JSON.parse(data)}]`); + + let lastX = -1, lastY = -1, lastActive = false; + let frameId = null; + + const style = new IconStyle(); + + block.render = (x, y, active) => { + if (x === lastX && y === lastY && active === lastActive) { + return; + } + lastX = x; + lastY = y; + lastActive = active; + + ctx.clearRect(0, 0, block.width, block.height); + for (const evt of jsonData) { + style.Scale = scale; + style.Hover = evt.area?.contains({x, y}) ?? false; + style.Active = evt.area?.contains({x, y}) ? active : false; + evt.area = Extensions.DrawEventIcon(ctx, evt, { + x: ((evt.beat ?? 1) - 1) * scale * 14, + y: (evt.y ?? 0) * scale * 14, + }, style); + } + } + + const throttledRender = (x, y, active) => { + if (frameId !== null) { + cancelAnimationFrame(frameId); + } + frameId = requestAnimationFrame(() => { + block.render(x, y, active); + frameId = null; + }); + } + + block.addEventListener("mousemove", (e) => { + const rect = block.getBoundingClientRect(); + const x = e.clientX - rect.left; + const y = e.clientY - rect.top; + throttledRender(x, y, false); + }); + block.addEventListener("mousedown", (e) => { + const rect = block.getBoundingClientRect(); + const x = e.clientX - rect.left; + const y = e.clientY - rect.top; + block.render(x, y, true); + }); + block.addEventListener("mouseup", (e) => { + const rect = block.getBoundingClientRect(); + const x = e.clientX - rect.left; + const y = e.clientY - rect.top; + block.render(x, y, false); + }); + block.addEventListener("mouseleave", (e) => { + if (frameId !== null) { + cancelAnimationFrame(frameId); + } + block.render(0, 0, false); + }); + block.render(0, 0, false); + }); +} + +window.$docsify.plugins = [].concat(window.$docsify.plugins, function (hook) { + hook.doneEach(function () { + rend(); + }); +});