[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [www-vrml] [xVRML] new screen snapshots and the future
Hi Bryan,
Sorry, I should have been clearer. It is a difficult problem to state and to understand though.
If you want to have a PROTO receiving an eventIn which passes that to the eventIn of a node inside the PROTO, then the only way to do it is to add a Script node. The Script node is the only node that makes the eventIn explicit. In all other nodes the eventIn is implied.
The same thing goes for eventOut. If you want to send an eventOut from a node inside a PROTO you must add a Script.
Bryan, the example you showed below used an eventIn through a PROTO head to a field in a node. That isn't what I mean. Try sending an eventIn through a PROTO into an eventIn in a node. You can't. Not without a Script to mediate.
If you are sending just a mouse-click then it is no big deal. But if the data being sent is a stream, then being required to send vast amounts of data through a javascript node is a stumbling block for making big, complex worlds.
Here is a simple example that makes a timer that simply produces a stream of time values. See how absurd it is to have to pass all that data through a Script node instead of directly from the ticker.
PROTO timer[
eventOut SFTime now
] {
DEF ticker TimeSensor {
#time eventOut SFTime
}
DEF hack Script {
eventIn SFTime relay
eventOut SFTime now IS now
url "javascript:
function relay(time) {
now=time;
}
"
}
PROTO ticker.time TO hack.relay
}
Best wishes,
- Miriam
--
---------=---------=---------=---------=---------=---------=------
A life! Cool! Where can I download one of those from?
---------=---------=---------=---------=---------=---------=------
http://werple.net.au/~miriam
My live Journal page http://www.livejournal.com/users/miriam_e/
-------------------------------------------------------------------------
for list subscription/unsubscription,
go to http://www.web3d.org/cgi-bin/public_list_signup/lwgate/listsavail.html