<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">On 08/22/2013 03:53 AM, Jack wrote:<br>
</div>
<blockquote cite="mid:5215C377.8060003@rybn.org" type="cite">
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<div class="moz-cite-prefix">Le 22/08/2013 07:13, Jonathan Wilkes
a écrit :<br>
</div>
<blockquote
cite="mid:1377148386.20393.YahooMailNeo@web160301.mail.bf1.yahoo.com"
type="cite">
<div style="color:#000; background-color:#fff;
font-family:arial, helvetica, sans-serif;font-size:12pt">Hi
list,<br>
<br>
I've got some updates to [canvasinfo], [pdinfo], and
[classinfo] that I'll put in a demo build either tomorrow or
the next day.<br>
<br>
I also added a new data structure class with two creators:<br>
[drawimage] - draw an image on a canvas<br>
[drawsprite] - draw a sprite on a canvas<br>
<br>
The [drawsprite] object takes the name of a directory
containing an image sequence and<br>
loads the images into tcl/tk memory when the object gets
created. A ds float field can then be<br>
associated with that image so that when you change its value
it jumps to that image in the<br>
sequence. I used the code from [drawnumber], so you can even
animate the sprite by clicking<br>
and dragging on the image.<br>
<br>
Since all the images are preloaded into tcl/tk, animating them
is fairly straightforward-- tk just<br>
clears the old image and copies the new one from one of the
images it has in memory.<br>
<br>
Of course the upshot is fairly obvious-- we can finally have
ponies running around inside Pure<br>
Data patches.<br>
<br>
E.g., thanks to this:<br>
<a moz-do-not-send="true" class="moz-txt-link-freetext"
href="http://friendshipismagic.smackjeeves.com/comics/1223051/female-pony-base-sprites/">http://friendshipismagic.smackjeeves.com/comics/1223051/female-pony-base-sprites/</a><br>
<br>
I can now do this:<br>
<a moz-do-not-send="true" class="moz-txt-link-freetext"
href="https://puredata.info/Members/jancsika/omgponies.webm/view">https://puredata.info/Members/jancsika/omgponies.webm/view</a><br>
<br>
I just added the "realtime code selection" as an afterthought
using [cnv] objects. However, it<br>
would be neat to be able to group code and highlight it
programmatically as the data is flowing.<br>
<br>
-Jonathan<br>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:Pd-list@iem.at">Pd-list@iem.at</a> mailing list
UNSUBSCRIBE and account-management -> <a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://lists.puredata.info/listinfo/pd-list">http://lists.puredata.info/listinfo/pd-list</a>
</pre>
</blockquote>
<br>
Very funny animation, we can now design platform games directly in
a patch. ! ;)<br>
More seriously, it could replace the [#see] object from gridflow,
interresting...<br>
++<br>
</blockquote>
<br>
As I understand it, [#see] is much more powerful because it's
visualizing stuff<br>
created from gridflow computations on the fly. But it's probably
also much slower<br>
for that same reason.<br>
<br>
One drawback to [drawsprite] is if you wanted to abuse it to draw a
large image<br>
sequence-- say a video clip-- you're going to use a ton of memory
loading the images<br>
into wish's memory. And by default tcl/tk doesn't free that memory
back to the OS.<br>
However it does free it up within tcl/tk when the corresponding
[drawsprite] is deleted--<br>
so if you delete it and undo a bunch of times it won't consume more
memory than it did<br>
in the first place.<br>
<br>
But for small sprites this isn't really an issue, and once the
images are loaded it is very<br>
cheap to copy/cut the scalar images on a canvas.<br>
<br>
-Jonathan<br>
<br>
<blockquote cite="mid:5215C377.8060003@rybn.org" type="cite"> <br>
Jack<br>
<br>
<br>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
<a class="moz-txt-link-abbreviated" href="mailto:Pd-list@iem.at">Pd-list@iem.at</a> mailing list
UNSUBSCRIBE and account-management -> <a class="moz-txt-link-freetext" href="http://lists.puredata.info/listinfo/pd-list">http://lists.puredata.info/listinfo/pd-list</a>
</pre>
</blockquote>
<br>
</body>
</html>