away3d/away3d-core-fp11 — pull request #443 by elkq (2012-11-24 00:53:55+00:00)
Title: AWD2Parser does not correctly parse ColorMaterials (patch attached as diff)

There are two issues when AWD2Parser.as extracts ColorMaterial information (line 384).

First, if (type == 1) "ColorMaterial", the finalize variable is never initialized, which means finalizeAsset() is called randomly.

Secondly, again in the "ColorMaterial" flow, the RGBA color variable is incorrectly decoded.
AWD2 encodes color as RGBA while ColorMaterial uses separate color and alpha values.