Blog

JigLibFlash Contributor – JigLibFlash Native FIVe3D Support

September 21, 2009 by Devin Reimer

JigLibFlash Logo

I recently became a member of the JigLibFlash team. The first item of business was to add FIVe3D support into the library itself. You can read the brief article about it here. While you now will not need to download additional files for JigLibFlash you will still have to download the additional FIVe3D files (including the FIVe3D cube) from this site until they are supported features of FIVe3D. You can download those additional files here.

For those who have already implemented JigLibFlash with FIVe3D this new change should require no more effort than removing the old jiglib folder from my orignal source. An example of the new implementation is also available within the JigLibFlash library.

For those who haven’t heard of or used JigLibFlash yet check it out.

JigLibFlash Blog: http://www.jiglibflash.com/blog
JigLibFlash Source: http://code.google.com/p/jiglibflash/

If you haven’t already seen the demo here it is – FIVe3D JigLibFlash Demo.

Unity3D – You're Stealing my Free Time and I Love It

September 7, 2009 by Devin Reimer

Unity Title

If someone 3 months ago would have said to me, do you see any reason why you would stop devoting so much time to Flash/Flex in the next year. I would have said not a chance. I love interactive content on the web and more specifically interactive 3D within a browser. I have long history with AS3 and the only other “competitors” (Silverlight and HTML5)  aren’t capable of what I would need them to do.

My world got turned upside down the day I was shown the Unity Web Player. I froze, my jaw dropped, this was amazing. I had seen demos of Unity before in presentations about iPhone development, but this was different, this was in a browser. Most importantly it meant I could program full 3D in C# for the web.  So I went back to my original list of reasons why I was not interested in Unity the first time I saw it. Firstly it was really for iPhone and Wii development at the time, but now it’s also for the web.  The next reason being, I didn’t own a Mac. After doing some reading I realized that sure enough the Unity guys have dealt with that, the editor was now available for Windows. My last reason was price, but since this tool is so great I could deal with the price. In theory I would be in, but there was one other reason that hadn’t occurred to me. What about the thousands of hours I’ve put into AS3 development. Separation anxiety, going from a place where I know so much, to a place where I know nothing.

After a week of thought on the topic, I decided that Unity3D development was what I had to do. This was what I was waiting for, it just didn’t come in the form of a new Flash Player release. It has been roughly a month since the shift in my spare time over to Unity3D and I couldn’t be happier, the power and the opportunities are incredible.

So this is why there has been a little drought in examples on this blog, Unity3D has stolen my free time. This does not mean nothing new is coming, I’m actually finishing up some JigLibFlash stuff as I write this (so clearly Unity3D hasn’t stole all my free time). I am also hoping in the coming months that I will have some Unity3D examples to put up on this blog.

If you haven’t already done so please go check out Unity3D now.

I have one final comment and it is for Adobe: I know your plan is to unify the mobile player with the web player. In doing this you are slowing down the advancement of the web player to a point that by the time you have them ready to unify, there might not be anything left to unify.

JigLibFlash FIVe3D Support and FIVe3D Cube

August 3, 2009 by Devin Reimer

FIVe3D JigLibFlash Demo 1 Screenshot

Last week I spoke at ‘Flash in the Peg‘ – Winnipeg’s Adobe User Group. Here I got the opportunity to show a demo of JigLibFlash FIVe3D support that I have been working on for the last few weeks. After more hours than I would like to admit JigLibFlash FIVe3D support is now available for download. Like both JigLibFlash and FIVe3D these classes are released under the MIT License.

If you have used FIVe3D before you will know that there are no 3D object primitives built into the library, because of this I have also wrote a Cube class primitive for FIVe3D. Even if you do not need to use physics in your project you can still use this new Cube primitive.

Setting up JigLibFlash to work with FIVe3D is not quite as easy as Papervision3D, but it’s not a lot harder. The reason for this is FIVe3D does not allow for direct transformation matrix manipulations. In simpler terms a  few small changes needed to be made to the Sprite3D class within FIVe3D. You can use my modified version of the Sprite3D class to replace your current version, or just add it directly to your project using the same package folder structure. An example of how to do this is in my source below. The modifications to the Sprite3D class are small and should have no impact on your projects (with or without JigLibFlash).

To check out the demo click here.

To get the demo source, including all required files click here.

To just download the required files (JigLibFlash FIVe3D Plugin, modified Sprite3D class and new Cube primitive) click here.

Source Requirements: You will need both FIVe3D 2.1.2 and JigLibFlash to compile the demo source.

Update: As I am now a JigLibFlash contributor, JigLibFlash library now has built-in FIVe3D support. For more information click here.

