> Cool,



> other option also nice.

> Put [canvas]

> &

> Put [htmlcanvas]

I thought about doing an object like that.  There are two possible approaches,
both of which I didn't like:
1) access the htmlcanvas by sending Pd messages to the inlet.  This seemed
really limiting, especially when you consider how deeply web programmers
leverage javascript and javascript frameworks when doing html5 canvas
drawing/animation.  If you do similar such work in Pd to retain/manage state
and render then you're getting in the way of audio computation.  If you leverage
a higher-level framework to do it on the GUI side then you're tied to it as a hard
dependency for all time.
2) Have a simple interface for just defining height/width/vis, and give a hook for
the user to specify and use their own js script to do the drawing.  But this adds
an entire language to the UX which IMO is too great a burden, esp. for doing
prototyping.

Instead I just extended data structure drawings with the [draw] object to leverage
the SVG spec and do declarative vector drawing.  If you look at
"Pd-L2Ork Data Structures" in the help browser you can see some examples.

-Jonathan

> this one could be edited through “devtools”? Perhaps?

Yes, that's certainly possible.

-Jonathan

> Mensaje telepatico asistido por maquinas.



From: Jonathan Wilkes <jancsika@yahoo.com>
Sent: Sunday, January 22, 2017 11:07 PM
To: Lucas Cordiviola; Alexandre Torres Porres; pd-list@lists.iem.at
Subject: Re: [PD] Purr Data rc4
 


>>That's a possibility.  But currently you can't open an html file from the menu.  You'd have to open devtools and do it manually.

> Like drag`n`drop an html?
> Exactly where in the devtools?

In the devtools console.  For example, you can do `window.open('about:blank');`

[...]

> I meant we, in the furure, can open a remote html file that has the .pd part inside a </code> tag. And the canvas is rich-html and the objects and cables are above that.

Oh, I see.  There are two potential features you are describing.  One is a friendly
interface for opening an html file in Purr Data.  The other is a friendly interface
for making a network request for a remote file and then displaying/running it.

For the first we can just play around with devtools and incrementally build the
feature from there.  Maybe adding ".html" as a legal file type to open, making
the pdgui.js module more generally usable, etc.

Fetching remote content is a bit more difficult.  Currently I don't let the GUI
toolkit make any network connections aside from the local socket connection
to the Pd process.

-Jonathan

> I`m just brain-storming about the fact that Purr-data is based on HTML5.

Salutti,
Lucarda.



Mensaje telepatico asistido por maquinas.