feathersui / feathersui-starling

User interface components for Starling Framework and Adobe AIR
https://feathersui.com/learn/as3-starling/
Other
914 stars 386 forks source link

Feathers 4.0 migration: AssetManager scaleFactor #1783

Closed kevinfoley closed 5 years ago

kevinfoley commented 5 years ago

The old version of Starling's AssetManager had a public scaleFactor property, which Feathers themes used to utilize. For example, from MetalWorksMobileThemeWithAssetManager:

oldScaleFactor = assetManager.scaleFactor;
assetManager.scaleFactor = ATLAS_SCALE_FACTOR;

The scaleFactor property does not exist in the new version of AssetManager. It looks like you changed the code to this:

oldScaleFactor = assetManager.textureOptions.scale;
assetManager.textureOptions.scale = ATLAS_SCALE_FACTOR;

This is not mentioned in your Feathers 4.0 migration guide. You should probably mention it there, since it will affect anyone migrating an older Feathers project that used one of your themes as a starting point.

joshtynjala commented 5 years ago

@kevinfoley What did you find that you needed to change in your code? I wouldn't expect this to affect anyone, since scaleFactor and scale serve the same purpose.

kevinfoley commented 5 years ago

We need to change in our code exactly what I mentioned above, if we were using a theme based on one of your example themes.

joshtynjala commented 5 years ago

If you're extending that class, you shouldn't need to change anything.

However, it sounds like you're basically copying/forking that class into something new. In that case, you still shouldn't need to change anything because the old AssetManager will continue to work. If you want to migrate to the new AssetManager too, you can certainly do that. However, how to update a forked class seems outside the scope of what Feathers should explain in the migration guide. If anything, Starling's own documentation for the new AssetManager is what you should be interested in, and that's already linked.