chris thatcher wrote:
> Can you recommend a good site that temporarily lets you post html and
> javascript. I'm sure I've seen them used from time to time, and it
> really is a good practice to post a live example when asking a question.
>
> Thanks
>
> On Sun, Oct 5, 2008 at 8:08 PM, F1LT3R <alistair...@me.com
> <mailto:alistair...@me.com>> wrote:
>
>
> Do you have an example of what is going wrong that I could look at?
>
>
> On Oct 5, 8:02 pm, Thatcher <thatcher.christop...@gmail.com
--John
Btw, I love the animated background on your Processing.js site :-)
--John
-Rob
I'm not a fan of IDEs either. I spend my time in TextMate and
Firebug, and I'd like to keep it that way.
So you prefer writing all your scripting in processing instead of
writing it in javascript? are there any limitations to the API that
would otherwise limit me from doing everything possible in the
interpreted processing.js code?
My goal is to make it through the Ben Fry, "Visualizing Data," book,
but all in the browser, and I'd rather do it in JS -- a language I
know, using the Processing.js API -- than do it in processing. So far
I'm getting hung up on things like trying to load strings from
processing within the browser. I've figured out how to load images
thanks to the examples on John's site, but there's nothing about
loading external text files. That seems like something that's going
to need handling through $.get() in javascript, which makes me want to
pick one place or the other to do this. Does that make any sense?
Thanks in advance for the advice.
Best,
Justin
So I think I understand what you're saying...let me check :)
Chapter 3 in Visualizing Data requires us to load in the Table.pde
library, then load in a delimited file. In the Processing IDE, this
is cake. In Pjs, I'm finding I'm spending my time trying to learn how
to load external files instead of making it through the chapter :)
Table.pde relies on the loadStrings method.
In processing, I'd load strings in through string[] myStrings =
loadStrings("filename.ext"). Since it doesn't appear I can do that in
Pjs, would this be right?
(assuming i declared string[] myStrings; in the processing file)
var myStringsInJS = [];
// put stuff in there
window.Processing.data.myStrings = myStringsInJS;
Thanks!
Justin
Before I start modifying my Pjs file...
John, is this something you plan to add to processing.js in the near
future?
Thanks a million, folks. I really appreciate it!
Justin
Sure, I don't see why not. It'd be pretty awesome to get parity with
the book (I'll have to crack open my copy to see how we do!)
--John
Of course any hardcore Processing fans probably aren't using
Processing.js to begin with since (at this time) JavaScript doesn't
provide the raw processing power that a Java Applet does (nor all the
libraries of Processing).
Kind of an uphill battle, in that respect. An easier market to tackle
is the casual Processing developer and the JavaScript developer
looking to do more with Canvas.
--John