Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Default ViewWidth and ViewHeight to Actor #3

Open
quinnhoener opened this issue May 20, 2017 · 1 comment
Open

Add Default ViewWidth and ViewHeight to Actor #3

quinnhoener opened this issue May 20, 2017 · 1 comment

Comments

@quinnhoener
Copy link
Contributor

In ActorLoader._ReadShot, there's a block for grabbing the view width and height. Stepping through the loading process in Chrome seems that these values are never set.

actor._ViewWidth = block.reader.readFloat32();
actor._ViewHeight = block.reader.readFloat32();

Ideally I'd love these values to be the base width and height of the initial frame of the animation. Currently in the Construct 2 Plugin, I have it set that the user has to hand-type the width and height so that scaling in the game engine works correctly to match what you've set in the editor. Having this based in the runtime would be pretty great.

@luigi-rosso
Copy link
Contributor

That View block only gets exported when you post a shot to the 2D site. It's used to calculate the bounds of the camera you align when exporting the shot. This library gets used for that too.

We are going to do a pretty serious "maturity" upgrade to this library in the near future. That will introduce support for more features like calculating bounding boxes dynamically. We could export that information for the animation too but I think having it be dynamically calculated will be relatively inexpensive, more accurate, keep download sizes down, and it'll be future-proof as our animations start becoming more dynamic (more on that later...).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants