visual-song 0.13.2 → 0.13.3
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/dist/index.d.ts +0 -1
- package/dist/index.js +8 -20
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -6309,7 +6309,7 @@ function useVisualSongAudio(file) {
|
|
|
6309
6309
|
}
|
|
6310
6310
|
};
|
|
6311
6311
|
}
|
|
6312
|
-
const VisualSong = /*#__PURE__*/ forwardRef(function VisualSong({ style,
|
|
6312
|
+
const VisualSong = /*#__PURE__*/ forwardRef(function VisualSong({ style, backgroundColor, vertexShader, primitiveMode, vertexCount, useSinWaveOnly, renderMode, initializedCallback }, ref) {
|
|
6313
6313
|
const canvasRef = useRef(null);
|
|
6314
6314
|
const canvasWrapperRef = useRef(null);
|
|
6315
6315
|
const glContextRef = useRef(null);
|
|
@@ -6416,18 +6416,6 @@ const VisualSong = /*#__PURE__*/ forwardRef(function VisualSong({ style, mainLoo
|
|
|
6416
6416
|
destroy();
|
|
6417
6417
|
};
|
|
6418
6418
|
}, []);
|
|
6419
|
-
useEffect(()=>{
|
|
6420
|
-
if (!module.current) return;
|
|
6421
|
-
if (typeof mainLoop === 'boolean') {
|
|
6422
|
-
if (mainLoop) {
|
|
6423
|
-
module.current.resumeMainLoop();
|
|
6424
|
-
} else {
|
|
6425
|
-
module.current.pauseMainLoop();
|
|
6426
|
-
}
|
|
6427
|
-
}
|
|
6428
|
-
}, [
|
|
6429
|
-
mainLoop
|
|
6430
|
-
]);
|
|
6431
6419
|
useEffect(()=>{
|
|
6432
6420
|
if (!module.current) return;
|
|
6433
6421
|
setBackgroundColorInternal(backgroundColor);
|
|
@@ -6498,13 +6486,13 @@ const VisualSong = /*#__PURE__*/ forwardRef(function VisualSong({ style, mainLoo
|
|
|
6498
6486
|
const renderer = module.current.Renderer.getInstance();
|
|
6499
6487
|
playerRef.current = renderer.createPlayer(width, height, `#${canvas.id}`);
|
|
6500
6488
|
glContextRef.current = canvas.getContext('webgl2');
|
|
6501
|
-
if
|
|
6502
|
-
|
|
6503
|
-
|
|
6504
|
-
|
|
6505
|
-
|
|
6506
|
-
|
|
6507
|
-
}
|
|
6489
|
+
// if(mainLoop !== undefined) {
|
|
6490
|
+
// if(mainLoop) {
|
|
6491
|
+
// module.current!.resumeMainLoop();
|
|
6492
|
+
// } else {
|
|
6493
|
+
// module.current!.pauseMainLoop();
|
|
6494
|
+
// }
|
|
6495
|
+
// }
|
|
6508
6496
|
if (backgroundColor !== undefined) {
|
|
6509
6497
|
setBackgroundColorInternal(backgroundColor);
|
|
6510
6498
|
}
|