X3D Model Documentation: ObliqueStrategies.x3d

  1  <?xml version="1.0" encoding="UTF-8"?>
  2  <!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 3.3//EN" "https://www.web3d.org/specifications/x3d-3.3.dtd">
  3  <X3D profile='Immersive' version='3.3 xmlns:xsd='http://www.w3.org/2001/XMLSchema-instance' xsd:noNamespaceSchemaLocation='https://www.web3d.org/specifications/x3d-3.3.xsd'>
  4       <head>
  5            <meta name='titlecontent='ObliqueStrategies.x3d'/>
  6            <meta name='descriptioncontent='Text scripting and animation example using Oblique Strategies card set by Brian Eno.'/>
  7            <meta name='creatorcontent='Don Brutzman, John Kelly, Ben Cheng'/>
  8            <meta name='createdcontent='3 November 2013'/>
  9            <meta name='modifiedcontent='14 August 2024'/>
 10            <meta name='referencecontent='oblique.html'/>
 11            <meta name='referencecontent='ObliqueStrategies.txt'/>
 12            <meta name='referencecontent='ObliqueStrategiesScript.js'/>
 13            <meta name='referencecontent='http://music.hyperreal.org/artists/brian_eno/oblique/oblique.html'/>
 14            <meta name='referencecontent='http://www.eno-web.co.uk/obliques.html'/>
 15            <meta name='referencecontent='http://gothpunk.com/haiku-intro.html'/>
 16            <meta name='referencecontent='http://www.rtqe.net/ObliqueStrategies/OSintro.html'/>
 17            <meta name='referencecontent='https://en.wikipedia.org/wiki/Oblique_Strategies'/>
 18            <meta name='subjectcontent='Brian Eno, Oblique Strategies'/>
 19            <meta name='Imagecontent='images/ObliqueStrategiesEntryScreen.png'/>
 20            <meta name='Soundcontent='translate_tts_HelloX3D.mp3'/>
 21            <meta name='Soundcontent='translate_tts_HelloX3D.wav'/>
 22            <meta name=' TODO content=' fix obsolete translation link '/>
 23            <meta name=' TODO content=' multiliingual translation parameter '/>
 24            <meta name='referencecontent='http://stackoverflow.com/questions/9163988/download-mp3-from-google-translate-text-to-speech'/>
 25            <meta name='referencecontent='http://www.greenbot.com/article/2105862/how-to-get-started-with-google-text-to-speech.html'/>
 26            <meta name=' warning content=' under development, scene Sound/AudioClip triggering (or retrieved file format) not working '/>
 27            <meta name=' warning content=' TODO resolve potential error in Script node TextScript: parse problem line 15 " var strategy = []; '/>
 28            <meta name='referencecontent='https://gist.github.com/alotaiba/1728771'/>
 29            <meta name='referencecontent='https://stackoverflow.com/questions/35002003/how-to-use-google-translate-tts-with-the-new-v2-api'/>
 30            <meta name='Soundcontent='https://translate.google.com/translate_tts?ie=UTF-8&client=tw-ob&tl=en&q=Hello+X3D4'/>
 31            <meta name='Soundcontent='translate_tts_HelloX3D4.mp3'/>
 32            <meta name='referencecontent='https://cloud.google.com/translate/docs/basic/translating-text'/>
 33            <meta name='identifiercontent='https://www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/Inspiration/ObliqueStrategies.x3d'/>
 34            <meta name='generatorcontent='X3D-Edit 4.0, https://savage.nps.edu/X3D-Edit'/>
 35            <meta name='licensecontent='../license.html'/>
 36       </head>
<!--

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

