With all this material.. Here’s a bit of animation! I’d like to see what you guys might do with it!!

With all this material.. Here’s a bit of animation! I’d like to see what you guys might do with it!!

]]>

14 Commentsto With all this material.. Here’s a bit of animation! I’d like to see what you guys might do with it!!

  1. Anonymous says:

    < ![CDATA[

    var c=LL.getEvent().getContainer();


    var cw=c.getWidth();


    var ch=c.getHeight();


    var cx=c.getPositionX();


    var cy=c.getPositionY();



    var math={


    pnt:function(a,b,c){return a+((b-a)*c);},


    pthg:function(a,b){return Math.sqrt((a*a)+(b*b));}


    };



    var i=c.getOpener();



    b=cy%ch/ch;




    var hex=[



    0xff795548,//brown


    0xff259b24,//green


    0xffff9800,//orange


    0xff00bcd4,//cyan


    0xffE51C23,//red



    0Xff9C27B0,//purple


    0Xff673AB7,//deep purple


    0XffE91E63,//indigo


    0Xff3F51B5,//pink


    0xff009688,//teal


    0xff607d8b//greyblue


    ];


    var page=cy<0?0:Math.floor(cy/ch)%hex.length;



    var p = new Paint();


    p.setColor(hex[(page+1)%hex.length]);




    img=LL.createImage(cw,ch);


    i.setBoxBackground(img,”n s”);


    canvas = img.draw();



    var r=math.pthg(cw,ch)/2;


    r=math.pnt(0,r,b);



    if(cy>=ch){canvas.drawColor(hex[page]);}


    canvas.drawCircle(cw/2, math.pnt(ch+r,ch/2,b), r, p);

    ]]>

  2. Anonymous says:

    < ![CDATA[

    Haha! That’s pretty dang cool!

    ]]>

  3. Anonymous says:

    < ![CDATA[

    What’s the setup for this? I see it’s several vertical panels, but what all is involved?

    ]]>

  4. Anonymous says:

    < ![CDATA[

    Fantastic

    ]]>

  5. Anonymous says:

    < ![CDATA[

    Awesome!!!

    ]]>

  6. Anonymous says:

    < ![CDATA[

    Great..


    How can i use this?

    ]]>

  7. Anonymous says:

    < ![CDATA[

    Math.floor with two parameters? Can’t find that in any wiki. What does it do?

    ]]>

  8. Anonymous says:

    < ![CDATA[

    No setup thomas greer​.. Just set this as the position changed event in on a panel.. Those four vertical items are just that.. Items.

    ]]>

  9. Anonymous says:

    < ![CDATA[

    TrianguloY​, good catch! I’m surprised it didn’t throw an error.. I just removed it

    ]]>

  10. Anonymous says:

    < ![CDATA[

    Works great with opaque colors, but not with (semi)transparent colors. Any idea?

    ]]>

  11. Anonymous says:

    < ![CDATA[

    I’m going to have to play with it a bit.. I’m thinking clipPath(), but I’ve never used it before

    ]]>

  12. Anonymous says:

    < ![CDATA[

    That’s way easier than what I was thinking! Thanks TrianguloY​



    I was planning on drawing the rectangle for the background with the circle cut out.. Then drawing the circle..

    ]]>

  13. Anonymous says:

    < ![CDATA[

    TrianguloY Thanks, that works! Just added that one statement before setColor to get it working:



    var p = new Paint();


    p.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.SRC));


    p.setColor(hex[(page+1)%hex.length]);

    ]]>

Leave a Reply

Your email address will not be published. Required fields are marked *