Inline198.setUrl([ "Target.x3d", "https://savage.nps.edu/Savage/AircraftFixedWing/F16-FightingFalcon-Turkey/Target.x3d", "Target.wrl", "https://savage.nps.edu/Savage/AircraftFixedWing/F16-FightingFalcon-Turkey/Target.wrl" ]) Transform197.addChildren(Inline198) Scene17.addChildren(Transform197) TimeSensor199 = x3dpsail.TimeSensor() TimeSensor199.setDEF("FireClock") TimeSensor199.setCycleInterval(8) Scene17.addChildren(TimeSensor199) PositionInterpolator200 = x3dpsail.PositionInterpolator() PositionInterpolator200.setDEF("MissilePath") PositionInterpolator200.setKey([0, 0.1, 1]) PositionInterpolator200.setKeyValue( [-15.65, 0, 4.5, -15.65, -2, 4.5, 16, -50, -500]) Scene17.addChildren(PositionInterpolator200) ROUTE201 = x3dpsail.ROUTE() ROUTE201.setFromField("touchTime") ROUTE201.setFromNode("FireSensor") ROUTE201.setToField("set_startTime") ROUTE201.setToNode("FireClock") Scene17.addChildren(ROUTE201) ROUTE202 = x3dpsail.ROUTE() ROUTE202.setFromField("fraction_changed")
x3dpsail.Material().setDiffuseColor( x3dpsail.SFColor(1, 0, 0)))) ).addChild(x3dpsail.Transform().setTranslation( x3dpsail.SFVec3f(1, 0, 0)).addChild( x3dpsail.Shape().setGeometry(x3dpsail.Text().setString( x3dpsail.MFString(["Node"])).setFontStyle( x3dpsail.FontStyle().setJustify( x3dpsail.MFString(["MIDDLE", "MIDDLE"])).setSize( x3dpsail.SFFloat(5)) )).setAppearance(x3dpsail.Appearance().setMaterial( x3dpsail.Material().setDiffuseColor( x3dpsail.SFColor(0, 0, 1))))))). addChild(x3dpsail.PositionInterpolator().setDEF( x3dpsail.SFString("NodePosition")).setKey( x3dpsail.MFFloat([0, 1])).setKeyValue( x3dpsail.MFVec3f([0, 0, 0, 0, 5, 0 ]))). addChild(x3dpsail.Script().setDEF( x3dpsail.SFString("MoveBall")).addField( x3dpsail.field().setName( x3dpsail.SFString("translation")).setAccessType( x3dpsail.SFString("inputOutput")).setType( x3dpsail.SFString("SFVec3f")).setValue( x3dpsail.SFString("50 50 0")) ).addField(x3dpsail.field().setName( x3dpsail.SFString("old")).setAccessType( x3dpsail.SFString("inputOutput")).setType( x3dpsail.SFString("SFVec3f")).setValue( x3dpsail.SFString("0 0 0") )).addField(x3dpsail.field().setName(
Transform32.setIS(IS33) Shape35 = x3dpsail.Shape() Sphere36 = x3dpsail.Sphere() Sphere36.setRadius(0.1) Shape35.setGeometry(Sphere36) Appearance37 = x3dpsail.Appearance() Material38 = x3dpsail.Material() Material38.setDiffuseColor([1, 0, 0]) Appearance37.setMaterial(Material38) Shape35.setAppearance(Appearance37) Transform32.addChildren(Shape35) PositionInterpolator39 = x3dpsail.PositionInterpolator() PositionInterpolator39.setDEF("PI1") PositionInterpolator39.setKey([0, 1]) PositionInterpolator39.setKeyValue([0, 0, 0, 0, 5, 0]) Transform32.addChildren(PositionInterpolator39) Script40 = x3dpsail.Script() Script40.setDEF("MB1") field41 = x3dpsail.field() field41.setName("translation") field41.setAccessType("inputOutput") field41.setType("SFVec3f") field41.setValue("50 50 0") Script40.addField(field41) field42 = x3dpsail.field()
X3D0 = (x3dpsail.X3D().setProfile(x3dpsail.SFString("Immersive")).setVersion(x3dpsail.SFString("3.3")) .setHead(x3dpsail.head() .addMeta(x3dpsail.meta().setName(x3dpsail.SFString("title")).setContent(x3dpsail.SFString("x3dconnectorProto"))) .addMeta(x3dpsail.meta().setName(x3dpsail.SFString("creator")).setContent(x3dpsail.SFString("Lost, Doug Sanden I think"))) .addMeta(x3dpsail.meta().setName(x3dpsail.SFString("generator")).setContent(x3dpsail.SFString("manual"))) .addMeta(x3dpsail.meta().setName(x3dpsail.SFString("identifier")).setContent(x3dpsail.SFString("https://coderextreme.net/X3DJSONLD/x3dconnectorProto.x3d"))) .addMeta(x3dpsail.meta().setName(x3dpsail.SFString("description")).setContent(x3dpsail.SFString("a generic proto to connect two objects")))) .setScene(x3dpsail.Scene() .addChild(x3dpsail.Viewpoint().setPosition(x3dpsail.SFVec3f(0,0,5)).setDescription(x3dpsail.SFString("Only Viewpoint"))) .addChild(x3dpsail.Background().setSkyColor(x3dpsail.MFColor([0.4,0.4,0.4]))) .addChild(x3dpsail.Transform().setDEF(x3dpsail.SFString("DECLpoint_G1_node")) .addChild(x3dpsail.Shape() .setGeometry(x3dpsail.Sphere().setRadius(x3dpsail.SFFloat(0.1))) .setAppearance(x3dpsail.Appearance() .setMaterial(x3dpsail.Material().setDiffuseColor(x3dpsail.SFColor(1,0,0))))) .addChild(x3dpsail.PositionInterpolator().setDEF(x3dpsail.SFString("DECLpoint_G1_PI1")).setKey(x3dpsail.MFFloat([0,1])).setKeyValue(x3dpsail.MFVec3f([0,0,0,0,5,0]))) .addChild(x3dpsail.Script().setDEF(x3dpsail.SFString("DECLpoint_G1_MB1")) .addField(x3dpsail.field().setName(x3dpsail.SFString("translation")).setAccessType(x3dpsail.SFString("inputOutput")).setType(x3dpsail.SFString("SFVec3f")).setValue(x3dpsail.SFString("0 0 0"))) .addField(x3dpsail.field().setName(x3dpsail.SFString("old")).setAccessType(x3dpsail.SFString("inputOutput")).setType(x3dpsail.SFString("SFVec3f")).setValue(x3dpsail.SFString("0 0 0"))) .addField(x3dpsail.field().setName(x3dpsail.SFString("set_location")).setAccessType(x3dpsail.SFString("inputOnly")).setType(x3dpsail.SFString("SFTime"))) .addField(x3dpsail.field().setName(x3dpsail.SFString("keyValue")).setAccessType(x3dpsail.SFString("inputOutput")).setType(x3dpsail.SFString("MFVec3f")).setValue(x3dpsail.SFString("0 0 0 0 5 0"))).setSourceCode('''ecmascript:\n"+ " function set_location(value) {\n"+ " old = translation;\n"+ " translation = new SFVec3f(Math.random()*10-5, Math.random()*10-5, Math.random()*10-5);\n"+ " keyValue = new MFVec3f([old, translation]);\n"+ " // Browser.println(keyValue);\n"+ " }''') ) .addChild(x3dpsail.TimeSensor().setDEF(x3dpsail.SFString("DECLpoint_G1_CL1")).setCycleInterval(x3dpsail.SFTime(3)).setLoop(x3dpsail.SFBool(True))) .addChild(x3dpsail.ROUTE().setFromNode(x3dpsail.SFString("DECLpoint_G1_CL1")).setFromField(x3dpsail.SFString("cycleTime")).setToNode(x3dpsail.SFString("DECLpoint_G1_MB1")).setToField(x3dpsail.SFString("set_location"))) .addChild(x3dpsail.ROUTE().setFromNode(x3dpsail.SFString("DECLpoint_G1_CL1")).setFromField(x3dpsail.SFString("fraction_changed")).setToNode(x3dpsail.SFString("DECLpoint_G1_PI1")).setToField(x3dpsail.SFString("set_fraction")))
x3dpsail.SFString("value_changed")).setFromNode( x3dpsail.SFString("Spinner")).setToField( x3dpsail.SFString("rotation")).setToNode( x3dpsail.SFString("TransformExampleUSE"))). addChild(x3dpsail.Inline( ).setDEF(x3dpsail.SFString("someInline")).setUrl( x3dpsail.MFString([ "someUrl.x3d", "http://www.web3d.org/x3d/content/examples/Basic/X3dSpecifications/someUrl.x3d" ]))).addChild(x3dpsail.IMPORT().setAS( x3dpsail.SFString("someInlineRoot")).setImportedDEF( x3dpsail.SFString("someName")).setInlineDEF( x3dpsail.SFString("someInline"))).addChild( x3dpsail.PositionInterpolator().setDEF( x3dpsail.SFString("StayInPlace")).setKey( x3dpsail.MFFloat([0, 1])).setKeyValue( x3dpsail.MFVec3f( [0, 0, 0, 0, 0, 0]))). addChild(x3dpsail.ROUTE().setFromField( x3dpsail.SFString("fraction_changed")).setFromNode( x3dpsail.SFString("Clock")).setToField( x3dpsail.SFString("set_fraction")).setToNode( x3dpsail.SFString("StayInPlace"))). addChild(x3dpsail.ROUTE().setFromField( x3dpsail.SFString("value_changed")).setFromNode( x3dpsail.SFString("StayInPlace")).setToField( x3dpsail.SFString("set_translation")).setToNode( x3dpsail.SFString("someInlineRoot"))))) X3D0.toFileX3D("./future/./X3dHeaderPrototypeSyntaxExamples_RoundTrip.x3d")
"../shaders/pc_bubbles.fs", "https://coderextreme.net/X3DJSONLD/shaders/pc_bubbles.fs" ]) ).setType(x3dpsail.SFString( "FRAGMENT" ))))))).addChild(x3dpsail.TimeSensor().setDEF(x3dpsail.SFString( "TourTime" )).setCycleInterval(x3dpsail.SFTime( 5 )).setLoop(x3dpsail.SFBool( True ))).addChild(x3dpsail.PositionInterpolator().setDEF( x3dpsail. SFString("TourPosition") ).setKey(x3dpsail.MFFloat([ 0, 1 ])).setKeyValue(x3dpsail.MFVec3f([ 0, 0, 10, 0, 0, -10 ]))).addChild(x3dpsail.OrientationInterpolator().setDEF( x3dpsail.SFString("TourOrientation") ).setKey(x3dpsail.MFFloat([ 0, 1 ])).setKeyValue(x3dpsail.MFRotation([ 0, 1, 0, 0, 0, 1, 0, 3.1416 ]))).addChild(x3dpsail.Script().setDEF( x3dpsail.SFString("RandomTourTime") ).addField(x3dpsail.field().setName(
Transform10.setDEF("DECLpoint_G1_node") Shape11 = x3dpsail.Shape() Sphere12 = x3dpsail.Sphere() Sphere12.setRadius(0.1) Shape11.setGeometry(Sphere12) Appearance13 = x3dpsail.Appearance() Material14 = x3dpsail.Material() Material14.setDiffuseColor([1, 0, 0]) Appearance13.setMaterial(Material14) Shape11.setAppearance(Appearance13) Transform10.addChildren(Shape11) PositionInterpolator15 = x3dpsail.PositionInterpolator() PositionInterpolator15.setDEF("DECLpoint_G1_PI1") PositionInterpolator15.setKey([0, 1]) PositionInterpolator15.setKeyValue([0, 0, 0, 0, 5, 0]) Transform10.addChildren(PositionInterpolator15) Script16 = x3dpsail.Script() Script16.setDEF("DECLpoint_G1_MB1") field17 = x3dpsail.field() field17.setName("translation") field17.setAccessType("inputOutput") field17.setType("SFVec3f") field17.setValue("0 0 0") Script16.addField(field17) field18 = x3dpsail.field()
Scene17.addChildren(ROUTE72) Inline73 = x3dpsail.Inline() Inline73.setDEF("someInline") Inline73.setUrl([ "someUrl.x3d", "http://www.web3d.org/x3d/content/examples/Basic/X3dSpecifications/someUrl.x3d" ]) Scene17.addChildren(Inline73) IMPORT74 = x3dpsail.IMPORT() IMPORT74.setAS("someInlineRoot") IMPORT74.setImportedDEF("someName") IMPORT74.setInlineDEF("someInline") Scene17.addChildren(IMPORT74) PositionInterpolator75 = x3dpsail.PositionInterpolator() PositionInterpolator75.setDEF("StayInPlace") PositionInterpolator75.setKey([0, 1]) PositionInterpolator75.setKeyValue([0, 0, 0, 0, 0, 0]) Scene17.addChildren(PositionInterpolator75) ROUTE76 = x3dpsail.ROUTE() ROUTE76.setFromField("fraction_changed") ROUTE76.setFromNode("Clock") ROUTE76.setToField("set_fraction") ROUTE76.setToNode("StayInPlace") Scene17.addChildren(ROUTE76) ROUTE77 = x3dpsail.ROUTE() ROUTE77.setFromField("value_changed") ROUTE77.setFromNode("StayInPlace")