I apologize for taking so long to give you an update on the status of the SVG library. I’ve been busy working on a last minute project 2,500 miles away from home and hearth for the previous three months.
The new library provides a major code cleanup and a slew of new features. Rick Masters and Brad Neuberg have made some huge leaps since I dropped off the face of the earth. Their work can be found in the sgweb Google project.
A few people have been asking about the status of the SVG Viewer project so I thought I would write a brief update.
I am in the process of merging my project with two sister projects by Richard R. Masters and Brad Neuberg. The new library will supply three component types: Flex, Flash, and Web.
This movie requires Flash Player 9
The engine uses an SVG file to generate 3D objects on the fly.
I am using Papervision3D and APE for 3D and physics.
The environment builder looks for three layers/groups in the root of the SVG. Each of the children of the layers is used to render different types of objects.
- The ‘ground’ layer is used to render the ground.
- The ‘items’ layer is used to render two dimensional objects on a plane.
- The ‘items3D’ layer is used to render three dimensional objects on two plane rotated 90 degrees from each other.
Items are rotated 90 degrees from the ground along their bottom edge.
I have created a code repository for the ThreeDee Papervision3D extension.
svn co https://iciifs.com/svn/ThreeDee
Graphics3D now supports profile rotation around the z-axis.
Simply draw a curve using the normal Graphics commands.
Then call endFillSpin(degrees:Number = 360, steps:uint = 20) to create on object based on the rotated curve.
[View Source Code]
I have implemented surface extrusion along the z-axis for Graphics3D.
Graphics3D.depth defines the size and direction of the extrusion.
[View Source Code]
Delaunay triangulation breaks a shape consisting of a set of points into triangles. We can then use those triangles to create a mesh in Papervision3D.
Hole detection is implemented by creating polygons that define each set of edges. Each triangle’s mid point is then check to see if it falls inside or outside of a shape. If it is in a shape, we also check that it is not in a hole represented by a sub polygon.
[View Source Code]
Papervisoin3D’s 3D text is nice, but the font choices are limited unless you want to take the time to implement your own Font3D files. I’ve been working with font parsing for the last month for another project and thought why not create a font parser for Papervision3D?
There have been a number of requests to post the SvgViewer project on Google code.
So, here it is: http://code.google.com/p/svg-viewer/
My goal is to keep the repo at Google as stable as possible. Day to day changes will still be made in the old repository.
Update: Text in Flash 10 seems to be disappearing. Will need to investigate…
Update #2: Text with individual character placement was not being handled. This was causing it to be pushed off screen. Text should now display properly. I don’t know why it worked in Flash 9.
I was curious how hard it would be to render an existing PDF file inside of Flash. Turns out it’s a pain in the ass.
I’ve been working on this off and on over the last couple of months. Best results are achieved with older version PDF files. It is no where near being close to rendering the newest PDF feature set.
Support for text-weight and text-anchor tags in text/tspan nodes are now supported.
<text text-anchor="middle" font-weight="bold" ...>
Basic support for HTML links has been added. HTML links monitor their parent node for mouse clicks.
<a xlink:href="http://zavoo.com" target="_blank"...
<a xlink:href="http://labs.zavoo.com" target="_self"...
svn co https://iciifs.com/svn/SvgViewer SvgViewer