[x3d-public] X3DOM dev url changed, HTML invocation questions
John Carlson
yottzumm at gmail.com
Tue Jul 15 11:09:09 PDT 2025
Don, sometimes you have to assign “routes” on the server to handle file
extensions, for example express. So for example, search for the block if
code with the magic function calls in my express server. I recently added
“*.rb” for JRuby files:
https://github.com/coderextreme/X3DJSONLD/blob/master/app.js
I had to remember every time I get a new file type. It’s a pain in the
neck, but it does add some security.
John
On Tue, Jul 15, 2025 at 1:01 PM Don Brutzman via x3d-public <
x3d-public at web3d.org> wrote:
> Interesting... I pulled down a fresh copy of Firefox and tested there as
> well. Once again, no images loaded into the X3DOM scene.
>
> These images should be legal and allowed by X3DOM, they are in a direct
> subdirectory beneath the X3DOM page in question. They would be allowed in
> any other HTML page.
>
> Possible approach: perhaps x3dom.js can catch the exception and treat it
> as OK, when appropriate? The following debugger screenshot from Firefox
> hints at that possibility, i.e. "Uncaught DOMException"
>
> [image: image.png]
>
> (Opinion: running a local CORS server is of course a workaround, but that
> means development/testing with a difference setup than deployment, slowing
> efforts and introducing other potential issues. So relaxing this
> overzealous restriction on local content loading local content seems
> worthwhile.)
>
> all the best, Don
>
> On Tue, Jul 15, 2025 at 4:40 AM vmarchetti--- via x3d-public <
> x3d-public at web3d.org> wrote:
>
>> I think these errors are a result of web browser configuration or policy
>> rathen than a change in the x3dom code.
>>
>> I am seeing the reported problem in loading ImageTexture resources from
>> the local file system in my install of Chrome, but not in Firefox. That
>> leads me to think it's a difference in how each browser is interpreting the
>> security risk of reading a local file through an XHR request, an issue
>> related to the CORS specification.
>>
>> Vince Marchetti
>>
>> On Jul 14, 2025, at 9:08 PM, Don Brutzman via x3d-public <
>> x3d-public at web3d.org> wrote:
>>
>> Thank you Andreas. I have
>>
>> - taken out the CSS for SANS, SERIF, TYPEWRITER
>> - updated the node-list url,
>> - tested both updated addresses for x3dom-full.js
>>
>> Here are two examples using your preferred address:
>>
>> -
>> https://www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/Animation/BoxSwitchX3dom.xhtml
>> -
>> https://www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/Animation/RotationCalculatorExampleX3dom.xhtml
>>
>> However, a problem has emerged. Neither model is displaying image
>> textures when launched on local host.
>> ERROR: [Utils|createTexture2D] Can't http request: images/WhiteImage.png
>> ERROR: [Utils|createTexture2D] Can't http request: images/YellowImage.png
>> ERROR: [Utils|createTexture2D] Can't http request:
>> images/TurquoiseImage.png
>> ERROR: [Utils|createTexture2D] Can't http request: images/GreenImage.png
>> ERROR: [Utils|createTexture2D] Can't http request: images/GreyImage.png
>> ERROR: [Utils|createTexture2D] Can't http request: images/RedImage.png
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> <image.png>
>>
>> Hopefully this is a fixable issue, TIA for any scrutiny. This was a very
>> useful capability when invoking the original
>> https://x3dom.org/download/dev/x3dom-full.js
>>
>> all the best, Don
>>
>> On Sun, Jul 13, 2025 at 8:45 PM Andreas Plesch <andreasplesch at gmail.com>
>> wrote:
>>
>>> Answers below.
>>>
>>> On Sun, Jul 13, 2025 at 2:21 PM Don Brutzman <don.brutzman at gmail.com>
>>> wrote:
>>>
>>>> Andreas writes on 10 JUL 2025:
>>>>
>>>>> I have deployed a new dev version.
>>>>> Please note that the download link for the dev version of x3dom has
>>>>> migrated from x3dom.org/download/dev (not updated) to
>>>>> https://cdn.jsdelivr.net/gh/x3dom/x3dom-dev/dist/x3dom.js (preferred)
>>>>> or
>>>>> https://x3dom.github.io/x3dom-dev/dist/x3dom.js
>>>>> which is
>>>>> automatically updated through
>>>>> https://github.com/x3dom/x3dom-dev
>>>>> for every merged PR at
>>>>> https://github.com/x3dom/x3dom
>>>>> The netlify link is obsolete.
>>>>
>>>>
>>>>> Andreas
>>>>
>>>>
>>>> Thanks for the alert. I am hoping to get the address and invocation
>>>> correct in our X3D Example Archives scenes by updating the conversion
>>>> stylesheet.
>>>>
>>>> - X3D Example Archives
>>>> -
>>>> https://www.web3d.org/x3d/content/examples/X3dResources.html#Examples
>>>> -
>>>> https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/stylesheets/X3dToX3domX_ITE.xslt
>>>>
>>>> The X3dToX3domX_ITE.xslt stylesheet produces the following header in
>>>> these examples:
>>>>
>>>> - X3D Example Archives: X3D4WA, X3D for Web Authors, Chapter 01
>>>> Technical Overview, Hello World
>>>> -
>>>> https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter01TechnicalOverview/HelloWorldIndex.html
>>>> -
>>>> https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter01TechnicalOverview/HelloWorldX3dom.xhtml
>>>>
>>>> <!DOCTYPE html>
>>>>
>>>> <!--
>>>> =================================================================== -->
>>>>
>>>> <!-- embedded X3D scene appears after html/head/script and style
>>>> entries -->
>>>>
>>>> <!--
>>>> =================================================================== -->
>>>>
>>>> <html xmlns="http://www.w3.org/1999/xhtml">
>>>>
>>>> <head>
>>>>
>>>> <title>Hello World!, HelloWorld.x3d (X3DOM)</title>
>>>>
>>>> <meta http-equiv="X-UA-Compatible" content="chrome=1,IE=edge"/>
>>>>
>>>> <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
>>>>
>>>> <meta name="generator"
>>>>
>>>> content="https://www.web3d.org/x3d/stylesheets/X3dToX3domX_ITE.xslt"/>
>>>>
>>>> <script type="text/javascript" src="
>>>> https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js">
>>>> </script>
>>>>
>>>> <!-- Numbered X3DOM release versions: https://www.x3dom.org/download
>>>> -->
>>>>
>>>> <!-- Developer X3DOM release version:
>>>> https://www.x3dom.org/download/dev -->
>>>>
>>>> <link rel="stylesheet"
>>>>
>>>> type="text/css"
>>>>
>>>> href="https://x3dom.org/download/dev/x3dom.css"/>
>>>>
>>>> <script type="text/javascript"
>>>>
>>>> src="https://x3dom.org/download/dev/x3dom-full.js"/>
>>>>
>>>>
>>>> Questions please, before I start a major rebuild:
>>>>
>>>> 1. *x3dom.js or x3dom-full.js ? (both look to be available)*
>>>>
>>>> x3dom-full.js
>>>
>>>>
>>>> 1. *Same treatment for x3dom.css or is it no longer used?*
>>>>
>>>> Yes, same treatment. It is still used.
>>>
>>>>
>>>> 1. *What is up-to-date guidance whenText node is included?* I have
>>>>
>>>>
>>>> - "X3DOM Text Example
>>>> The following scenes demonstrate the use of the text and fontsyle
>>>> nodes. You can also use web fonts, however on windows there is a glitch.
>>>> You have to use and display the font in your document before you can use
>>>> them in X3DOM."
>>>> - https://x3dom.org/x3dom/example/x3dom_text.html
>>>>
>>>> <meta name="warning"
>>>>
>>>> content="Webfonts must be loaded prior to using Text node in X3D
>>>> scene... see https://x3dom.org/x3dom/example/x3dom_text.html"/>
>>>>
>>>> <!-- X3DOM needs Web Fonts when an X3D Text node is included -->
>>>>
>>>> <!-- adapted from https://x3dom.org/x3dom/example/x3dom_text.html and
>>>> https://web.mit.edu/jmorzins/www/fonts.html -->
>>>>
>>>> <style type="text/css">
>>>>
>>>> /*
>>>> =============================================================================
>>>> */
>>>>
>>>> @font-face {
>>>>
>>>> font-family: 'SERIF'; /* default original */
>>>>
>>>> font-style: normal;
>>>>
>>>> font-weight: 700;
>>>>
>>>> src: local('Roman'), url('Roman.ttf') format('truetype');
>>>>
>>>> }
>>>>
>>>> @font-face {
>>>>
>>>> font-family: 'SERIF'; /* default alternate */
>>>>
>>>> font-style: normal;
>>>>
>>>> font-weight: 700;
>>>>
>>>> src: local('Times New Roman'), local('TimesNewRoman'), url('Times New
>>>> Roman.ttf') format('truetype');
>>>>
>>>> }
>>>>
>>>> /*
>>>> =============================================================================
>>>> */
>>>>
>>>> @font-face {
>>>>
>>>> font-family: 'SANS'; /* default original */
>>>>
>>>> font-style: normal;
>>>>
>>>> font-weight: 400;
>>>>
>>>> src: local('Arial'), url('Arial.ttf') format('truetype');
>>>>
>>>> }
>>>>
>>>> @font-face {
>>>>
>>>> font-family: 'SANS'; /* default alternate */
>>>>
>>>> font-style: normal;
>>>>
>>>> font-weight: 400;
>>>>
>>>> src: local('Helvetica'), url('Helvetica.ttf') format('truetype');
>>>>
>>>> }
>>>>
>>>> /*
>>>> =============================================================================
>>>> */
>>>>
>>>> @font-face {
>>>>
>>>> font-family: 'TYPEWRITER'; /* default original */
>>>>
>>>> font-style: normal;
>>>>
>>>> font-weight: 900;
>>>>
>>>> src: local('Courier'), url('Courier.ttf') format('truetype');
>>>>
>>>> }
>>>>
>>>> @font-face {
>>>>
>>>> font-family: 'TYPEWRITER'; /* default alternate */
>>>>
>>>> font-style: normal;
>>>>
>>>> font-weight: 900;
>>>>
>>>> src: local('Courier New'), url('Courier New.ttf') format('truetype');
>>>>
>>>> }
>>>>
>>>> /*
>>>> =============================================================================
>>>> */
>>>>
>>>> </style>
>>>>
>>>> <style type="text/css" media="screen, print">
>>>>
>>>> .webfont { font-size:200%; font-family:'TYPEWRITER'; color:green;} /*
>>>> Conversion TODO font families: SANS SERIF TYPEWRITER */
>>>>
>>>> </style>
>>>>
>>>>
>>> I think this guidance still applies for custom font families if a
>>> FontLibrary node is not used. FontLibrary font loading does not require
>>> this css. Also, all basic X3D font families do not require css.
>>> https://github.com/x3dom/x3dom/blob/master/test/functional/fonts.html
>>> has examples.
>>>
>>>
>>>> and
>>>>
>>>> *4. Is the following still the best up-to-date list of supported nodes?*
>>>>
>>>> https://andreasplesch.github.io/x3dom/dist/doc/author/nodes.html
>>>>
>>>> P.S. node wish list: IndexedTriangleFanSet, Script
>>>>
>>>>
>>> https://x3dom.github.io/x3dom-dev/dist/doc
>>>
>>> would be the best source for up to date documentation on supported nodes
>>> with dev releases as it is built and deployed along with the library.
>>>
>>>
>>> Thanks in advance for all improvements to these invocations, and thanks
>>>> as ever for ongoing progress with X3DOM!
>>>>
>>>> all the best, Don
>>>>
>>>
>>> All the best, Andreas
>>> --
>>> Andreas Plesch
>>> Waltham, MA 02453
>>>
>> _______________________________________________
>> 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
>>
> _______________________________________________
> x3d-public mailing list
> x3d-public at web3d.org
> http://web3d.org/mailman/listinfo/x3d-public_web3d.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20250715/f1fd462e/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 130332 bytes
Desc: not available
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20250715/f1fd462e/attachment-0001.png>
More information about the x3d-public
mailing list