Packaging a Document or Scene
Find it: File > Package
Before you publish your documents or scenes on the Web, you need to
package them using CosmoPackage. Packaging refers to the process
of locating all the files necessary to create a document, scene, or
world and organizing the files for publication on a server. Publishing
refers to the process of copying the packaged files to a Web server
where they can be accessed by Web clients.
Packaging accomplishes a number of things:
-
It collects all the files needed to make up your
document or world on the Web and copies them into a single directory.
As it copies the files, it converts absolute paths to
relative paths so that the package can be moved to a different location
(for example, a Web server).
-
For VRML files, it writes out a modified version of the VRML
file format so that it conforms to the current VRML
standard. Files saved in Cosmo Worlds can be viewed directly using
Cosmo Player on a system that has Cosmo Worlds installed on it, but the
files need to be packaged before they are published on the Web.
Note: Packaging is a one-way process. It strips authoring
information and optimizes the files. Without this stripped information,
you may not be able to edit embedded images and plug-in applications in
an HTML file or animations in a VRML file. For this reason, if you want
to continue to edit a file, work on the file you originally saved in
Cosmo Create or Cosmo Worlds. Package the file again when you've
finished editing it.
Major Stages
When you select File > Package, the CosmoPackage
utility appears. The three buttons in the lower left corner allow you
to step through each stage of the packaging process:
-
Discover
-
This stage finds all the local files needed to support your documents.
All local URLs referred to in your file (for example, inlines,
textures, sounds, and images) are located and included as part of the
package for this file. Remote files and trusted references are
ignored during this stage.
-
Package
-
This stage copies the files required for your package into a single
staging directory. Absolute paths are changed to relative paths so that
the world can be published on a Web server. During the packaging stage,
CosmoPackage also optimizes VRML files and may rename them (for
example, by adding a .gz or .wrl suffix).
SGI-specific attributes are stripped from HTML files.
-
Preview
-
This stage allows you to view the packaged files so that you can test
links, animations, sensors, scripts, navigation through VRML worlds,
and layout of HTML pages.
-
Be sure to check the icon in the lower-right portion of the
CosmoPackage window. If the package resembles an open box, packaging is
still in progress (you're in the discovery or packaging stage). If the
icon is a closed box with a tied ribbon, packaging is complete, and you
have successfully completed both the discovery and packaging stages.
Note: Remember, just as with any document, you need to save the
package in order for it to be recorded on disk.
CosmoPackage works with files in the following formats:
-
Cosmo Worlds (these files are converted to VRML 2.0 format;
Cosmo Worlds files contain some additional features that are not
strictly part of VRML 2.0)
-
VRML 1.0 and VRML 2.0 (VRML 1.0 files are converted
to VRML 2.0)
-
Inventor (Inventor files are converted to VRML 2.0)
-
Cosmo Create (These files contain some SGI-specific data
that is not part of standard HTML; although most browsers simply ignore
the extra data, the packaging stage removes it.)
-
HTML
Other document types (such as .rgb and .gif image types, Java class
files, and Shockwave plug-in files) are not searched for references to
other local documents, they do not have their references corrected, nor
are they optimized; they are just moved to the packaging directory.
Jump to: