30% Off Papervision3D Training in San Francisco
San Flashcisco has information about how to obtain 30% of the price of Papervision3D Training that’s happening this weekend in San Francisco.
San Flashcisco has information about how to obtain 30% of the price of Papervision3D Training that’s happening this weekend in San Francisco.
I’ve just starting using Papervision3d for the first time and I decided to go head first into the Great White build.
After completing a portion of work in my project I usually run the profiler to make sure objects are being collected. So, after finishing my Papervision3d portion of work, I ran the project in the profiler. I immediately noticed that I had a worry number of PV3D objects still hanging out, taking up a lot of memory. They we’re mainly math type objects such as Number3D and Matrix3D. And after exploring some more using the profiler, I was able to see that the culprit was the MaterialManager. And surprise , surprise, it’s a Singleton.
Now, I’m not one of those people who hate Singleton’s in projects, all I ask is that they keep themselves tidy. So that when a singleton is “idle”, it’s memory foot print is minimal. And yes I understand that “Great White” is in a pre-release status so I’m not on a rant and bitch session here. I would merely like to warm others who are using Great White for projects to be carful.
So, how does MaterialManager leak? It would seem that the following Dictionary just keeps growing and growing with complex Material objects.
private var materials:Dictionary;
And in the way I’m using Papervision3d; I end up with hundreds of bitmap BitmapMaterial’s and WireframeMaterial’s by having Cubes covered in the BitmapMaterial’s fly on to stage and then off again. Once I remove the Cube from the Scene3D, I expected the Material to be GC’ed because I saw no hard deconstruct method. But no, I saw this Dictionary becomes quite large, very quickly.
To work around this problem I temporally commented out the body of the registerMaterial method so that my Material would never be added to materials:Dictionary.
public static function registerMaterial(material:MaterialObject3D):void {
//getInstance()._registerMaterial(material);
}
But you may need to build your own work around if you’re using shaders as the MaterialManager seems to be connected to ShadedMaterial’s. Maybe you could call init() on MaterialManager once you’re finished with your papervision3d portion of the project. Or work closely with MaterialManager when removing objects from the Scene3D.
I’m sure this issue shall be corrected for the final release of PV3D 2 but until then this work around will be working for me.




.. NOT!
It’s just my old MacBook in a Manila Envelope ![]()
We’re trying to gauge the number of people who shall be attending the first San Flashcisco meet this Thursday. If you’re thinking about attending we would appreciate it if you could comment here.
Thank you ![]()
Around the middle of December I decided to see if I could improve my ActionScript 3 life a little by creating a very basic layout and constraints framework. I thought it would be the perfect project to help speed up my overall development times.
Starting off, I didn’t plan the framework at all, I just kept coding until I got to the end result which, is usually the way things work for me. And after the couple of tinkering around down days, I ended up with a decorator pattern that I could apply to any existing DisplayObject.
This means that you don’t have to apply this framework to the whole application. The stage can stay as a Sprite; your existing components will still display where you told them to display. This framework can be added to any existing project without the need to upgrading anything and without the fear breaking anything which, I think is the best thing about it.
Unfortunately, I shall not be releasing the framework today. I feel that I can still improve upon it and clean the API a little. But I am attaching a video “walk through” of the API and a link to the code I use in the video.
Disclaimers:
Link to Video (for if you can’t see the embed)
If you have any feedback or questions please feel free to leave a comment.
Also, if you are living in the Bay Area .. please remember that the first San Flashcisco user group meeting is on Thursday (Jan 17th 08). For more information, please visit SanFlashcisco.com
After several small meetings with community leaders and discussions between myself and joint San Flashcisco manager, Patience Elfving, I am please to announce the go-ahead of the San Flashcisco user group.
We have set a regular monthly date for our meetings which will be the 3rd Thursday of the month. Our first meeting will be on January 17th starting at 6:30pm, hosted at 275 Battery Street, Suite 800, SF.
Read More: http://sanflashcisco.com/blog/7/first-meet-january-17th-2008-630