[x3d-public] add 'hidden' field to Shape?

vmarchetti at kshell.com vmarchetti at kshell.com
Fri Dec 13 03:17:55 PST 2019

1. There is a extension attribute in X3DOM called the 'render' attribute which serves this purpose, with opposite parity (meaning render=true has the same effect as hidden=false). It is higher up in the X3DOM inheritance tree, (see https://doc.x3dom.org/author/Grouping/X3DBoundedObject.html <https://doc.x3dom.org/author/Grouping/X3DBoundedObject.html> ) so it is an attribute in both the ShapeNode and the grouping nodes.

2. To add this field to Shape, and potentially the grouping nodes, we would need to specify how it behaves when the Shape node is referenced multiple times in a Scene with DEF/USE statements. This is a common pattern when a Shape is something which is repeated multiple times, think tires on a car. However, if 'hidden' is defined as a field on the Shape then all the tires would be shown/hidden together, which may not be the desired effect. If the authoring solution to avoid this is to enclose each tire in its own Group node and apply hidden on that Group, then you're pretty much back to the existing design pattern available with the Switch node.

Vince Marchetti

> On Dec 12, 2019, at 11:23 AM, Don Brutzman <brutzman at nps.edu> wrote:
> A common task in 3D graphics is selectively hiding geometry.
> X3D is fairly clumsy about this, typically requiring Switch or LOD animation to achieve it.
> HTML has a much simpler approach, the 'hidden' attribute.  There is a similar construct in CSS.
> 	HTML5 6.1 The hidden attribute
> 	https://html.spec.whatwg.org/multipage/interaction.html#the-hidden-attribute
> As a similar way to simplify hidding, either for pure X3D or hybrid html/X3D, wondering if we might add a 'hidden' attribute to Shape.
> 	12.4.6 Shape
> 	https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4-WD1/Part01/components/shape.html#Shape
> 	SFBool [in out] hidden FALSE
> Might we add hidden to Shape?  Is there a better approach?
> all the best, Don
> -- 
> Don Brutzman  Naval Postgraduate School, Code USW/Br       brutzman at nps.edu
> Watkins 270,  MOVES Institute, Monterey CA 93943-5000 USA   +1.831.656.2149
> X3D graphics, virtual worlds, navy robotics http://faculty.nps.edu/brutzman
> _______________________________________________
> x3d-public mailing list
> x3d-public at web3d.org
> http://web3d.org/mailman/listinfo/x3d-public_web3d.org

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

More information about the x3d-public mailing list