-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathExample3.x3d
33 lines (32 loc) · 1.26 KB
/
Example3.x3d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 3.2//EN" "http://www.web3d.org/specifications/x3d-3.2.dtd">
<X3D profile="Immersive" version="3.2">
<Scene>
<ProtoDeclare name='testbox'>
<ProtoInterface>
<field name='translation' type='SFVec3f' accessType='inputOutput'></field>
</ProtoInterface>
<ProtoBody>
<Group>
<Transform DEF="box1">
<IS>
<connect nodeField="translation" protoField="translation"></connect>
</IS>
<Shape>
<Box size="1 1 1"></Box>
<Appearance>
<Material diffuseColor="0 1 0"></Material>
</Appearance>
</Shape>
</Transform>
</Group>
<Group>
<TimeSensor DEF="Timer" cycleInterval="5" loop="true"></TimeSensor>
<PositionInterpolator DEF="PI" key="0 0.25 0.5 0.75 1" keyValue="0 0 0, 0.5 0 0, 0 0 0, -0.5 0 0, 0 0 0"></PositionInterpolator>
<ROUTE fromNode="Timer" fromField="fraction_changed" toNode="PI" toField="set_fraction"></ROUTE>
<ROUTE fromNode="PI" fromField="value_changed" toNode="box1" toField="set_translation"></ROUTE>
</Group>
</ProtoBody>
</ProtoDeclare>
</Scene>
</X3D>