X3D Model Documentation: LoadSensorExample.x3d

  1  <?xml version="1.0" encoding="UTF-8"?>
  2 
<!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 3.0//EN" "https://www.web3d.org/specifications/x3d-3.0.dtd">
  3  <X3D profile='Immersive' version='3.0 xmlns:xsd='http://www.w3.org/2001/XMLSchema-instance' xsd:noNamespaceSchemaLocation='https://www.web3d.org/specifications/x3d-3.0.xsd'>
  4       <head>
  5            <meta name='titlecontent='LoadSensorExample.x3d'/>
  6            <meta name='descriptioncontent='LoadSensor test: default initial view means no functionality, active view means load in progress, final view means LoadSensor (and loading) success.'/>
  7            <meta name='createdcontent='16 August 2002'/>
  8            <meta name='modifiedcontent='20 October 2019'/>
  9            <meta name='creatorcontent='Don Brutzman, Alan Hudson'/>
 10            <meta name=' warning content=' LoadSensor only supported by X3D-compliant browsers. LoadSensor is not implemented in VRML 97. '/>
 11            <meta name='identifiercontent='https://www.web3d.org/x3d/content/examples/Basic/development/LoadSensorExample.x3d'/>
 12            <meta name='generatorcontent='X3D-Edit 3.3, https://savage.nps.edu/X3D-Edit'/>
 13            <meta name='licensecontent='../license.html'/>
 14       </head>
<!--

<!-- Event Graph ROUTE Table shows event connections. -->

<!-- to top Index for DEF nodes: ActiveView, EarthImage, Font, JavaBoardImage, LoadedView, Loader, NotLoadedView

Index for Viewpoint nodes: ActiveView, LoadedView, NotLoadedView

Index for ExternProtoDeclare definition: LoadSensor
-->
 15       <Scene>
 16            <!-- Do not copy this ExternProtoDeclare, it is used for providing automatic support in X3dToVrml97.xslt and X3D-Edit -->
 17            <WorldInfo title='LoadSensorExample.x3d'/>
 18            <ExternProtoDeclare name='LoadSensorappinfo='LoadSensor monitors the progress and success of downloading URL elements over a network. Only nodes that contain a valid URL field (i.e. descendants of X3DUrlObject) may be specified as watchList children. Multiple nodes may be watched with a single LoadSensor.' documentation='https://www.web3d.org/specifications/ISO-IEC-19775/Part01/components/networking.html#LoadSensor'   url=' "LoadSensorPrototype.wrl#LoadSensor" "https://www.web3d.org/x3d/content/examples/Basic/development/LoadSensorPrototype.wrl#LoadSensor" "LoadSensorPrototype.x3d#LoadSensor" "https://www.web3d.org/x3d/content/examples/Basic/development/LoadSensorPrototype.x3d#LoadSensor" '>
 19                 <field name='enabledtype='SFBoolaccessType='inputOutput'/>
 20                 <field name='timeOuttype='SFTimeaccessType='inputOutput'/>
 21                 <field name='watchListtype='MFNodeaccessType='initializeOnly'/>
 22                 <field name='set_watchListtype='MFNodeaccessType='inputOnly'/>
 23                 <field name='isActivetype='SFBoolaccessType='outputOnly'/>
 24                 <field name='isLoadedtype='SFBoolaccessType='outputOnly'/>
 25                 <field name='loadTimetype='SFTimeaccessType='outputOnly'/>
 26                 <field name='progresstype='SFFloataccessType='outputOnly'/>
 27                 <field name='metadatatype='SFNodeaccessType='initializeOnly'/>
 28            </ExternProtoDeclare>
 29            <Group>
 30                 <Viewpoint DEF='NotLoadedViewdescription='Not loaded textureposition='0 0 6'/>
 31 
               <!-- ROUTE information for ActiveView node:  [from Loader.isActive to set_bind ] -->
               <Viewpoint DEF='ActiveViewdescription='Loading textures'/>
 32 
               <!-- ROUTE information for LoadedView node:  [from Loader.isLoaded to set_bind ] -->
               <Viewpoint DEF='LoadedViewdescription='Texture loading completeorientation='0 1 0 3.14159position='0 0 -10'/>
 33                 <Group>
 34                      <Transform translation='-1 0 0'>
 35                           <Shape>
 36                                <Sphere/>
 37                                <Appearance>
 38 
                                   <!-- ImageTexture EarthImage is a DEF node that has 1 USE node: USE_1 -->
                                   <ImageTexture DEF='EarthImage'   url=' "earth-topo.png " "earth-topo-small.gif " "https://www.web3d.org/x3d/content/examples/Basic/earth-topo.png " "https://www.web3d.org/x3d/content/examples/Basic/earth-topo-small.gif " '/>
 39                                </Appearance>
 40                           </Shape>
 41                      </Transform>
 42                      <Transform translation='1 0 0'>
 43                           <Shape>
 44                                <Box/>
 45                                <Appearance>
 46 
                                   <!-- ImageTexture JavaBoardImage is a DEF node that has 1 USE node: USE_1 -->
                                   <ImageTexture DEF='JavaBoardImage'   url=' "JavaBoardSmileForTheCamera.jpg " "https://www.web3d.org/x3d/content/examples/Basic/development/JavaBoardSmileForTheCamera.jpg " '/>
 47                                </Appearance>
 48                           </Shape>
 49                      </Transform>
 50                 </Group>
 51 
               <!-- ROUTE information for Loader node:  [from isActive to ActiveView.set_bind ] [from isLoaded to LoadedView.set_bind ] -->
               <LoadSensor DEF='LoadertimeOut='4'>
 52                      <ImageTexture USE='EarthImagecontainerField='watchList'/>
 53                      <ImageTexture USE='JavaBoardImagecontainerField='watchList'/>
 54                 </LoadSensor>
 55                 < ROUTE  fromNode='Loader' fromField='isActive' toNode='ActiveView' toField='set_bind'/>
 56                 < ROUTE  fromNode='Loader' fromField='isLoaded' toNode='LoadedView' toField='set_bind'/>
 57                 <Transform translation='0 0 7'>
 58                      <Shape>
 59                           <Text string='"LoadSensor active"'>
 60 
                              <!-- FontStyle Font is a DEF node that has 1 USE node: USE_1 -->
                              <FontStyle DEF='Fontjustify='"MIDDLE" "MIDDLE"size='0.5'/>
 61                           </Text>
 62                           <Appearance>
 63                                <Material diffuseColor='0.8 0.5 0.1'/>
 64                           </Appearance>
 65                      </Shape>
 66                 </Transform>
 67                 <Transform rotation='0 1 0 3.14159translation='0 0 -7'>
 68                      <Shape>
 69                           <Text string='"LoadSensor success"'>
 70                                <FontStyle USE='Font'/>
 71                           </Text>
 72                           <Appearance>
 73                                <Material diffuseColor='0.1 0.5 0.1'/>
 74                           </Appearance>
 75                      </Shape>
 76                 </Transform>
 77            </Group>
 78       </Scene>
 79  </X3D>
<!--

<!-- Event Graph ROUTE Table shows event connections. -->

<!-- to top Index for DEF nodes: ActiveView, EarthImage, Font, JavaBoardImage, LoadedView, Loader, NotLoadedView

Index for Viewpoint nodes: ActiveView, LoadedView, NotLoadedView

Index for ExternProtoDeclare definition: LoadSensor
-->
X3D Tooltips element index: Appearance, Box, ExternProtoDeclare, field, FontStyle, Group, head, ImageTexture, LoadSensor, Material, meta, ROUTE, Scene, Shape, Sphere, Text, Transform, Viewpoint, WorldInfo, X3D, accessType and type, XML data types, field types

Event Graph ROUTE Table with 2 ROUTE connections total, showing X3D event-model relationships for this scene.

Each row shows an event cascade that may occur during a single timestamp interval between frame renderings, as part of the X3D execution model.

Loader
LoadSensor
isActive
SFBool

ROUTE
event to
(1)
ActiveView
Viewpoint
set_bind
SFBool
Loader
LoadSensor
isLoaded
SFBool

ROUTE
event to
(1)
LoadedView
Viewpoint
set_bind
SFBool

-->
<!-- Online at
https://www.web3d.org/x3d/content/examples/Basic/development/LoadSensorExampleIndex.html -->
<!-- Version control at
https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/content/examples/Basic/development/LoadSensorExample.x3d -->

<!-- Color legend: X3D terminology <X3dNode DEF='idName' field='value'/> matches XML terminology <XmlElement DEF='idName' attribute='value'/>
(Light-blue background: event-based behavior node or statement) (Grey background inside box: inserted documentation) (Magenta background: X3D Extensibility)
    <ProtoDeclare name='ProtoName'> <field name='fieldName'/> </ProtoDeclare> -->

to top <!-- For additional help information about X3D scenes, please see X3D Tooltips, X3D Resources, and X3D Scene Authoring Hints. -->