~holger-seelig/cobweb.js/trunk

« back to all changes in this revision

Viewing changes to cobweb.js/tests/Components/PointingDeviceSensor/SphereSensor.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, 17 Apr 2015 08:10:57 GMT'/>
7
 
    <meta name='creator' content='Holger Seelig'/>
8
 
    <meta name='generator' content='Titania V0.7.8, http://titania.create3000.de'/>
9
 
    <meta name='modified' content='Fri, 17 Apr 2015 08:21:44 GMT'/>
10
 
    <meta name='title' content='SphereSensor'/>
11
 
  </head>
12
 
  <Scene>
13
 
    <Viewpoint DEF='_1'
14
 
        description='Outer'
15
 
        position='89.14 34.0901 210.317'
16
 
        orientation='-0.355311 0.932102 0.0702855 0.418242'
17
 
        centerOfRotation='3.65466 0.0348644 2.69749'/>
18
 
    <Transform
19
 
        translation='3.65468 0.0348776 2.6975'
20
 
        rotation='-0.57735 0.57735 0.577351 2.09439'
21
 
        scale='26.825 26.8249 26.825'
22
 
        scaleOrientation='0.0571682 -0.998131 0.0216096 0.787943'>
23
 
      <Viewpoint
24
 
          description='Front'
25
 
          position='0 0 8'/>
26
 
      <Viewpoint
27
 
          description='Back'
28
 
          position='0 0 -8'
29
 
          orientation='0 1 0 3.14159'/>
30
 
      <Viewpoint
31
 
          description='Left'
32
 
          position='-8 0 0'
33
 
          orientation='-0 -1 -0 1.5708'/>
34
 
      <Viewpoint
35
 
          description='Right'
36
 
          position='8 0 0'
37
 
          orientation='0 1 0 1.5708'/>
38
 
      <Viewpoint
39
 
          description='Top'
40
 
          position='0 8 0'
41
 
          orientation='-1 -0 -0 1.5708'/>
42
 
      <Viewpoint
43
 
          description='Bottom'
44
 
          position='0 -8 0'
45
 
          orientation='1 0 0 1.5708'/>
46
 
      <Transform DEF='Button1'>
47
 
        <SphereSensor DEF='Touch1'
48
 
            offset='0.165918 -0.953924 0.250001 1.49429'/>
49
 
        <Transform DEF='Shape1'
50
 
            rotation='0.165918 -0.953924 0.250001 1.49429'>
51
 
          <Transform DEF='_2'
52
 
              translation='2 0 0'>
53
 
            <Shape>
54
 
              <Appearance>
55
 
                <ImageTexture
56
 
                    url='"../images/image.png"'/>
57
 
              </Appearance>
58
 
              <Sphere/>
59
 
            </Shape>
60
 
          </Transform>
61
 
        </Transform>
62
 
        <Transform DEF='TrackPoint'
63
 
            translation='0.090672 0.252601 2.96274'
64
 
            scaleOrientation='-0.357407 0.862856 -0.357407 4.51948'>
65
 
          <Shape>
66
 
            <Appearance>
67
 
              <LineProperties
68
 
                  linewidthScaleFactor='5'/>
69
 
            </Appearance>
70
 
            <PointSet>
71
 
              <Coordinate
72
 
                  point='0 0 0'/>
73
 
            </PointSet>
74
 
          </Shape>
75
 
        </Transform>
76
 
      </Transform>
77
 
    </Transform>
78
 
    <Script DEF='Debug'>
79
 
      <field accessType='inputOnly' type='SFVec3f' name='set_trackPoint1'/>
80
 
      <field accessType='inputOnly' type='SFBool' name='set_isOver1'/>
81
 
      <field accessType='inputOnly' type='SFBool' name='set_isActive1'/>
82
 
<![CDATA[vrmlscript:
83
 
function set_trackPoint1 (value)
84
 
{
85
 
        print ('Touch 1 trackPoint: ' + value);
86
 
}
87
 
 
88
 
function set_isOver1 (value)
89
 
{
90
 
        print ('Touch 1 isOver: ' + value);
91
 
}
92
 
 
93
 
function set_isActive1 (value)
94
 
{
95
 
        print ('Touch 1 isActive: ' + value);
96
 
}
97
 
]]> 
98
 
    </Script>
99
 
    <ROUTE fromNode='Touch1' fromField='trackPoint_changed' toNode='TrackPoint' toField='set_translation'/>
100
 
    <ROUTE fromNode='Touch1' fromField='isOver' toNode='Debug' toField='set_isOver1'/>
101
 
    <ROUTE fromNode='Touch1' fromField='isActive' toNode='Debug' toField='set_isActive1'/>
102
 
    <ROUTE fromNode='Touch1' fromField='trackPoint_changed' toNode='Debug' toField='set_trackPoint1'/>
103
 
    <ROUTE fromNode='Touch1' fromField='rotation_changed' toNode='Shape1' toField='set_rotation'/>
104
 
  </Scene>
105
 
</X3D>