Hi All
I Just merged DEV branch and the BitmapFileMaterial() is removed! What should I use instead of that Class?
Thanks
(DEV branch) What to use instead of BitmapFileMaterial?Software: Away3D 4.x |
||
M4TH76, Newbie
Posted: 14 November 2011 06:00 PM Total Posts: 3 Hi All Thanks |
||
Alex Bogartz, Sr. Member
Posted: 14 November 2011 08:10 PM Total Posts: 216 [ # 1 ] They made a reference some time back about creating a new class called TextureMaterial. Is that in there? |
||
M4TH76, Newbie
Posted: 14 November 2011 08:13 PM Total Posts: 3 [ # 2 ] Thanks Here a little hack I made :] BitmapFileMaterial.as in root dir of my classpath/.fla
package { |
||
David Lenaerts, Administrator
Posted: 15 November 2011 11:57 AM Total Posts: 80 [ # 3 ] While that technically works, it’s the “wrong” way to go about it What’s happening in your code is actually the reason the old BitmapFileMaterial is now gone: poor resource management. Instead, you could look into creating a BitmapFileTexture that extends Texture2DBase or BitmapTexture base. That way, one Texture object can be shared across several materials, which is not something a BitmapFileMaterial would allow. Instead, it creates new BitmapData and BitmapTexture instances all the time. We’re planning to implement these things so you’ll have them ready to go (same goes for VideoTexture, MovieTexture), but if you feel like having a stab at it, feel free and let us know |