diff --git a/content/docs/shortcodes/Quadrille Renderer.md b/content/docs/shortcodes/Quadrille Renderer.md index b9dd0c03..003ffd72 100644 --- a/content/docs/shortcodes/Quadrille Renderer.md +++ b/content/docs/shortcodes/Quadrille Renderer.md @@ -3,7 +3,7 @@ weight: 1 --- # Quadrille Renderer -{{< p5-iframe sketch="/graphics-playground/sketches/quadrille-renderer/sketch.js" lib1= "https://cdn.jsdelivr.net/gh/objetos/p5.quadrille.js/p5.quadrille.js" width="520" height="520">}} +{{< p5-iframe sketch="/graphics-playground/sketches/quadrille-renderer/sketch.js" lib1= "https://cdn.jsdelivr.net/gh/objetos/p5.quadrille.js/p5.quadrille.js" width="450" height="450" >}} ## What is `quadrille.js`? diff --git a/content/sketches/quadrille-renderer/sketch.js b/content/sketches/quadrille-renderer/sketch.js index ff139da9..f32c9b7d 100644 --- a/content/sketches/quadrille-renderer/sketch.js +++ b/content/sketches/quadrille-renderer/sketch.js @@ -8,10 +8,11 @@ let fov; let origen; function setup() { - createCanvas(COLS * Quadrille.cellLength, ROWS * Quadrille.cellLength); - angleMode(RADIANS); Quadrille.cellLength = 5; Quadrille.outlineWeight = 0; + createCanvas(COLS * Quadrille.cellLength, ROWS * Quadrille.cellLength); + angleMode(RADIANS); + console.log(width, height); quadrille = createQuadrille(ROWS, COLS); cubo = { vertices: [ @@ -54,7 +55,7 @@ function draw() { background(0); quadrille.clear(); - qRotateX(cubo.vertices, 0.1); + qRotateX(cubo.vertices, 0.05); let triangs3D = qTriangles(cubo); let triangs2D = qProyectTriangles(triangs3D, fov, qCam, origen);