PlayActView
There is only ever one PlayActView which is created shortly after the application starts, and is only destroyed when the application ends.
Properties
Because sceneToWorld and worldToScene have so many inputs, I split the job into two. This is an intermediate step that you won't care about!?
Because sceneToWorld and worldToScene have so many inputs, I split the job into two. This is an intermediate step that you won't care about!?
The scaling factor to take account of this view not being the same as the game's nominal size.
Because sceneToWorld and worldToScene have so many inputs, I split the job into two. This is an intermediate step that you won't care about!?
A Matrix property which can convert CoordinateSystem.window coordinates to CoordinateSystem.world coordinates (such as those used by Actor.position).
The point (as a ratio of the view's size from the top-left) that worldPinProperty corresponds to. This point will be the center of rotation and scaling.
The point in CoordinateSystem.world coordinates that corresponds to viewPinRatioProperty. This point will be the center of rotation and scaling.
Because sceneToWorld and worldToScene have so many inputs, I split the job into two. This is an intermediate step that you won't care about!?
A Matrix property which can convert CoordinateSystem.world coordinates (such as those used by Actor.position) to CoordinateSystem.window coordinates.
An arbitrary zoom factor, which is unrelated to the size of this view.
Functions
Ensures that nominalSize (in world coordinates) fits within the view. If the view's aspect ratio is wider than nominalSize's then more of the world will be visible at the edges. On the other hand, if the view's aspect ratio is taller, then more of the world will be visible at the top and bottom.