<!-- to top Index for DEF nodes: CardSoundSpatialization, CardText, CardTransform, HeadlineClickSurface, InterfaceAppearance, MessageFont, NextTextClickedSensor, PreviousTextClickedSensor, RandomTextClickedSensor, TextScript, TextToSpeechAnchor, TextToSpeechAudioClip, TransparentClickSurface
-->
 37       <Scene>
 38            <WorldInfo title='ObliqueStrategies.x3d'/>
 39            <NavigationInfo type='"NONE"'/>
 40            <Background skyColor='0.419608 0.427451 1'/>
 41            <Transform scale='0.4 0.4 0.4translation='0 1 0'>
 42 
               <!-- TouchSensor RandomTextClickedSensor is a DEF node that has 1 USE node: USE_1
               <!-- ROUTE information for RandomTextClickedSensor node:  [from isActive to TextScript.selectRandomCard ] -->
               <TouchSensor DEF='RandomTextClickedSensordescription='Select to see a new strategy'/>
 43                 <Shape>
 44                      <Text string='"Oblique Strategies" "" "(Over One Hundred Worthwhile Dilemmas)" "" "by Brian Eno and Peter Schmidt"'>
 45 
                         <!-- FontStyle MessageFont is a DEF node that has 4 USE nodes: USE_1, USE_2, USE_3, USE_4 -->
                         <FontStyle DEF='MessageFontfamily='"SANS"justify='"MIDDLE" "MIDDLE"style='BOLD'/>
 46                      </Text>
 47                      <Appearance>
 48                           <Material diffuseColor='1 1 1'/>
 49                      </Appearance>
 50                 </Shape>
 51                 <Transform scale='10 3 1'>
 52                      <Shape DEF='HeadlineClickSurface'>
 53                           <IndexedFaceSet solid='falsecoordIndex='0 1 2 3 -1'>
 54                                <Coordinate point='1 1 0 1 -1 0 -1 -1 0 -1 1 0'/>
 55                           </IndexedFaceSet>
 56                           <Appearance>
 57                                <Material ambientIntensity='0.245763diffuseColor='0.34773 0.090909 0.005289shininess='0.07specularColor='0.336735 0.051091 0.051091transparency='0.8'/>
 58                           </Appearance>
 59                      </Shape>
 60                 </Transform>
 61            </Transform>
 62 
 63                 <!-- initialize() method includes unit test to printAllStrategies() to console -->
 64                 <!-- TODO insert field definitions here (index string_changed previous next random) and then animate! -->
 65                 <field name='indextype='SFInt32value='0accessType='initializeOnly'
                appinfo='index for active strategy card, -1 means no selection'/>
 66                 <field name='string_changedtype='MFStringaccessType='outputOnly'
                appinfo='latest strategy card value'/>
 67                 <field name='textToSpeechUrltype='MFStringaccessType='outputOnly'
                appinfo='"url to invoke Google Translate"'/>
 68                 <field name='newCardTimetype='SFTimeaccessType='outputOnly'
                appinfo='activate Sound node'/>
 69                 <field name='selectPreviousCardtype='SFBoolaccessType='inputOnly'/>
 70                 <field name='selectNextCardtype='SFBoolaccessType='inputOnly'/>
 71                 <field name='selectRandomCardtype='SFBoolaccessType='inputOnly'/>
 72                 <field name='traceEnabledtype='SFBoolvalue='trueaccessType='initializeOnly'
                appinfo='controls console tracing'/>
 73            </Script>
 74            <Transform DEF='CardTransformscale='0.4 0.4 0.4translation='0 -1.5 0'>
 75                 <Shape>
 76 
                    <!-- ROUTE information for CardText node:  [from TextScript.string_changed to string ] -->
                    <Text DEF='CardText'>
 77                           <FontStyle family='"SANS"justify='"MIDDLE" "MIDDLE"style='BOLD'/>
 78                      </Text>
 79                      <Appearance>
 80                           <Material diffuseColor='1 1 1'/>
 81                      </Appearance>
 82                 </Shape>
 83                 < ROUTE  fromNode='TextScript' fromField='string_changed' toNode='CardText' toField='string'/>
 84                 <Sound DEF='CardSoundSpatializationmaxBack='100maxFront='100minBack='20minFront='20'>
 85                      <!-- Make sure the sound source AudioClip is audible at the user location -->
 86                      <!-- Not all X3D players seem to use the .mp3 -->
 87                      <!-- &#38; is ampersand character, avoids escaping problems and inconsistencies in browsers and X3D players -->
 88                      <!-- %20 is space character used in uri/url encoding -->
 89 
 90                 </Sound>
 91                 < ROUTE  fromNode='TextScript' fromField='textToSpeechUrl' toNode='TextToSpeechAudioClip' toField='url'/>
 92                 < ROUTE  fromNode='TextScript' fromField='newCardTime' toNode='TextToSpeechAudioClip' toField='startTime'/>
 93            </Transform>
 94            <Transform scale='0.4 0.4 0.4translation='-3.2 2.5 0'>
 95 
               <!-- ROUTE information for PreviousTextClickedSensor node:  [from isActive to TextScript.selectPreviousCard ] -->
               <TouchSensor DEF='PreviousTextClickedSensordescription='Select to see previous strategy'/>
 96                 < ROUTE  fromNode='PreviousTextClickedSensor' fromField='isActive' toNode='TextScript' toField='selectPreviousCard'/>
 97                 <Shape>
 98                      <Text string='"previous"'>
 99                           <FontStyle USE='MessageFont'/>
