Skip to content

Commit

Permalink
Adjust height for p5js_instance & pjs_cs
Browse files Browse the repository at this point in the history
  • Loading branch information
GoSubRoutine committed Apr 23, 2020
1 parent 479fc20 commit 6fe71ba
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion p5js_instance/sketch/sketch.js
Expand Up @@ -19,7 +19,7 @@ import Chamber from "../classes/chamber.js";
import autoResizeFrame from "../utils/frameResize.js";
console.log(import.meta);
export default function sketch(p) {
const BALLS = 4, balls = Array(BALLS).fill(null), CHAMBERS = 8, chambers = Array(CHAMBERS).fill(null), BG = 0o350, OUTLINE = 0, WEIGHT = 2, { width: SW, height: SH } = screen, W = frameElement && SW * 30 >> 6 || SW * 63 >> 6, H = frameElement && SH * 71 >> 8 || SH * 3 >> 2;
const BALLS = 4, balls = Array(BALLS).fill(null), CHAMBERS = 8, chambers = Array(CHAMBERS).fill(null), BG = 0o350, OUTLINE = 0, WEIGHT = 2, { width: SW, height: SH } = screen, W = frameElement && SW * 30 >> 6 || SW * 63 >> 6, H = frameElement && SH * 71 >> 8 || SH * 23 >> 5;
let bg;
p.setup = function () {
this.createCanvas(W, H).mousePressed(() => balls.forEach(b => b.respawn()));
Expand Down
2 changes: 1 addition & 1 deletion p5js_instance/sketch/sketch.ts
Expand Up @@ -30,7 +30,7 @@ export default function sketch(p: p5) {
BG = 0o350, OUTLINE = 0, WEIGHT = 2,
{ width: SW, height: SH } = screen,
W = frameElement && SW * 30 >> 6 || SW * 63 >> 6,
H = frameElement && SH * 71 >> 8 || SH * 3 >> 2;
H = frameElement && SH * 71 >> 8 || SH * 23 >> 5;

let bg: p5.Color;

Expand Down
2 changes: 1 addition & 1 deletion pjs_cs/sketch/sketch.coffee
Expand Up @@ -35,7 +35,7 @@ export default sketch = (p) ->

{ width: SW, height: SH } = screen
W = if frameElement then SW * 30 >> 6 else SW * 63 >> 6
H = if frameElement then SH * 71 >> 8 else SH * 3 >> 2
H = if frameElement then SH * 71 >> 8 else SH * 23 >> 5

p.setup = ->
@size W, H
Expand Down
2 changes: 1 addition & 1 deletion pjs_cs/sketch/sketch.js
Expand Up @@ -36,7 +36,7 @@ export default sketch = function(p) {
WEIGHT = 2;
SW = screen.width, SH = screen.height;
W = frameElement ? SW * 30 >> 6 : SW * 63 >> 6;
H = frameElement ? SH * 71 >> 8 : SH * 3 >> 2;
H = frameElement ? SH * 71 >> 8 : SH * 23 >> 5;
p.setup = function() {
var bo, cx, cy, di, hy, i, wx;
this.size(W, H);
Expand Down

0 comments on commit 6fe71ba

Please sign in to comment.