Creating Inline Objects

on this page: creating | putting an inline back into the scene | changing the URL | bounding box fields

Use inline objects to break a large file into smaller pieces that can be downloaded separately. An inline object contains the URL for another file, either on the local system or anywhere else on the Web. Some browsers display bounding boxes for inline objects until the complete inline file is loaded. This technique allows users to navigate through a world while they are waiting for all the pieces to load. For complex files, inline objects are an efficient way to manage data for a large number of objects.

Find it: Click the Inline Editor button on the Action palette:

Creating an Inline Object

To create an inline object, follow these steps:

  1. In the main window, select the object that you want to make into an inline object.

  2. In the Inline Editor, click the Convert Master Selection to Inline File button.

  3. The File Selection dialog box appears. Type the complete path and filename for the new inline file. VRML files usually end in the suffix .wrl.

    When you click OK, the selected object is no longer shown in the Outline Editor view of the scene file. Instead, an Inline node is added to the file, with a URL that refers to the inline object. When the scene is displayed, there is no discernible difference between an inline object and any other object in the file, unless you enable the Display Inline as Bounding Box feature. On some browsers, when a large scene is downloaded, inline objects are initially displayed as bounding boxes, since they are fetched separately from the main file.

  4. Check any of the three boxes if desired:

Putting an Inline Object Back into the Scene

To put an inline object back into the scene (so that it's part of the main file again):

  1. In the main window, select the inline object.

  2. In the Inline Editor, click the Fold Inline Back into Scene button.

    The Inline node is removed from the file, and the object or group is reinserted directly into the file.

Changing the URL

You can change the URL for the inline object by clicking the Change URL button to browse the files on your system. The file suffix for VRML files is .wrl.

Bounding Box Fields

If you examine an Inline node using the Outline Editor, you'll see it has two fields relating to the object's bounding box: bboxCenter and bboxSize. Some browsers use these fields to optimize rendering and downloading. These browsers can use the bounding box fields to determine quickly whether the inline objects are in view. If they aren't, the browser doesn't need to fetch the inline file at all. You can specify your own bounding box values using the Outline Editor, or you can allow Cosmo Worlds to fill in the fields for you.

Jump to: