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='title' content='LoadSensorExample.x3d'/> |
6 | <meta name='description' content='LoadSensor test: default initial view means no functionality, active view means load in progress, final view means LoadSensor (and loading) success.'/> |
7 | <meta name='created' content='16 August 2002'/> |
8 | <meta name='modified' content='20 October 2019'/> |
9 | <meta name='creator' content='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='identifier' content='https://www.web3d.org/x3d/content/examples/Basic/development/LoadSensorExample.x3d'/> |
12 | <meta name='generator' content='X3D-Edit 3.3, https://savage.nps.edu/X3D-Edit'/> |
13 | <meta name='license' content='../license.html'/> |
14 | </head> |
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='LoadSensor' appinfo='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='enabled' type='SFBool' accessType='inputOutput'/> |
20 | <field name='timeOut' type='SFTime' accessType='inputOutput'/> |
21 | <field name='watchList' type='MFNode' accessType='initializeOnly'/> |
22 | <field name='set_watchList' type='MFNode' accessType='inputOnly'/> |
23 | <field name='isActive' type='SFBool' accessType='outputOnly'/> |
24 | <field name='isLoaded' type='SFBool' accessType='outputOnly'/> |
25 | <field name='loadTime' type='SFTime' accessType='outputOnly'/> |
26 | <field name='progress' type='SFFloat' accessType='outputOnly'/> |
27 | <field name='metadata' type='SFNode' accessType='initializeOnly'/> |
28 | </ExternProtoDeclare> |
29 | <Group> |
30 | <Viewpoint DEF='NotLoadedView' description='Not loaded texture' position='0 0 6'/> |
31 |
<!-- ROUTE information for ActiveView node:
[from Loader.isActive to set_bind
]
-->
<Viewpoint DEF='ActiveView' description='Loading textures'/> |
32 |
<!-- ROUTE information for LoadedView node:
[from Loader.isLoaded to set_bind
]
-->
<Viewpoint DEF='LoadedView' description='Texture loading complete' orientation='0 1 0 3.14159' position='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='Loader' timeOut='4'> |
52 | <ImageTexture USE='EarthImage' containerField='watchList'/> |
53 | <ImageTexture USE='JavaBoardImage' containerField='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 | |
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.14159' translation='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 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 |
ActiveView
Viewpoint set_bind SFBool |
|
Loader
LoadSensor isLoaded SFBool |
LoadedView
Viewpoint set_bind SFBool |
<!--
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>
-->
<!-- For additional help information about X3D scenes, please see X3D Tooltips, X3D Resources, and X3D Scene Authoring Hints. -->