File tree Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Original file line number Diff line number Diff line change 1306
1306
1307
1307
/*jshint esversion: 11, bitwise: false*/
1308
1308
1309
- var morphicVersion = '2023-July-13 ' ;
1309
+ var morphicVersion = '2023-November-07 ' ;
1310
1310
var modules = { } ; // keep track of additional loaded modules
1311
1311
var useBlurredShadows = true ;
1312
1312
@@ -12228,12 +12228,14 @@ WorldMorph.prototype.initRetina = function () {
12228
12228
12229
12229
WorldMorph . prototype . getGlobalPixelColor = function ( point ) {
12230
12230
// answer the color at the given point.
12231
- var dta = this . worldCanvas . getContext ( '2d' ) . getImageData (
12232
- point . x ,
12233
- point . y ,
12234
- 1 ,
12235
- 1
12236
- ) . data ;
12231
+ // first, create a new temporary canvas representing the fullImage
12232
+ // and sample that one instead of the actual world canvas
12233
+ // this slows things down but keeps Chrome from crashing
12234
+ // in v119 in the Fall of 2023
12235
+ var dta = Morph . prototype . fullImage . call ( this )
12236
+ . getContext ( '2d' )
12237
+ . getImageData ( point . x , point . y , 1 , 1 )
12238
+ . data ;
12237
12239
return new Color ( dta [ 0 ] , dta [ 1 ] , dta [ 2 ] ) ;
12238
12240
} ;
12239
12241
You can’t perform that action at this time.
0 commit comments