create3000 / cobweb

Cobweb is now X_ITE
https://github.com/create3000/x_ite
Other
10 stars 5 forks source link

inline.getInternalScene #22

Closed andreasplesch closed 7 years ago

andreasplesch commented 7 years ago

I can use successfully the internal scene of an inline to add nodes to it with cobweb_dom.

https://andreasplesch.github.io/cobweb_dom/tests/dev/inline/inlineScene.xhtml

cobweb_dom finds the correct scene depending on where a new element is added and then uses the parser to parse and then add a new node to this scene.

It works for the main scene, and for root nodes of an inline scene. It also works for children nodes (children field values) of an inline scene but only if their parent (Transform) is a root node. If the parent is deeper inside the scene, eg. itself is a field value, it does not work, eg. the new node is not displayed. This is the case of the red button in the example above. The new x3d node is created using the inline execution context and the parent's (Transform) children's field value is set properly. In fact, the same code works for the main scene (first button). Maybe somehow the traversing does not get to the new node within the inline ?

I cannot figure out why this case does not work or how to fix it.

Do you have some insight or any ideas ?

andreasplesch commented 7 years ago

Tracing what happens when a node is added nested deeper inside an inline, it looks all ok and even gl.drawArrays() in X3DGeometryNode.js is called but the red box does not show up. The vertexbuffer has the right length, so perhaps something else (in the uniforms setup?) is the problem.

andreasplesch commented 7 years ago

It turns out, all was ok, the box was there but was really tiny. Changed the example to work better.

create3000 commented 7 years ago

lol

create3000 commented 7 years ago

lol rofl