Jump to content

Search the Community

Showing results for tags 'svg'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • GreenSock Forums
    • GSAP
    • Banner Animation
    • Jobs & Freelance
  • Flash / ActionScript Archive
    • GSAP (Flash)
    • Loading (Flash)
    • TransformManager (Flash)

Product Groups

  • Club GreenSock
  • TransformManager

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start





Website URL







  1. I have relatively big SVG that I'm animating with TweenLite - drawSVG. The problem is I can't make it going smoothly - it always being slow and intermittent first 1-2 seconds and proceeding fine on 3-4th second. I've tried adding delays to make it wait until the whole page is loaded, but it doesn't give much difference. Also tried renaming 50% of .style0 classes in SVG into another class and making it non-animated and visible from the beginning - not much difference as well, first 2 second of loading are still laggy. I'm looking for a way to make it smoother without editing SVG itself. I'm using the following code to animate it: jQuery(document).ready(function($){ TweenLite.set(".style0", {visibility:"visible"}); var tl = new TimelineLite(); tl.fromTo(".style0", 4, {drawSVG:0}, {drawSVG:"102%"}, "-=1"); TweenLite.render(); });
  2. Hello!, My code: http://codepen.io/SavanaPope/pen/xGKKzY I am sorry that my attached Codepen will not work. I am not sure how, or even if, you can use codepen with referenced svg's in the manner that I have. I am testing with XAMPP and the above code does work in that context. I am trying to animate a parent container which contains a bunch of svg object references. I would like to create an earthquake effect which requires me to rotate "Land," VolcanoOutline," and a bunch of other svg's together as a group. They need to rotate around the same origin, which I want to be able to define through this parent container. I have done this technique before using a nesting system like the following codepen, which uses <g id="name">....children with their own id's......</g> to animate the tomato as one piece. http://codepen.io/ihatetomatoes/pen/VYLMrJ This works great because I can animate the group as a block as well as the separate id's within the group. The problem is that my animation has highly complex svg's and I would like to keep the html clean by referencing them. When I try to replicate the same grouping technique with my referenced svg object's, it does not seem to work like it does when you are using inline svg. Is there any way to use GSAP TimelineMax on a parent container which holds a bunch of referenced svg objects? Thank you so much if you can help me!! P.S. - I have attached the project as well if you want to try it locally with the svg's working. FurryJean.zip
  3. Hey guys, I'm not too sure if I've simply been staring at this too long or if I'm just having one of those off days where simple math decides it's gonna kick my teeth in. I'm trying to animate the stroke-dasharray of an svg path with multiple dashes "chasing" one another through the path --similar to christmas lights that chase one another in a sequence. I've roughly figured out what I need to do here, but I can't seem to figure out a way to address a second and third dash to enter in. Basically, I need to start one, and then continuously check to see if the current dash(es) have animated far enough to start entering in the subsequent dash and similarly I think I'll need to check the same "offsets" when it reaches the end of the line. Anyone feel like taking a stab at a sane approach for this? If even just high level of how I might store some "mock" variables to watch in order to make the process easier, etc. As always any help is greatly appreciated! P.S. - A side note is I'm not sure why the ease isn't working on the "chase" (it's set to Bounce atm for ease of visually seeing if the ease is being picked up)
  4. I have an svg animation (created with Blender). It is a chained animation that loops (repeatCount="indefinite"). I want it to play once and stop. Since it is a frame animation, setting to each animate tag's repeatCount="1" leaves the previous displayed. Can I use GSAP to send an endElement()? Is there a good way control the playback? here is a link to the svg: http://www.prime37.com/images/u1.svg
  5. Hi all, I'm quite new to GSAP, but I'm really enjoying using it! I'd like to animate the anchor points on a path in an svg image, is this possible using TweenMax or a plugin? I've found another library (Two.js - https://jonobr1.github.io/two.js/examples/morph.html), which does this quite nicely, but I wanted to see if I could use TweenMax as an alternative. Thanks in advance!
  6. Hi! I have a static svg that I add some content to from JS and then I move it a bit in a tween. I have mainly svg texts and svg rect-s with a gradient filled each with. The main idea is to slide the rect and then the texts to their final position. Well this works just fine with Firefox, but Google Chrome fails to move the texts. Although I am able to move texts with jQuery like $('.foo').attr('y', $('.foo').attr('y') + 100); but not with tweenmax. Any thoughts? Regards, Robert
  7. Hi, I'm working on a new interface using SVG, GSAP and JQuery. I'd like a fluid interface with smooth interactions, and without staggered effects as you can see on this codepen (when the mouse move too fast between the plygons). I'd like something like this (each area back to its place before activating the new MouseEvent) but without the memory effect wich append a new Timeline each time the mouse is over a new area. I tried a lot of things like tl : new Timeline ({onStart:removeMouseEvent, onComlpete:addMouseEvent}) but the result is never what i want exactly. Is there a way to do that ? I hope I was clear enough, my english is pretty approximate. Thanks for reading and thanks for your amazing API.
  8. Hi, I'm having some issues with some simple rotation animations in all browsers. They are inconsistently choppy and I do not understand why. I have done significantly more complex animations on other sites without any trouble, so I'm just puzzled as to what the issue is. You can view the animations here: http://guzu.looseygooseyart.com/home.php I am referring to the section that shows a box closing it's doors and then sliding off. At times it runs perfect and others not so perfect. My javascript for the animation is as follows: function Close_Doors(){ var anim_rotation = 135, anim_duration = 0.35, anim_easing = Power1.easeIn, anim_delay = 2.05; TweenMax.to('#left_door', anim_duration, { rotation:anim_rotation, transformOrigin:"bottom right", ease:anim_easing, delay:anim_delay, force3D:true }); TweenMax.to('#right_door', anim_duration, { rotation:-(anim_rotation), transformOrigin:"bottom left", ease:anim_easing, delay:anim_delay, force3D:true }); TweenMax.to('.package', 2, { delay:2.8, x:1000, ease:anim_easing, force3D:true }); } As you can see I am forcing 3d acceleration, which seems to be the "go to" solution throughout the forums.
  9. First check this link in Chrome, Firefox and Safari: Jug Bug Notice in Chrome and Firefox it animates the scent on rollover... But in Safari it only animates a portion of the tweens. Specifically, the transforms do not work in Safari when calling TweenMax.fromTo(). Interestingly, if you create a simple TweenMax.to() tween, it functions fine. But if you use TweenMax.fromTo() or try to use TweenMax.set() right before calling TweenMax.to() then Safari will not animate the transforms... just standard properties. I assume this is due to the special SVG browser handling in TweenMax... Most likely it's a bug with TweenMax.set() because I assume TweenMax.fromTo() is just a helper method that actually calls TweenMax.set() before calling TweenMax.to(). Right?
  10. So I've been struggling to figure out how to resolve this issue and figured there has to be some kind of resolution to this by now as I've seen people reporting this bug with chrome for years it seems like. I managed to get it working in Firefox and IE, haven't checked anything else. Although Ie has issues with unset SVG Widths and Heights so it seems like I need to setup a backup script to set that on load for IE. But this is driving me nuts. I just want to animate some simple clouds through a background. The only problem is the clouds are using an alpha mask which won't seem to animate. Also this isn't the final animation, I am just trying to get it to work before I spend more time on it. Any help would be greatly appreciated! Thanks.
  11. Hello again! What would you think is the best way to animate a huge circle with GSAP? I've tried : Changing the width/height of a div with border radius (small to big) Changing the scale of a div with border radius (big scaled down to small and then scaled back up) Changing the width/height of a svg circle For example, http://plnkr.co/edit/vgmRe65FmzmzpcpHR7KM in full screen. But the animation is not really smooth on Firefox. I was wondering if my only option is to use a canvas element. Any ideas? Thanks
  12. Hi, I am having an issue animating/tweening the width of a rect element within an SVG. When using scaleX with a percentage value, the rect animated perfectly, however the SVG stroke scales with the box, which is not ideal, I would also prefer to specify a specific value as opposed to a percentage. When using width with a pixel value (without appending "px"), the rect does not animate. If you inspect the element you will notice the animation being applied to the correct element, however the value being applied to the rect is specified in pixels with the "px" appended, which is not a value SVG elements recognise/respond to. I hope my explanation makes sense. If anyone can shed some light on this it would be greatly appreciated. Thank you.
  13. Hello, I'm facing performance issues when tweening SVG <image> elements x and y position. I'm animating using the attr x and y value. The performance is great on IE,FF and Safari, but very bad on Chrome. Does anyone have a cross browser solution or an explanation why this happends? Thanks! Jonas
  14. Hi there guys! I am a newbie to GSAP - discovered it while searching for universal cross-browser tool to make efficient animations for the web-sites. In short, it's great) I'm planning to use svg a lot, so it's crucial for me how it is handled in GSAP. I delved deeper and did some experimentation, and as a result I came up with what seems to be a bug: - 3D transform (rotationY, for example) does not work in Firefox, though, in contrast to IE, it is supported in FF. It took some time until I figured out that with earlier versions of GSAP (back from 1.14.0) everything's working fine. No problems in Chrome as well. - The next thing that annoys me a little is the necessity to use {transform-origin: "50% 50%"} each time to make svg element rotate around its center; as opposed to what is written in "getting started" guide, it seems that this value is not default for svg elements: their transformation is done around left top corner if {transform-origin: "50% 50%"} is not defined explicitly. See both cases on Codepen here http://codepen.io/anon/pen/jEmNyw. Thanks!
  15. I'm trying to build a slide-out menu in an app that runs within an SVG tag and everything works except the grid snapping. Codepen I've tried using console.log(endValue) where the Codepen says alert() but it doesn't seem to get triggered. I was thinking that maybe snap was a feature inherited by the ThrowPropsPlugin (not using that) but I wasn't sure. The idea is that the menu element (#testE) can slide halfway out of screen OR fully visible.
  16. Check out the Codepen and you'll notice that you're able to drag the octopus to the left a bit before the bounds stop you from going further. You can't go to the right at all. After you let go, you'd expect to be able to drag it to the right (back to where it started), but it seems as though the bounds reset based on the image's relative position. When you drag it, you can't go to the right, but you can go further to the left than you originally could. Thanks for your help!
  17. Hi to all, for a project we need to use the ScrambleTextPlugin with a svg text but it does not work with Internet Explorer. To get it work we changed innerHTML in TextContent, but I think you can get something better Thank for your support Jacopo
  18. Hi ! I have been working on a full SVG animation with TweenMax. It was a pleasure as everything works really really well with the great addition of cross browser transform origin. Thanks ! I just noted one thing that you might be able to adjust for future releases. At first, I was using opacity attribute to tween elements opacity. It worked with <g></g>, <path />, <rect />, quite everything. But not on ios... On ios, if you tween opacity and you move the element using x property, it creates a glitch. I couldn't find a way to make it behave correctly. I dig around a little, and the only way I could manage to use opacity for now has been by creating a tween using attr: {'fill-opacity': 0.5} or attr: {'stroke-opacity': 0.5}, and by being sure that the property was set before tweening it (using TweenMax.set did the trick). The big downside of that technique is that you can't tween group (<g></g>) opacity, and for tweening the global opacity of an object, you have to tween the stroke and the fill. The codepen attached shows three ways of tweening the opacity. Chrome handle the three ways perfectly, but ios and firefox not. Please have a look. I hope you'll have an idea of a better way to use this. Have a nice day !
  19. Hi, I've embedded my base64 encoded SVG into my CSS but the fill and stroke tweens seem to be ignored. See the Codepen example. What am I doing thats wrong? Here's the SVG <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 125.368 104.307"><path fill="#8F5E8D" d="M85.194 86.885v17.422l4.494-5.123c4.84 5.1 4.8 5.1 4.8 5.123V86.885c-1.302 1.04-2.898 1.38-4.52 1.38-1.555.035-3.168-.365-4.768-1.38zm4.813-15c-3.536 0-6.754 3.403-6.754 7.175 0 3.7 3.2 7.1 6.8 7.1s6.755-3.405 6.755-7.15C96.762 75.3 93.5 71.9 90 71.885zm27.657 12.635c.313 0 .95-.364.95-1.04s-.637-1.013-.95-1.013h-15.106c-.637 0-1.276.337-1.276 1.014 0 .7.6 1 1.3 1 15.082.02 15.118.02 15.118.04zm-15.106 5.8h15.1c.313 0 .95-.704.95-1.38 0-.338-.637-1.014-.95-1.014h-15.106c-.637 0-1.276.676-1.276 1 .005.674.624 1.374 1.324 1.393zm22.497-17.76C110.91 57.9 110.9 57.9 110.9 57.895c-.325-.34-.638-.677-.962-.677H94.835c-3.535 0-6.114 3.066-6.114 6.81v3.096c0 .7.6 1.4 1.3 1.4.67 0 1.31-.676 1.31-1.354v-3.095c0-2.026 1.596-3.744 3.536-3.744h13.5v8.53c0 3.7 2.6 6.8 6.1 6.818h8v22.2c0 2.055-1.275 3.405-3.19 3.405H102.55c-.638 0-1.277.703-1.277 1.717 0 .7.6 1.4 1.3 1.4h16.7c3.533 0 6.084-2.73 6.084-6.5V73.69c.014-.39.046-.79-.254-1.13zm-10.613 0c-1.912 0-3.532-1.69-3.532-3.743v-6.812c9.964 10.6 10 10.6 10 10.555h-6.468zM48.872.252C22.494 13.6 22.5 13.6 22.5 13.565h57.6L53.366.3C52.09-.084 50.146-.084 48.9.252zM22.176 104.307h57.9v-89.39H22.19v89.39zm40.523-81.2c3.53 0 6.4 3.1 6.4 6.812 0 3.43-2.878 6.5-6.41 6.5s-6.44-3.07-6.44-6.508c.01-3.718 2.944-6.818 6.444-6.81zm0 19.786c3.53 0 6.4 3.1 6.4 6.8 0 3.435-2.878 6.5-6.41 6.5s-6.44-3.065-6.44-6.5c.01-3.693 2.945-6.793 6.445-6.8zm0 19.807c3.53 0 6.4 3.1 6.4 6.476 0 3.77-2.878 6.838-6.41 6.838s-6.44-3.067-6.44-6.838c.012-3.476 2.95-6.476 6.45-6.496zm0 20.104c3.53 0 6.4 3.1 6.4 6.474 0 3.77-2.878 6.84-6.41 6.8s-6.44-3.067-6.44-6.84c.01-3.338 2.945-6.438 6.445-6.433zM39.54 23.107c3.534 0 6.4 3.1 6.4 6.8 0 3.434-2.9 6.5-6.436 6.5-3.22 0-6.116-3.066-6.116-6.5.035-3.707 2.912-6.807 6.112-6.8zm0 19.793c3.534 0 6.4 3.1 6.4 6.812 0 3.435-2.9 6.5-6.436 6.5-3.22 0-6.116-3.065-6.116-6.5C33.423 46 36.3 42.9 39.5 42.892zm0 19.78c3.534 0 6.4 3.1 6.4 6.475 0 3.77-2.9 6.838-6.436 6.8-3.22 0-6.116-3.067-6.116-6.838C33.423 65.7 36.3 62.7 39.5 62.68zm0 20.124c3.534 0 6.4 3.1 6.4 6.5 0 3.77-2.9 6.84-6.436 6.84-3.22 0-6.116-3.068-6.116-6.84.035-3.404 2.912-6.504 6.112-6.5zM0 104.307h18.6V35.04H0v69.267zm9.333-61.414c3.19 0 6.1 3.1 6.1 6.812 0 3.435-2.9 6.5-6.09 6.5-3.536 0-6.435-3.065-6.435-6.5C2.898 46 5.8 42.9 9.3 42.893zm0 19.786c3.19 0 6.1 2.7 6.1 6.47 0 3.403-2.9 6.473-6.09 6.5-3.536 0-6.435-3.07-6.435-6.475-.01-3.78 2.892-6.48 6.392-6.5zm0 20.12c3.19 0 6.1 3.1 6.1 6.8 0 3.432-2.9 6.5-6.09 6.5-3.536 0-6.435-3.068-6.435-6.5-.01-3.7 2.892-6.8 6.392-6.8z" /></svg>
  20. Hi all, I'm having this problem with SVG rotation. Basically it always reset its position once the animation is finished. Codepen: http://codepen.io/anon/pen/QwwEYX During testing, it works fine on Chrome, but not of Firefox and mobile Safari. I'm using Firefox 33.1.1. Anyone's having the same issue? Any pointer is greatly appreciated. Cheers! UPDATE: Apparently the problem is exclusive to FF for mac and Safari mac.
  21. So I'm doing some experimentation to see if I can find a use for SVG in my web game. I can tween SVG elements without a problem, but I cannot figure out how to remove them when I'm done. The typical this.target.parentNode.removeChild(this.target) isn't working for Raphael objects... so how do you do it?
  22. I can't seem to figure out how I'd set the transform point so that I could have it scale from the right, bottom, etc. Thanks! - Lance
  23. Hey all! I've been doing a lot of animating along bezier curves and created a simple little helper tool/function that converts an SVG path into an array of cubic bezier points that can be plugged directly into GSAP Tweening functions. It's still missing a little functionality for quadratic and elliptical arc movements, but I haven't come across any issues with it yet converting SVGs saved out of Illustrator. Just thought I'd share in case anyone else finds it useful. http://github.com/mattanglin/svg-to-cubic-bezier I'll update to incorporate the other SVG movements (and cleanup the code. It's pretty quick and dirty at the moment...) as I have time. Any feedback welcomed. Thanks!
  24. Hi there, I'm playing with the TweenMax API and I encounter some difficulties. I aim to animate a full svg. I use a basic Tween for test puprose TweenMax.to($('#' + 'front_side_down'), 1, { opacity: 1, display: 'inline' }) When the SVG does not contain much nodes, it runs smoothly and nicely. But when I hit more than 1000 groups node of svg path the animation got choppy. I wonder why it influence anything, as in any case we only target one element... Any help would be much appreciate ! Thanks ! P.S : I'm talking about a 3.5mo SVG file
  25. I've noticed that GSAP applies transform properties to SVG elements via the inline style attribute instead of the native SVG transform attribute: https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/transform. This tends to be a browser compatibility issue, especially with IE. I cross referenced Velocity JS, and it looks like there's some feature detection built in that deals with this issue. Am I missing something? Or does GSAP have a method of accomplishing this easily? I should note that I already have some functional code, but it's a lot more verbose than I'd like it to be; onUpdate functions running after every tween. To be sure I'm clear, I want: transform="translate(40, 60)" or transform="matrix(1,2,3,4,5,6)" instead of style="transform: matrix(1, 0, 0, 1, -45, 75)" (ignore number values) Thanks for the help