[x3d-public] json schema validation problem: "-children" commentsinside"head"element
Don Brutzman
brutzman at nps.edu
Sat Jul 2 16:13:20 PDT 2016
On 7/2/2016 3:56 PM, Joe D Williams wrote:>> "@center": [
> 0,
> 5
> ],
> "@rotation": 0.758,
> "@scale": [
> 2,
> 0.5
> ],
>
> why is rotation different than center or scale?
> Thanks, Joe
in this case since it is being applied to TextureTransform, which only takes a single-valued SFFloat for @rotation and SFVec2f values for @translation and @scale, respectively.
http://www.web3d.org/x3d/content/X3dTooltips.html#TextureTransform
http://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/components/texturing.html#TextureTransform
> ----- Original Message ----- From: "John Carlson" <yottzumm at gmail.com>
> To: "Roy Walmsley" <roy.walmsley at ntlworld.com>
> Cc: "X3D Graphics public mailing list" <x3d-public at web3d.org>
> Sent: Saturday, July 02, 2016 5:02 AM
> Subject: Re: [x3d-public] json schema validation problem: "-children" commentsinside"head"element
>
>
> This is only in the prototype expander. Now fairly sure there is a bug in my code. The #comment in question in red, and I’m assuming it’s getting there because the textureTransform field did not get set:
> "-appearance": {
> "Appearance": {
> "@DEF": "DECLDarkOak_INSTANCE_DarkOakAppearance",
> "-children": [
> {
> "#comment": "textureTransform field IS exposed through the Prototype field interface with same name"
> }
> ],
> "-textureTransform": {
> "#comment": "NULL node as child"
> },
> "-material": {
> "Material": {
> "@diffuseColor": [
> 1,
> 0.45,
> 0.23
> ]
> }
> },
> "-texture": {
> "ImageTexture": {
> "@DEF": "DECLDarkOak_INSTANCE_wood_g",
> "@url": [
> "wood_g.jpg",
> "http://www.web3d.org/x3d/content/examples/Vrml2.0Sourcebook/Chapter31-Prototypes/wood_g.jpg"
> ]
> }
> }
>
> Here’s a good one in the same file:
>
> "-textureTransform": {
> "TextureTransform": {
> "@center": [
> 0,
> 5
> ],
> "@rotation": 0.758,
> "@scale": [
> 2,
> 0.5
> ],
> "@translation": [
> 0.5,
> 0
> ]
> }
> },
> From the prototype expansion of:
>
> examples/Vrml2.0Sourcebook/Chapter31-Prototypes/Figure31.5WoodAppearanceExternalPrototypes.json
> Looking at the JSON, it looks like the node should appear like:
>
> "-textureTransform": {
> “-children”: [ {
> "#comment": "NULL node as child"
> }]
> },
>
> Which does pass schema without error. Why, I don’t know. Is this the general way to get extra nodes into a containerField through JSON schema? Roy? Full prototype expanded file attached.
>
> Hmm.
> Sent from Mail for Windows 10
>
> From: John Carlson
>
>
> --------------------------------------------------------------------------------
>
>
>> _______________________________________________
>> x3d-public mailing list
>> x3d-public at web3d.org
>> http://web3d.org/mailman/listinfo/x3d-public_web3d.org
>>
>
>
> _______________________________________________
> 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