[x3d-public] add 'hidden' field to Shape?
Holger Seelig
holger.seelig at googlemail.com
Sat Dec 14 02:57:45 PST 2019
I agree with the opinion that the field should be available as well on
X3DShapeNode and X3DGroupingNode, but I think the logic should be
reversed: TRUE should mean ON/visible, and FALSE should mean OFF/hidden.
Better name the field 'visible' or even like X3DOM 'render'. Think about
interconnectivity, routing from one exiting field to the new
X3DShapeNode field, you could route a TimeSensor's isActive or isPaused
fields, or a TouchSensor's isActive or isOver fields directly to the new
field if the logic is like above, to display for instance a 'lamp' shape
to indicate the action. This would not be possible if the field is named
'hidden' some logic would be need to negate the logic:
TimeSensor.isActive -> NOTScript -> Shape.hidden. With the logic above,
no Script node is needed.
Best regards,
Holger
On 13.12.19 12:17, vmarchetti at kshell.com wrote:
> 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 ) 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
>> <mailto: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
>
>
> _______________________________________________
> x3d-public mailing list
> x3d-public at web3d.org
> http://web3d.org/mailman/listinfo/x3d-public_web3d.org
--
Holger Seelig
Digital Media Designer
Scheffelstraße 31a
04277 Leipzig
Germany
Cellular: +49 176 420 479 37
E-Mail: holger.seelig at create3000.de
Web: http://create3000.de
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20191214/e6ece275/attachment.html>
More information about the x3d-public
mailing list