<?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">
<![CDATA[
ecmascript: function initialize( ) { texture_changed = textures[0]; Browser.println ('[Cut Selector] initialize(): textures.length=' + textures.length); // debug } function set_fraction( f, tm ) { i = Math.floor(f * 10); if ( i == 10 ) { i = 9; } Browser.println ('[Cut Selector] set_fraction(): i=' + i); // debug texture_changed = textures[i]; }
]]>
<![CDATA[
ecmascript: function translate( x ) { // compute the fraction using the given X position f = (x-minMaxX[0]) / (minMaxX[1] - minMaxX[0]); // send a fraction event fraction_changed = f; // send a new label string with 1 digit after decimal label_changed[0] = Math.floor(f*10.0)/10.0; } function initialize( ) { // set the plane sensor bounds minPosition_changed[0] = minMaxX[0]; minPosition_changed[1] = 0.0; maxPosition_changed[0] = minMaxX[1]; maxPosition_changed[1] = 0.0; // set the plane sensor initial position offset_changed[0] = initialX; offset_changed[1] = 0.0; offset_changed[2] = 0.0; // compute the initial values translate( initialX ); } function set_translation( t, tm ) { // compute the new values translate( t[0] ); }
]]>
Event Graph ROUTE Table entries with 9 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.
Selector
Script texture_changed SFNode |
App
Appearance set_texture SFNode |
Plane
ProtoInstance TexturePlane |
No ROUTE connection found for output from this node. Contains SFNode/MFNode field with indirect access to other nodes. |
<!--
Online at
https://www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Siggraph98Course/CutIndex.html
-->
<!--
Version control at
https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Siggraph98Course/Cut.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)
<ProtoInstance
name='ProtoName'>
<field
name='fieldName'/> </ProtoInstance>
-->
<!-- For additional help information about X3D scenes, please see X3D Tooltips, X3D Resources, and X3D Scene Authoring Hints. -->