Optional
pixelThe pixelRatio of the WebGL rendering context.
VFX-JS renders the output with window.devicePixelRatio
by default.
This means the resolution of the WebGL canvas gets larger in high-DPI display devices (e.g. iPhone).
However, you might find VFX-JS not being rendered smoothly, especially in low-end devices.
In such case, you can pass lower values to pixelRatio
so VFX-JS can render in lower resolutions.
For example, if pixelRatio
is 0.5, VFX-JS renders in the half resolution of the native resolution.
ref. https://developer.mozilla.org/en-US/docs/Web/API/Window/devicePixelRatio
Optional
zz-index
for the WebGL canvas.
This is useful if you want to place the canvas behind other DOM element, or vice versa.
Options to initialize
VFX
class.