In this post I aim to show you how to download the Papervision3D v2.0 (codenamed Great White) sources from their Subversion repository within Eclipse and compile them as an Actionscript 3 library.
For this I’m assuming that you have the Flex Builder 3 plugin installed (see a previous post on using this plugin with Eclipse 3.4) and, if you need to, read my last post on installing the SVN plugin (Subversive) in eclipse. Another source of information can be found on the Papervision3D FAQ.
In Eclipse, select Import… from the File menu item

From the popup that appears, select Projects from SVN in the SVN node of the tree - thanks to the Subversive Eclipse plugin - and click Next.
You’ll then be requested information on the SVN repository. We need to create a new one for the the Papervision3D source so select the Create a new repository location radio button and click Next.

In the following window we need to enter information about the Papervision3D respository location. Enter http://papervision3d.googlecode.com/svn/ in the text field next to the URL: label and click Next. Note that the URL given on the Papervision3D FAQ is http://papervision3d.googlecode.com/svn/trunk/. Eclipse automatically searches for the trunk directory, as you can see if you click on the Advanced settings tab, so we don’t need to give it here.
Eclipse then searches for the repository and provides a listing of available directories. You can browse through the trunk branches and you’ll see that there is the Great White branch as well as the previous version of Papervision3D (v1.5 ?) shown here for Actionscript 3. Select GreatWhite and click on Finish.
Eclipse starts to scan the repository and then requests how you would like to check out the project. Select Check out as a project configured using the New Project Wizard and click on Finish.
In the New Project wizard select Flex Library Project from the Flex Builder tree node and click Next.
Enter the name of the project you’d like to create - for example Papervision3D as I show below and click Next to set up the main source directory.

Enter src in the field next to the Main source folder label and select the radio button next to src under Classes to include in the library then click on Finish.
Eclipse will then start to check out the Great White branch from the Papervision3D repository and place them in a new project which can take several minutes. You should then see the new project in the Flex Navigator.

If, like me, you see the error message nothing was specified to be included in the library, then simply right-click on the project, select Properties and select Flex Library Build Path from the menu and click on the check box next to src under Classes to include in the library and click on OK.
You’ll see at the bottom right of the Eclipse window that it starts to compile the sources and when its finished if you open up the bin directory of the project in the Navigator you’ll see a newly created libary file called Papervision3D.swc that you can use in your Papervision3D projects (or otherwise link your other projects to the Papervision3D one when you configure them).

Also included in the import are some examples of using Papervision3D v2.0. These are useful to get started on Papervision3D projects. Similarly useful is to perform the same procedure as above and check out the previous version of Papervision3D (check out from a different branch from the repository as shown above when importing an SVN project). The API has changed quite a lot, but not completely. There are a lot of useful examples showing the different features. The source code is also well documented and its useful exploring the different Actionscript classes.
Anyway, I hope to provide some simple, concrete examples of using Papervision3D in the near future. In the meantime I hope this has provided a useful step in obtaining the source code using SVN in Eclipse (*) and please let me know if there’s anything missing.
(* by the way, I presume the same steps in installing SVN and obtaining the Papervision3D source code can be performed directly within the Flex Builder 3 application since it uses the Eclipse architecture - it’d be useful to know if you’ve tried it)
It’s all good, the menus and choices are 99% similar :) in Flex version 3.0 (build 3.0.1.205647)
I tried this on Linux and it basically works-
thanks very much.
I got slightly different results after checkout, and a lot of errors in the first build until i went in and added the other src in the flex library path.
As of 9/16/2008 when I check out from the papervision svn repos, I get “trunk 727″ instead of “Great White.” I am not used to SVN, but managed to navigate the tags and trunk successfully, so it can’t be that difficult.
PS I got here from here:
http://dev.papervision3d.org/2008/09/01/first-steps-in-papervision3d/
John
Hi John,
Thanks for the comments. Yes, the svn repository structure has changed since this post went out as Papervision3D is moving towards a release version of v2.0… and I’m a little slow in updating this post!
So, as you say, the latest revision (as of this date) is 727 and Great White no longer exists as a branch. When checking out from the SVN repository you need to select trunk -> as3 -> trunk which currently downloads build, docs, examples and src directories.
To make sure the source is fully compiled you need to ensure that in eclipse the project properties -> Flex Library Build Path has src check-box selected and the src is entered in the Main source folder.
Obviously, if you got the source to compile then you’ve managed to do all this but its useful for others to have the info - thanks again for the heads-up!
Hi there tartiflop,
I’ve just installed papervision on Flex Builder 3 on MAC OS X.
The only doubt i got was witch svn folder to get. I got trunk/branches/cs4 and it all went smooth until compiling.
i get “A file found in a source-path ‘CopyOfAstroRenderEngine’ must have the same name as the class definition inside the file
‘AstroRenderEngine’. (CopyOfAstroRenderEngine.as)
Maybe i got the wrong version? any ideas?
Well, good tutorial anyway, congratz ;)
100% compiled ;)
Just deleted the src/org/papervision3d/render folder and reverted it and it compiled ok.
Your next tuts should keep me busy the next days ;)
Cheers
Hi Vortek,
For Flex 3 you shouldn’t download the CS4 branch (the blog details are a bit out of date due to SVN restructuring since this post was published). You need to get the source from svn->trunk->as3->trunk. You should find that this includes the src directory and that it compiles without the need to delete any folders… glad you managed to get it compiled anyway!
Thanks for the tut, worked more or less the same in FlexBuilder 3.
Really nice to have SVN integrated directly in FlexBuilder ;-)