File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -18,14 +18,16 @@ window.setup = function() {
18
18
}
19
19
20
20
window . draw = function ( ) {
21
- width = base_size . x ;
22
- height = base_size . y ;
23
21
background ( 255 ) ;
24
22
vignettes . draw ( ) ;
25
23
}
26
24
27
25
window . setup_new_canvas = function ( i_width , i_height ) {
28
26
window . p5Canvas = createCanvas ( i_width , i_height ) . canvas ;
27
+ window . p5Width = width ;
28
+ window . p5Height = height ;
29
+ width = base_size . x ;
30
+ height = base_size . y ;
29
31
}
30
32
31
33
window . mouseClicked = function ( ) {
Original file line number Diff line number Diff line change @@ -157,7 +157,7 @@ export default class Vignettes{
157
157
}
158
158
159
159
get current_scale ( ) {
160
- return this . _lock_scale ? 1 : width / this . _size . x ;
160
+ return this . _lock_scale ? 1 : p5Width / this . _size . x ;
161
161
}
162
162
163
163
//-------------asset loading and displaying------------------
You can’t perform that action at this time.
0 commit comments