[x3d-public] bug in InstantReality or my code?

John Carlson yottzumm at gmail.com
Sun Nov 29 19:26:31 PST 2015


Apparently, MFVec3d is not defined in the InstantReality JavaScript API.  Huh?  Is that so you can’t do cool stuff?

John
> On Nov 29, 2015, at 8:58 PM, Don Brutzman <brutzman at nps.edu> wrote:
> 
> always check types when ROUTE-ing values.  X3D Validator checks them, and X3D-Edit pane also tries to support his.
> 
> If you think that node is broken, try a simpler scene to isolate the bug conclusively (Shader support varies).
> 
> 
> On 11/29/2015 3:00 PM, John Carlson wrote:
>> I’m getting the following error in InstantReality on Mac OS X 10.11
>> 
>> WARNING Avalon Can’t create ROUTE >RandomTourTime.position_changed< TO>TourPosition.set_keyValue<: Invalid inSlot.
>> 
>> I’ve also tried keyValue.  How do I set keyValue in the GeoPositionInterpolator?  The standard says I can. http://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/components/geodata.html
>> 
>> Here is the x3d:
>> 
>> <?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='Full' version='3.3' xsd:noNamespaceSchemaLocation='http://www.web3d.org/specifications/x3d-3.3.xsd' xmlns:xsd='http://www.w3.org/2001/XMLSchema-instance'>
>>     <Scene>
>>         <GeoViewpoint DEF='Tour' position='0 0 10' orientation='1 0 0 -1.57' description='Tour Views'/>
>>         <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>
>>             <Shape>
>>                 <Sphere/>
>>                 <Appearance>
>>                     <Material diffuseColor='0.7 0.7 0.7' specularColor='0.5 0.5 0.5'/>
>>                 </Appearance>
>>             </Shape>
>>         </Transform>
>>         <TimeSensor DEF='TourTime' cycleInterval='30' loop='true'/>
>>         <GeoPositionInterpolator DEF='TourPosition' key='0 1' keyValue='0 0 10 0 0.00628 10'/>
>>         <Script DEF='RandomTourTime'>
>>             <field accessType='inputOnly' name='set_fraction' type='SFFloat'/>
>> 
>>             <field name='position_changed' accessType='inputOutput' type='MFVec3d' value='0 0 10 0 0.00628 10'/>
>>             ecmascript:
>>                function set_fraction(value) {
>>                         Browser.println(position_changed[0]);
>>                         Browser.println(position_changed[1]);
>>                         position_changed[0] = new SFVec3d(position_changed[1][0], position_changed[1][1], position_changed[1][2]);
>>                         position_changed[1] = new SFVec3d(Math.random()*0.00628-0.00314,Math.random()*0.0628-0.00314, 10);
>>                }
>>         </Script>
>>         <ROUTE fromNode='TourTime' fromField='cycleTime' toNode='RandomTourTime' toField='set_fraction'/>
>>         <ROUTE fromNode='RandomTourTime' fromField='position_changed' toNode='TourPosition' toField='set_keyValue'/>
>>         <ROUTE fromNode='TourTime' fromField='fraction_changed' toNode='TourPosition' toField='set_fraction'/>
>>         <ROUTE fromNode='TourPosition' fromField='value_changed' toNode='Tour' toField='set_position'/>
>>     </Scene>
>> </X3D>
>> 
>> 
>> 
>> _______________________________________________
>> x3d-public mailing list
>> x3d-public at web3d.org
>> http://web3d.org/mailman/listinfo/x3d-public_web3d.org
>> 
> 
> 
> all the best, Don
> -- 
> Don Brutzman  Naval Postgraduate School, Code USW/Br       brutzman at nps.edu
> Watkins 270,  MOVES Institute, Monterey CA 93943-5000 USA   +1.831.656.2149
> X3D graphics, virtual worlds, navy robotics http://faculty.nps.edu/brutzman




More information about the x3d-public mailing list