[x3d-public] Anchor target within scene: code example

Joseph D Williams joedwil at earthlink.net
Sat Jan 26 04:22:45 PST 2019


From: Albert Jan Wonnink
Sent: Saturday, January 26, 2019 12:54 AM
To: x3d-public at web3d.org
Subject: Re: [x3d-public] Anchor target within scene: code example

➢ Hi Joe, Thank you for your answer. 

You are welcome, but It doesn’t seem like it was much of an answer. 

➢ This point is a result of an attempt to see the 3d web as a natural extension of the 2d web, with an experimental browser for XR in mind. So one of my considerations has been how a common feature like an (I)Frame could have a similar functionality in 3D. 

Isn’t an inline is a lot like an iframe? The iframe is sandboxed? Maybe the html object may be a better comparison. 

➢ One can extend the rectangle of the frame to a block in 3D. But in 3D it doesn't seem to make sense to disallow mixing the visual content of this block with content of the main scene (like we do for 2d). 

Well, I think in html you can get the effect of mixing visual content if the iframe or object has a transparent background. 
 
➢ But otherwise the described functionality would be exactly similar to what we have for Html.

I still don’t get it because what does this have to do with what an x3d or html anchor is supposed to do. There is not any html anchor that tells you to exchange one part of the page for another. You need to use the DOM for that, just as in x3d you use the SAI. 

➢ Of course anything can be done using JavaScript, but in my opinion such a common feature should mimic how it is done in Html, and be specified using only meta tags and their attributes. 

I still don’t know of any html tags that do what I think you are describing. The ways to give focus or attract focus has more posibilies in x3d than in html. Defining presentation styles for simple interactions is probably best left to the author because a simple default probably won’t work anyway. 

➢ Maybe I don't understand it completely, but I think your first example can't be use to load different models from the server in the same node, can it? 


The example starts with an inline in the scene, then when the button is clicked the inline is replaced by sending it a new url. The operation uses a script but there are other x3d utilities to do things like this without a script. 


➢ The X3D parser currently already checks whether an (I)Frame is specified as target for the anchor when the X3D is used within a 2D page. 

I guess I haven’t seen that example. But the x3d or html anchor does not care whether an iframe or an inline is referenced, it just knows to unload the current document and load the new, or that the scene is the same, but the viewpoint is new. What happens when you click an html anchor that is in an iframe? 

➢ In my opinion this can be easily extended for checking '(I)Frames' in the 3D scene. 
➢ This could be 'normal' anchor behavior. 

I still don’t get why. The anchor does what I does. If you need to figure out other sorts of actions for the click then step back to basics and look at other types of sensors, like the touchsensor. 

➢ You make a valid point that an anchor in 3D should also have a default visual feedback, for example something like the mouse over behavior in 2D on a link. I don't think something like this is defined in X3D, is it? And I would surely appreciate CSS possibilities :) 

That default style stuff is not (yet) defined for x3d, but possible. Look at the isOver and isActive events on touchsensor for example and since there are no defaults you can do whatever needs to be done – make your own x3d css. Why click, just swap content with an isOver?  CSS for X3D, just now being considered. Watch the list and join the fun. 

➢ Regards, 

➢ Albert Jan Wonnink

Good Luck, and Best Regards, 
Joe

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20190126/26740399/attachment.html>


More information about the x3d-public mailing list