~holger-seelig/cobweb.js/trunk

« back to all changes in this revision

Viewing changes to tests/Components/PointingDeviceSensor/LineSensor.x3d

  • Committer: Holger Seelig
  • Date: 2017-08-22 04:53:24 UTC
  • Revision ID: holger.seelig@yahoo.de-20170822045324-4of4xxgt79669gbt
Switched to npm.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?xml version="1.0" encoding="UTF-8"?>
 
2
<!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 3.3//EN" "http://www.web3d.org/specifications/x3d-3.3.dtd">
 
3
<X3D profile='Full' version='3.3' xmlns:xsd='http://www.w3.org/2001/XMLSchema-instance' xsd:noNamespaceSchemaLocation='http://www.web3d.org/specifications/x3d-3.3.xsd'>
 
4
  <head>
 
5
    <meta name='comment' content='World of Titania'/>
 
6
    <meta name='created' content='Fri, 10 Apr 2015 06:06:29 GMT'/>
 
7
    <meta name='creator' content='Holger Seelig'/>
 
8
    <meta name='generator' content='Titania V1.1.0, http://titania.create3000.de'/>
 
9
    <meta name='modified' content='Wed, 09 Sep 2015 09:06:33 GMT'/>
 
10
    <meta name='title' content='LineSensor'/>
 
11
  </head>
 
12
  <Scene>
 
13
    <Viewpoint
 
14
        description='Home'
 
15
        position='3.65536 268.285 2.69857'
 
16
        orientation='-0.57735 0.57735 0.577351 2.09439'/>
 
17
    <Transform
 
18
        translation='3.65468 0.0348776 2.6975'
 
19
        rotation='-0.57735 0.57735 0.577351 2.09439'
 
20
        scale='26.825 26.8249 26.825'
 
21
        scaleOrientation='0.0459123 -0.998773 0.01854 0.72878'>
 
22
      <Viewpoint
 
23
          description='Front'/>
 
24
      <Viewpoint
 
25
          description='Back'
 
26
          position='0 0 -10'
 
27
          orientation='0 1 0 3.14159'/>
 
28
      <Viewpoint
 
29
          description='Left'
 
30
          position='-10 0 0'
 
31
          orientation='-0 -1 -0 1.5708'/>
 
32
      <Viewpoint
 
33
          description='Right'
 
34
          position='10 0 0'
 
35
          orientation='0 1 0 1.5708'/>
 
36
      <PlaneSensor DEF='Touch1'
 
37
          axisRotation='0 0 1 0.785398'
 
38
          offset='-0.0675507 -0.0675507 0'
 
39
          maxPosition='-1 0'/>
 
40
      <Transform DEF='Button1'
 
41
          translation='-0.0675507 -0.0675507 0'>
 
42
        <Transform DEF='Shape1'>
 
43
          <Transform
 
44
              translation='0 1 0'>
 
45
            <Shape>
 
46
              <Text
 
47
                  string='"1"'>
 
48
                <FontStyle
 
49
                    justify='"MIDDLE"'/>
 
50
              </Text>
 
51
            </Shape>
 
52
          </Transform>
 
53
          <Transform DEF='Cube'
 
54
              scale='0.5 0.5 0.5'>
 
55
            <Shape>
 
56
              <Appearance>
 
57
                <Material
 
58
                    transparency='0.5'/>
 
59
              </Appearance>
 
60
              <Box/>
 
61
            </Shape>
 
62
          </Transform>
 
63
        </Transform>
 
64
      </Transform>
 
65
      <Transform DEF='Line'
 
66
          rotation='0 0 1 0.785398'>
 
67
        <Shape>
 
68
          <IndexedLineSet
 
69
              coordIndex='0, 1, -1'>
 
70
            <Coordinate
 
71
                point='-2000 0 0, 2000 0 0'/>
 
72
          </IndexedLineSet>
 
73
        </Shape>
 
74
      </Transform>
 
75
      <Transform DEF='TrackPoint'
 
76
          translation='0.187073 0.187073 0'>
 
77
        <Shape>
 
78
          <Appearance>
 
79
            <LineProperties
 
80
                linewidthScaleFactor='5'/>
 
81
            <Material
 
82
                emissiveColor='1 0 0'/>
 
83
          </Appearance>
 
84
          <PointSet>
 
85
            <Coordinate
 
86
                point='0 0 0'/>
 
87
          </PointSet>
 
88
        </Shape>
 
89
        <Shape>
 
90
          <Appearance>
 
91
            <Material DEF='Rococo12_1'
 
92
                ambientIntensity='0.226102'
 
93
                diffuseColor='0.904409 0.146366 0.208768'
 
94
                specularColor='0.0955906 0.0955906 0.0955906'
 
95
                shininess='0.078125'/>
 
96
          </Appearance>
 
97
          <Sphere
 
98
              radius='0.1'/>
 
99
        </Shape>
 
100
      </Transform>
 
101
    </Transform>
 
102
    <Script DEF='Debug'>
 
103
      <field accessType='inputOnly' type='SFVec3f' name='set_trackPoint1'/>
 
104
      <field accessType='inputOnly' type='SFBool' name='set_isOver1'/>
 
105
      <field accessType='inputOnly' type='SFBool' name='set_isActive1'/>
 
106
<![CDATA[vrmlscript:
 
107
function set_trackPoint1 (value)
 
108
{
 
109
        print ('Touch 1 trackPoint: ' + value);
 
110
}
 
111
 
 
112
function set_isOver1 (value)
 
113
{
 
114
        print ('Touch 1 isOver: ' + value);
 
115
}
 
116
 
 
117
function set_isActive1 (value)
 
118
{
 
119
        print ('Touch 1 isActive: ' + value);
 
120
}
 
121
]]> 
 
122
    </Script>
 
123
    <Transform DEF='Sphere_1'
 
124
        scale='3.04509 3.04509 3.04509'>
 
125
      <Shape>
 
126
        <Appearance>
 
127
          <Material/>
 
128
        </Appearance>
 
129
        <Sphere/>
 
130
      </Shape>
 
131
    </Transform>
 
132
    <ROUTE fromNode='Touch1' fromField='trackPoint_changed' toNode='TrackPoint' toField='set_translation'/>
 
133
    <ROUTE fromNode='Line' fromField='rotation_changed' toNode='Touch1' toField='set_axisRotation'/>
 
134
    <ROUTE fromNode='Line' fromField='rotation_changed' toNode='Cube' toField='set_rotation'/>
 
135
    <ROUTE fromNode='Touch1' fromField='trackPoint_changed' toNode='Debug' toField='set_trackPoint1'/>
 
136
    <ROUTE fromNode='Touch1' fromField='isOver' toNode='Debug' toField='set_isOver1'/>
 
137
    <ROUTE fromNode='Touch1' fromField='isActive' toNode='Debug' toField='set_isActive1'/>
 
138
    <ROUTE fromNode='Touch1' fromField='translation_changed' toNode='Button1' toField='set_translation'/>
 
139
  </Scene>
 
140
</X3D>