create3000 / x_ite

X_ITE X3D Browser, view and manipulate X3D and VRML scenes in HTML.
https://create3000.github.io/x_ite/
Other
67 stars 15 forks source link

Script node as nested PROTO in VML handled different in X_TE 5.0.0 #111

Closed olafgithub closed 1 year ago

olafgithub commented 2 years ago

I noticed in 5.0.0 that a nested PROTO Script node does not run. In 4.7.7 (and maybe later too) it works fine.

MINIMAL EXAMPLE

VRML V2.0 utf8

PROTO PRO [ ] { PROTO SCR [ ] { Script { url "javascript:

   function initialize() 
    {
      print( 'SCR::function initialize()' ); 
    }

  "
}

}

other stuff here

SCR {} }

PRO {}

With X_ITE 4,7.7 the message is printed on the console. With X_ITE 5,0.0 No message is printed on the console.

With 5.0.0 the script node is NOT initialized and DOES NOT run.

Windows 10 Google Chrome Same error with Edge and Firefox

timer_test.txt

create3000 commented 2 years ago

Thank you for posting this bug. The bug should be fixed now and a new new version is published.

olafgithub commented 2 years ago

Great!

I just tested it with 5.0.2 Works fine

Olaf