LingDong- / q5xjs

A small and fast alternative (experimental) implementation of p5.js
https://q5xjs.netlify.app/
The Unlicense
541 stars 25 forks source link

Scaling issues with pixeldensity and background on Q5("global"); #25

Open EstebanPiacentino opened 4 months ago

EstebanPiacentino commented 4 months ago

Hello!

This is related to a previously closed issue #6.

When using Q5("global") and pixelDensity(2), I still see the background unscaled. See my code below and the output:

new Q5("global");

function setup() {
  createCanvas(700,700);
  pixelDensity(window.devicePixelRatio);
}

function draw() {
  background(100);

  fill(150,0,0);
  rect(350,350,100,100);

}
Captura de pantalla 2024-03-24 a las 20 10 30

Many thanks!

quinton-ashley commented 1 month ago

@EstebanPiacentino This works in q5.js v2 https://q5js.org