<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 3.3//EN" "https://www.web3d.org/specifications/x3d-3.3.dtd">
<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 '>
<head>
<meta name='titlecontent='ObliqueStrategies.x3d'/>
<meta name='descriptioncontent='Text scripting and animation example using Oblique Strategies card set by Brian Eno.'/>
<meta name='creatorcontent='Don Brutzman, John Kelly, Ben Cheng'/>
<meta name='createdcontent='3 November 2013'/>
<meta name='modifiedcontent='11 November 2022'/>
<meta name='referencecontent='oblique.html'/>
<meta name='referencecontent='ObliqueStrategies.txt'/>
<meta name='referencecontent='ObliqueStrategiesScript.js'/>
<meta name='referencecontent=' http://music.hyperreal.org/artists/brian_eno/oblique/oblique.html '/>
<meta name='referencecontent=' http://www.eno-web.co.uk/obliques.html '/>
<meta name='referencecontent=' http://gothpunk.com/haiku-intro.html '/>
<meta name='referencecontent=' http://www.rtqe.net/ObliqueStrategies/OSintro.html '/>
<meta name='referencecontent=' https://en.wikipedia.org/wiki/Oblique_Strategies '/>
<meta name='subjectcontent='Brian Eno, Oblique Strategies'/>
<meta name='Imagecontent='images/ObliqueStrategiesEntryScreen.png'/>
<meta name='Soundcontent='translate_tts_HelloX3D.mp3'/>
<meta name='Soundcontent='translate_tts_HelloX3D.wav'/>
<meta name=' TODO content=' multiliingual translation parameter '/>
<meta name='referencecontent=' http://stackoverflow.com/questions/9163988/download-mp3-from-google-translate-text-to-speech '/>
<meta name='referencecontent=' http://www.greenbot.com/article/2105862/how-to-get-started-with-google-text-to-speech.html '/>
<meta name=' warning content=' under development, scene Sound/AudioClip triggering (or retrieved file format) not working '/>
<meta name=' warning content=' TODO resolve potential error in Script node TextScript: parse problem line 15 "
var strategy = [];
'/>

<meta name='referencecontent=' https://gist.github.com/alotaiba/1728771 '/>
<meta name='referencecontent=' https://stackoverflow.com/questions/35002003/how-to-use-google-translate-tts-with-the-new-v2-api '/>
<meta name='Soundcontent=' https://translate.google.com/translate_tts?ie=UTF-8&client=tw-ob&tl=en&q=Hello+X3D4 '/>
<meta name='Soundcontent='translate_tts_HelloX3D4.mp3'/>
<meta name='referencecontent=' https://cloud.google.com/translate/docs/basic/translating-text '/>
<meta name='identifiercontent=' https://x3dgraphics.com/examples/X3dForAdvancedModeling/Inspiration/ObliqueStrategies.x3d '/>
<meta name='generatorcontent='X3D-Edit 4.0, https://savage.nps.edu/X3D-Edit'/>
<meta name='licensecontent=' ../license.html'/>
</head>
<!-- -->
<Scene>
<WorldInfo title='ObliqueStrategies.x3d'/>
<NavigationInfo type='"NONE"'/>
<Background skyColor='0.419608 0.427451 1'/>
<Transform scale='0.4 0.4 0.4translation='0 1 0'>
<!-- ROUTE information for RandomTextClickedSensor node:  [from isActive to TextScript.selectRandomCard ] -->
<TouchSensor DEF='RandomTextClickedSensordescription='Select to see a new strategy'/>
<Shape>
<Text string='"Oblique Strategies" "" "(Over One Hundred Worthwhile Dilemmas)" "" "by Brian Eno and Peter Schmidt"'>
<FontStyle DEF='MessageFontfamily='"SANS"justify='"MIDDLE" "MIDDLE"style='BOLD'/>
</Text>
<Appearance>
<Material diffuseColor='1 1 1'/>
</Appearance>
</Shape>
<Transform scale='10 3 1'>
<Shape DEF='HeadlineClickSurface'>
<IndexedFaceSet solid='falsecoordIndex='0 1 2 3 -1'>
<Coordinate point='1 1 0 1 -1 0 -1 -1 0 -1 1 0'/>
</IndexedFaceSet>
<Appearance>
<Material ambientIntensity='0.245763diffuseColor='0.34773 0.090909 0.005289shininess='0.07specularColor='0.336735 0.051091 0.051091transparency='0.8'/>
</Appearance>
</Shape>
</Transform>
</Transform>
<!-- ROUTE information for TextScript node:  [from PreviousTextClickedSensor.isActive to selectPreviousCard ] [from NextTextClickedSensor.isActive to selectNextCard ] [from RandomTextClickedSensor.isActive to selectRandomCard ] [from string_changed to CardText.string ] [from textToSpeechUrl to TextToSpeechAudioClip.url ] [from newCardTime to TextToSpeechAudioClip.startTime ] [from textToSpeechUrl to TextToSpeechAnchor.url ] -->
<Script DEF='TextScript'
  url=' "ObliqueStrategiesScript.js" "https://x3dgraphics.com/examples/X3dForAdvancedModeling/Inspiration/ObliqueStrategiesScript.js" '>
<!-- initialize() method includes unit test to printAllStrategies() to console -->
<!-- TODO insert field definitions here (index string_changed previous next random) and then animate! -->
<field name='indextype='SFInt32value='0accessType='initializeOnly'
 appinfo='index for active strategy card, -1 means no selection'/>

<field name='string_changedtype='MFStringaccessType='outputOnly'
 appinfo='latest strategy card value'/>

<field name='textToSpeechUrltype='MFStringaccessType='outputOnly'
 appinfo='"url to invoke Google Translate"'/>

<field name='newCardTimetype='SFTimeaccessType='outputOnly'
 appinfo='activate Sound node'/>

<field name='selectPreviousCardtype='SFBoolaccessType='inputOnly'/>
<field name='selectNextCardtype='SFBoolaccessType='inputOnly'/>
<field name='selectRandomCardtype='SFBoolaccessType='inputOnly'/>
<field name='traceEnabledtype='SFBoolvalue='trueaccessType='initializeOnly'
 appinfo='controls console tracing'/>
</Script>
<Transform DEF='CardTransformscale='0.4 0.4 0.4translation='0 -1.5 0'>
<Shape>
<!-- ROUTE information for CardText node:  [from TextScript.string_changed to string ] -->
<Text DEF='CardText'>
<FontStyle family='"SANS"justify='"MIDDLE" "MIDDLE"style='BOLD'/>
</Text>
<Appearance>
<Material diffuseColor='1 1 1'/>
</Appearance>
</Shape>
<ROUTE fromNode='TextScriptfromField='string_changedtoNode='CardTexttoField='string'/>
<Sound DEF='CardSoundSpatializationmaxBack='100maxFront='100minBack='20minFront='20'>
<!-- Make sure the sound source AudioClip is audible at the user location -->
<!-- Not all X3D players seem to use the .mp3 -->
<!-- &#38; is ampersand character, avoids escaping problems and inconsistencies in browsers and X3D players -->
<!-- %20 is space character used in uri/url encoding -->
<!-- ROUTE information for TextToSpeechAudioClip node:  [from TextScript.textToSpeechUrl to url ] [from TextScript.newCardTime to startTime ] -->
<AudioClip DEF='TextToSpeechAudioClipdescription='sends strategy text google translate'
  url=' "http://translate.google.com/translate_tts?tl=en&amp;q=Feed%20the%20recording%20back%20out%20of%20the%20medium" "translate_tts_mp3FileFormatNotSupported.wav" "https://x3dgraphics.com/examples/X3dForAdvancedModeling/Inspiration/translate_tts_mp3FileFormatNotSupported.wav" '/>
