-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
169 lines (159 loc) · 5.96 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
<!DOCTYPE html>
<html>
<meta charset="UTF-8">
<title>FFRC BeatBox Editor v1.5.0</title>
<script type="text/javascript" src="https://code.jquery.com/jquery-3.5.1.min.js"></script>
<!-- SWF Editing -->
<script type="text/javascript" src="https://cdn.jsdelivr.net/pako/1.0.3/pako.min.js"></script>
<script type="text/javascript" src="js/main.js"></script>
<script type="text/javascript" src="js/swf-tags.js"></script>
<script type="text/javascript" src="js/swf-reader.js"></script>
<script type="text/javascript" src="js/swf-writer.js"></script>
<script type="text/javascript" src="js/swf-pcode.js"></script>
<!-- Editor -->
<script type="text/javascript" src="js/editor.js"></script>
<script type="text/javascript" src="js/history.js"></script>
<script type="text/javascript" src="js/filedrop.js"></script>
<script type="text/javascript" src="js/url-loader.js"></script>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/@simonwep/selection-js/dist/selection.min.js"></script>
<script type="text/javascript" src="js/selection.js"></script>
<!-- Chart Preview -->
<script type="text/javascript" src="js/p5.min.js"></script>
<script type="text/javascript" src="js/p5.sound.min.js"></script>
<script type="text/javascript" src="js/chartpreview.js"></script>
<link rel="stylesheet" href="style.css?v=1.5.0">
</head>
<body>
<div id="fileDropOverlay">
<div>
Load Dropped File
</div>
</div>
<div id="progressBarOverlay" style="display:none;">
<div class="fill" style="width:0%;"></div>
</div>
<div id="noteModel" class="noteModel" style="display:none;">
<h2>Editing Note: <span class="noteIndex">0</span></h2>
<div class="params">
<span>Frame:</span><input type="number" id="note_model_frame"><br>
<span>Time (MS):</span><input type="number" id="note_model_time"><br>
<span>Direction:</span><select name="color" id="note_model_dir">
<option value="L">Left</option>
<option value="D">Down</option>
<option value="U">Up</option>
<option value="R">Right</option>
</select><br>
<span>Color:</span><select name="color" id="note_model_color">
<option value="blue">Blue</option>
<option value="red">Red</option>
<option value="yellow">Yellow</option>
<option value="green">Green</option>
<option value="orange">Orange</option>
<option value="pink">Pink</option>
<option value="purple">Purple</option>
<option value="cyan">Cyan</option>
<option value="white">White</option>
</select><br>
</div>
<div class="save">
<input id="saveNoteButton" type="button" value="Save Note Values" />
</div>
</div>
<div id="noteSelectionModel" class="noteModel" style="display:none;">
<h2>Editing Selection: <span class="selectionSize">0</span> Notes</h2>
<div class="params">
<a class="shiftSelectionFrames">Shift Frames</a><br/>
</div>
</div>
<div id="receptorModel" style="display:none;">
</div>
<div class="header">
<div class="file_selector">
<input class="urlFile" type="button" value="Load External URL"></input> | <input class="swfFile" type="file"></input>
</div>
</div>
<div class="editor_area">
<div class="col">
<div id="left_col" class="sticky_container">
<div class="container">
<div id="audioPreview">
<audio id="audio" controls>
<source id="source" src="" type="audio/mpeg"/>
</audio>
</div>
<div id="chartPreviewContainer">
<div id="chartPreviewDisplay">
<div id="p5_loading"><img src="notes/note_receptor.png" /><br>...Loading Preview...</div>
</div>
<div class="previewControls">
<button class="play">Play</button>
<button class="stop">Stop</button>
<input type="text" class="speed_input" value="1.5" style="width: 100px"> <button class="speed_set">Set</button>
<select class="direction_set">
<option value="up">Up</option>
<option value="down">Down</option>
</select>
</div>
<script>
BASE_NOTE_LOCATION = "notes/";
chartPreview = false;
$('.previewControls .play').on('click', function(e) {
chartPreview.playPreview();
});
$('.previewControls .stop').on('click', function(e) {
chartPreview.stopPreview();
});
$('.previewControls .speed_set').on('click', function(e) {
chartPreview.setNoteSpeed($('.previewControls .speed_input').val());
});
$('.previewControls .direction_set').change(function(e) {
chartPreview.scrollDirection($('.previewControls .direction_set').val());
});
//
$('.toggle_song_stats').on('click', function(e) {
$("#chartCalcContainer").toggle();
});
$(function(e) {
if(!chartPreview)
chartPreview = new p5(songChartPreviewer, 'chartPreviewDisplay');
});
</script>
</div>
</div>
</div>
</div>
<div class="col">
<div id="noteListContainer" class="note_display">
<div id="chart_tag_empty">
Load a FFR SWF file.
</div>
<div id="chart_box"></div>
</div>
</div>
<div class="col">
<div id="right_col" class="sticky_container">
<div class="container">
<div id="editor_options">
<a class="toggleGhostNotes">Toggle Time Ghost Notes</a><br/>
<a class="toggleNotes">Toggle Notes</a><br/><br/>
<a class="updatePreview">Update Preview</a><br/>
<a class="shiftFrames">Shift All Frames</a><br/>
<a class="writeFile">Write File</a><br/><br/>
<a class="randomColors">Randomize Colors</a><br/>
</div>
<div id="editor_jump">
<span>Jump to Note:</span><input type="number" id="jump_note_value" value="0" /> <input type="button" class="jumpToNote" value="Jump"><br/>
<span>Jump to Time:</span><input type="text" id="jump_time_value" value="0:00" /> <input type="button" class="jumpToTime" value="Jump"><br/>
</div>
<div id="history">
History:
<div id="history_change_text">• No File Loaded</div>
</div>
<div id="download_urls">
</div>
</div>
</div>
</div>
</div>
</body>
</html>