package HumanoidAnimation.WinterAndSpring;

import org.web3d.x3d.jsail.Core.*;
import org.web3d.x3d.jsail.EnvironmentalEffects.*;
import org.web3d.x3d.jsail.EventUtilities.*;
import org.web3d.x3d.jsail.fields.*;
import org.web3d.x3d.jsail.Geometry3D.*;
import org.web3d.x3d.jsail.Grouping.*;
import org.web3d.x3d.jsail.Interpolation.*;
import org.web3d.x3d.jsail.Lighting.*;
import org.web3d.x3d.jsail.Navigation.*;
import org.web3d.x3d.jsail.Networking.*;
import org.web3d.x3d.jsail.Shape.*;
import org.web3d.x3d.jsail.Sound.*;
import org.web3d.x3d.jsail.Texturing.*;
import org.web3d.x3d.jsail.Time.*;

// Javadoc metadata annotations follow, see below for X3DJSAIL Java source code.
/**
 * <p> Main stage for HAnim scene Winter and Spring. </p>
 <p> Related links:  source MainStage.java, <a href="https://www.web3d.org/x3d/content/examples/X3dResources.html" target="_blank">X3D Resources</a>, <a href="https://www.web3d.org/x3d/content/examples/X3dSceneAuthoringHints.html" target="_blank">X3D Scene Authoring Hints</a>, and <a href="https://www.web3d.org/x3d/content/X3dTooltips.html" target="_blank">X3D Tooltips</a>. </p>
	<table style="color:black; border:0px solid; border-spacing:10px 0px;">
        <caption>Scene Meta Information</caption>
		<tr style="background-color:silver; border-color:silver;">
			<td style="text-align:center; padding:10px 0px;"><i>meta tags</i></td>
			<td style="text-align:left;   padding:10px 0px;">HumanoidAnimation.WinterAndSpring.MainStage&nbsp; Document Metadata </td>
		</tr>

		<tr>
			<td style="text-align:right; vertical-align: text-top;"> <i> title </i> </td>
			<td> <a href="https://www.web3d.org/x3d/content/examples/HumanoidAnimation/WinterAndSpring/MainStage.x3d">MainStage.x3d</a> </td>
		</tr>
		<tr>
			<td style="text-align:right; vertical-align: text-top;"> <i> description </i> </td>
			<td> Main stage for HAnim scene Winter and Spring. </td>
		</tr>
		<tr>
			<td style="text-align:right; vertical-align: text-top;"> <i> creator </i> </td>
			<td> Carol McDonald, Joe Williams, Katy Schildmeyer, and John Carlson </td>
		</tr>
		<tr>
			<td style="text-align:right; vertical-align: text-top;"> <i> translator </i> </td>
			<td> Joe Williams and Don Brutzman </td>
		</tr>
		<tr>
			<td style="text-align:right; vertical-align: text-top;"> <i> created </i> </td>
			<td> 25 May 2023 </td>
		</tr>
		<tr>
			<td style="text-align:right; vertical-align: text-top;"> <i> modified </i> </td>
			<td> 8 September 2024 </td>
		</tr>
		<tr>
			<td style="text-align:right; vertical-align: text-top;"> <i> reference </i> </td>
			<td> MainStageREADME.txt </td>
		</tr>
		<tr>
			<td style="text-align:right; vertical-align: text-top;"> <i> hint </i> </td>
			<td> containerField=watchList changed to containerField=children in X3D 4.0 </td>
		</tr>
		<tr>
			<td style="text-align:right; vertical-align: text-top;"> <i> MovingImage </i> </td>
			<td> WinterAndSpring3 by Joe Williams <a href="https://youtu.be/5HrX7_uu9mU" target="_blank">https://youtu.be/5HrX7_uu9mU</a> </td>
		</tr>
		<tr>
			<td style="text-align:right; vertical-align: text-top;"> <i> reference </i> </td>
			<td> <a href="https://www.web3d.org/x3d/content/examples/HumanoidAnimation/WinterAndSpring/originals/0WSMainStage09g.x3d">originals/0WSMainStage09g.x3d</a> </td>
		</tr>
		<tr>
			<td style="text-align:right; vertical-align: text-top;"> <i> identifier </i> </td>
			<td> <a href="https://www.web3d.org/x3d/content/examples/HumanoidAnimation/WinterAndSpring/MainStage.x3d" target="_blank">https://www.web3d.org/x3d/content/examples/HumanoidAnimation/WinterAndSpring/MainStage.x3d</a> </td>
		</tr>
		<tr>
			<td style="text-align:right; vertical-align: text-top;"> <i> generator </i> </td>
			<td> X3D-Edit 4.0, <a href="https://savage.nps.edu/X3D-Edit" target="_blank">https://savage.nps.edu/X3D-Edit</a> </td>
		</tr>
		<tr>
			<td style="text-align:right; vertical-align: text-top;"> <i> license </i> </td>
			<td> <a href="https://www.web3d.org/x3d/content/examples/HumanoidAnimation/WinterAndSpring/../license.html">../license.html</a> </td>
		</tr>
		<tr style="background-color:silver; border-color:silver;">
			<td style="text-align:center;" colspan="2">  &nbsp; </td>
		</tr>
	</table>

	<p>
		This program uses the
		<a href="https://www.web3d.org/specifications/java/X3DJSAIL.html" target="_blank">X3D Java Scene Access Interface Library (X3DJSAIL)</a>.
		It has been produced using the 
		<a href="https://www.web3d.org/x3d/stylesheets/X3dToJava.xslt" target="_blank">X3dToJava.xslt</a>
		stylesheet
	       (<a href="https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/stylesheets/X3dToJava.xslt" target="_blank">version control</a>)
                which is used to create Java source code from an original <code>.x3d</code> model.
	</p>

	* @author Carol McDonald, Joe Williams, Katy Schildmeyer, and John Carlson
 */

public class MainStage
{
	/** Default constructor to create this object. */
	public MainStage ()
	{
	  initialize();
	}

