The shell object is the root object for the arcticPigs viewer. From here you can access all aspects of the viewer or any other component that is loaded by the arctic shell object. Also this is the object that receives all the events generated by the viewer. With these events you can link 3D events to the browser window using the HTML document object model or you can loop back events into the 3d scene.

The document (or 'doc') object lets you access all methods and properties related to loading files. Files loaded by the viewer are global. If you have several 3D windows in a single web page, all files loaded by all components will be accessible from the document object.

The window object handles all properties related to the rendering area on the screen. Typical properties are the background colour, overriding the automatic 3D detail level etc.

The world object is the most important object. Here you create scripts, add models, lights or even whole choreographies to the 3D world. Here you also control certain aspects of the camera handling. Here you can also create new layers, which are in effect 3D windows within an existing 3D window. The right-click menu makes use of this technique but there is no limit to what you can show within such a sub-layer. It is a fully functional 3D world object in itself, albeit rendered to a subsection of the original window.

You do not directly create the arcticShell object. It is created for you by the browser in response to the <OBJECT> tag found in the HTML of your web page. The example below shows the valid syntax for creating a 400x400 pixels 3D viewing area in your web page.

Example:
The following code snippet is taken from the HTML defining your web page. 

<object 
	align=left
	classid=CLSID:A9DAD15A-365E-494d-9D41-8A0BB80007B0
	codebase="http://www.arcticpigs.com/activeX/mayhem.cab#version=-1,-1,-1,-1"
	height=400
	width=400
	id=arctic>
</object>

You can access the arcticShell object within the <SCRIPT> block through the named
object 'arctic' (this name is defined through the id=arctic  attribute above)


<SCRIPT Language = JScript> 
	arctic.doc.loadModel("./models/zeppelin.model");
	arctic.window.performanceData = true;
</SCRIPT>

Properties, Events and Methods

Name Type Description
onModelLoaded EventThis events fires as soon as a model has completely downloaded
onModelLoaded(modelFile modelfileobject)
onActionLoaded EventThis events fires as soon as an action file has completely downloaded
onActionLoaded(actionFile actionfileobject)
onSoundLoaded EventThis events fires as soon as a sound file has completely downloaded
onSoundLoaded(soundFile soundfileobject)
onChorLoaded EventThis events fires as soon as an chor file has completely downloaded
onChorLoaded(chorFile chorfileobject)
on3dClick EventThis event fires every time you click on some 3D object within the scene.
on3dClick(model modelobject, group groupobject)
on3dMouseOver EventThis event fires every time the cursor first hits a patch belonging to a particular group
on3dMouseOver(model modelobject, group groupobject)
on3dMouseOut EventThis event fires as soon as the cursor is no longer above any patch belonging to a group
on3dMouseOut(model modelobject, group groupobject)
on3dLButtonUp EventThis event fires as soon as the cursor is no longer above any patch belonging to a group
on3dLButtonUp(model modelobject, group groupobject)
on3dLButtonDown EventThis event fires as soon as the left mouse button is released
on3dLButtonDown(model modelobject, group groupobject)
on3dDblClick EventThis event fires as on a double click event on a model or group
on3dDblClick(model modelobject, group groupobject)
onModelDrag EventThis event is continuously fired while a model instance is being dragged in the 3d scene
onModelDrag(model modelobject)
onModelInstanced EventThis event is fired as soon as the model instance has been created within the 3d scene.
onModelInstanced(model modelobject)
onScriptReady EventThis events fires as soon as the script is ready to play
onScriptReady(script scriptobject)
onCreate EventThis events fires as soon as the 3D control is initialised.
onCreate(void)
doc PropertyThis property returns an instance of the arcticDocument class.
window PropertyThis property returns an instance of the arcticWindow class
world PropertyThis property returns an instance of the main arcticLayer class

 

©2000 arcticpigs. All rights reserved.
This is a draft version! The functionality of parts of the software are liable to change.