interface: bigger now
This commit is contained in:
parent
72a24ce131
commit
96a5876297
2 changed files with 14 additions and 11 deletions
11
sketch.js
11
sketch.js
|
@ -22,7 +22,8 @@ let checkbox_skeleton;
|
|||
let checkbox_polytope;
|
||||
let input_particles;
|
||||
|
||||
let aside_size;
|
||||
let aside_width;
|
||||
let aside_height;
|
||||
|
||||
|
||||
function preload() {
|
||||
|
@ -31,7 +32,9 @@ function preload() {
|
|||
|
||||
function setup() {
|
||||
createCanvas(0, 0, WEBGL);
|
||||
aside_size = int(getComputedStyle(document.documentElement).getPropertyValue('--aside-size').replace('px', ''));
|
||||
const css = getComputedStyle(document.documentElement);
|
||||
aside_width = int(css.getPropertyValue('--aside-width').replace('px', ''));
|
||||
aside_height = int(css.getPropertyValue('--aside-height').replace('px', ''));
|
||||
windowResized();
|
||||
|
||||
camera = createCamera();
|
||||
|
@ -60,9 +63,9 @@ function setup() {
|
|||
|
||||
function windowResized() {
|
||||
if (windowWidth >= windowHeight) {
|
||||
resizeCanvas(windowWidth - aside_size, windowHeight);
|
||||
resizeCanvas(windowWidth - aside_width, windowHeight);
|
||||
} else {
|
||||
resizeCanvas(windowWidth, windowHeight - aside_size);
|
||||
resizeCanvas(windowWidth, windowHeight - aside_height);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue