X3DOM in TW6

196 views
Skip to first unread message

zemoxian

unread,
Jul 22, 2016, 11:28:08 PM7/22/16
to TiddlyWiki
I've been experimenting with X3DOM. I'm able to display 3D graphics in a Tiddler using the X3D tag. However, when a new X3D is inserted into the DOM, x3dom.reload() has to be called for it to display 3D content.

I've created a widget to call it with a button click. I'm wondering if there is a better way to do it?

Jed Carty

unread,
Jul 23, 2016, 4:12:03 AM7/23/16
to TiddlyWiki
This sounds neat, so you have a demo somewhere? And for many javascript libraries that you have to reload you can put the function in the code that adds something new so it happens automatically.

Jeremy Ruston

unread,
Jul 23, 2016, 8:00:53 AM7/23/16
to tiddl...@googlegroups.com
I found this link:


One approach is to write a <$x3d> widget that calls x3dom on its child elements after it has executed/refreshed them:

<$x3d width='500px' height='400px'>
    <scene>
        <shape>
            <appearance>
                <material diffuseColor='1 0 0'></material>
            </appearance>
            <box></box>
        </shape>
    </scene>
</$x3d>

That way you can reuse all of TW’s abilities to eg transclude attribute values and the list widget to generate repetitive structures.

Best wishes

Jeremy.

On 23 Jul 2016, at 09:12, Jed Carty <inmy...@gmail.com> wrote:

This sounds neat, so you have a demo somewhere? And for many javascript libraries that you have to reload you can put the function in the code that adds something new so it happens automatically.

--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/67c559af-034b-49d5-8e44-bff60be0c8be%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Alex Hough

unread,
Jul 24, 2016, 2:51:26 PM7/24/16
to tiddl...@googlegroups.com
Could you click on a side of a cube and navigate to a tiddler?
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/CA5E0C89-79BC-4E53-AF4F-6DCC4F056E08%40gmail.com.
Message has been deleted

zemoxian

unread,
Jul 25, 2016, 10:45:46 PM7/25/16
to TiddlyWiki
I imagine a widget like the $button widget could provide that. I tried <$button tag=shape ...> but it didn't work (only tried it on my iPhone). I think a variation of the button widget could work though. Just need to work out what isn't working.

zemoxian

unread,
Jul 25, 2016, 10:59:18 PM7/25/16
to TiddlyWiki
This works fine. An $x3d widget may be useful but I haven't needed it yet. i need the <<x3dreload>> button to make it visible. The widget could make it unnecessary.

<x3d width="300px" height="300px" >
<scene>
<viewpoint position="3 2 10"></viewpoint>
<$list filter="[tag[Shapes]]"><$transclude /></$list>
</scene>
</x3d>
<<x3dreload>>

zemoxian

unread,
Jul 25, 2016, 11:11:24 PM7/25/16
to TiddlyWiki
Reply all
Reply to author
Forward
0 new messages