</Sound>
<ROUTE fromNode='TextScriptfromField='textToSpeechUrltoNode='TextToSpeechAudioCliptoField='url'/>
<ROUTE fromNode='TextScriptfromField='newCardTimetoNode='TextToSpeechAudioCliptoField='startTime'/>
</Transform>
<Transform scale='0.4 0.4 0.4translation='-3.2 2.5 0'>
<!-- ROUTE information for PreviousTextClickedSensor node:  [from isActive to TextScript.selectPreviousCard ] -->
<TouchSensor DEF='PreviousTextClickedSensordescription='Select to see previous strategy'/>
<ROUTE fromNode='PreviousTextClickedSensorfromField='isActivetoNode='TextScripttoField='selectPreviousCard'/>
<Shape>
<Text string='"previous"'>
<FontStyle USE='MessageFont'/>
</Text>
<Appearance DEF='InterfaceAppearance'>
<Material diffuseColor='1 0 0.6'/>
</Appearance>
</Shape>
<Transform scale='2 0.6 1'>
<Shape DEF='TransparentClickSurface'>
<!-- support Selectable Text with a scalable IFS -->
<IndexedFaceSet solid='falsecoordIndex='0 1 2 3 -1'>
<Coordinate point='1 1 0 1 -1 0 -1 -1 0 -1 1 0'/>
</IndexedFaceSet>
<Appearance>
<Material transparency='1'/>
</Appearance>
</Shape>
</Transform>
</Transform>
<Transform scale='0.4 0.4 0.4translation='3.5 2.5 0'>
<!-- ROUTE information for NextTextClickedSensor node:  [from isActive to TextScript.selectNextCard ] -->
<TouchSensor DEF='NextTextClickedSensordescription='Select to see next strategy'/>
<ROUTE fromNode='NextTextClickedSensorfromField='isActivetoNode='TextScripttoField='selectNextCard'/>
<Shape>
<Text string='"next"'>
<FontStyle USE='MessageFont'/>
</Text>
<Appearance USE='InterfaceAppearance'/>
</Shape>
<Transform scale='1.2 0.6 1'>
<Shape USE='TransparentClickSurface'/>
</Transform>
</Transform>
<Transform scale='0.4 0.4 0.4translation='-3.3 -0.5 0'>
<TouchSensor USE='RandomTextClickedSensor'/>
<ROUTE fromNode='RandomTextClickedSensorfromField='isActivetoNode='TextScripttoField='selectRandomCard'/>
<Shape>
<Text string='"random"'>
<FontStyle USE='MessageFont'/>
</Text>
<Appearance USE='InterfaceAppearance'/>
</Shape>
<Transform scale='1.8 0.6 1'>
<Shape USE='TransparentClickSurface'/>
</Transform>
</Transform>
<Transform scale='0.4 0.4 0.4translation='3.3 -0.5 0'>
<!-- 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" '>
<ROUTE fromNode='TextScriptfromField='textToSpeechUrltoNode='TextToSpeechAnchortoField='url'/>
<Shape>
<Text string='"speech"'>
<FontStyle USE='MessageFont'/>
</Text>
<Appearance USE='InterfaceAppearance'/>
</Shape>
<Transform scale='1.8 0.6 1'>
<Shape USE='TransparentClickSurface'/>
</Transform>
</Anchor>
</Transform>
</Scene>
</X3D>
<!--

Index for DEF nodes : CardSoundSpatialization, CardText, CardTransform, HeadlineClickSurface, InterfaceAppearance, MessageFont, NextTextClickedSensor, PreviousTextClickedSensor, RandomTextClickedSensor, TextScript, TextToSpeechAnchor, TextToSpeechAudioClip, TransparentClickSurface
-->

<!-- Color key: <X3dNode DEF='idName' field='value'/> matches <XmlElement DEF='idName' attribute='value'/>
(Light blue background: behavior node) (Grey background: inserted documentation) (Magenta background: X3D Extensibility)
-->

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