Giter VIP home page Giter VIP logo

Comments (20)

create3000 avatar create3000 commented on July 3, 2024

Yes, good idea, and Library is a good place, because I cannot make the repro larger than ca. 40MB, because of jsdelivr restrictions.

from x_ite.

andreasplesch avatar andreasplesch commented on July 3, 2024

I submitted a pull request with the existing tests to Library. Some tests still work with the alpha version, quite a few do not. See create3000/Library#2

from x_ite.

andreasplesch avatar andreasplesch commented on July 3, 2024

Here are a few direct links:
https://raw.githack.com/andreasplesch/Library/dom_integration/Tests/Browser/DOMIntegration/addAndRemoveNode.xhtml
https://raw.githack.com/andreasplesch/Library/dom_integration/Tests/Browser/DOMIntegration/cycle.xhtml
https://raw.githack.com/andreasplesch/Library/dom_integration/Tests/Browser/DOMIntegration/fanOutRoute.xhtml
https://raw.githack.com/andreasplesch/Library/dom_integration/Tests/Browser/DOMIntegration/gears_proto.xhtml
https://raw.githack.com/andreasplesch/Library/dom_integration/Tests/Browser/DOMIntegration/importDocument.xhtml
https://raw.githack.com/andreasplesch/Library/dom_integration/Tests/Browser/DOMIntegration/importDoc.xhtml
https://raw.githack.com/andreasplesch/Library/dom_integration/Tests/Browser/DOMIntegration/inline_dom.xhtml
https://raw.githack.com/andreasplesch/Library/dom_integration/Tests/Browser/DOMIntegration/inline_in_inline.xhtml
https://raw.githack.com/andreasplesch/Library/dom_integration/Tests/Browser/DOMIntegration/inline_Mushrooms.xhtml
https://raw.githack.com/andreasplesch/Library/dom_integration/Tests/Browser/DOMIntegration/inline_proto.xhtml
https://raw.githack.com/andreasplesch/Library/dom_integration/Tests/Browser/DOMIntegration/inline_route.xhtml
https://raw.githack.com/andreasplesch/Library/dom_integration/Tests/Browser/DOMIntegration/inlinev2.xhtml
https://raw.githack.com/andreasplesch/Library/dom_integration/Tests/Browser/DOMIntegration/interactiveTransformations.xhtml
https://raw.githack.com/andreasplesch/Library/dom_integration/Tests/Browser/DOMIntegration/jqueryui_adopt.xhtml
https://raw.githack.com/andreasplesch/Library/dom_integration/Tests/Browser/DOMIntegration/noDOM_multiview.html
https://raw.githack.com/andreasplesch/Library/dom_integration/Tests/Browser/DOMIntegration/output_events.xhtml
https://raw.githack.com/andreasplesch/Library/dom_integration/Tests/Browser/DOMIntegration/removeAddMaterial.xhtml
https://raw.githack.com/andreasplesch/Library/dom_integration/Tests/Browser/DOMIntegration/rosetta_xite.xhtml
https://raw.githack.com/andreasplesch/Library/dom_integration/Tests/Browser/DOMIntegration/test_alphax_ite.xhtml
https://raw.githack.com/andreasplesch/Library/dom_integration/Tests/Browser/DOMIntegration/x3d_d3.xhtml
https://raw.githack.com/andreasplesch/Library/dom_integration/Tests/Browser/DOMIntegration/x3d_integration2.xhtml
https://raw.githack.com/andreasplesch/Library/dom_integration/Tests/Browser/DOMIntegration/x3d_multiview.xhtml
https://raw.githack.com/andreasplesch/Library/dom_integration/Tests/Browser/DOMIntegration/x3d_script2.xhtml
https://raw.githack.com/andreasplesch/Library/dom_integration/Tests/Browser/DOMIntegration/x3d_script.xhtml

from x_ite.

create3000 avatar create3000 commented on July 3, 2024

I have remove the "x3d_" from the events so .addEventListener('x3d_touchTime', myToggleSizeFunction) has become just .addEventListener('touchTime', myToggleSizeFunction). This should work well because it is a CustomEvent.

from x_ite.

create3000 avatar create3000 commented on July 3, 2024

Ahh, and including the CSS is not needed anymore.

from x_ite.

andreasplesch avatar andreasplesch commented on July 3, 2024

ok, I can work on fixing the examples that way.

from x_ite.

andreasplesch avatar andreasplesch commented on July 3, 2024

I have fixed the event names, and https://raw.githack.com/andreasplesch/Library/dom_integration/Tests/Browser/DOMIntegration/fanOutRoute.xhtml
works now, for example.

https://raw.githack.com/andreasplesch/Library/dom_integration/Tests/Browser/DOMIntegration/x3d_d3.xhtml works better as well. The detail.fields event property is not available anymore. Perhaps because node.getFields() does not seem be there anymore. Event values are important to web programmers so it would be great to have access to all fields.

Only the 'new color' button still works in that example. Something to track down.

from x_ite.

create3000 avatar create3000 commented on July 3, 2024

Have removed the CSS and removed "x3d_".

There is a "node" property in the detail, which is a SFNode. A SFNode is essentially only a collection of fields, thus fields can be accessed by node.fieldName.

from x_ite.

andreasplesch avatar andreasplesch commented on July 3, 2024

node.fieldName is fine (I thought I had tried that before). Listing all available fields in a fields property would make it much friendlier to discover fields for web programmers who are not that familiar with x3d.

Perhaps via node.getFieldDefinitions()

fields[node.getFieldDefinitions()[i].name] = node.getFieldDefinitions()[i].value

Seems a bit convoluted. Perhaps there is a better way.

I updated the d3_x3d example and it works now:
https://raw.githack.com/andreasplesch/Library/dom_integration/Tests/Browser/DOMIntegration/x3d_d3.xhtml

Looking at other examples.

from x_ite.

andreasplesch avatar andreasplesch commented on July 3, 2024

https://raw.githack.com/andreasplesch/Library/dom_integration/Tests/Browser/DOMIntegration/inline_proto.xhtml

has problems. Investigating.

from x_ite.

andreasplesch avatar andreasplesch commented on July 3, 2024

Updated inline_proto.xhtml to use less restrictive selector to access inline transform.

Since now the complete X3D element is appended: https://github.com/create3000/x_ite/blob/main/src/x_ite/Browser/DOMIntegration.js#L305

It used to be just the Scene element. x3dom appends the children of the Scene element.

from x_ite.

create3000 avatar create3000 commented on July 3, 2024

I think It is better to add the complete X3D element to an Inline, it is the loaded world with all properties (meta, components and so on), which are then accessible.

from x_ite.

andreasplesch avatar andreasplesch commented on July 3, 2024

That's ok. Small fixes to cycle, noDom_multiview, rosetta_xite.

from x_ite.

andreasplesch avatar andreasplesch commented on July 3, 2024

all fixes in create3000/Library#3

from x_ite.

create3000 avatar create3000 commented on July 3, 2024

HTML Script elements should work now better. Added processing of these element directly in XMLParser, thus the childNodes are immediately available during parsing, and routes to Script node fields will work now.

HTML Test:
https://raw.githack.com/create3000/Library/main/Tests/Browser/DOMIntegration/html5/x3d_script.html
https://raw.githack.com/create3000/Library/main/Tests/Browser/DOMIntegration/html5/x3d_script2.html

from x_ite.

create3000 avatar create3000 commented on July 3, 2024

Also added documentation.

https://create3000.github.io/x_ite/dom-integration#script-element

from x_ite.

andreasplesch avatar andreasplesch commented on July 3, 2024

node.fieldName for accessing node fields does not seem work anymore. See hitPoint_changed field = undefined after isOver here:

https://raw.githack.com/andreasplesch/Library/master/Tests/Browser/DOMIntegration/x3d_d3.xhtml

node._fieldName works.

from x_ite.

create3000 avatar create3000 commented on July 3, 2024

Should work again now.

from x_ite.

andreasplesch avatar andreasplesch commented on July 3, 2024

Yes, thanks ! It looks like node.valueOf() already tried to use the node cache ?

But the debugger indicates that instead of SFNode.valueOf function the native JS Object.prototype.valueOf function was called.

from x_ite.

create3000 avatar create3000 commented on July 3, 2024

Yes that's true for SFNode.valueOf, but in DOMIntegration at the neuralgic points a X3DBaseNode occurs, for which SFNodeCache is fine.

And that was the bug before.

from x_ite.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.