	/** Create and initialize the X3D model for this object. */
	public final void initialize()
	{
            try { // catch-all
  x3dModel = new X3D().setProfile(X3D.PROFILE_IMMERSIVE).setVersion(X3D.VERSION_4_0)
  .setHead(new head()
    .addComponent(new component().setName("HAnim").setLevel(1))
    .addMeta(new meta().setName(meta.NAME_TITLE      ).setContent("MainStage.x3d"))
    .addMeta(new meta().setName(meta.NAME_DESCRIPTION).setContent("Main stage for HAnim scene Winter and Spring."))
    .addMeta(new meta().setName(meta.NAME_CREATOR    ).setContent("Carol McDonald, Joe Williams, Katy Schildmeyer, and John Carlson"))
    .addMeta(new meta().setName(meta.NAME_TRANSLATOR ).setContent("Joe Williams and Don Brutzman"))
    .addMeta(new meta().setName(meta.NAME_CREATED    ).setContent("25 May 2023"))
    .addMeta(new meta().setName(meta.NAME_MODIFIED   ).setContent("8 September 2024"))
    .addMeta(new meta().setName(meta.NAME_REFERENCE  ).setContent("MainStageREADME.txt"))
    .addMeta(new meta().setName(meta.NAME_HINT       ).setContent("containerField=watchList changed to containerField=children in X3D 4.0"))
    .addMeta(new meta().setName(meta.NAME_MOVINGIMAGE).setContent("WinterAndSpring3 by Joe Williams https://youtu.be/5HrX7_uu9mU"))
    .addMeta(new meta().setName(meta.NAME_REFERENCE  ).setContent("originals/0WSMainStage09g.x3d"))
    .addMeta(new meta().setName(meta.NAME_IDENTIFIER ).setContent("https://www.web3d.org/x3d/content/examples/HumanoidAnimation/WinterAndSpring/MainStage.x3d"))
    .addMeta(new meta().setName(meta.NAME_GENERATOR  ).setContent("X3D-Edit 4.0, https://savage.nps.edu/X3D-Edit"))
    .addMeta(new meta().setName(meta.NAME_LICENSE    ).setContent("../license.html")))
  .setScene(new Scene()
    .addChild(new WorldInfo().setTitle("MainStage.x3d"))
    .addChild(new NavigationInfo().setHeadlight(false).setTransitionTime(0))
    .addComments(" These lights are intentionally shining on all of the models loaded within a top-level scene ")
    .addChild(new DirectionalLight().setDirection(0.0,0.0,1.0).setGlobal(true).setIntensity(0.75))
    .addChild(new DirectionalLight().setGlobal(true).setIntensity(0.75))
    .addChild(new DirectionalLight().setGlobal(true).setIntensity(0.75))
    .addChild(new DirectionalLight().setDirection(-1.0,0.0,0.0).setGlobal(true).setIntensity(0.75))
    .addChild(new DirectionalLight().setDirection(0.0,-0.75,0.0).setGlobal(true).setIntensity(0.75))
    .addChild(new TimeSensor("StartTIME"))
    .addComments(" scene ready signal Start audio ")
    .addChild(new TimeSensor("DelayTIME").setCycleInterval(0.5))
    .addComments(" delay between start audio and start animations ")
    .addChild(new TimeSensor("Clock100Seconds").setCycleInterval(100))
    .addComments(" start animation ")
    .addChild(new BooleanFilter("DelayFILTER"))
    .addChild(new TimeTrigger("Clock100SecondsTRIGGER"))
    .addComments(" generate Clock100Seconds startTime from completion of Delay ")
    .addChild(new ROUTE().setFromNode("StartTIME").setFromField("cycleTime").setToNode("StartTIME").setToField("set_stopTime"))
    .addComments(" stop Start ")
    .addChild(new ROUTE().setFromNode("StartTIME").setFromField("stopTime").setToNode("DelayTIME").setToField("set_startTime"))
    .addComments(" turn on delay and audio ")
    .addChild(new ROUTE().setFromNode("DelayTIME").setFromField("isActive").setToNode("DelayFILTER").setToField("set_boolean"))
    .addChild(new ROUTE().setFromNode("DelayFILTER").setFromField("inputFalse").setToNode("Clock100SecondsTRIGGER").setToField("set_boolean"))
    .addChild(new ROUTE().setFromNode("Clock100SecondsTRIGGER").setFromField("triggerTime").setToNode("Clock100Seconds").setToField("set_startTime"))
    .addComments(" start animation timer ")
    .addChild(new Group("WSAudio")
      .addChild(new Sound("SceneMusic1").setLocation(-5.0,10.0,10.0).setMaxBack(50).setMaxFront(50).setMinBack(25).setMinFront(25).setSpatialize(false)
        .addComments(" X3D Players should pick the first version that works, providing better interoperability ")
        .addComments(" For playability in this very big scene, the audio files are ordered by smaller file sizes first ")
        .setSource(new AudioClip("Melodies1").setDescription("John Harrison with the Wichita State University Chamber").setUrl(new String[] {"audio/Winter_Spring_rv2_keyedMono.wav","audio/winter_spring_rv2_keyed_143.wav","audio/winter_spring_rv2_keyed.mp3","https://www.web3d.org/x3d/content/examples/HumanoidAnimation/WinterAndSpring/audio/Winter_Spring_rv2_keyedMono.wav","https://www.web3d.org/x3d/content/examples/HumanoidAnimation/WinterAndSpring/audio/winter_spring_rv2_keyed_143.wav","https://www.web3d.org/x3d/content/examples/HumanoidAnimation/WinterAndSpring/audio/winter_spring_rv2_keyed.mp3"})))
      .addComments(" start audio ")
      .addChild(new ROUTE().setFromNode("StartTIME").setFromField("stopTime").setToNode("Melodies1").setToField("set_startTime")))
    .addChild(new Group("GrampsStage")
      .addChild(new Group("StageSurface")
        .addChild(new Transform("Floor").setTranslation(15.0,-0.3,15.0)
          .addChild(new Shape()
            .setGeometry(new Box().setSize(1500.0,0.1,1500.0))
            .setAppearance(new Appearance()
              .setTexture(new ImageTexture().setUrl(new String[] {"images/Lawn.jpg","https://www.web3d.org/x3d/content/examples/HumanoidAnimation/WinterAndSpring/images/Lawn.jpg"}))
              .setMaterial(new Material().setDiffuseColor(0.0,0.8,0.0).setEmissiveColor(0.0,0.7,0.0).setSpecularColor(0.0,0.4,0.0)))))
        .addChild(new Transform("PathwaySurface1").setTranslation(0.0,-0.15,0.0)
          .addChild(new Inline("PathMeshTopSurface").setUrl(new String[] {"PathMeshTopSurface.x3d","https://www.web3d.org/x3d/content/examples/HumanoidAnimation/WinterAndSpring/PathMeshTopSurface.x3d","PathMeshTopSurface.wrl","https://www.web3d.org/x3d/content/examples/HumanoidAnimation/WinterAndSpring/PathMeshTopSurface.wrl"})))
        .addChild(new Transform("PathwaySurface2").setTranslation(0.0,-0.1,0.1)
          .addChild(new Inline().setUSE("PathMeshTopSurface")))
        .addChild(new Transform("PathwayGrid").setTranslation(0.0,-0.12,0.0)
          .addChild(new Inline("Pathway").setUrl(new String[] {"Pathway.x3d","https://www.web3d.org/x3d/content/examples/HumanoidAnimation/WinterAndSpring/Pathway.x3d","Pathway.wrl","https://www.web3d.org/x3d/content/examples/HumanoidAnimation/WinterAndSpring/Pathway.wrl"}))))
      .addChild(new Group("StageDecorations")
        .addChild(new Transform("BushesTransform").setTranslation(0.0,-0.2,0.0)
          .addChild(new Inline("Bushes").setUrl(new String[] {"Bushes.x3d","https://www.web3d.org/x3d/content/examples/HumanoidAnimation/WinterAndSpring/Bushes.x3d","Bushes.wrl","https://www.web3d.org/x3d/content/examples/HumanoidAnimation/WinterAndSpring/Bushes.wrl"})))
        .addChild(new Transform("BorderFlowers")
          .addChild(new Inline("FlowerSet").setUrl(new String[] {"FlowerSet.x3d","https://www.web3d.org/x3d/content/examples/HumanoidAnimation/WinterAndSpring/FlowerSet.x3d","FlowerSet.wrl","https://www.web3d.org/x3d/content/examples/HumanoidAnimation/WinterAndSpring/FlowerSet.wrl"})))
        .addChild(new Transform("TwoFlowerGardens")
          .addChild(new Inline("FlowerGardens").setUrl(new String[] {"FlowerGardens.x3d","https://www.web3d.org/x3d/content/examples/HumanoidAnimation/WinterAndSpring/FlowerGardens.x3d","FlowerGardens.wrl","https://www.web3d.org/x3d/content/examples/HumanoidAnimation/WinterAndSpring/FlowerGardens.wrl"}))))
      .addChild(new Group("TitlesandViewpointsInOrderofAppearance")
        .addChild(new Viewpoint("Scene_StageFarView").setDescription("Stage Far View").setCenterOfRotation(9.8557,0.0,3.5).setOrientation(0.5,1.76,0.3,-1.0).setPosition(-15.0,10.0,32.0))
        .addChild(new Group("TitleSet1of2")
          .addChild(new Transform("TitleSet1")
            .addChild(new Transform("WinterAndSpringTitle").setTranslation(10.0,10.0,0.0)
              .addChild(new Viewpoint("WinterAndSpringTitleView").setDescription("Look at WS title").setJump(false).setOrientation(-0.15,0.0,0.0,0.2).setPosition(0.0,0.75,4.0))
              .addChild(new Shape()
                .setGeometry(new Box().setSize(4.0,3.0,0.25))
                .setAppearance(new Appearance()
                  .setTexture(new ImageTexture().setUrl(new String[] {"images/WinterAndSpring.png","https://www.web3d.org/x3d/content/examples/HumanoidAnimation/WinterAndSpring/images/WinterAndSpring.png"}))
                  .setMaterial(new Material()))))
            .addChild(new Transform("WSAuthorsTitle").setTranslation(10.0,10.0,-5.0)
              .addChild(new Viewpoint("WSAuthorsTitleView").setDescription("Look at Authors title").setJump(false).setOrientation(-0.15,0.0,0.0,0.2).setPosition(0.0,1.0,5.0))
              .addChild(new Shape()
                .setGeometry(new Box().setSize(4.0,3.0,0.25))
                .setAppearance(new Appearance()
                  .setTexture(new ImageTexture().setUrl(new String[] {"images/WSAuthorsAll.png","https://www.web3d.org/x3d/content/examples/HumanoidAnimation/WinterAndSpring/images/WSAuthorsAll.png"}))
                  .setMaterial(new Material()))))))
        .addChild(new Group("SceneViewpoints01")
          .addComments(" Looking down the path ")
          .addChild(new Viewpoint("Scene_GrampsBack1View").setDescription("Looking down the path").setCenterOfRotation(7.0,1.5,0.0).setOrientation(0.0,1.0,0.0,-2.7).setPosition(7.0,2.0,-6.5))
          .addComments(" Looking toward the bushes ")
          .addChild(new Viewpoint("Scene_KidsRunningTowardGramps").setDescription("Grand Kids Running").setCenterOfRotation(10.0,0.8,4.0).setOrientation(0.0,1.0,0.0,1.5).setPosition(11.0,1.6,4.0)))
        .addChild(new Group("CharactersAndCharacterViewpoints")
          .addChild(new Transform("Gramps")
            .addChild(new Transform("GrampsBox").setTranslation(6.6,0.0,0.5)
              .addChild(new Viewpoint("Gramps01View").setDescription("Look at Gramps").setOrientation(-0.25,0.0,0.0,0.3).setPosition(0.0,4.0,11.0))
              .addComments(" Viewpoint DEF='Gramps02View' description='Look over Gramps Shoulder' orientation='0 1 0 3' position='-3 2 -9'/ ")
              .addComments(" PointLight location='0 5 15' global='true' intensity='0.5' / ")
              .addChild(new Viewpoint("Gramps03View").setDescription("Look at Heart over Gramps Shoulder").setOrientation(0.0,0.7,0.0,3.0).setPosition(-1.0,2.0,-8.0))
              .addChild(new Inline("Gramps11").setUrl(new String[] {"Gramps11.x3dv","https://www.web3d.org/x3d/content/examples/HumanoidAnimation/WinterAndSpring/Gramps11.x3dv"}))
              .addComments(" TODO get proper conversion of Gramps <Inline DEF='GrampsAnimations' url='\"GrampsAnimations.x3d\" \"https://www.web3d.org/x3d/content/examples/HumanoidAnimation/WinterAndSpring/GrampsAnimations.x3d\" \"GrampsAnimations.wrl\" \"https://www.web3d.org/x3d/content/examples/HumanoidAnimation/WinterAndSpring/GrampsAnimations.wrl\"'/> ")
              .addComments(" visual debug assist ")
              .addChild(new Inline("JointCoordinateAxes").setUrl(new String[] {"JointCoordinateAxes.x3dv","https://www.web3d.org/x3d/content/examples/HumanoidAnimation/WinterAndSpring/JointCoordinateAxes.x3d"}))
              .addChild(new Transform()
                .addChild(new Inline("CaneFitting").setUrl(new String[] {"CaneFitting.x3d","https://www.web3d.org/x3d/content/examples/HumanoidAnimation/WinterAndSpring/CaneFitting.x3d","CaneFitting.wrl","https://www.web3d.org/x3d/content/examples/HumanoidAnimation/WinterAndSpring/CaneFitting.wrl"})))))
          .addChild(new Transform("GrampsGrandKids")
            .addComments(" TODO Viewpoint DEF='GrampsGrandKidsView' description='Look at Gramps GrandKids' orientation='-0.25 0 0 0.3' position='0 4 9'/> ")
            .addComments(" Leif ")
            .addChild(new Transform("Leif")
              .addChild(new Transform("LeifBox").setTranslation(-7.9962,0.0046,3.000)
                .addComments(" PointLight location='0 10 15' global='true' intensity='0.5' / ")
                .addChild(new Viewpoint("LeifView").setDescription("Look at Leif").setOrientation(-0.25,0.0,0.0,0.5).setPosition(0.0,2.0,4.0))
                .addChild(new Inline("LeifAnimated").setUrl(new String[] {"LeifAnimated.x3d","https://www.web3d.org/x3d/content/examples/HumanoidAnimation/WinterAndSpring/LeifAnimated.x3d","LeifAnimated.wrl","https://www.web3d.org/x3d/content/examples/HumanoidAnimation/WinterAndSpring/LeifAnimated.wrl"}))))
            .addComments(" Lily ")
            .addChild(new Transform("Lily")
              .addChild(new Transform("LilyBox").setTranslation(-8.0962,0.0046,5.600)
                .addComments(" PointLight location='0 10 15' global='true' intensity='0.5' / ")
                .addChild(new Viewpoint("Lilyview").setDescription("Look at Lily").setOrientation(-0.25,0.0,0.0,0.5).setPosition(0.0,2.0,4.0))
                .addChild(new Inline("LilyAnimated").setUrl(new String[] {"LilyAnimated.x3d","https://www.web3d.org/x3d/content/examples/HumanoidAnimation/WinterAndSpring/LilyAnimated.x3d","LilyAnimated.wrl","https://www.web3d.org/x3d/content/examples/HumanoidAnimation/WinterAndSpring/LilyAnimated.wrl"}))))
            .addComments(" Tufani ")
            .addChild(new Transform("Tufani")
              .addChild(new Transform("TufaniBox").setTranslation(-8.0962,0.0046,6.400)
                .addComments(" PointLight location='0 10 15' global='true' intensity='0.5' / ")
                .addChild(new Viewpoint("Tufaniview").setDescription("Look at Tufani").setOrientation(-0.25,0.0,0.0,0.5).setPosition(0.0,2.0,4.0))
                .addChild(new Inline("TufaniAnimated").setUrl(new String[] {"TufaniAnimated.x3d","https://www.web3d.org/x3d/content/examples/HumanoidAnimation/WinterAndSpring/TufaniAnimated.x3d","TufaniAnimated.wrl","https://www.web3d.org/x3d/content/examples/HumanoidAnimation/WinterAndSpring/TufaniAnimated.wrl"})))))
          .addComments(" Gramps and GrandKids Translation and Orientation ")
          .addComments(" All other animations are in file for character ")
          .addChild(new PositionInterpolator("Gramps_HumanoidRoot_TranslationInterpolator").setKey(new double[] {0.0,0.09,0.11,0.22,0.43,0.55,0.63,0.73,0.85,0.86,0.88,0.90,0.92,0.94,0.96,0.98,1.0}).setKeyValue(new MFVec3f(new double[] {6.6,0.0,0.5,6.8557,0.0,0.5,6.8557,0.0,0.5,9.8557,0.0,3.5,9.8557,0.1,3.5,9.8557,0.0,3.5,14.3558,0.0,8.0,16.8558,0.0,15.0,21.3557,0.0,24.5,21.3557,0.05,24.5,21.3557,0.0,24.5,21.3557,0.05,24.5,21.3557,0.0,24.5,21.3557,0.05,24.5,21.3557,0.0,24.5,21.3557,0.1,24.5,21.3557,0.0,24.5})))
          .addChild(new OrientationInterpolator("Gramps_HumanoidRoot_RotationInterpolator").setKey(new double[] {0.0,0.09,0.11,0.22,0.25,0.43,0.55,0.63,0.73,0.85,0.88,0.90,0.92,0.94,0.96,0.98,1.0}).setKeyValue(new MFRotation(new double[] {0.0,1.0,0.0,1.65,0.0,1.0,0.0,1.65,0.0,1.0,0.0,1.0,0.0,1.0,0.0,-0.5,0.0,1.0,0.0,-1.0,0.0,1.0,0.0,-1.7,0.0,1.0,0.0,1.0,0.0,1.0,0.0,0.35,0.0,1.0,0.0,0.35,0.0,1.0,0.0,0.35,0.0,1.0,0.0,0.35,0.0,1.0,0.0,0.35,0.0,1.0,0.0,0.35,0.0,1.0,0.0,0.35,0.0,1.0,0.0,0.35,0.0,1.0,0.0,0.36,0.0,1.0,0.0,0.36})))
          .addChild(new ROUTE().setFromNode("Clock100Seconds").setFromField("fraction_changed").setToNode("Gramps_HumanoidRoot_TranslationInterpolator").setToField("set_fraction"))
          .addChild(new ROUTE().setFromNode("Gramps_HumanoidRoot_TranslationInterpolator").setFromField("value_changed").setToNode("GrampsBox").setToField("set_translation"))
          .addChild(new ROUTE().setFromNode("Clock100Seconds").setFromField("fraction_changed").setToNode("Gramps_HumanoidRoot_RotationInterpolator").setToField("set_fraction"))
          .addChild(new ROUTE().setFromNode("Gramps_HumanoidRoot_RotationInterpolator").setFromField("value_changed").setToNode("GrampsBox").setToField("set_rotation"))
          .addChild(new PositionInterpolator("Leif_Root_TranslationInterpolator").setKey(new double[] {0.0,0.09,0.11,0.21,0.223,0.43,0.55,0.63,0.73,0.75,0.85,0.9,1.0}).setKeyValue(new MFVec3f(new double[] {-7.9962,0.0046,3.000,-7.9962,0.0046,3.000,-7.9962,0.0046,3.000,-7.9962,0.1046,3.000,-7.9962,0.0046,3.000,9.0038,0.0796,2.4999,11.5048,0.0796,3.4999,16.0038,0.0796,7.8699,18.5038,0.1796,14.8699,18.5038,0.0796,14.8699,23.0038,0.0796,24.3699,23.0038,0.0796,24.3699,23.0038,0.0796,24.3699})))
          .addChild(new OrientationInterpolator("Leif_HumanoidRoot_RotationInterpolator").setKey(new double[] {0.0,0.05,0.11,0.22,0.25,0.43,0.55,0.63,0.73,0.85,0.88,0.90,0.92,0.94,0.96,0.98,1.0}).setKeyValue(new MFRotation(new double[] {0.0,0.0,1.0,0.0,0.0,1.0,0.0,1.6,0.0,1.0,0.0,1.6,0.0,1.0,0.0,1.6,0.0,1.0,0.0,1.6,0.0,1.0,0.0,1.6,0.0,1.0,0.0,1.0,0.0,1.0,0.0,0.5,0.0,1.0,0.0,0.3,0.0,1.0,0.0,0.3,0.0,1.0,0.0,0.3,0.0,1.0,0.0,0.3,0.0,1.0,0.0,0.3,0.0,1.0,0.0,0.3,0.0,1.0,0.0,0.3,0.0,1.0,0.0,0.3,0.0,1.0,0.0,0.3})))
          .addChild(new ROUTE().setFromNode("Clock100Seconds").setFromField("fraction_changed").setToNode("Leif_Root_TranslationInterpolator").setToField("set_fraction"))
          .addChild(new ROUTE().setFromNode("Leif_Root_TranslationInterpolator").setFromField("value_changed").setToNode("LeifBox").setToField("set_translation"))
          .addChild(new ROUTE().setFromNode("Clock100Seconds").setFromField("fraction_changed").setToNode("Leif_HumanoidRoot_RotationInterpolator").setToField("set_fraction"))
          .addChild(new ROUTE().setFromNode("Leif_HumanoidRoot_RotationInterpolator").setFromField("value_changed").setToNode("LeifBox").setToField("set_rotation"))
          .addChild(new PositionInterpolator("Lily_HumanoidRoot_TranslationInterpolator").setKey(new double[] {0.0,0.09,0.11,0.225,0.43,0.55,0.63,0.73,0.85,0.86,1.0}).setKeyValue(new MFVec3f(new double[] {-8.0962,0.0046,5.600,-8.0962,0.0046,5.600,-8.0962,0.0046,5.600,-8.0962,0.0046,5.600,8.9038,0.0796,3.0999,10.1538,0.0796,3.0999,15.1538,0.0796,7.8499,17.6538,0.0796,14.8499,22.1538,0.0796,24.3499,22.1538,0.0796,24.3499,22.1538,0.0796,24.3499})))
          .addChild(new OrientationInterpolator("Lily_HumanoidRoot_RotationInterpolator").setKey(new double[] {0.0,0.07,0.11,0.22,0.25,0.43,0.55,0.63,0.73,0.85,0.88,0.90,0.92,0.94,0.96,0.98,1.0}).setKeyValue(new MFRotation(new double[] {0.0,0.0,1.0,0.0,0.0,1.0,0.0,1.6,0.0,1.0,0.0,1.6,0.0,1.0,0.0,1.6,0.0,1.0,0.0,1.6,0.0,1.0,0.0,1.6,0.0,1.0,0.0,1.0,0.0,1.0,0.0,0.5,0.0,1.0,0.0,0.3,0.0,1.0,0.0,0.3,0.0,1.0,0.0,0.3,0.0,1.0,0.0,0.3,0.0,1.0,0.0,0.3,0.0,1.0,0.0,0.3,0.0,1.0,0.0,0.3,0.0,1.0,0.0,0.3,0.0,1.0,0.0,0.3})))
          .addChild(new ROUTE().setFromNode("Clock100Seconds").setFromField("fraction_changed").setToNode("Lily_HumanoidRoot_TranslationInterpolator").setToField("set_fraction"))
          .addChild(new ROUTE().setFromNode("Lily_HumanoidRoot_TranslationInterpolator").setFromField("value_changed").setToNode("LilyBox").setToField("set_translation"))
          .addChild(new ROUTE().setFromNode("Clock100Seconds").setFromField("fraction_changed").setToNode("Lily_HumanoidRoot_RotationInterpolator").setToField("set_fraction"))
          .addChild(new ROUTE().setFromNode("Lily_HumanoidRoot_RotationInterpolator").setFromField("value_changed").setToNode("LilyBox").setToField("set_rotation"))
          .addChild(new PositionInterpolator("Tufani_HumanoidRoot_TranslationInterpolator").setKey(new double[] {0.0,0.09,0.11,0.227,0.43,0.55,0.63,0.73,0.85,0.86,1.0}).setKeyValue(new MFVec3f(new double[] {-8.0962,0.0046,6.400,-8.0962,0.0046,6.400,-8.0962,0.0046,6.400,-8.0962,0.0046,6.400,8.7038,0.0796,3.8999,9.2038,0.0796,3.6499,13.6538,0.0796,7.7699,16.1538,0.0796,14.7699,20.6538,0.0796,24.2699,20.6538,0.0796,24.2699,20.6538,0.0796,24.2699})))
          .addChild(new OrientationInterpolator("Tufani_HumanoidRoot_RotationInterpolator").setKey(new double[] {0.0,0.09,0.11,0.22,0.25,0.43,0.55,0.63,0.73,0.85,0.88,0.90,0.92,0.94,0.96,0.98,1.0}).setKeyValue(new MFRotation(new double[] {0.0,0.0,1.0,0.0,0.0,1.0,0.0,1.6,0.0,1.0,0.0,1.6,0.0,1.0,0.0,1.6,0.0,1.0,0.0,1.6,0.0,1.0,0.0,1.6,0.0,1.0,0.0,1.0,0.0,1.0,0.0,0.5,0.0,1.0,0.0,0.3,0.0,1.0,0.0,0.3,0.0,1.0,0.0,0.3,0.0,1.0,0.0,0.3,0.0,1.0,0.0,0.3,0.0,1.0,0.0,0.3,0.0,1.0,0.0,0.3,0.0,1.0,0.0,0.3,0.0,1.0,0.0,0.3})))
          .addChild(new ROUTE().setFromNode("Clock100Seconds").setFromField("fraction_changed").setToNode("Tufani_HumanoidRoot_TranslationInterpolator").setToField("set_fraction"))
          .addChild(new ROUTE().setFromNode("Tufani_HumanoidRoot_TranslationInterpolator").setFromField("value_changed").setToNode("TufaniBox").setToField("set_translation"))
          .addChild(new ROUTE().setFromNode("Clock100Seconds").setFromField("fraction_changed").setToNode("Tufani_HumanoidRoot_RotationInterpolator").setToField("set_fraction"))
          .addChild(new ROUTE().setFromNode("Tufani_HumanoidRoot_RotationInterpolator").setFromField("value_changed").setToNode("TufaniBox").setToField("set_rotation")))
        .addChild(new Group("SceneViewPoints02")
          .addComments(" Insert other PageDown viewpoints before final titles ")
          .addChild(new Transform("WSDedicationTitle").setTranslation(10.0,10.0,-10.0)
            .addChild(new Viewpoint("WSDedicationTitleView").setDescription("Look at Dedication title").setJump(false).setOrientation(-0.15,0.0,0.0,0.2).setPosition(0.0,1.0,5.0))
            .addChild(new Shape()
              .setGeometry(new Box().setSize(4.0,3.0,0.25))
              .setAppearance(new Appearance()
                .setTexture(new ImageTexture().setUrl(new String[] {"images/WSDedicationR1.png","https://www.web3d.org/x3d/content/examples/HumanoidAnimation/WinterAndSpring/images/WSDedicationR1.png"}))
                .setMaterial(new Material()))))
          .addChild(new Transform("WSThanksTitle").setTranslation(10.0,10.0,-15.0)
            .addChild(new Viewpoint("WSThanksTitleView").setDescription("Look at Thanks title").setJump(false).setOrientation(-0.15,0.0,0.0,0.2).setPosition(0.0,1.0,5.0))
            .addChild(new Shape()
              .setGeometry(new Box().setSize(4.0,3.0,0.25))
              .setAppearance(new Appearance()
                .setTexture(new ImageTexture().setUrl(new String[] {"images/WSThanksR2trimmed.png","https://www.web3d.org/x3d/content/examples/HumanoidAnimation/WinterAndSpring/images/WSThanksR2trimmed.png"}))
                .setMaterial(new Material()))))
          .addChild(new Transform("WSMusicCreditsTitle").setTranslation(10.0,10.0,-20.0)
            .addChild(new Viewpoint("WSMusicCreditsTitleView").setDescription("Look at Music Credits title").setJump(false).setOrientation(-0.15,0.0,0.0,0.2).setPosition(0.0,1.0,5.0))
            .addChild(new Shape()
              .setGeometry(new Box().setSize(4.0,3.0,0.25))
              .setAppearance(new Appearance()
                .setTexture(new ImageTexture().setUrl(new String[] {"images/WSMusicCreditAll.png","https://www.web3d.org/x3d/content/examples/HumanoidAnimation/WinterAndSpring/images/WSMusicCreditAll.png"}))
                .setMaterial(new Material())))))))
    .addComments(" Sequencers for Viewpoints ")
    .addChild(new BooleanSequencer("Scene_StageFarViewSequencer").setKey(new double[] {0.0,1.0}).setKeyValue(new boolean[] {true,false}))
    .addChild(new ROUTE().setFromNode("Clock100Seconds").setFromField("fraction_changed").setToNode("Scene_StageFarViewSequencer").setToField("set_fraction"))
    .addChild(new ROUTE().setFromNode("Scene_StageFarViewSequencer").setFromField("value_changed").setToNode("Scene_StageFarView").setToField("set_bind"))
    .addChild(new BooleanSequencer("WinterAndSpringTitleViewSequencer").setKey(new double[] {0.0,0.03,1.0}).setKeyValue(new boolean[] {false,true,false}))
    .addChild(new ROUTE().setFromNode("Clock100Seconds").setFromField("fraction_changed").setToNode("WinterAndSpringTitleViewSequencer").setToField("set_fraction"))
    .addChild(new ROUTE().setFromNode("WinterAndSpringTitleViewSequencer").setFromField("value_changed").setToNode("WinterAndSpringTitleView").setToField("set_bind"))
    .addChild(new BooleanSequencer("WSAuthorsTitleViewSequencer").setKey(new double[] {0.0,0.06,1.0}).setKeyValue(new boolean[] {false,true,false}))
    .addChild(new ROUTE().setFromNode("Clock100Seconds").setFromField("fraction_changed").setToNode("WSAuthorsTitleViewSequencer").setToField("set_fraction"))
    .addChild(new ROUTE().setFromNode("WSAuthorsTitleViewSequencer").setFromField("value_changed").setToNode("WSAuthorsTitleView").setToField("set_bind"))
    .addChild(new BooleanSequencer("Scene_GrampsBack1ViewSequencer").setKey(new double[] {0.0,0.09,1.0}).setKeyValue(new boolean[] {false,true,false}))
    .addChild(new ROUTE().setFromNode("Clock100Seconds").setFromField("fraction_changed").setToNode("Scene_GrampsBack1ViewSequencer").setToField("set_fraction"))
    .addChild(new ROUTE().setFromNode("Scene_GrampsBack1ViewSequencer").setFromField("value_changed").setToNode("Scene_GrampsBack1View").setToField("set_bind"))
    .addChild(new BooleanSequencer("Scene_KidsRunningTowardGrampsSequencer").setKey(new double[] {0.0,0.23,1.0}).setKeyValue(new boolean[] {false,true,false}))
    .addChild(new ROUTE().setFromNode("Clock100Seconds").setFromField("fraction_changed").setToNode("Scene_KidsRunningTowardGrampsSequencer").setToField("set_fraction"))
    .addChild(new ROUTE().setFromNode("Scene_KidsRunningTowardGrampsSequencer").setFromField("value_changed").setToNode("Scene_KidsRunningTowardGramps").setToField("set_bind"))
    .addChild(new BooleanSequencer("LeifViewSequencer").setKey(new double[] {0.0,0.30,1.0}).setKeyValue(new boolean[] {false,false,false}))
    .addChild(new ROUTE().setFromNode("Clock100Seconds").setFromField("fraction_changed").setToNode("LeifViewSequencer").setToField("set_fraction"))
    .addChild(new ROUTE().setFromNode("LeifViewSequencer").setFromField("value_changed").setToNode("LeifView").setToField("set_bind"))
    .addChild(new BooleanSequencer("LilyViewSequencer").setKey(new double[] {0.0,0.33,1.0}).setKeyValue(new boolean[] {false,true,false}))
    .addChild(new ROUTE().setFromNode("Clock100Seconds").setFromField("fraction_changed").setToNode("LilyViewSequencer").setToField("set_fraction"))
    .addChild(new ROUTE().setFromNode("LilyViewSequencer").setFromField("value_changed").setToNode("Lilyview").setToField("set_bind"))
    .addChild(new BooleanSequencer("TufaniViewSequencer").setKey(new double[] {0.0,0.36,1.0}).setKeyValue(new boolean[] {false,false,false}))
    .addChild(new ROUTE().setFromNode("Clock100Seconds").setFromField("fraction_changed").setToNode("TufaniViewSequencer").setToField("set_fraction"))
    .addChild(new ROUTE().setFromNode("TufaniViewSequencer").setFromField("value_changed").setToNode("Tufaniview").setToField("set_bind"))
    .addChild(new BooleanSequencer("Gramps01ViewSequencer").setKey(new double[] {0.0,0.56,1.0}).setKeyValue(new boolean[] {false,true,false}))
    .addChild(new ROUTE().setFromNode("Clock100Seconds").setFromField("fraction_changed").setToNode("Gramps01ViewSequencer").setToField("set_fraction"))
    .addChild(new ROUTE().setFromNode("Gramps01ViewSequencer").setFromField("value_changed").setToNode("Gramps01View").setToField("set_bind"))
    .addChild(new BooleanSequencer("Gramps03ViewSequencer").setKey(new double[] {0.0,0.75,1.0}).setKeyValue(new boolean[] {false,true,true}))
    .addChild(new ROUTE().setFromNode("Clock100Seconds").setFromField("fraction_changed").setToNode("Gramps03ViewSequencer").setToField("set_fraction"))
    .addChild(new ROUTE().setFromNode("Gramps03ViewSequencer").setFromField("value_changed").setToNode("Gramps03View").setToField("set_bind"))
    .addChild(new BooleanSequencer("WSDedicationTitleViewSequencer").setKey(new double[] {0.0,0.89,1.0}).setKeyValue(new boolean[] {false,true,false}))
    .addChild(new ROUTE().setFromNode("Clock100Seconds").setFromField("fraction_changed").setToNode("WSDedicationTitleViewSequencer").setToField("set_fraction"))
    .addChild(new ROUTE().setFromNode("WSDedicationTitleViewSequencer").setFromField("value_changed").setToNode("WSDedicationTitleView").setToField("set_bind"))
    .addChild(new BooleanSequencer("WSThanksTitleViewSequencer").setKey(new double[] {0.0,0.93,1.0}).setKeyValue(new boolean[] {false,true,false}))
    .addChild(new ROUTE().setFromNode("Clock100Seconds").setFromField("fraction_changed").setToNode("WSThanksTitleViewSequencer").setToField("set_fraction"))
    .addChild(new ROUTE().setFromNode("WSThanksTitleViewSequencer").setFromField("value_changed").setToNode("WSThanksTitleView").setToField("set_bind"))
    .addChild(new BooleanSequencer("WSMusicCreditsTitleViewSequencer").setKey(new double[] {0.0,0.96,1.0}).setKeyValue(new boolean[] {false,true,false}))
    .addChild(new ROUTE().setFromNode("Clock100Seconds").setFromField("fraction_changed").setToNode("WSMusicCreditsTitleViewSequencer").setToField("set_fraction"))
    .addChild(new ROUTE().setFromNode("WSMusicCreditsTitleViewSequencer").setFromField("value_changed").setToNode("WSMusicCreditsTitleView").setToField("set_bind"))
    .addChild(new Group("BackgroundsAndBackgroundSwitching")
      .addComments(" Backgrounds ")
      .addComments(" This is black for all ")
      .addChild(new Background("Background1Black").setGroundColor(new MFColor(new double[] {0.0,0.0,0.0})))
      .addComments(" This is light gray sky and green grass ")
      .addChild(new Background("Background2GraySkyGreenGrass").setGroundAngle(new double[] {1.57}).setGroundColor(new MFColor(new double[] {0.956,0.639,0.0,0.721,1.0,0.501})).setSkyColor(new MFColor(new double[] {0.827,0.827,0.827})).setBackUrl(new String[] {"images/SCENE_FOG_1.png","https://www.web3d.org/x3d/content/examples/HumanoidAnimation/WinterAndSpring/images/SCENE_FOG_1.png"}).setFrontUrl(new String[] {"images/SCENE_FOG_1.png","https://www.web3d.org/x3d/content/examples/HumanoidAnimation/WinterAndSpring/images/SCENE_FOG_1.png"}).setLeftUrl(new String[] {"images/SCENE_FOG_1.png","https://www.web3d.org/x3d/content/examples/HumanoidAnimation/WinterAndSpring/images/SCENE_FOG_1.png"}).setRightUrl(new String[] {"images/SCENE_FOG_1.png","https://www.web3d.org/x3d/content/examples/HumanoidAnimation/WinterAndSpring/images/SCENE_FOG_1.png"}))
      .addComments(" This is blue sky and green grass ")
      .addChild(new Background("Background3BlueSkyGreenGrass").setGroundAngle(new double[] {1.57}).setGroundColor(new MFColor(new double[] {0.356,0.639,0.0,0.721,1.0,0.501})).setSkyColor(new MFColor(new double[] {0.0,0.71,0.886})))
      .addComments(" This is DarkGrey background and white text for all ")
      .addChild(new Background("Background4DarkGrey").setSkyColor(new MFColor(new double[] {0.6,0.6,0.6})))
      .addChild(new BooleanSequencer("Background1BlackSequencer").setKey(new double[] {0.0,0.90,1.0}).setKeyValue(new boolean[] {true,true,true}))
      .addChild(new BooleanSequencer("Background2GraySkyGreenGrassSequencer").setKey(new double[] {0.0,0.09,1.0}).setKeyValue(new boolean[] {false,true,false}))
      .addChild(new BooleanSequencer("Background3SkyBlueGreenGrassSequencer").setKey(new double[] {0.0,0.22,1.0}).setKeyValue(new boolean[] {false,true,false}))
      .addChild(new BooleanSequencer("Background4DarkGreySequencer").setKey(new double[] {0.0,0.85,1.0}).setKeyValue(new boolean[] {false,true,false}))
      .addChild(new ROUTE().setFromNode("Clock100Seconds").setFromField("fraction_changed").setToNode("Background1BlackSequencer").setToField("set_fraction"))
      .addChild(new ROUTE().setFromNode("Clock100Seconds").setFromField("fraction_changed").setToNode("Background2GraySkyGreenGrassSequencer").setToField("set_fraction"))
      .addChild(new ROUTE().setFromNode("Clock100Seconds").setFromField("fraction_changed").setToNode("Background3SkyBlueGreenGrassSequencer").setToField("set_fraction"))
      .addChild(new ROUTE().setFromNode("Clock100Seconds").setFromField("fraction_changed").setToNode("Background4DarkGreySequencer").setToField("set_fraction"))
      .addChild(new ROUTE().setFromNode("Background1BlackSequencer").setFromField("value_changed").setToNode("Background1Black").setToField("set_bind"))
      .addChild(new ROUTE().setFromNode("Background2GraySkyGreenGrassSequencer").setFromField("value_changed").setToNode("Background2GraySkyGreenGrass").setToField("set_bind"))
      .addChild(new ROUTE().setFromNode("Background3SkyBlueGreenGrassSequencer").setFromField("value_changed").setToNode("Background3BlueSkyGreenGrass").setToField("set_bind"))
      .addChild(new ROUTE().setFromNode("Background4DarkGreySequencer").setFromField("value_changed").setToNode("Background4DarkGrey").setToField("set_bind")))
    .addChild(new LoadSensor("EveryInlineLoadSensor")
      .addChild(new Inline().setUSE("PathMeshTopSurface"))
      .addChild(new Inline().setUSE("Pathway"))
      .addChild(new Inline().setUSE("Bushes"))
      .addChild(new Inline().setUSE("FlowerSet"))
      .addChild(new Inline().setUSE("FlowerGardens"))
      .addChild(new Inline().setUSE("Gramps11"))
      .addChild(new Inline().setUSE("JointCoordinateAxes"))
      .addChild(new Inline().setUSE("CaneFitting"))
      .addChild(new Inline().setUSE("LeifAnimated"))
      .addChild(new Inline().setUSE("LilyAnimated"))
      .addChild(new Inline().setUSE("TufaniAnimated")))
    .addChild(new ROUTE().setFromNode("EveryInlineLoadSensor").setFromField("loadTime").setToNode("StartTIME").setToField("startTime")));
            }
            catch (Exception ex)
            {       
                System.err.println ("*** Further hints on X3DJSAIL errors and exceptions at");
                System.err.println ("*** https://www.web3d.org/specifications/java/X3DJSAIL.html");
                throw (ex);
            }
	}
	// end of initialize() method