100                      </Text>
101 
                    <!-- Appearance InterfaceAppearance is a DEF node that has 3 USE nodes: USE_1, USE_2, USE_3 -->
                    <Appearance DEF='InterfaceAppearance'>
102                           <Material diffuseColor='1 0 0.6'/>
103                      </Appearance>
104                 </Shape>
105                 <Transform scale='2 0.6 1'>
106 
                    <!-- Shape TransparentClickSurface is a DEF node that has 3 USE nodes: USE_1, USE_2, USE_3 -->
                    <Shape DEF='TransparentClickSurface'>
107                           <!-- support Selectable Text with a scalable IFS -->
108                           <IndexedFaceSet solid='falsecoordIndex='0 1 2 3 -1'>
109                                <Coordinate point='1 1 0 1 -1 0 -1 -1 0 -1 1 0'/>
110                           </IndexedFaceSet>
111                           <Appearance>
112                                <Material transparency='1'/>
113                           </Appearance>
114                      </Shape>
115                 </Transform>
116            </Transform>
117            <Transform scale='0.4 0.4 0.4translation='3.5 2.5 0'>
118 
               <!-- ROUTE information for NextTextClickedSensor node:  [from isActive to TextScript.selectNextCard ] -->
               <TouchSensor DEF='NextTextClickedSensordescription='Select to see next strategy'/>
119                 < ROUTE  fromNode='NextTextClickedSensor' fromField='isActive' toNode='TextScript' toField='selectNextCard'/>
120                 <Shape>
121                      <Text string='"next"'>
122                           <FontStyle USE='MessageFont'/>
123                      </Text>
124                      <Appearance USE='InterfaceAppearance'/>
125                 </Shape>
126                 <Transform scale='1.2 0.6 1'>
127                      <Shape USE='TransparentClickSurface'/>
128                 </Transform>
129            </Transform>
130            <Transform scale='0.4 0.4 0.4translation='-3.3 -0.5 0'>
131                 <TouchSensor USE='RandomTextClickedSensor'/>
132                 < ROUTE  fromNode='RandomTextClickedSensor' fromField='isActive' toNode='TextScript' toField='selectRandomCard'/>
133                 <Shape>
134                      <Text string='"random"'>
135                           <FontStyle USE='MessageFont'/>
136                      </Text>
137                      <Appearance USE='InterfaceAppearance'/>
138                 </Shape>
139                 <Transform scale='1.8 0.6 1'>
140                      <Shape USE='TransparentClickSurface'/>
141                 </Transform>
142            </Transform>
143            <Transform scale='0.4 0.4 0.4translation='3.3 -0.5 0'>
144 
               <!-- ROUTE information for TextToSpeechAnchor node:  [from TextScript.textToSpeechUrl to url ] -->
               <Anchor DEF='TextToSpeechAnchordescription='text to speech in browserparameter='"target=_blank"'   url=' "http://translate.google.com/translate_tts?tl=en&amp;q=Overtly%20resist%20change" '>
