question about resizing jit.pwindow with javascript.

Oct 6, 2008 at 4:10pm

question about resizing jit.pwindow with javascript.

I try to resize jit.pwindow and patcher window with javascript, but i have problems i can’t resolve alone ; here a demo patch to explain what’s happen ; it’s probably about openGL stuff that i don’t understand very well.
Do you know how to avoid this distortion ?

#40180
Oct 7, 2008 at 4:14pm

i didn’t search enough, sorry ! after few hours (i’m stupid !), here a way to do it, it’s not very beautiful, but that works.

#141906
May 18, 2011 at 10:03pm

believe me you’re not stupid. I don’t know any js or java…and I need to accomplish this. sadness fills 0.o

#141907
May 19, 2011 at 8:30am

Hello,

more or less equal to missing zips …

Attachments:
  1. Foo.zip
#141908
May 19, 2011 at 2:03pm

THANKS!

wow…i think I understand that, as a simple switch. But I need to do it dynamically. I’ve got 12 jit.pwindows playing one video stream cut up and spread about a window. I want them to start in a random positions and in roughly 5 minutes finish in a shape. I imagine a basic reconstruction of the video stream in natural order.

i guess today I dive into the java docs.

#141909
May 19, 2011 at 4:17pm

Hello,

without javascript …

– Pasted Max Patch, click to expand. –

HTH

#141910
May 19, 2011 at 10:36pm

thanks!!

2 questions though.

– Pasted Max Patch, click to expand. –

1) am I hallucinating or does that rectangle turn into a square at higher values?
2) is there anyway to move the pwindow around in the patcher window? like this

– Pasted Max Patch, click to expand. –

i’ll be honst I can’t decipher the flower =,*(

#141911
May 20, 2011 at 5:36am

Hello,

– Pasted Max Patch, click to expand. –

HTH

#141912
May 20, 2011 at 5:36am

oops

#141913
May 20, 2011 at 8:52pm

is there no limit to your genius!!!!????? thank you so much. why do you say oops?

#141914
May 21, 2011 at 6:51am

Hello,

because i posted twice ;-)

#141915
May 21, 2011 at 3:28pm

did you know about this attribute the jit.pwindow has. it’s called patching_rect.

– Pasted Max Patch, click to expand. –

I was just showed that and it’s LOADS simpler.

#141916
May 21, 2011 at 3:50pm

Hello,

yep, much more easy like that …

If you want to know all attributes :
- open the jit.pwindow inspector (select the [jit.pwindow] then cmd + i),
- click on @ in bottom left (“Show attribute name”),
that’s it !

HTH.

#141917
May 21, 2011 at 5:52pm

oh snap! thank you for that! I’m familiar with the inspector but I didn’t realize they were all @rguments…. and now I know how to access them! this is excellent. learning so much =) thanks!!

#141918

You must be logged in to reply to this topic.