[PD] locality with new [field] object (Jonathan Wilkes)

jamal crawford threen52 at ml1.net
Wed Sep 9 17:34:05 CEST 2015


hahaha! are you kidding me? (:

> I guess the next step is to make pacman eat those objects as he moves
> over them.
.. or maybe even make him sing?

~/.jc

On Mon, Sep 7, 2015, at 09:52 PM, Jonathan Wilkes wrote:
> Btw-- the "canvas" field isn't the only
      way to avoid throwing around gpointers.
>
>
      Here's a quick pacman vector animation where I just animate by
      changing the
>
      attributes of the drawing instruction.  Since it's all vector
      drawings I can scale pacman
>
      to any size I wish without it becoming pixelated:
>
> http://pdblog.nfshost.com/pacman.webm
>
>
      I guess the next step is to make pacman eat those objects as he
      moves over them.
>
>
      -Jonathan
>
>
      On 09/02/2015 02:29 PM, jamal crawford wrote:
>> hey list, Jonathan.
>>
>>> You start with a struct:[struct foo float x float y canvas
          a b]
>>> Then create a scalar from this struct. The scalar will have an "x"
>>> value, a "y" value, and a
          canvas "a" which gets filled with the contents of an
          abstraction "b.pd" that is somewhere in Pd's search path.
>>> Now here's the neat thing-- inside the newly instantiated
          "b.pd" you can do this:
>>> [loadbang]|[field x]|[print x]
>>>
>>
>>> imagine you have a drawing instruction like this:[draw rect 0 0
>>> 20 20]
When you create the scalar you get a little black box on a canvas. With
a canvas field like I described, you can right-click the scalar and
choose "Open" to show a canvas window.
>>
>> while trying to create [struct foo float x float y canvas a
        b], i get: canvas: no such type, using pd 0.46.6
>> what am I missing?
>>
>> ~/.jc
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20150909/54957e9a/attachment.html>


More information about the Pd-list mailing list