Jump to content
Search Community

skiplan

Members
  • Posts

    8
  • Joined

  • Last visited

Posts posted by skiplan

  1. Yep all those lovely graphics classes in Flash don't exist in the browser, so you're going to need to use something like SVG or Canvas to draw complex things on the screen.

     

    There are many libraries available to help you do this, but I don't really use them often so I don't have a favourite to recommend. GSAP does have plugins for animating objects from the following libraries though:

     

    KineticJS

    Raphaël

    EaselJS

    Thank you for the answer.

    Actually my problem is not to draw a complex plot (I use Canvas to do this), but to animate.

     

    Thanks

  2. Hi,

    I've already made this work in AS3 (http://forums.greensock.com/topic/257-drawing-with-tweenmax-solved/)

     

    That's working very fine.

    Now, i'm trying to make this work with JS....But right now, it doesn't work.

    Is anyone could help me?

    Thanks a lot.

    function buildPathTimeline($points, $graphics, epaisseur, color){
    			var timeline = new TimelineLite({paused:true});
    			var p //point
    			var strColor;
    			var numEpaisseur;
    			var dx; //distance on the x-axis
    			var dy; //distance on the y-axis
    			var d; //distance
    			var pen; //stores information about the coordinates and previous points for each one in the Array
    			for (var i = 0; i < $points.length; i++) 
    			{
    				p = $points[i];
    				strColor = color[i];
    				numEpaisseur = epaisseur[i];
    				pen = { x:p[0], y:p[1] };
    				dx = p[0] - 10;
    				dy = p[1] - 10;
    				//d = Math.sqrt(dx * dx + dy * dy);
    				timeline.add(new TweenLite(pen, 0.5, { x:p[0], y:p[1], ease:Linear.easeNone ,onUpdate:updateLine, onUpdateParams:[$graphics, pen, numEpaisseur, strColor] } ));
    				
    			}
    			return timeline;
    		}
    		
    		function updateLine($graphics, $pen, epaisseur, color){
    			
    			$graphics.lineTo($pen.x, $pen.y);
    			$graphics.strokeStyle = "#000000"; //color
    			$graphics.lineWidth = 5;
    			$graphics.stroke();
    			
    		}
    
    
    context.beginPath();
    
    context.moveTo(20, 20);
    
    myPath = buildPathTimeline(pointArray, context, epaisseurArray, colorArray);
    
    TweenLite.to(myPath, 20, {currentProgress:1, delay:1.5});
    
    
    
  3. Yes, thanks for the answer.
    I'd already seen that but i have a lot of data like an image url or a color that transform.matrix does not contains.
    So, I don't really know how can I record all this informations.

  4. Hello,

    I have a user interface which is allow the user to create some contents like add an image, text, video.

    This user interface is using the TransformManger.

    Is there an (easy) way for implement an undo/redo function?

    Thanks for help and the answers

    post-8224-0-87887200-1369402015_thumb.jpg

×
×
  • Create New...