crystal.window.viewport_scale

Returns the scaling factor applied to the game viewport within draw.

Usage

crystal.window.viewport_scale()

Returns

Name Type Description
scale number Scaling factor applied when upscaling the game.

Examples

crystal.window.draw(function()
  local scale = crystal.window.viewport_scale();
  love.graphics.setPointSize(scale * 4);
  love.graphics.points(100, 100);
end);

This site uses Just the Docs, a documentation theme for Jekyll.