Table of Contents Previous Directory Viewpoint Slideshow    Directory Viewpoint Slideshow Javadoc for translated java source Next Directory Viewpoint Slideshow X3D Resources

X3D Example Archives: X3D4WA, X3D for Web Authors, Chapter 09 Event Utilities Scripting

[1] BackgroundColorArrayAnimation.x3d (default X3D view from 0 0 10)
Directory Viewpoint Slideshow
IntegerSequencer example:  Road Work Ahead!

Event-utility nodes allow conversion and connection of different data types via ROUTEs, while Script nodes allow authors to write their own event-handling code for special scene capabilities.

Event utility nodes simplify data-type conversion of events when producing animation chains between nodes. These include BooleanFilter, BooleanSequencer, BooleanToggle, IntegerSequencer, IntegerTrigger, and TimeTrigger nodes.

The Script node allows authors to define new functionality produced by JavaScript (ECMAscript) or Java code. Authors can add field declarations that define accessType (inputOnly, outputOnly, initializeOnly and inputOutput) and type for each field.

The supporting Chapter 9 slideset and course videos (NPS, YouTube) for X3D for Web Authors are available online via X3dGraphics.com.

Also available: X3D Scene Authoring Hints for Scripts and URL Links.

Authors can use a 10-step algorithm checklist (with example diagram) as an event-animation design pattern that helps build consistent event-routing chains. The supporting Chapter 7 slideset and course videos (NPS, YouTube) for X3D for Web Authors are available online via X3dGraphics.com.

The quick-reference sheet X3D Event Utility Nodes: Field Event Diagrams illustrates the functionality of the event utility nodes. These nodes receive and pass values that are sent via ROUTE connections.

28 X3D Models                 44 X3D Model Viewpoint Snapshots

BackgroundColorArrayAnimation
Background Color Array Animation.x3d    
[1] BackgroundColorArrayAnimation.x3d (default X3D view from 0 0 10)

BooleanFilterPumpHouse
Boolean Filter Pump House.x3d    
[2] BooleanFilterPumpHouse.x3d Click pump house to activate
[3] BooleanFilterPumpHouse.x3d (default X3D view from 0 0 10)

BooleanSequencerIntegerSequencer
Boolean Sequencer Integer Sequencer.x3d    
[4] BooleanSequencerIntegerSequencer.x3d (default X3D view from 0 0 10)

BooleanSequencerPumpHouse
Boolean Sequencer Pump House.x3d    
[5] BooleanSequencerPumpHouse.x3d touch and hold to interrupt pump operation
[6] BooleanSequencerPumpHouse.x3d (default X3D view from 0 0 10)

BooleanToggleExample
Boolean Toggle Example.x3d    
[7] BooleanToggleExample.x3d Select red button to toggle cone jitter
[8] BooleanToggleExample.x3d (default X3D view from 0 0 10)

BooleanTogglePumpHouse
Boolean Toggle Pump House.x3d    
[9] BooleanTogglePumpHouse.x3d Click pump house to toggle operation
[10] BooleanTogglePumpHouse.x3d (default X3D view from 0 0 10)

BooleanTriggerPumpHouse
Boolean Trigger Pump House.x3d    
[11] BooleanTriggerPumpHouse.x3d select pump house to activate
[12] BooleanTriggerPumpHouse.x3d (default X3D view from 0 0 10)

CircleLinesExample
Circle Lines Example.x3d    
[13] CircleLinesExample.x3d CircleLines Example
[14] CircleLinesExample.x3d (default X3D view from 0 0 10)

CircleLinesExample60
Circle Lines Example 60.x3d    
[15] CircleLinesExample60.x3d Circle Lines Example
[16] CircleLinesExample60.x3d (default X3D view from 0 0 10)

CircleLinesSphereLatitude
Circle Lines Sphere Latitude.x3d    
[17] CircleLinesSphereLatitude.x3d CircleLines Example
[18] CircleLinesSphereLatitude.x3d (default X3D view from 0 0 10)

CircleLinesSphereLongitude
Circle Lines Sphere Longitude.x3d    
[19] CircleLinesSphereLongitude.x3d LongitudeLines Example
[20] CircleLinesSphereLongitude.x3d (default X3D view from 0 0 10)

ElevationGridSimpleWaveAnimation
Elevation Grid Simple Wave Animation.x3d    
[21] ElevationGridSimpleWaveAnimation.x3d Wave view
[22] ElevationGridSimpleWaveAnimation.x3d (default X3D view from 0 0 10)

IntegerSequencerPumpHouse
Integer Sequencer Pump House.x3d    
[23] IntegerSequencerPumpHouse.x3d Click pump house for next cone
[24] IntegerSequencerPumpHouse.x3d (default X3D view from 0 0 10)

IntegerSequencerRoadSignSwitcher
Integer Sequencer Road Sign Switcher.x3d    
[25] IntegerSequencerRoadSignSwitcher.x3d Road sign switcher, 6m away
[26] IntegerSequencerRoadSignSwitcher.x3d (default X3D view from 0 0 10)


Integer Trigger Example.x3d    
[27] IntegerTriggerExample.x3d Select text to change color
[28] IntegerTriggerExample.x3d (default X3D view from 0 0 10)

IntegerTriggerPumpHouse
Integer Trigger Pump House.x3d    
[29] IntegerTriggerPumpHouse.x3d Book View
[30] IntegerTriggerPumpHouse.x3d (default X3D view from 0 0 10)

MoodSelector
Mood Selector.x3d    
[31] MoodSelector.x3d How do you feel today?
[32] MoodSelector.x3d (default X3D view from 0 0 10)

newECMAscriptTest
new ECMAscript Test.x3d    
[33] newECMAscriptTest.x3d Check X3D console to see output
[34] newECMAscriptTest.x3d (default X3D view from 0 0 10)

ScriptComplexStateEvents
Script Complex State Events.x3d    
[35] ScriptComplexStateEvents.x3d Control 3-way lamp
[36] ScriptComplexStateEvents.x3d (default X3D view from 0 0 10)

ScriptControlEvents
Script Control Events.x3d    
[37] ScriptControlEvents.x3d Push button to change light color
[38] ScriptControlEvents.x3d Book View
[39] ScriptControlEvents.x3d (default X3D view from 0 0 10)

ScriptEvents
Script Events.x3d    
[40] ScriptEvents.x3d click pump house to spin cones
[41] ScriptEvents.x3d Book View
[42] ScriptEvents.x3d (default X3D view from 0 0 10)

ScriptEventsPumpHouse
Script Events Pump House.x3d    
[43] ScriptEventsPumpHouse.x3d Book View
[44] ScriptEventsPumpHouse.x3d (default X3D view from 0 0 10)

ScriptNodeEventOutControlEcmaScript
Script Node Event Out Control Ecma Script.x3d    
[45] ScriptNodeEventOutControlEcmaScript.x3d View test
[46] ScriptNodeEventOutControlEcmaScript.x3d (default X3D view from 0 0 10)

ScriptNodeFieldControlEcmaScript
Script Node Field Control Ecma Script.x3d    
[47] ScriptNodeFieldControlEcmaScript.x3d View test
[48] ScriptNodeFieldControlEcmaScript.x3d (default X3D view from 0 0 10)

ScriptSimpleStateEvents
Script Simple State Events.x3d    
[49] ScriptSimpleStateEvents.x3d click switch to toggle light
[50] ScriptSimpleStateEvents.x3d (default X3D view from 0 0 10)

TestScriptInitialization
Test Script Initialization.x3d    
[51] TestScriptInitialization.x3d (default X3D view from 0 0 10)

TimeTriggerPumpHouse
Time Trigger Pump House.x3d    
[52] TimeTriggerPumpHouse.x3d Book View
[53] TimeTriggerPumpHouse.x3d (default X3D view from 0 0 10)

TimeTriggerTest
Time Trigger Test.x3d    
[54] TimeTriggerTest.x3d TimeTrigger test
[55] TimeTriggerTest.x3d (default X3D view from 0 0 10)
 

This viewpoint slideshow is online at
https://X3dGraphics.com/examples/X3dForWebAuthors/Chapter09EventUtilitiesScripting/viewpointSlideshow.html

Validate XHTML 1.1

Viewpoint image version history at
https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter09EventUtilitiesScripting/_viewpoints

Table of Contents Previous Directory Viewpoint Slideshow    Directory Viewpoint Slideshow Javadoc for translated java source Next Directory Viewpoint Slideshow X3D Resources