<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 3.0//EN" "https://www.web3d.org/specifications/x3d-3.0.dtd">
<![CDATA[
ecmascript: function switchPosition(pos) { if (switchPosition.pos.y == 0){ fanCycleTime[0] = switchPosition.pos.y; displayFanSpeed[0] ='OFF'; } else{if (switchPosition.pos.y == 3){ fanCycleTime[0] = .01; displayFanSpeed[0] ='MAX'; } else { fanCycleTime[0] = (6 - (switchPosition.pos.y*2)); displayFanSpeed[0] = (Math.round((1/fanCycleTime[0])*6000)/100) + ' RPM'; }} }
]]>
<![CDATA[
ecmascript: function onButtonAction(bool) { if (onButtonAction.bool == true) { displayMotorStatus[0] ='ON'; fanOnButtonAction = 1; } }
]]>
<![CDATA[
ecmascript: function offButtonAction(bool) { if (offButtonAction.bool == true) { displayMotorStatus[0] ='OFF'; } }
]]>
Event Graph ROUTE Table entries with 25 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.
SensorOffButton
TouchSensor touchTime SFTime |
MotorClockOff
TimeSensor set_startTime SFTime |
then |
MotorClockOff
TimeSensor fraction_changed SFFloat |
OffButtonDownPath
PositionInterpolator set_fraction SFFloat |
then |
OffButtonDownPath
PositionInterpolator value_changed SFVec3f |
OffButton
Transform set_translation SFVec3f |
|||
then |
MotorClockOff
TimeSensor fraction_changed SFFloat |
OnButtonUpPath
PositionInterpolator set_fraction SFFloat |
then |
OnButtonUpPath
PositionInterpolator value_changed SFVec3f |
OnButton
Transform set_translation SFVec3f |
|||||
then |
MotorClockOff
TimeSensor fraction_changed SFFloat |
GtoRColorInerp
ColorInterpolator set_fraction SFFloat |
then |
GtoRColorInerp
ColorInterpolator value_changed SFColor |
MotorDisplayMaterial
Material set_diffuseColor SFColor |
|||||
SensorOffButton
TouchSensor isActive SFBool |
MotorButtonActionOff
Script offButtonAction SFBool |
then |
MotorButtonActionOff
Script displayMotorStatus MFString |
StatusDisplay
Text set_string MFString |
SwitchPlaneSensor
PlaneSensor translation_changed SFVec3f |
SwitchTransform
Transform set_translation SFVec3f |
|||||||||||||
SwitchPlaneSensor
PlaneSensor translation_changed SFVec3f |
MotorAmp
Script switchPosition SFVec3f |
then |
MotorAmp
Script displayFanSpeed MFString |
SpeedDisplay
Text set_string MFString |
||||||||||
then |
MotorAmp
Script fanCycleTime MFFloat |
FanClock
TimeSensor set_cycleInterval SFTime |
then |
FanClock
TimeSensor fraction_changed SFFloat |
FanPath
OrientationInterpolator set_fraction SFFloat |
then |
FanPath
OrientationInterpolator value_changed SFRotation |
Fan
Transform set_rotation SFRotation |
<!--
Online at
https://www.web3d.org/x3d/content/examples/Basic/StudentProjects/PropellerControlPanelIndex.html
-->
<!--
Version control at
https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/content/examples/Basic/StudentProjects/PropellerControlPanel.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)
-->
<!-- For additional help information about X3D scenes, please see X3D Tooltips, X3D Resources, and X3D Scene Authoring Hints. -->