File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed
Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change 44// By: SharkPool
55// License: MIT
66
7- // Version V.1.0.1
7+ // Version V.1.0.11
88
99( function ( Scratch ) {
1010 "use strict" ;
278278 render . exports . Drawable . prototype . updateVisible = function ( isVisible ) {
279279 if ( ! this [ cameraSymbol ] ) setupState ( this ) ;
280280 if ( isVisible && this . _visible !== isVisible ) {
281+ const camSystem = this [ cameraSymbol ] ;
282+ const safeOgSZ = camSystem . ogSZ !== 0 ? camSystem . ogSZ : 1e-10 ;
283+ const updatedScale = [ this . scale [ 0 ] / safeOgSZ , this . scale [ 1 ] / safeOgSZ ] ;
284+
281285 // save some renderer calls, packing this all into one
282286 // while running only when isVisible is true combines this
283287 // into a single renderer call
284- this [ cameraSymbol ] . needsRefresh = true ;
285288 this . updateProperties ( {
286- position : this . _position ,
287- direction : this . _direction ,
288- scale : this . scale ,
289+ position : translatePosition ( this . _position , true , camSystem ) ,
290+ direction : this . _direction + camSystem . ogDir ,
291+ scale : updatedScale ,
289292 } ) ;
290293 }
291294 ogUpdateVisible . call ( this , isVisible ) ;
You can’t perform that action at this time.
0 commit comments