Replies: 4 comments
-
|
If a model appears to be somehow transparent or turned inside out, it is most likely that the ccw field of the geometry must be changed from Your inline issue: please make sure that the content is still within the x3d-canvas element, by inspecting it with the web browser. If the content is empty, simply add it again with DOM methods like |
Beta Was this translation helpful? Give feedback.
-
Yes this is a peculiarity of all HTML browsers element names become uppercase and attributes become lowercase. X_ITE compensates this and will use this uniformly cased names. If you do not wish this you have to use XHTML pages, but I would not recommend this as a modern HTML page is much more easier to use.
From my point of view I would recommend using src attribute. Changes can be made with X3D SAI (Scene Access Interface) functions: https://create3000.github.io/x_ite/reference/ecmascript-object-and-function-definitions/ |
Beta Was this translation helpful? Give feedback.
-
|
Ah, thank you! Setting I did check that the child content is still in the DOM after the prerendering-interactive transition. Based on what I can see, it appears almost as if the view ends up zooming out like it's registering some extreme user input when the viewer reloads during transition. In any case, I think it's probably best to disable prerendering for X3D components anyway as it ends up reinitializing the viewer, which ends up taking longer than just waiting for the viewer to load client-side only, so I'm going to let that particular mystery stay a mystery. Thanks for the suggestion to just reference external .x3d content via the I was indeed going to research SAI. Is the X_ITE library extensible enough to plug in a custom SAI module? My hope was to implement a JS-Blazor/Wasm bridge via SAI to keep things as standards compliant as possible, but open up to WASM/C# X3D scripting. Obviously I could implement something on a case-by-case basis through the JS scripting capabilities, but I was hoping to add some middleware to interpret input/output parameters and script references to dynamically wire them up to wasm/C# code. Ideally in a way that could be re-used for, say, a hypothetical rust/wasm integration, et. al. |
Beta Was this translation helpful? Give feedback.
-
|
I don't know if the SAI interface is sufficient for you, but you can skim through the reference and then you'll surely see if it fits. Here are a few things that are possible: |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello! I did a little experimentation with integrating X_ITE with Blazor, and I have some very beginner/basic questions. First of all, I noticed the normals appear to be inverted in this model, though using other examples appear to be correct. I'm guessing this is an issue with the model, but just want to make sure I'm not missing something:

I can't post the Deer.x3d file here as it's too large.
Second, although referencing an external .x3d file appears to work fine when the
x3d-canvasuses it via thesrcattribute, when attempting to implement a simple inline x3d like the X_ITE getting started sample only works if thex3d-canvaselement exists in the pre-rendered top level html (i.e. when the elements exist in the server-side pre-rendered html for the page). When I navigate to other pages in the app and navigate back (so that thex3d-canvaselement is removed from the DOM and then later re-added when navigating back), I notice that the viewer appears to load correctly (the right click menu exists, for example, and I see the debug console output with renderer information). However, the actual X3D content doesn't render.For context, Blazor supports pre-rendering on the server, followed by the "client side" taking over and re-rendering the page in an "interactive" mode.. When you refresh the browser, Blazor "prerenders" the whole page on the server-side, then later once the client-side finishes bootstrapping, it takes over and re-renders the page at least once on the client-side. The content displays correctly in the brief moment between prerendering (content rendered correctly) and one of the interactive modes taking over and re-rendering the page. Then the viewer appears to work but the content is missing.
Is there a javascript API to let X_ITE know that the content has updated?
I also noticed that when using this style, the browser interprets these X3D elements as HTML instead of XML, so it normalizes the element names to lowercase. Is that expected?
Beta Was this translation helpful? Give feedback.
All reactions