These are the mandatory window
properties accessed by p5.js
on import, and what can be used instead:
By default, there is no requestAnimationFrame
in node.
p5 has a polyfill for requestAnimationFrame
for older browsers, so we don't need to implement anything.
window.performance
(MDN)
Use node core module perf_hooks
window.screen
(MDN)
p5 uses screen.width
and screen.height
for displayWidth and displayHeight (Not required while working in node, so using null
)
window.navigator
(MDN)
p5 uses navigator.mediaDevices.getUserMedia()
which is used to access the user mic and camera feed. (Not required while working in node)