create3000 / x_ite

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

Error with createVrmlFromString in version 8.7.7 #137

Closed olafgithub closed 1 year ago

olafgithub commented 1 year ago

Today I noticed that many parts in my VRML models are not created.

Look at: https://satadorus.eu/x_ite/hexastix/hexastix.html

There used to be a nice brass part between the actual pencil and the eraser. This part is created with createVrmlFromString()

The same problem with a lot of other parts in other 3D models that are created this way I will investigate this further tomorrow and make a minimal example.

Olaf

olafgithub commented 1 year ago

Update:

I tried to use a few older versions:

Results:

8.7.5 works ok 8.7.6 fails to create parts 8.7.7 fails to create parts

Hope this helps,

Olaf

create3000 commented 1 year ago

I could identify the bug, it was due to a change in MFNode.remove (internal function), which is now fixed.

The fix is now already released.

Because I now have Unit Test at https://github.com/create3000/x_ite-tests, I wrote a test to prevent future mistakes. There are already more than 700 tests now, and I add every day more. I appreciate every pull request to this repo.

Thank you for your patience and writing bug reports.

olafgithub commented 1 year ago

Hello Holger,

I noticed on GitHub that you released version 8.7.8 and I tested it. Looks fine again.

How do you test software like this? Do you create something and confirm it looks the same?

Thanks a lot for the quick fix.

Olaf


Van: Holger Seelig @.> Verzonden: donderdag 1 juni 2023 12:37 Aan: create3000/x_ite @.> CC: olafgithub @.>; Author @.> Onderwerp: Re: [create3000/x_ite] Error with createVrmlFromString in version 8.7.7 (Issue #137)

I could identify the bug, it was due to a change in MFNode.remove (internal function), which is now fixed.

The fix is now already released.

Because I now have Unit Test at https://github.com/create3000/x_ite-tests, I wrote a test to prevent future mistakes. There are already more than 700 tests now, and I add every day more. I appreciate every pull request to this repo.

Thank you for your patience and writing bug reports.

— Reply to this email directly, view it on GitHubhttps://github.com/create3000/x_ite/issues/137#issuecomment-1571791204, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABOJCTH73A2PAQOARPS5JPDXJBWFZANCNFSM6AAAAAAYVWTLCE. You are receiving this because you authored the thread.Message ID: @.***>

create3000 commented 1 year ago

The are two way to test, first there are unit test with the jest testing environment, which are in a separate repo at https://github.com/create3000/x_ite-tests. A test look like this:

const X3D = require ("../../X3D")

const
   canvas  = X3D .createBrowser (),
   Browser = canvas .browser,
   scene   = Browser .currentScene,
   node    = scene .createNode ("WorldInfo")

test ("common", () =>
{
   expect (node .getType ()) .toBe (X3D .X3DConstants .SFNode)
   expect (node .getTypeName ()) .toBe ("SFNode")
   expect (node .getNodeTypeName ()) .toBe ("WorldInfo")
   expect (node .getNodeName ()) .toBe ("")
   expect (node .getNodeDisplayName ()) .toBe ("")
})

With this automated test, all JavaScript function can and should be tests in a comprehensive way.

Second they're a visually tests, because not all can be tested automatically, these tests must be 'click' manually, test by test, in the browser. I have installed these test locally on my computer, but they are also available online at https://rawgit.com/create3000/x_ite/main/x_ite.min.html.

olafgithub commented 1 year ago

Thanks for the information. I never used any automatic testing. The visual test looks nice. I am from a time when programs were self-contained and deterministic. They started with begin and ended with end. ... My first exposure to VRML was ca 1995 before VRML 97

Olaf


Van: Holger Seelig @.> Verzonden: donderdag 1 juni 2023 13:36 Aan: create3000/x_ite @.> CC: olafgithub @.>; Author @.> Onderwerp: Re: [create3000/x_ite] Error with createVrmlFromString in version 8.7.7 (Issue #137)

The are two way to test, first there are unit test with the jest testing environment, which are in a separate repo at https://github.com/create3000/x_ite-tests. A test look like this:

const X3D = require ("../../X3D")

const canvas = X3D .createBrowser (), Browser = canvas .browser, scene = Browser .currentScene, node = scene .createNode ("WorldInfo")

test ("common", () => { expect (node .getType ()) .toBe (X3D .X3DConstants .SFNode) expect (node .getTypeName ()) .toBe ("SFNode") expect (node .getNodeTypeName ()) .toBe ("WorldInfo") expect (node .getNodeName ()) .toBe ("") expect (node .getNodeDisplayName ()) .toBe ("") })

With this automated test, all JavaScript function can and should be tests in a comprehensive way.

Second they're a visually tests, because not all can be tested automatically, these tests must be 'click' manually, test by test, in the browser. I have installed these test locally on my computer, but they are also available online at https://rawgit.com/create3000/x_ite/main/x_ite.min.html.

— Reply to this email directly, view it on GitHubhttps://github.com/create3000/x_ite/issues/137#issuecomment-1571873180, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABOJCTFWQCTWEBRIOU7WNH3XJB5EPANCNFSM6AAAAAAYVWTLCE. You are receiving this because you authored the thread.Message ID: @.***>