Update 2: The JigLibFlash team (myself included) have completed work on upgrading JigLibFlash to Flash Player 10. To view the my blog post on this click here.

Multiline WordWrap DynamicText3D in FIVe3D Part 2 (Now with Dynamic Alignment)

July 19, 2009 by Devin Reimer

FIVe3D WordWrap Part 2 Screenshot

Update: I have released a new version that now supports the newest versions of FIVe3D. To go to the new post click here.

For those of you that have not read my original blog post on multiline wordwrap in FIVe3D. You can go read the article here.

I didn’t intend of expanding my DynamicTextMultiline class, but as I was working on another project I ended up adding to it and expanding its feature set. I have now implemented dynamic alignment (left,right,center) and line spacing, as well as fixed a small bug involving multiline text width. I have also updated the package path of the class to a more logical location (almostlogical.five3d.display).

Using dynamic alignment and line spacing is very easy:

var dynText:DynamicText3DMultiline;
dynText = new DynamicText3DMultiline(HelveticaMedium);
dynText.width = 200;
dynText.align =  DynamicText3DMultiline.CENTER;
dynText.lineSpacing = 5;
dynText.wordWrap = true;

This class has been programmed in such a way that you can use it even if you don’t need to use word wrap because it has almost no additional performance impact when wordwrap=false. Plus now you get the added benefit of being able to dynamically align your text.

This demo is the same as Part 1 except it includes the ability to change the alignment of the text (left,right,center) in real-time.

Note: For performance reasons I recommend setting text.wordwrap=true as the very last property you set.

To play the demo click here.

To get the demo source, including the newest version of the DynamicText3DMultiline class click here.

To just download the newest version of the DynamicText3DMultline class click here.

Source Requirements: You will need both FIVe3D 2.1.2 and TweenMax to compile the demo source.

Note: If you are having problems using word wrapping with generated fonts (not the default Helvetica fonts), please refer to the solution in the previous post.

Multiline WordWrap DynamicText3D in FIVe3D

June 23, 2009 by Devin Reimer

FIVe3D Word Wrap Screenshot

For those of you that have never heard of FIVe3D, it is a lightweight vector based 3D library now written in AS3. You can check it out for yourself, http://five3d.mathieu-badimon.com.

In working on a small project using FIVe3D I discovered that while the 3D text part of the library is awesome it did not support multiline word wrap. I had seen examples of people using muliple DynamicText3D objects to fake text being multiline, but I wanted the text to be able to support dynamically word wrapping.

So I created a class called DynamicText3DMultiline which works the exact same way as the normal DynamicText3D class, but adds multiline wordwrap functionality. To use wordwrapping, simply set the width of the object and then set wordwrap equal to true.

var dynText:DynamicText3DMultiline;
dynText = new DynamicText3DMultiline(HelveticaMedium);
dynText.width = 200;
dynText.size = 14;
dynText.wordWrap = true;

There is next to no overhead in using this class instead of the DynamicText3D class when you don’t need the word wrapping feature, so as in my example this is now my standard text rendering class. Also it does have the added benefit have having a textHeight function.

To play the demo click here.

To get the demo source and the new DynamicText3DMultiline class click here.

Source Requirements: You will need both FIVe3D 2.1.2 and TweenMax to compile the demo source.

Update: I have been informed that people have not been able to get this class to work with their own generated typography files. I have discovered the issue, it turns out there is a small bug in the Typography Generator. Luckly the solution is easy. Once you create a new typography AS file, open it up and go to line 15. Change the variable ‘__heights’ to ‘__height’, and word wrapping will work.

Update 2: A new version of the DynamicText3DMultline class has been released with new features. Please check out the new post.

Update 3: I have released a new version that now supports the newest versions of FIVe3D. To go to the new post click here.

Actionscript Object Class Generator using Flex

June 1, 2009 by Devin Reimer

Actionscript Object Class Creator Shot

I have been working with Flex for a little while now mostly working on little experiments. So I decided it was time to create something useful. The idea for this project came to me while working on a large very object-oriented project.

All standard object class are similar in layout, but different enough that you really can’t copy and paste them. After creating tons of these classes by hand I knew there must be an easier way. At that moment ‘Actionscript Object Class Generator’ was born. This web-based application lets the user fill in a few fields and options like package path, class name, variables, variable types and also specify if getters and/or setters are needed. Once complete it will auto generate the properly formatted object class code which you then can paste directly into Actionscript file.

Check it out here.

Please leave me some feedback. Let me know if you like it, what features should be added or changed. If enough people find this application useful I might turn it into an AIR app that will save out files automatically.