Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

XML Parser Error: Unknown node type 'TEXT', you probably have insufficient component/profile statements. #125

Closed
jamesleesaunders opened this issue Dec 14, 2022 · 6 comments
Labels
bug Something isn't working

Comments

@jamesleesaunders
Copy link

Describe the bug
Seeing new console error in v8.3.0:

XML Parser Error: Unknown node type 'TEXT', you probably have insufficient component/profile statements.

This error is not seen on version prior to v8.3.0.
I assume this is complaining about the following text elements used on the axis:

<billboard axisofrotation="0 0 0">
   <shape>
      <appearance>
         <material diffusecolor="0.0000 0.0000 0.0000"></material>
      </appearance>
      <text string="&quot;1&quot;">
         <fontstyle size="1.3" family="&quot;SANS&quot;" style="BOLD" justify="&quot;MIDDLE&quot; &quot;MIDDLE&quot;"></fontstyle>
      </text>
   </shape>
</billboard>

To Reproduce
Goto: https://raw.githack.com/jamesleesaunders/d3-x3d/master/examples/X_ITE/chart/SpotPlot.html
Open JS Console.

Environment:
Welcome to X_ITE X3D Browser v8.3.0:
Current Graphics Renderer
Name: Google Inc. (Apple) ANGLE (Apple, Apple M1 Pro, OpenGL 4.1)
WebGL version: WebGL 2.0 (OpenGL ES 3.0 Chromium)
Shading language: WebGL GLSL ES 3.00 (OpenGL ES GLSL ES 3.0 Chromium)

Chrome
OSX

@jamesleesaunders jamesleesaunders added the bug Something isn't working label Dec 14, 2022
@jamesleesaunders
Copy link
Author

Ahh, this is only an issue when I have profile=Interactive. If I go to Full it does not error about TEXT node type.
Should this happen?
(I switches to Interactive to stop the Tesxture3d.js asm warnings)

@create3000
Copy link
Owner

create3000 commented Dec 15, 2022

Because it is now possible and because the Text component is a littler larger I made an external component of it and it is only loaded on demand now.

This means for you the Interactive profile does not include the Text component and therefor you should add it manually if needed. X3D nodes are grouped in components and components are grouped in profiles. To add a component to your X3D world use the following example code.

<X3D profile='Interactive' version='4.0'>
  <head>
    <component name='Text' level='1'/>
  </head>
...

Specification with list of components:
https://www.web3d.org/documents/specifications/19775-1/V4.0/Part01/Architecture.html

You should use a profile you like, and add the missing components from which you use nodes. There can be as many component elements as you need.

@create3000
Copy link
Owner

I now could get rid of the Texture3D.js asm warnings. But I really want to encourage you to use the right component/profile statements.

@jamesleesaunders
Copy link
Author

Brill Thanks again!
I have added head + component = Text and this appears to be all good. 😄

I see now from the Interactive profile that Text is not listed in the Components and levels section:
https://www.web3d.org/documents/specifications/19775-1/V4.0/Part01/interactive.html
So I now understand why you removed it.

Sorry I have raised a few bugs recently - It feels like I am turning into your #1 tester! .. I have learn lots along the way also!

I have also make sure adding this head + component works with x3dom as I am keen to keep d3-x3d agnostic and work on both x3dom and x_ite).

@create3000
Copy link
Owner

Don't bother to submit bug reports. Every issue is welcome.

Component/profile statement are integral part of X3D and therefor well specified.

Have a look at the Web3D.org examples archive, all examples have component/profile statements, and can be tests either in X3DOM or in X_ITE.

https://www.web3d.org/x3d/content/examples/Basic/

@andreasplesch
Copy link
Contributor

Brill Thanks again! I have added head + component = Text and this appears to be all good. smile

I see now from the Interactive profile that Text is not listed in the Components and levels section: https://www.web3d.org/documents/specifications/19775-1/V4.0/Part01/interactive.html So I now understand why you removed it.

Sorry I have raised a few bugs recently - It feels like I am turning into your #1 tester! .. I have learn lots along the way also!

I have also make sure adding this head + component works with x3dom as I am keen to keep d3-x3d agnostic and work on both x3dom and x_ite).

x3dom ignores profiles and component statements to keep things simple and avoid traffic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants