<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>Indeed, Appearance material is an SFNode, not an MFNode in
      X3DV4.   What do you think?<br>
    </p>
    <p><img src="cid:part1.2F0235C3.3B83AB95@gmail.com" alt=""></p>
    <div class="moz-cite-prefix">On 4/16/21 1:17 AM, John Carlson wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:5fdaf026-febf-12a6-241e-6b002650043d@gmail.com">Traceback:
      <br>
      <br>
      Found the following error with my ~/x3dschema JSON parse test,
      done by running `base validate.sh`, results in javaresults.txt,
      which is filtered (also need to filter "node_modules") here:
<a class="moz-txt-link-freetext" href="https://github.com/coderextreme/x3dschema/blob/master/jsonparseresults.txt">https://github.com/coderextreme/x3dschema/blob/master/jsonparseresults.txt</a>
      Cleaned up results here:
      <br>
      <br>
      json-parse json Expected a ':' after a key at 196859 [character 37
      line 216]
x3d/content/examples/X3dForAdvancedModeling/AudioSpatialSound/SingleAudio.json<br>
      json-parse json Expected a ':' after a key at 7359 [character 31
      line 198]
x3d/content/examples/X3dForAdvancedModeling/AudioSpatialSound/SplitChannels.json<br>
      json-parse json Expected a ':' after a key at 287624 [character 37
      line 270]
x3d/content/examples/X3dForAdvancedModeling/AudioSpatialSound/SpatialAudioCameraAnimation.json<br>
      <br>
      <br>
      Note that there are two Material objects in SplitChannels.json, so
      -material should probably be an array.   Will check XML.
      <br>
      <br>
      SplitChannels.x3d excerpt:
      <br>
      <br>
            <Transform DEF='volumeRight' rotation='1 0 0 -0.5'
      scale='10 10 10' translation='0 -10 0'>
      <br>
              <Shape>
      <br>
                <Appearance>
      <br>
                  <Material diffuseColor='0.345 0.345 0.882'
      transparency='0'/>
      <br>
                  <Material ambientIntensity='0.0933' diffuseColor='1
      1 1' emissiveColor='0 0 0' shininess='0.51' specularColor='0.46
      0.46 0.46'/>
      <br>
                </Appearance>
      <br>
                <Text solid='false' string='Right Channel Volume'>
      <br>
                  <FontStyle family='&apos;Times&apos;'
      horizontal='true' justify='BEGIN' leftToRight='true' size='1'
      spacing='1' style='BOLD' topToBottom='true'/>
      <br>
                </Text>
      <br>
              </Shape>
      <br>
            </Transform>
      <br>
      <br>
      <br>
      The following will show the two Material Appearances in all three
      .x3d files.
      <br>
      <br>
      x3d/content/examples/X3dForAdvancedModeling/AudioSpatialSound$
      egrep 'Appearance|Material' *.x3d
      <br>
      <br>
      Will check for error/warning/development.  An allied file in same
      folder has a warning, but none in these .x3d files that I can
      tell.
      <br>
      <br>
      Will check web.
