File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed
Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -52,6 +52,7 @@ export default class PerspireServer {
5252 this . outputPath = outputPath ;
5353 this . test = test ;
5454 this . container = container ;
55+ this . window = container . window ;
5556 }
5657
5758 async start ( ) {
Original file line number Diff line number Diff line change @@ -59,7 +59,12 @@ exports.handler = async (yargv) => {
5959 global . document = container . window . document ;
6060 global . navigator = container . window . navigator ;
6161 global . WebSocket = require ( "ws" ) ; // For networking in Node environments
62-
62+ global . requestAnimationFrame = ( callback ) => {
63+ setTimeout ( callback , 0 ) ;
64+ } ;
65+ global . cancelAnimationFrame = ( callback ) => {
66+ setTimeout ( callback , 0 ) ;
67+ } ;
6368 const PerspireServer = require ( "@valos/inspire/PerspireServer" ) . default ;
6469
6570 const vlm = yargv . vlm ;
@@ -92,6 +97,7 @@ exports.handler = async (yargv) => {
9297 container
9398 } ) ;
9499 await server . start ( ) ;
100+
95101 const interval = ( typeof yargv . keepalive === "number" ) ? yargv . keepalive : ( yargv . keepalive && 1 ) ;
96102 if ( interval ) {
97103 console . warn ( "Setting up keepalive render every" , interval , "seconds" ) ;
You can’t perform that action at this time.
0 commit comments