<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">Yves,<br>
      <br>
      You asked about the methods prepareEvents and eventsProcessed with
      the intent of building an MFFloat array. The abstract details for
      these methods is documented in
<a class="moz-txt-link-freetext" href="http://www.web3d.org/documents/specifications/19775-2/V3.3/Part02/servRef.html#ScriptContentRealised">http://www.web3d.org/documents/specifications/19775-2/V3.3/Part02/servRef.html#ScriptContentRealised</a><br>
      <br>
      prepareEvents is called when the run-time is about to start the
      event cascade. This method is called every frame independent of
      the containing [Script] node receiving any events.  <br>
      <br>
      eventsProcessed is called at the end of the event cascade only if
      the containing [Script] node received an event. The method may be
      called more than once per frame.<br>
      <br>
      Note that there is a render operation at the end of the event
      cascade and prior to the end of the frame. Everything that happens
      with a single frame has the same timestamp. <br>
      <br>
      There is no guarantee of the order of received events during a
      timestamp. And as can be seen from the description above there is
      no means to capture the "last" event. I am not sure how to
      implement what you want.<br>
      <br>
      <br>
      Note that if you are using X3DOM (besides not having these methods
      available), the entire event model is different. It is possible to
      accumulate values and generate a new event when the collection is
      complete by whatever criteria you wish to use.<br>
      <br>
      <br>
      Leonard Daly<br>
      <br>
      <br>
      <br>
    </div>
    <blockquote
      cite="mid:4CDD02D2-DE78-43AB-A747-209C392FD5AA@gmail.com"
      type="cite">
      <pre wrap="">Hi,

In ECMAScript binding (19777-1 v3.3), section 7.10 describes functions which can be defined in Script nodes in addition to those handling inputOnly fields. Functions "prepareEvents" and "eventsProcessed" have names which seem to imply some semantics: prepareEvents might be called before any inputOnly function in that Script node for a given timestamp, and eventsProcessed might be called after. But their description is much fuzzier: prepareEvents is said to be called "every frame" (we don't know when), and eventsProcessed "after some set of events have been received" (we don't know how many times).

Could someone clarify? I hope the semantics follows the function names. I want to write a multiplexor Script node where multiple SFFloat values are packed as a single MFFloat which is routed further. This could be done in eventsProcessed provided it isn't called multiple times with the same timestamp.

Thanks,

Yves


_______________________________________________
x3d-public mailing list
<a class="moz-txt-link-abbreviated" href="mailto:x3d-public@web3d.org">x3d-public@web3d.org</a>
<a class="moz-txt-link-freetext" href="http://web3d.org/mailman/listinfo/x3d-public_web3d.org">http://web3d.org/mailman/listinfo/x3d-public_web3d.org</a>

</pre>
    </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>