You are reading a single comment by @Gordon and its replies.
Click here to read the full conversation.
-
I was using this but it doesn't work for some reason... it says:
Uncaught Error: Field or method "set" does not already exist, and can't create it on undefined at line 3 col 12...
Specifically this doesn't exist inside that DMX.prototype.newData function, or indeed inside any other than the first one DMX()...
I also don't know what you mean about bind, but I tried adding this and it also didn't work.
Looks good - the only thing I can see is in some functions you access the object directly with
DMX
but you should really be usingthis
(or it'll fail if you call the object anything else).As you might have found out, it's slightly more painful than that though - you need to use
bind
:and the same for the end of frame marker too...
Other thing I'd say is maybe calling all the handlers could end up being quite slow - I'm not sure. You'd have to be careful that the new frame handler didn't take so long that you missed data.