silphscope 1.4.0 → 1.4.2
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/package.json
CHANGED
|
@@ -46,7 +46,7 @@ export async function renderBallParticle(ballName, balls, reader, rom, options =
|
|
|
46
46
|
|
|
47
47
|
const png = new PNG({ width, height });
|
|
48
48
|
png.data = image;
|
|
49
|
-
const pngBuffer = streamToBuffer(png.pack());
|
|
49
|
+
const pngBuffer = await streamToBuffer(png.pack());
|
|
50
50
|
|
|
51
51
|
if (outputDir) {
|
|
52
52
|
const dir = `${outputDir}/${ballName}`;
|
|
@@ -52,7 +52,7 @@ export async function renderBall(ballName, balls, reader, rom, options = {}) {
|
|
|
52
52
|
|
|
53
53
|
const png = new PNG({ width, height });
|
|
54
54
|
png.data = image;
|
|
55
|
-
const pngBuffer = streamToBuffer(png.pack());
|
|
55
|
+
const pngBuffer = await streamToBuffer(png.pack());
|
|
56
56
|
|
|
57
57
|
if (outputDir) {
|
|
58
58
|
const dir = `${outputDir}/${ballName}`;
|
|
@@ -138,7 +138,10 @@ export async function renderAllBalls(rom, options= {}) {
|
|
|
138
138
|
const reader = new RomReader(rom, config);
|
|
139
139
|
|
|
140
140
|
for (const ballName of Object.keys(providedBalls)) {
|
|
141
|
-
await renderBall(ballName, providedBalls, reader, rom, {
|
|
141
|
+
await renderBall(ballName, providedBalls, reader, rom, {
|
|
142
|
+
outputDir,
|
|
143
|
+
ballParticles,
|
|
144
|
+
});
|
|
142
145
|
console.log(`Done: ${ballName}`);
|
|
143
146
|
}
|
|
144
147
|
}
|