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 13061306
13071307/*jshint esversion: 11, bitwise: false*/
13081308
1309- var morphicVersion = '2023-July-13 ' ;
1309+ var morphicVersion = '2023-November-07 ' ;
13101310var modules = { } ; // keep track of additional loaded modules
13111311var useBlurredShadows = true ;
13121312
@@ -12228,12 +12228,14 @@ WorldMorph.prototype.initRetina = function () {
1222812228
1222912229WorldMorph . prototype . getGlobalPixelColor = function ( point ) {
1223012230 // 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 ;
1223712239 return new Color ( dta [ 0 ] , dta [ 1 ] , dta [ 2 ] ) ;
1223812240} ;
1223912241
You can’t perform that action at this time.
0 commit comments