API reference
Every public class, method, and event in @codexo/exojs. Generated from source.
classCappedResolutionCanvasSizing
Scales the canvas to its parent and lets the render resolution follow it downwards, but never above the base resolution. The CSS box is the largest base-aspect rectangle that fits the parent, exactly as with FixedResolutionCanvasSizing. Below the base resolution the backing store follows the smaller display size, so a phone renders fewer pixels; above it the backing store stops at `base x pixelRatio`, so a large display costs no more to draw than the resolution the app was authored for. The logical coordinate system is always the base resolution. The balanced responsive mode, and the usual choice when a fixed aspect ratio is wanted but a fixed pixel budget is not. Requires a canvas element with a parent in the document.
import { CappedResolutionCanvasSizing } from '@codexo/exojs'Scales the canvas to its parent and lets the render resolution follow it downwards, but never above the base resolution.
The CSS box is the largest base-aspect rectangle that fits the parent, exactly as with FixedResolutionCanvasSizing. Below the base resolution the backing store follows the smaller display size, so a phone renders fewer pixels; above it the backing store stops at `base x pixelRatio`, so a large display costs no more to draw than the resolution the app was authored for. The logical coordinate system is always the base resolution.
The balanced responsive mode, and the usual choice when a fixed aspect ratio is wanted but a fixed pixel budget is not.
Requires a canvas element with a parent in the document.
new(): CappedResolutionCanvasSizingdetach(): void