[x3d-public] X3D-Edit -- Schematron out to lunch on this file. All I did was make the script inline. Thanks for help in advance. I will try Java 8 next
John Carlson
yottzumm at gmail.com
Fri Dec 4 20:27:52 PST 2015
Java 8 fixed the issue. WODE. Thanks!
John
> On Dec 4, 2015, at 10:15 PM, John Carlson <john.carlson3 at sbcglobal.net> wrote:
>
> Performing X3D schema validation...
> Checking file:/Users/johncarlson/Source/X3DJSONLD/bubbles.x3d...
> Referenced entity at "nbres:/org/web3d/x3d/externals/schemas/x3d-3.3-Web3dExtensionsPublic.xsd".
> XML schema validation: pass
>
> Performing X3D regular expression (regex) values check...
>
> Performing X3dToClassicVrml.xslt conversion check...
> www.web3d.org
> com.sun.org.apache.xml.internal.utils.WrappedRuntimeException: www.web3d.org
> javax.xml.transform.TransformerException: com.sun.org.apache.xml.internal.utils.WrappedRuntimeException: www.web3d.org
>
> Performing X3D Schematron check...
>
>
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 3.3//EN" "http://www.web3d.org/specifications/x3d-3.3.dtd">
> <X3D profile='Immersive' version='3.3' xsd:noNamespaceSchemaLocation='http://www.web3d.org/specifications/x3d-3.3.xsd' xmlns:xsd='http://www.w3.org/2001/XMLSchema-instance'>
> <Scene>
> <NavigationInfo type='"ANY" "WALK" "EXAMINE" "FLY" "LOOKAT"'/>
> <Viewpoint DEF='Tour' description='Tour Views'/>
> <Viewpoint position='0 0 4' description='sphere in road'/>
> <Background backUrl='"cubemap/BK.png" "http://coderextreme.net/X3DJSONLD/cubemap/BK.png"' bottomUrl='"cubemap/BT.png" "http://coderextreme.net/X3DJSONLD/cubemap/BT.png"' frontUrl='"cubemap/FR.png" "http://coderextreme.net/X3DJSONLD/cubemap/FR.png"' leftUrl='"cubemap/LF.png" "http://coderextreme.net/X3DJSONLD/cubemap/LF.png"' rightUrl='"cubemap/RT.png" "http://coderextreme.net/X3DJSONLD/cubemap/RT.png"' topUrl='"cubemap/TP.png" "http://coderextreme.net/X3DJSONLD/cubemap/TP.png"'/>
> <Transform DEF='Rose01'>
> <Shape>
> <Sphere/>
> <Appearance DEF='_01_-_Default'>
> <Material diffuseColor='0.7 0.7 0.7' specularColor='0.5 0.5 0.5'/>
> <!--ComposedCubeMapTexture containerField='texture'>
> <ImageTexture url='"cubemap/BK.png" "http://coderextreme.net/X3DJSONLD/cubemap/BK.png"' containerField='back'/>
> <ImageTexture url='"cubemap/BT.png" "http://coderextreme.net/X3DJSONLD/cubemap/BT.png"' containerField='bottom'/>
> <ImageTexture url='"cubemap/FR.png" "http://coderextreme.net/X3DJSONLD/cubemap/FR.png"' containerField='front'/>
> <ImageTexture url='"cubemap/LF.png" "http://coderextreme.net/X3DJSONLD/cubemap/LF.png"' containerField='left'/>
> <ImageTexture url='"cubemap/RT.png" "http://coderextreme.net/X3DJSONLD/cubemap/RT.png"' containerField='right'/>
> <ImageTexture url='"cubemap/TP.png" "http://coderextreme.net/X3DJSONLD/cubemap/TP.png"' containerField='top'/>
> </ComposedCubeMapTexture>
> <ComposedShader DEF='ComposedShader' containerField='shaders' language='GLSL'>
> <field name='cube' accessType='inputOutput' type='SFInt32' value='0'/>
> <field name='chromaticDispertion' accessType='inputOutput' type='SFVec3f' value='0.98 1 1.033'/>
> <field name='bias' accessType='inputOutput' type='SFFloat' value='0.5'/>
> <field name='scale' accessType='inputOutput' type='SFFloat' value='0.5'/>
> <field name='power' accessType='inputOutput' type='SFFloat' value='2'/>
> <ShaderPart url='"bubbles.vs" "http://coderextreme.net/X3DJSONLD/bubbles.vs"' containerField='parts'/>
> <ShaderPart url='"bubbles.fs" "http://coderextreme.net/X3DJSONLD/bubbles.fs"' containerField='parts' type='FRAGMENT'/>
> </ComposedShader-->
> </Appearance>
> </Shape>
> </Transform>
> <TimeSensor DEF='TourTime' cycleInterval='5' loop='true'/>
> <PositionInterpolator DEF='TourPosition' key='0 1' keyValue='0 0 10 0 0 -10'/>
> <OrientationInterpolator DEF='TourOrientation' key='0 1' keyValue='0 1 0 0 0 1 0 3.1416'/>
> <Script DEF='RandomTourTime'>
> <field accessType='inputOnly' name='set_fraction' type='SFFloat'/>
> <field name='value_changed' accessType='inputOutput' type='SFFloat' value='0'/>
> <field name='orientations' accessType='inputOutput' type='MFRotation' value='0,1,0,0,0,1,0,-1.57,0,1,0,3.14,0,1,0,1.57,0,1,0,0,1,0,0,-1.57,0,1,0,0,1,0,0,1.57,0,1,0,0'/>
> <field name='positions' accessType='inputOutput' type='MFVec3f' value='0,0,10,-10,0,0,0,0,-10,10,0,0,0,0,10,0,10,0,0,0,10,0,-10,0,0,0,10'/>
> <field name='position_changed' accessType='outputOnly' type='MFVec3f'/>
> <field name='orientation_changed' accessType='outputOnly' type='MFRotation'/>
> <![CDATA[javascript:
>
>
> function set_fraction(value) {
> //var positions = [[0, 0, 10], [-10, 0, 0], [0, 0, -10], [10, 0, 0], [0, 0, 10], [0, 10, 0], [0, 0, 10], [0, -10, 0], [0, 0, 10]];
> //var orientations = [[0, 1, 0, 0], [0, 1, 0, -1.57], [0, 1, 0, 3.14], [0, 1, 0, 1.57], [0, 1, 0, 0] [1, 0, 0, -1.57], [0, 1, 0, 0], [1, 0, 0, 1.57], [0, 1, 0, 0]];
> //Browser.println(value);
> var ov = value_changed;
> Browser.println(ov);
> //Browser.println(positions.length);
> do {
> value_changed = Math.round(Math.random()*positions.length);
> } while (value_changed === ov);
> Browser.println(value_changed);
> var vc = value_changed;
>
> Browser.println(orientations[ov]);
> Browser.println(orientations[vc]);
> orientation_changed[0] = new SFRotation(orientations[ov][0], orientations[ov][1], orientations[ov][2], orientations[ov][3]);
> orientation_changed[1] = new SFRotation(orientations[vc][0], orientations[vc][1], orientations[vc][2], orientations[vc][3]);
> Browser.println(positions[ov]);
> Browser.println(positions[vc]);
> position_changed = new MFVec3f();
> position_changed[0] = new SFVec3f(positions[ov][0],positions[ov][1],positions[ov][2]);
> position_changed[1] = new SFVec3f(positions[vc][0],positions[vc][1],positions[vc][2]);
> // }
> }
> ]]></Script>
> <ROUTE fromNode='TourTime' fromField='cycleTime' toNode='RandomTourTime' toField='set_fraction'/>
> <ROUTE fromNode='RandomTourTime' fromField='orientation_changed' toNode='TourOrientation' toField='keyValue'/>
> <ROUTE fromNode='RandomTourTime' fromField='position_changed' toNode='TourPosition' toField='keyValue'/>
> <ROUTE fromNode='TourTime' fromField='fraction_changed' toNode='TourOrientation' toField='set_fraction'/>
> <ROUTE fromNode='TourOrientation' fromField='value_changed' toNode='Tour' toField='set_orientation'/>
> <ROUTE fromNode='TourTime' fromField='fraction_changed' toNode='TourPosition' toField='set_fraction'/>
> <ROUTE fromNode='TourPosition' fromField='value_changed' toNode='Tour' toField='set_position'/>
> </Scene>
> </X3D>
More information about the x3d-public
mailing list