home *** CD-ROM | disk | FTP | other *** search
Text File | 2001-02-27 | 863 b | 47 lines | [AMAS/AMAP] |
- // -* ShowBehavior.js *-
- //
- // Name: Show behavior
- // Description:
- // Author:
- // Version: $Id: ShowBehavior.js,v 1.3 2001/02/27 11:43:00 consumer Exp $
- //
-
- function ShowBehavior()
- {
- // No need for an object with this behavior.
- }
-
- function ShowBehaviorStart(solidName, geom)
- {
- // Member variables of the behavior
- this.solidName = solidName;
- this.geom = geom;
-
- TSUpdateNodeAttribute(geom, 'visible', '1');
- }
-
- function ShowBehaviorStop()
- {
- TSUpdateNodeAttribute(this.geom, 'visible', '0');
- }
-
- //
- // Event functions
- //
-
- function ShowBehaviorStartEvent(obj, event)
- {
- var geom = TSGetExtraParam(event, 'geom');
- var targetSolid = TSGetExtraParam(event, 'targetSolid');
-
- if (targetSolid == "")
- ShowBehaviorStart(obj, geom);
- else
- ShowBehaviorStart(targetSolid, geom);
- }
-
- function ShowBehaviorStopEvent(obj, event)
- {
- ShowBehaviorStop() ;
- }
-