	/** The initialized model object, created within initialize() method. */
	private X3D x3dModel;

	/** 
	 * Provide a 
	 * <a href="https://dzone.com/articles/java-copy-shallow-vs-deep-in-which-you-will-swim" target="_blank">shallow copy</a>
	 * of the X3D model.
	 * @see <a href="https://www.web3d.org/specifications/java/javadoc/org/web3d/x3d/jsail/Core/X3D.html">X3D</a>
	 * @return MainStage model
	 */
	public X3D getX3dModel()
	{	  
		return x3dModel;
	}
	   
    /** 
     * Default main() method provided for test purposes, uses CommandLine to set global ConfigurationProperties for this object.
     * @param args array of input parameters, provided as arguments
     * @see <a href="https://www.web3d.org/specifications/java/javadoc/org/web3d/x3d/jsail/Core/X3D.html#handleArguments-java.lang.String:A-">X3D.handleArguments(args)</a>
     * @see <a href="https://www.web3d.org/specifications/java/javadoc/org/web3d/x3d/jsail/Core/X3D.html#validationReport--">X3D.validationReport()</a>
     * @see <a href="https://www.web3d.org/specifications/java/javadoc/org/web3d/x3d/jsail/CommandLine.html">CommandLine</a>
     * @see <a href="https://www.web3d.org/specifications/java/javadoc/org/web3d/x3d/jsail/CommandLine.html#USAGE">CommandLine.USAGE</a>
     * @see <a href="https://www.web3d.org/specifications/java/javadoc/org/web3d/x3d/jsail/ConfigurationProperties.html">ConfigurationProperties</a>
     */
    public static void main(String args[])
    {
        System.out.println("Build this X3D model, showing validation diagnostics...");
        X3D thisExampleX3dModel = new MainStage().getX3dModel();
//      System.out.println("X3D model construction complete.");
	
        // next handle command line arguments
        boolean hasArguments = (args != null) && (args.length > 0);
        boolean validate = true; // default
        boolean argumentsLoadNewModel = false;
        String  fileName = new String();

        if (args != null)
        {
                for (String arg : args)
                {
                        if (arg.toLowerCase().startsWith("-v") || arg.toLowerCase().contains("validate"))
                        {
                                validate = true; // making sure
                        }
                        if (arg.toLowerCase().endsWith(X3D.FILE_EXTENSION_X3D) ||
                                arg.toLowerCase().endsWith(X3D.FILE_EXTENSION_CLASSICVRML) ||
                                arg.toLowerCase().endsWith(X3D.FILE_EXTENSION_X3DB) ||
                                arg.toLowerCase().endsWith(X3D.FILE_EXTENSION_VRML97) ||
                                arg.toLowerCase().endsWith(X3D.FILE_EXTENSION_EXI) ||
                                arg.toLowerCase().endsWith(X3D.FILE_EXTENSION_GZIP) ||
                                arg.toLowerCase().endsWith(X3D.FILE_EXTENSION_ZIP) ||
                                arg.toLowerCase().endsWith(X3D.FILE_EXTENSION_HTML) ||
                                arg.toLowerCase().endsWith(X3D.FILE_EXTENSION_XHTML))
                        {
                                argumentsLoadNewModel = true;
                                fileName = arg;
                        }
                }
        }
        if      (argumentsLoadNewModel)
                System.out.println("WARNING: \"HumanoidAnimation.WinterAndSpring.MainStage\" model invocation is attempting to load file \"" + fileName + "\" instead of simply validating itself... file loading ignored.");
        else if (hasArguments) // if no arguments provided, this method produces usage warning
                thisExampleX3dModel.handleArguments(args);
	
        if (validate)
        {
            //  System.out.println("--- TODO fix duplicated outputs ---"); // omit when duplicated outputs problem is solved/refactored
		String validationResults = thisExampleX3dModel.validationReport();
            //  System.out.println("-----------------------------------"); // omit when duplicated outputs problem is solved/refactored
                System.out.print("HumanoidAnimation.WinterAndSpring.MainStage self-validation test confirmation: ");
                if (!validationResults.equals("success"))
                    System.out.println();
                System.out.println(validationResults.trim());

                // experimental: test X3DJSAIL output files
                // WinterAndSpring/MainStage_JavaExport.* file validation is checked when building X3D Example Archives
                String filenameX3D  = "WinterAndSpring/MainStage_JavaExport.x3d"; 
                String filenameX3DV = "WinterAndSpring/MainStage_JavaExport.x3dv"; 
                String filenameJSON = "WinterAndSpring/MainStage_JavaExport.json";
                thisExampleX3dModel.toFileX3D        (filenameX3D);
                thisExampleX3dModel.toFileClassicVRML(filenameX3DV);
// TODO         thisExampleX3dModel.toFileJSON       (filenameJSON);
        }
    }
}
