Skip to content

WebCanvas: enableDevicePixelRatio does not work in web worker #227

@zubiden

Description

@zubiden

Since devicePixelRatio is not defined for Web Workers, it results in an error when enabled.

I suggest removing this option and providing a new one that accepts a scale factor number. If a number is not provided, it should fall back to the current value of 1 + ((window.devicePixelRatio - 1) * 0.75). In environments where DPR is not defined, it is simply 1. I would name it something like scaleFactor, renderScale or canvasScale (debatable).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions