diff --git a/Environment/TimeOfDay/TimeOfDay.x3d b/Environment/TimeOfDay/TimeOfDay.x3d index 38cfe0e37a393802d23fc61c8283c40d198d7fb6..c08d74d3fb55d2d3a0597b00b8d68501103b04e0 100644 --- a/Environment/TimeOfDay/TimeOfDay.x3d +++ b/Environment/TimeOfDay/TimeOfDay.x3d @@ -112,17 +112,17 @@ <Script DEF='ampm'> <field accessType='inputOnly' name='set_boolean' type='SFBool'/> <field accessType='outputOnly' name='whichchoice' type='SFInt32'/> - <![CDATA[ -ecmascript: - -function set_boolean ( boolean_input, eventTime) -{ - - if ( boolean_input== false ) { whichchoice = 0;} - - if ( boolean_input== true ) { whichchoice = 1; } - -} + <![CDATA[ +ecmascript: + +function set_boolean ( boolean_input, eventTime) +{ + + if ( boolean_input== false ) { whichchoice = 0;} + + if ( boolean_input== true ) { whichchoice = 1; } + +} ]]> </Script> <Transform scale='4 1 1' translation='-1 2.5 0'> @@ -167,23 +167,23 @@ function set_boolean ( boolean_input, eventTime) <field accessType='inputOnly' name='set_boolean' type='SFBool'/> <field accessType='outputOnly' name='hour_changed' type='SFInt32'/> <field accessType='outputOnly' name='twelvebool' type='SFBool'/> - <![CDATA[ -ecmascript: - -function set_boolean ( boolean_input, eventTime) -{ - Browser.print ('boolean_input=' + boolean_input); - if ( boolean_input == true ) - { hour_changed = hour_changed + 1;} - - if (hour_changed <= 11){twelvebool = false; } - - if (hour_changed > 11){twelvebool = true; } - if (hour_changed ==24) {hour_changed = 0;} -} - -// separage function needed for set_hour -// hour_changed is an output, it gets set in the function + <![CDATA[ +ecmascript: + +function set_boolean ( boolean_input, eventTime) +{ + Browser.print ('boolean_input=' + boolean_input); + if ( boolean_input == true ) + { hour_changed = hour_changed + 1;} + + if (hour_changed <= 11){twelvebool = false; } + + if (hour_changed > 11){twelvebool = true; } + if (hour_changed ==24) {hour_changed = 0;} +} + +// separage function needed for set_hour +// hour_changed is an output, it gets set in the function ]]> </Script> <Transform scale='5 5 5' translation='-18 18 100'> @@ -290,28 +290,28 @@ function set_boolean ( boolean_input, eventTime) <field accessType='outputOnly' name='whichchoice' type='SFInt32'/> <field accessType='outputOnly' name='range' type='SFFloat'/> <field accessType='outputOnly' name='binder' type='SFBool'/> - <![CDATA[ -ecmascript: - -function set_boolean ( boolean_input, eventTime) -{ -binder =true; -if ( boolean_input== false ) { return; } -whichchoice = whichchoice +1; -if ( whichchoice ==12 ) { whichchoice = 0; } -if (whichchoice ==0) {range = 0;} -if (whichchoice ==1) {range = 5000;} -if (whichchoice ==2) {range = 2500;} -if (whichchoice ==3) {range = 1000;} -if (whichchoice ==4) {range = 500;} -if (whichchoice ==5) {range = 250;} -if (whichchoice ==6) {range = 100;} -if (whichchoice ==7) {range = 50;} -if (whichchoice ==8) {range = 25;} -if (whichchoice ==9) {range = 10;} -if (whichchoice ==10) {range = 5;} -if (whichchoice ==11) {range = 1;} -} + <![CDATA[ +ecmascript: + +function set_boolean ( boolean_input, eventTime) +{ +binder =true; +if ( boolean_input== false ) { return; } +whichchoice = whichchoice +1; +if ( whichchoice ==12 ) { whichchoice = 0; } +if (whichchoice ==0) {range = 0;} +if (whichchoice ==1) {range = 5000;} +if (whichchoice ==2) {range = 2500;} +if (whichchoice ==3) {range = 1000;} +if (whichchoice ==4) {range = 500;} +if (whichchoice ==5) {range = 250;} +if (whichchoice ==6) {range = 100;} +if (whichchoice ==7) {range = 50;} +if (whichchoice ==8) {range = 25;} +if (whichchoice ==9) {range = 10;} +if (whichchoice ==10) {range = 5;} +if (whichchoice ==11) {range = 1;} +} ]]> </Script> </Transform>