145                      < ROUTE  fromNode='TextScript' fromField='textToSpeechUrl' toNode='TextToSpeechAnchor' toField='url'/>
146                      <Shape>
147                           <Text string='"speech"'>
148                                <FontStyle USE='MessageFont'/>
149                           </Text>
150                           <Appearance USE='InterfaceAppearance'/>
151                      </Shape>
152                      <Transform scale='1.8 0.6 1'>
153                           <Shape USE='TransparentClickSurface'/>
154                      </Transform>
155                 </Anchor>
156            </Transform>
157       </Scene>
158  </X3D>
<!--

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

<!-- to top Index for DEF nodes: CardSoundSpatialization, CardText, CardTransform, HeadlineClickSurface, InterfaceAppearance, MessageFont, NextTextClickedSensor, PreviousTextClickedSensor, RandomTextClickedSensor, TextScript, TextToSpeechAnchor, TextToSpeechAudioClip, TransparentClickSurface
-->
X3D Tooltips element index: Anchor, Appearance, AudioClip, Background, Coordinate, field, FontStyle, head, IndexedFaceSet, Material, meta, NavigationInfo, ROUTE, Scene, Script, Shape, Sound, Text, TouchSensor, Transform, WorldInfo, X3D, accessType and type, XML data types, field types

Event Graph ROUTE Table entries with 7 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.

NextTextClickedSensor
TouchSensor
isActive
SFBool

ROUTE
event to
(1)
TextScript
Script
selectNextCard
SFBool
then
 
 
 
TextScript
Script
newCardTime
SFTime

ROUTE
event to
(2)
TextToSpeechAudioClip
AudioClip
startTime
SFTime
  then
 
 
 
TextScript
Script
string_changed
MFString

ROUTE
event to
(2)
CardText
Text
string
MFString
  then
 
 
 
TextScript
Script
textToSpeechUrl
MFString

ROUTE
event to
(2)
TextToSpeechAudioClip
AudioClip
url
MFString
  then
 
 
 
TextScript
Script
textToSpeechUrl
MFString

ROUTE
event to
(2)
TextToSpeechAnchor
Anchor
url
MFString

PreviousTextClickedSensor
TouchSensor
isActive
SFBool

ROUTE
event to
(1)
TextScript
Script
selectPreviousCard
SFBool
then
 
 
 
TextScript
Script
newCardTime
SFTime

ROUTE
event to
(2)
TextToSpeechAudioClip
AudioClip
startTime
SFTime
  then
 
 
 
TextScript
Script
string_changed
MFString

ROUTE
event to
(2)
CardText
Text
string
MFString
  then
 
 
 
TextScript
Script
textToSpeechUrl
MFString

ROUTE
event to
(2)
TextToSpeechAudioClip
AudioClip
url
MFString
  then
 
 
 
TextScript
Script
textToSpeechUrl
MFString

ROUTE
event to
(2)
TextToSpeechAnchor
Anchor
url
MFString

RandomTextClickedSensor
TouchSensor
isActive
SFBool

ROUTE
event to
(1)
TextScript
Script
selectRandomCard
SFBool
then
 
 
 
TextScript
Script
newCardTime
SFTime

ROUTE
event to
(2)
TextToSpeechAudioClip
AudioClip
startTime
SFTime
  then
 
 
 
TextScript
Script
string_changed
MFString

ROUTE
event to
(2)
CardText
Text
string
MFString
  then
 
 
 
TextScript
Script
textToSpeechUrl
MFString

ROUTE
event to
(2)
TextToSpeechAudioClip
AudioClip
url
MFString
  then
 
 
 
TextScript
Script
textToSpeechUrl
MFString

ROUTE
event to
(2)
TextToSpeechAnchor
Anchor
url
MFString

      TextToSpeechAnchor
Anchor
description='text to speech in browser' 
User-interaction hint for this node. 
Additional guidance on X3D animation can be found in the 10-Step Animation Design Process and Event Tracing hint sheets. Have fun with X3D! 😀

-->
<!-- Online at
https://www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/Inspiration/ObliqueStrategiesIndex.html -->
<!-- Version control at
https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/Inspiration/ObliqueStrategies.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)
-->

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