@r2o3/rgchart-nodejs 0.0.11 → 0.0.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -7
- package/package.json +1 -1
- package/rgchart.js +26 -27
- package/rgchart_bg.wasm +0 -0
package/README.md
CHANGED
|
@@ -27,7 +27,7 @@ A library for parsing and writing charts for various rhythm games. It supports c
|
|
|
27
27
|
Add this to your `Cargo.toml`:
|
|
28
28
|
```toml
|
|
29
29
|
[dependencies]
|
|
30
|
-
rgchart = "0.0.
|
|
30
|
+
rgchart = "0.0.12"
|
|
31
31
|
```
|
|
32
32
|
|
|
33
33
|
Or run:
|
|
@@ -98,18 +98,18 @@ use rgchart::OsuFile;
|
|
|
98
98
|
use rgchart::QuaFile;
|
|
99
99
|
|
|
100
100
|
// Write from OsuFile to to osu! format
|
|
101
|
-
let osu_string = osu_chart.
|
|
101
|
+
let osu_string = osu_chart.to_str_mania(soundbank);
|
|
102
102
|
|
|
103
103
|
// assuming you don't have a soundbank
|
|
104
|
-
let osu_string = osu_chart.
|
|
104
|
+
let osu_string = osu_chart.to_str_mania_no_soundbank();
|
|
105
105
|
|
|
106
106
|
// other modes for osu!, it will interprete the hit objects values as is for the mode you're writing to.
|
|
107
|
-
let osu_string = osu_chart.
|
|
107
|
+
let osu_string = osu_chart.to_str();
|
|
108
108
|
// or
|
|
109
|
-
let osu_string = osu_chart.
|
|
109
|
+
let osu_string = osu_chart.to_str_standard(soundbank);
|
|
110
110
|
|
|
111
|
-
let osu_string = osu_chart.
|
|
112
|
-
let osu_string = osu_chart.
|
|
111
|
+
let osu_string = osu_chart.to_str_taiko(soundbank);
|
|
112
|
+
let osu_string = osu_chart.to_str_catch(soundbank);
|
|
113
113
|
|
|
114
114
|
// Write from QuaFile to Quaver format
|
|
115
115
|
let qua_string = qua_chart.to_str().expect("Failed to write Quaver chart");
|
package/package.json
CHANGED
package/rgchart.js
CHANGED
|
@@ -91,33 +91,6 @@ function getDataViewMemory0() {
|
|
|
91
91
|
return cachedDataViewMemory0;
|
|
92
92
|
}
|
|
93
93
|
|
|
94
|
-
function getArrayJsValueFromWasm0(ptr, len) {
|
|
95
|
-
ptr = ptr >>> 0;
|
|
96
|
-
const mem = getDataViewMemory0();
|
|
97
|
-
const result = [];
|
|
98
|
-
for (let i = ptr; i < ptr + 4 * len; i += 4) {
|
|
99
|
-
result.push(wasm.__wbindgen_export_0.get(mem.getUint32(i, true)));
|
|
100
|
-
}
|
|
101
|
-
wasm.__externref_drop_slice(ptr, len);
|
|
102
|
-
return result;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
function addToExternrefTable0(obj) {
|
|
106
|
-
const idx = wasm.__externref_table_alloc();
|
|
107
|
-
wasm.__wbindgen_export_0.set(idx, obj);
|
|
108
|
-
return idx;
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
function passArrayJsValueToWasm0(array, malloc) {
|
|
112
|
-
const ptr = malloc(array.length * 4, 4) >>> 0;
|
|
113
|
-
for (let i = 0; i < array.length; i++) {
|
|
114
|
-
const add = addToExternrefTable0(array[i]);
|
|
115
|
-
getDataViewMemory0().setUint32(ptr + 4 * i, add, true);
|
|
116
|
-
}
|
|
117
|
-
WASM_VECTOR_LEN = array.length;
|
|
118
|
-
return ptr;
|
|
119
|
-
}
|
|
120
|
-
|
|
121
94
|
function _assertClass(instance, klass) {
|
|
122
95
|
if (!(instance instanceof klass)) {
|
|
123
96
|
throw new Error(`expected instance of ${klass.name}`);
|
|
@@ -225,6 +198,32 @@ module.exports.writeToFscGeneric = function(chart) {
|
|
|
225
198
|
}
|
|
226
199
|
};
|
|
227
200
|
|
|
201
|
+
function getArrayJsValueFromWasm0(ptr, len) {
|
|
202
|
+
ptr = ptr >>> 0;
|
|
203
|
+
const mem = getDataViewMemory0();
|
|
204
|
+
const result = [];
|
|
205
|
+
for (let i = ptr; i < ptr + 4 * len; i += 4) {
|
|
206
|
+
result.push(wasm.__wbindgen_export_0.get(mem.getUint32(i, true)));
|
|
207
|
+
}
|
|
208
|
+
wasm.__externref_drop_slice(ptr, len);
|
|
209
|
+
return result;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
function addToExternrefTable0(obj) {
|
|
213
|
+
const idx = wasm.__externref_table_alloc();
|
|
214
|
+
wasm.__wbindgen_export_0.set(idx, obj);
|
|
215
|
+
return idx;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
function passArrayJsValueToWasm0(array, malloc) {
|
|
219
|
+
const ptr = malloc(array.length * 4, 4) >>> 0;
|
|
220
|
+
for (let i = 0; i < array.length; i++) {
|
|
221
|
+
const add = addToExternrefTable0(array[i]);
|
|
222
|
+
getDataViewMemory0().setUint32(ptr + 4 * i, add, true);
|
|
223
|
+
}
|
|
224
|
+
WASM_VECTOR_LEN = array.length;
|
|
225
|
+
return ptr;
|
|
226
|
+
}
|
|
228
227
|
/**
|
|
229
228
|
* @param {string} raw_chart
|
|
230
229
|
* @returns {GenericManiaChart}
|
package/rgchart_bg.wasm
CHANGED
|
Binary file
|