Class Scripting

java.lang.Object
Basic.X3dSpecifications.Scripting

public class Scripting extends Object

X3D encodings example: this Script node decides whether or not to open a bank vault given openVault and combinationEntered messages. To do this, it remembers whether or not the correct combination has been entered. The Script node combined with a Sphere, a TouchSensor and a Sound node to show how is works. When the pointing device is over the sphere, the combinationEntered eventIn of the Script is sent. Then, when the Sphere is touched (typically when the mouse button is pressed) the Script is sent the openVault eventIn. This generates the vaultUnlocked eventOut which starts a click sound.

Related links: Catalog page Scripting, source Scripting.java, X3D Resources, X3D Scene Authoring Hints, and X3D Tooltips.

Scene Meta Information
meta tags   Document Metadata
title Scripting.x3d
description X3D encodings example: this Script node decides whether or not to open a bank vault given openVault and combinationEntered messages. To do this, it remembers whether or not the correct combination has been entered. The Script node combined with a Sphere, a TouchSensor and a Sound node to show how is works. When the pointing device is over the sphere, the combinationEntered eventIn of the Script is sent. Then, when the Sphere is touched (typically when the mouse button is pressed) the Script is sent the openVault eventIn. This generates the vaultUnlocked eventOut which starts a click sound.
creator Don Brutzman and Joe Williams
created 1 June 2002
modified 28 October 2019
specificationSection X3D encodings, ISO/IEC 19776-1.3, Part 1: XML encoding, Annex C.5 Scripting example
specificationUrl https://www.web3d.org/documents/specifications/19776-1/V3.3/Part01/examples.html#ScriptingExample
identifier https://www.web3d.org/x3d/content/examples/Basic/X3dSpecifications/Scripting.x3d
generator X3D-Edit 3.3, https://savage.nps.edu/X3D-Edit
license ../license.html
 

This program uses the X3D Java Scene Access Interface Library (X3DJSAIL). It has been produced using the X3dToJava.xslt stylesheet (version control) which is used to create Java source code from an original .x3d model.