[x3d-public] X3DJSAIL: container field changed in JSON. Watchout there's two of them

Don Brutzman brutzman at nps.edu
Tue Mar 21 22:23:27 PDT 2017


Sound/AudioClip (default containerField value) and Sound/MovieTexture (modified containerField value) are handled satisfactorily now.

Example:

http://www.web3d.org/specifications/java/X3DJSAIL.html#Examples
============================================================================
	String   soundExampleUrl = "http://www.web3d.org/x3d/content/examples/ConformanceNist/Sounds/AudioClip/default.x3d";
	String[]    soundFileUrl = { "chimes.wav", "http://www.web3d.org/x3d/content/examples/ConformanceNist/Sounds/AudioClip/chimes.wav" };
	scene.addChild(new SoundObject().setSource(new AudioClipObject().setUrl(soundFileUrl))
		 .addComments("Scene example fragment from " + soundExampleUrl));

	String   movieExampleUrl = "http://www.web3d.org/x3d/content/examples/ConformanceNist/Appearance/MovieTexture/mpeg1-systems.x3d";
	String[]    movieFileUrl = { "mpgsys.mpg", "http://www.web3d.org/x3d/content/examples/ConformanceNist/Appearance/MovieTexture/mpgsys.mpg" };
	scene.addChild(new SoundObject().setSource(new MovieTextureObject().setUrl(movieFileUrl))
		 .addComments("Scene example fragment from " + movieExampleUrl));
============================================================================
         <Sound>
             <AudioClip url='"chimes.wav" "http://www.web3d.org/x3d/content/examples/ConformanceNist/Sounds/AudioClip/chimes.wav"'/>
             <!-- Scene example fragment from http://www.web3d.org/x3d/content/examples/ConformanceNist/Sounds/AudioClip/default.x3d -->
         </Sound>
         <Sound>
             <MovieTexture containerField='source' url='"mpgsys.mpg" "http://www.web3d.org/x3d/content/examples/ConformanceNist/Appearance/MovieTexture/mpgsys.mpg"'/>
             <!-- Scene example fragment from http://www.web3d.org/x3d/content/examples/ConformanceNist/Appearance/MovieTexture/mpeg1-systems.x3d -->
         </Sound>
============================================================================

Also updated Scene Authoring Hints: containerField, and made X3D Tooltips: MovieTexture warning more prominent.

	http://www.web3d.org/x3d/content/examples/X3dSceneAuthoringHints.html#containerField

	http://www.web3d.org/x3d/content/X3dTooltips.html#MovieTexture

Again thanks.  8)


On 3/21/2017 5:29 PM, Don Brutzman wrote:
> Great diagnosis, yes it is an unhandled case in X3DJSAIL.  Will work on it.
>
> On 3/21/2017 2:52 AM, yottzumm at gmail.com wrote:
>>
>>
>> I think these files are up to date.  I changed setSource to setTexture and then back, so I’m not sure the Java is up to date.  Check out differences between output JSON and source JSON.  Not sure what to do. Intermediate X3D contains no containerFields, and the Java contains setSource, so I think it’s a containerField issue in X3DJSAIL. Could be a tricky one.  The DEF/USE may influence it as well.
>>
>> Original X3D contains a container field:
>>
>>       <Sound maxBack='100' maxFront='100'>
>>         <MovieTexture USE='Movie' containerField='source'/>
>>       </Sound>
>>
>> John

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