Filed under: 3D, ActionScript 3, Adobe Flash, Multi-Screen Flash, Rich Internet Applications | Tags: 3D, Adobe, Adobe Flash, Flash, Flash Player 11, Molehill
Molehill is a set of low-level API’s that allow Adobe Flash (and Adobe AIR) developers to be able to generate complex 2D, 2.5D and 3D graphics and aniimations highly efficiently — assuming that the appropriate GPU hardware exists on that platform and that Adobe Flash supports this platform.
Viewing Molehill Content on the Desktop and Mobile Platforms
Currently, Adobe Flash Player 11 (currently released via our incubator program, see Thibault’s blog http://www.bytearray.org/?p=2810 for more information) supports the Molehill API’s on the desktop, and will bring this same functionality to Android, RIM and iOS platforms later this year.
High-Level Access
It’s useful to understand that it is expected that a majority of Flash developers will not use this API directly but via a third-party display framework (such as Alternativa3D, Away3D, Coppercube, Flare3D, Minko, Sophie3D, Yogurt3D, Zest3D and Ely Greenfield’s open source M2D framework https://github.com/egreenfield/M2D ).
Low-Level Access
If you want to access the low-level API’s directly, you can reference the prerelease documentation for Flash Player 11, which is referenced in this useful document ( http://labs.adobe.com/wiki/index.php/Flash_Player_Incubator#Authoring_for_Flash_Player_11.2C0.2C0.2C58_Incubator which also contains information about how to appropriately update Flash Builder or Adboe Flash CS5 Professional) and look up the flash.display3D package and flash.display.Stage3D class.
In addition, Thibault’s post references using the AGALMiniAssembler if you want to work with low-level shaders bytecode from assembly string, which is available at http://www.bytearray.org/wp-content/projects/agalassembler/com.zip
Fallback
It’s useful to know that if the graphics can’t be rendered using hardware acceleration, it gracefully falls back to software rendering. In addition, you can actually detect this condition and choose an alternative way to display your content.
cntx3d = new Context3D(
var pattern:RegExp = /software/I;
If(cntx3d.driverInfo.search(pattern)==0)
{
// rendered via software
renderLowestCommonDenominator();
}
else { // rendered in hardware
renderIn3D();
}
Leave a Comment so far
Leave a comment










