You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like the same convenience setters for Scene.scale and Scene.offset as follows.
setscale(value: (number|number[]|{x?: number;y?: number;})){if(typeofvalue==='number'){this.scale.x=this.scale.y=value;}elseif(Array.isArray(value)){// setter logic similar to SpriteView}elseif(typeofvalue==='object'){// setter logic similar to SpriteView}else{thrownewTypeError('Argument must be a number, number array, or object.');}}
It seems like this isn't happening now because Scene.scale and Scene.offset are instances of DrawTriggerPoint, but it shouldn't be hard to move these to an internal private variable and convert the public interfaces to getters and setters. What might be more difficult to overcome is the philosophical desire to always be setting the x and y components of a DrawTriggerPoint directly.
The text was updated successfully, but these errors were encountered:
The
SpriteView
implementation provides convenient setters for thePositionWorld
etc. properties as:I would like the same convenience setters for
Scene.scale
andScene.offset
as follows.It seems like this isn't happening now because
Scene.scale
andScene.offset
are instances ofDrawTriggerPoint
, but it shouldn't be hard to move these to an internalprivate
variable and convert the public interfaces to getters and setters. What might be more difficult to overcome is the philosophical desire to always be setting thex
andy
components of aDrawTriggerPoint
directly.The text was updated successfully, but these errors were encountered: