In X3d, the script is embedded by using a programmatic node script. It supports Ecmascript/javascript or the Java language. Here's an explanation of what a ecmascript,ecmascript is also a scripting language, developed using Netscape and Microsoft, and is an object-oriented language, ECMAScript and Dom are very close to the current implementation of JavaScript and JScript, although they are used in a network environment, but they can be used in any scripting environment, and their syntax is essentially the same as JavaScript.
In this talk, let's take a look at an instance process and then explain its simple programming approach.
De jure an instance procedure that embeds a script
This example is when the mouse clicks on the cylinder, the cylinder moves out of the ball it is connected to, and then the cylinder is clicked, and the cylinder returns to its original position. The sample process is as follows:
(1) Create a 12. X3d the new document with the following initialization procedure:
(2) because the ball does not need to move, so we first construct a ball, the color is yellow. As in the following code: