<?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://www.web3d.org/x3d/content/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>
<!-- 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=' TextScript' fromField='string_changed' toNode=' CardText' toField='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 -->
</Sound>
< ROUTE  fromNode=' TextScript' fromField='textToSpeechUrl' toNode=' TextToSpeechAudioClip' toField='url'/>
< ROUTE  fromNode=' TextScript' fromField='newCardTime' toNode=' TextToSpeechAudioClip' toField='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=' PreviousTextClickedSensor' fromField='isActive' toNode=' TextScript' toField='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=' NextTextClickedSensor' fromField='isActive' toNode=' TextScript' toField='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=' RandomTextClickedSensor' fromField='isActive' toNode=' TextScript' toField='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=' TextScript' fromField='textToSpeechUrl' toNode=' TextToSpeechAnchor' toField='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>
<!--

to top <!-- Event Graph ROUTE Table shows event connections -->
 
<!-- Index for DEF nodes: CardSoundSpatialization, CardText, CardTransform, HeadlineClickSurface, InterfaceAppearance, MessageFont, NextTextClickedSensor, PreviousTextClickedSensor, RandomTextClickedSensor, TextScript, TextToSpeechAnchor, TextToSpeechAudioClip, TransparentClickSurface
-->

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



-->

<!-- 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. -->