<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
John,<br>
<br>
<blockquote
cite="mid:BDA92670-25AF-4BF4-82E5-652A59023D82@sbcglobal.net"
type="cite">
<div class="">If we can figure out how to hook up Proto’s with
HTML5 script, perhaps through a class attribute or other
attribute, that might work. I agree that converting ecmascript
to JavaScript is not an idea solution, and solutions already
exist for VRMLscript (Cobweb). I am not that familiar with
Inline, i will have to investigate more. <br>
</div>
</blockquote>
<br>
Inline is like reading the external file and sticking it in the
existing X3D code stream. There are other name-scope items to
manage, but that is the basic idea.<br>
<br>
<br>
<blockquote
cite="mid:BDA92670-25AF-4BF4-82E5-652A59023D82@sbcglobal.net"
type="cite">
<div class="">Can you show me how to model a graph with 4 nodes
and 3 edges with HTML5 and Inline? (pseudocode is fine). Then
scale it to 200 nodes and 199 edges without much typing (a loop
or two is fine)? I would need to know how to keep the node
positions up to date with the edge end positions in particular.
I am working on converting the X3D JSON Schema to an X3D
diagram. I would use Protos, but they are not available on the
web. I did not say this was simple, and I can help with X3D
examples that I have created.</div>
</blockquote>
<br>
Does each entry consist of a node object (perhaps depicted as a
sphere) and N connection objects/edges (perhaps depicted as
cylinders)? <br>
<br>
A node and its connections need to be inserted into the scene
(perhaps on-demand). One end of each connection is the node, and the
other end is specified as some other node. So the inputs are the
node information (including position) and N other nodes. This
requires the creation of N+1 geometric objects, One is placed at the
location provided, and the other N connect the new object to
existing other nodes. <br>
<br>
In X3DOM, the object creation is easy by adding the appropriate
Shape structure to a Transform node in the DOM (addChild). It would
be necessary to obtain the global coordinates for each of the N
remote objects to be able to construct a connection object between
the two. I would need to research how to do this in X3DOM, but I
have seen the methods that return the coordinate in absolute space.<br>
<br>
The work could be done in JavaScript and X3DOM as it exists now. I
am not sure this is appropriate for a standard. Perhaps a
best-practices or tutorial document that describes how to do this.
It might be for this case to use sprintf.js and a format string with
placeholders for the replacements.
<a class="moz-txt-link-freetext" href="https://github.com/alexei/sprintf.js">https://github.com/alexei/sprintf.js</a><br>
<br>
<br>
Leonard Daly<br>
<br>
<br>
<br>
<br>
<blockquote
cite="mid:BDA92670-25AF-4BF4-82E5-652A59023D82@sbcglobal.net"
type="cite">
<div class=""><br class="">
</div>
<div class="">John</div>
<div class="">
<div>
<blockquote type="cite" class="">
<div class="">On Feb 5, 2016, at 7:37 PM, Leonard Daly <<a
moz-do-not-send="true" href="mailto:web3d@realism.com"
class=""><a class="moz-txt-link-abbreviated" href="mailto:web3d@realism.com">web3d@realism.com</a></a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<meta content="text/html; charset=utf-8"
http-equiv="Content-Type" class="">
<div bgcolor="#FFFFFF" text="#000000" class="">
<div class="moz-cite-prefix">John,<br class="">
<br class="">
</div>
<blockquote
cite="mid:C466BAC7-0217-446B-8AFC-2B4994A1D464@sbcglobal.net"
type="cite" class="">
<pre class="" wrap="">So there’s a current going on where we are trying to modify HTML5 and X3DOM attributes, either with straight JavaScript or Templating (via AngularJS). While the X3D JSON loader does not support modifying attributes that I know of after the fact (well, it *may*), it dos support specifying @class and @id attribute names for later modification with your favorite JavaScript framework. Templating is likely another issue we need to face. Who has used templating with X3DOM and what success have they had? Should X3DOM support templating as part of its core, or should it be done with web components or a framework like Meteor, Angular.js, handlebars, mustache, etc.?</pre>
</blockquote>
<br class="">
I am not sure I understand exactly what you mean by
templating. I don't want to make any assumptions and
start going down a completely wrong path. Can you
provide a foundation for the discussion?<br class="">
<br class="">
<blockquote
cite="mid:C466BAC7-0217-446B-8AFC-2B4994A1D464@sbcglobal.net"
type="cite" class="">
<pre class="" wrap="">We need to decide pretty quick whether Protos will be supported in X3DOM (perhaps through a prototype expander on the client and/or server side), otherwise, there will be a massive bifurcation of technology (which may be good) and struggle possibly as people attempt to merge various templating frameworks with X3DOM.</pre>
</blockquote>
<br class="">
In my experience, all of the interesting X3D PROTOs
contain a Script node. Without a Script node, I have not
seen or been able to construct something that is any
different than an Inline. If one exists, I would like to
know about it.<br class="">
<br class="">
I do not see why there should be a Script node in an
html-type profile for X3D. Having JavaScript (meaning
code to manipulate the DOM) and ECMAScript (meaning code
to manipulate X3D's SAI) is dangerous as people will
quickly be confused. The SAI api cannot replace the DOM
api as there are things that can to be done to the DOM
that do not make sense to handle with the SAI. There are
also a lot (meaning >>1,000x) more DOM programmers
than SAI programmers.<br class="">
<br class="">
So without Script node, I do not see the need for PROTO.
I am willing to reconsider if you can provide me useful
examples that are doable in PROTO and not Inline or some
other means. <br class="">
<br class="">
Perhaps a better concept might be a MACRO where the
contained (declarative) code is expanded and parameter
values from the parent are substituted to equivalent
parameters in the expanded code. That probably has lots
of applications and would be straight-forward to code.
It would be sort-of like an Inline with pre-defined
parameters. If that is the case. it would be necessary
to define any name-scoping limitations and parameter
updates. Perhaps an extended Inline definition would be
sufficient.<br class="">
<br class="">
<br class="">
Leonard Daly<br class="">
<br class="">
<br class="">
<blockquote
cite="mid:C466BAC7-0217-446B-8AFC-2B4994A1D464@sbcglobal.net"
type="cite" class="">
<pre class="" wrap="">I think we need to provide an answer which *isn’t* straight JavaScript, and that can be declarative.
John
------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140">http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140</a>
_______________________________________________
X3dom-users mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:X3dom-users@lists.sourceforge.net">X3dom-users@lists.sourceforge.net</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="https://lists.sourceforge.net/lists/listinfo/x3dom-users">https://lists.sourceforge.net/lists/listinfo/x3dom-users</a>
</pre>
</blockquote>
<br class="">
<br class="">
<br class="">
<div class="moz-signature">-- <br class="">
<font class="tahoma,arial,helvetica san serif"
color="#333366"> <font class="" size="+1"><b
class="">Leonard Daly</b></font><br class="">
X3D Co-Chair<br class="">
Cloud Consultant<br class="">
President, Daly Realism - <i class="">Creating the
Future</i> </font></div>
</div>
------------------------------------------------------------------------------<br
class="">
Site24x7 APM Insight: Get Deep Visibility into Application
Performance<br class="">
APM + Mobile APM + RUM: Monitor 3 App instances at just
$35/Month<br class="">
Monitor end-to-end web transactions and take corrective
actions now<br class="">
Troubleshoot faster and improve end-user experience.
Signup Now!<br class="">
<a moz-do-not-send="true"
href="http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140_______________________________________________"
class="">http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140_______________________________________________</a><br
class="">
X3dom-users mailing list<br class="">
<a class="moz-txt-link-abbreviated" href="mailto:X3dom-users@lists.sourceforge.net">X3dom-users@lists.sourceforge.net</a><br class="">
<a class="moz-txt-link-freetext" href="https://lists.sourceforge.net/lists/listinfo/x3dom-users">https://lists.sourceforge.net/lists/listinfo/x3dom-users</a><br
class="">
</div>
</blockquote>
</div>
<br class="">
</div>
</blockquote>
<br>
<br>
<div class="moz-signature">-- <br>
<font class="tahoma,arial,helvetica san serif" color="#333366">
<font size="+1"><b>Leonard Daly</b></font><br>
X3D Co-Chair<br>
Cloud Consultant<br>
President, Daly Realism - <i>Creating the Future</i>
</font></div>
</body>
</html>