[x3d-public] Css-3d tags

Andreas Plesch andreasplesch at gmail.com
Thu Sep 21 20:47:39 PDT 2017


In Leonard's nomenclature classes are collections of specific styles. This
is in contrast to HTML where classes are collections of elements.
Nevertheless, here is a potential way to use paths or any css selector to
assign styles to matching elements in a preprocessing phase. Say there is a
tag such as

<css3d objects=selectorString styles='shape box' />

where shape and box are defined class3ds.

Then in a preprocessing step it would be possible to go through all css3d
elements, select matching target elements and add a class3d='shape box'
attribute to each. In pseudocode:

document.querySelectorAll('css3d').for each(function(El){
styles=El.styles

document.querySelectorAll(selectorString).for each(addclass3d.bind(styles))

)})

function addclass3d(El) {
El.setAttribute('class3d', this)
\\better merge into existing value
}

This is rough but could work I think.

The larger question if it is possible to separate semantic content from
presentation in 3d scenes. Is geometry always content and size or color
always style ? Are small animations always just a stylistic aid, never
critical ?

In HTML CSS is mostly used to make pages 'pretty' and sometimes look
coherent across a larger site. What is the equivalent use for 3d scenes ?
Perhaps this suggests that css would be most useful if it worked across
multiple scenes ?

Andreas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20170921/1019c198/attachment-0001.html>


More information about the x3d-public mailing list