<a class="moz-txt-link-freetext" href="https://x3dgraphics.com/examples/X3dForAdvancedModeling/AudioSpatialSound/SplitChannelsIndex.html">https://x3dgraphics.com/examples/X3dForAdvancedModeling/AudioSpatialSound/SplitChannelsIndex.html</a>
      looks like above.
      <br>
      <br>
      <br>
      Will check X3DV4 schema:
      <br>
      <br>
      <xs:element name="Appearance">
      <br>
              <xs:annotation>
      <br>
                  <xs:appinfo>
      <br>
                      [snip]
      <br>
                      <xs:element name="material" type="SFNode"
      fixed="inputOutputField" default="X3DMaterialNode"/>
      <br>
      <br>
      I'm reading this that there shouldn't be more that one Material,
      otherwise, material would be an MFNode.
      <br>
      <br>
      Running the XML files through X3D validator:   All three .x3d
      files fail
      <br>
      <br>
      Don't forget to validate before checking in.  I'm aware these
      files are under development. My best guess is we'll have to wait
      for a new copy of the X3D validator and schema?
      <br>
      <br>
      If we make -material an array, this will be a pretty significant
      change, basically affecting practically everything.  It's easy for
      XML, and we haven't defined X3D JSON in a standard, but in the
      future, I recommend changing SFNode to MFNode with care.
      <br>
      <br>
      jsonlint errors follow:
      <br>
      <br>
      SingleAudio.json
      <br>
      Error: Parse error on line 207:
      <br>
      ...                    { "Material":
      <br>
      -----------------------^
      <br>
      Expecting 'STRING', got '{'
      <br>
          at Object.parseError
      (/usr/local/lib/node_modules/jsonlint/lib/jsonlint.js:55:11)
      <br>
          at Object.parse
      (/usr/local/lib/node_modules/jsonlint/lib/jsonlint.js:132:22)
      <br>
          at parse
      (/usr/local/lib/node_modules/jsonlint/lib/cli.js:82:14)
      <br>
          at main
      (/usr/local/lib/node_modules/jsonlint/lib/cli.js:135:14)
      <br>
          at Object.<anonymous>
      (/usr/local/lib/node_modules/jsonlint/lib/cli.js:179:1)
      <br>
          at Module._compile (internal/modules/cjs/loader.js:1138:30)
      <br>
          at Object.Module._extensions..js
      (internal/modules/cjs/loader.js:1158:10)
      <br>
          at Module.load (internal/modules/cjs/loader.js:986:32)
      <br>
          at Function.Module._load
      (internal/modules/cjs/loader.js:879:14)
      <br>
          at Function.executeUserEntryPoint [as runMain]
      (internal/modules/run_main.js:71:12)
      <br>
      SpatialAudioCameraAnimation.json
      <br>
      Error: Parse error on line 261:
      <br>
      ...                    { "Material":
      <br>
      -----------------------^
      <br>
      Expecting 'STRING', got '{'
      <br>
          at Object.parseError
      (/usr/local/lib/node_modules/jsonlint/lib/jsonlint.js:55:11)
      <br>
          at Object.parse
      (/usr/local/lib/node_modules/jsonlint/lib/jsonlint.js:132:22)
      <br>
          at parse
      (/usr/local/lib/node_modules/jsonlint/lib/cli.js:82:14)
      <br>
          at main
      (/usr/local/lib/node_modules/jsonlint/lib/cli.js:135:14)
      <br>
          at Object.<anonymous>
      (/usr/local/lib/node_modules/jsonlint/lib/cli.js:179:1)
      <br>
          at Module._compile (internal/modules/cjs/loader.js:1138:30)
      <br>
          at Object.Module._extensions..js
      (internal/modules/cjs/loader.js:1158:10)
      <br>
          at Module.load (internal/modules/cjs/loader.js:986:32)
      <br>
          at Function.Module._load
      (internal/modules/cjs/loader.js:879:14)
      <br>
          at Function.executeUserEntryPoint [as runMain]
      (internal/modules/run_main.js:71:12)
      <br>
      SplitChannels.json
      <br>
      Error: Parse error on line 189:
      <br>
      ...                    { "Material":
      <br>
      -----------------------^
      <br>
      Expecting 'STRING', got '{'
      <br>
          at Object.parseError
      (/usr/local/lib/node_modules/jsonlint/lib/jsonlint.js:55:11)
      <br>
          at Object.parse
      (/usr/local/lib/node_modules/jsonlint/lib/jsonlint.js:132:22)
      <br>
          at parse
      (/usr/local/lib/node_modules/jsonlint/lib/cli.js:82:14)
      <br>
          at main
      (/usr/local/lib/node_modules/jsonlint/lib/cli.js:135:14)
      <br>
          at Object.<anonymous>
      (/usr/local/lib/node_modules/jsonlint/lib/cli.js:179:1)
      <br>
          at Module._compile (internal/modules/cjs/loader.js:1138:30)
      <br>
          at Object.Module._extensions..js
      (internal/modules/cjs/loader.js:1158:10)
      <br>
          at Module.load (internal/modules/cjs/loader.js:986:32)
      <br>
          at Function.Module._load
      (internal/modules/cjs/loader.js:879:14)
      <br>
          at Function.executeUserEntryPoint [as runMain]
      (internal/modules/run_main.js:71:12)
      <br>
      <br>
    </blockquote>
  </body>
</html>