Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...

tomKnox

Members
  • Posts

    19
  • Joined

  • Last visited

tomKnox's Achievements

Newbie

Newbie (1/14)

4

Reputation

  1. hmm, when the svg is part of a child in rows/columns the path doesn't seem to get recognised. In previous tests I had an svg manually placed in the body of the html and that works perfectly. Would you mind if I privately send you the link, as this is a disclosed project. I understand any answer and will obviously look for a solution myself.
  2. Hi PointC. Thanks for clearing that out. I am positive I won't forget this. Very much appreciated!
  3. Hi it's been such a long time since I've played with gsap. Hope everyone has been doing fine :) Would someone please shed a light. I would love the fact that my triangles are spread across the screen on page load. For some reasons, the positions are all identical. I current have tried to regenerate the random value in a for loop, I console.log different values. Still, all paths go to the same position. I'd love them to be spread around. Thank you for your expert advice.
  4. A good 'somewhat alternative' to gsap in unity is DoTween, as it has a similar syntax. This being said as a greeksock/gsap users since the very early days of greensock. I truly wish to see gsap someday in the unity asset store. all the best
  5. Hi, Having a standard bootstrap progress bar — is it possible to actually tween it's value. i see over complicated things online, but not a simple progress bar without alternations. Hence the question. <div class="progress"> <div class="progress-bar active" role="progressbar" aria-valuenow="0" aria-valuemin="90" aria-valuemax="100" style="width: 90%"> <span class="sr-only">90% </span> </div> </div> So how would I simply animate it's value? Any tip is greatly appreciated. My apologies if this is already covered, however I couldn't find the answer for this simple example. Thank you for your help.
  6. Pardon me for the late reply, thank you for this example, it worked out well. Kinda got lost in new projects so heres my belated thanks!
  7. Thanks Carl. As I was afraid for. A slight "crap" echoes in a Homer Simpsons' style. I was experimenting with transferring it to a bitmap but still. it seems greensock strips the "to tween object" to its bare essence. I did find some filters for Starling, also a motionBlur, but it doesn't really bring out the effect what greensock does. Maybe. I am not sure if its even remotely possible but i guess it would be awesome to enable this in the future? About the greensock platform, its awesome how much you can accomplish with onUpdate and onComplete in terms of everything, esp now with trying to push a game idea. I am not afraid of enterframes, however In this case i thought it was much more processor friendly to "enterframe" only when its needed. ofc this is possible with regular on enterframes but hey, something you just like to experiment and crash your IDE ten times before there is a result In my humble opinion from what i saw/learned is that greensock hand in hand with starling and its way of dealing with things would be totally well... greensock! greetings
  8. Hi greensockers, I also posted this on the starling forum, as i am not sure, where to begin. First of all, i am not sure this is the best way: Scenario: I have several thousand movieclips on stage (the movieclip exist in the library and has its own class with basic properties) These are added to the fla (i don't work in flash Builder (for this project) through com.emibap.textureAtlas.DynamicAtlas This allows me to add movieclips from the library as starling movieclips. joy! However, I'd love to build this game idea purely around greensock's tweening classes. Hittest work via onUpdate, and each event that causes of effects any other parameter is so damn easy to code + fast, pausable, reversable No single enterframe is used in this game idea. Some of the motion would benefit with some motionBlur. I get this error: motionBlur tweens only work for DisplayObjects. I tried to cast the hero_mc as a displayObject (which works perfectly fine), until I add the motionBlur part in the greensock tween. Does anyone have a clue or workaround? relevant code snippet: var mc: SheetMC = new SheetMC(); var atlas: TextureAtlas = DynamicAtlas.fromMovieClipContainer(mc, .5, 0, true, true); var hero_mc :MovieClip = new MovieClip(atlas.getTextures("hero_mc"), 60); addChild(hero_mc) ; Starling.juggler.add(hero_mc); var mytest:DisplayObject = hero_mc as starling.display.DisplayObject; mytest.x = 1024 * .5; mytest.y = 768 * .5; TweenMax.from(mytest, 0.48, { y: 868, onUpdate:hitTest, ease: Back.easeOut, motionBlur: { strength: 0.9, quality: 2 } });
  9. Hi! best wishes for ya'll green(s)®ockers! Good health & what floats your boat! enjoy!! my question: Is it possible to define a gradient of lets say 4 color stops in jquery then loop through an array of colors and one of those array items is that gradient... the rest is a single color. Here is what I have. (it might look dirty... just testing ) The rainbow_array in the color array obviously doesn't work, its just to illustrate what i am after. Many thanks for some insight! var rainbow_array = Array ("e21111", "11e2c2", "a011e2"); var color_array = Array("#ffcc00",rainbow_array, "#e7353a", "#b62727", "#eeeeee", "#d5d5d5", "#0c0c0c"); $('#clickable_thing').click(function(event) { var parent = $(this).parent(); parent = parent.find("rect"); var fillcolor = $(parent).css('fill'); console.log(rgb2hex(fillcolor)); TweenMax.to(parent,.4,{fill: color_array[i]}); if(rgb2hex(fillcolor) == color_array[i]) { if (i < color_array.length-1) { i++; if (i == 1) { /*do gradient*/ } else { TweenMax.to(parent,.4,{fill: color_array[i]}); } } else { i = 0; TweenMax.to(parent,.4,{fill: color_array[i]}); } } });
  10. Greetings On stage i have a "backgroundHolder" which succesfully listens to the liquidstage/area stuff. This works as a background image. code: ls = new LiquidStage(this.stage, stage.stageWidth, stage.stageHeight, stage.stageWidth, stage.stageHeight); area = new LiquidArea(this, 0,0,stage.stageWidth, stage.stageHeight); area.attach(backgroundHolder, ScaleMode.PROPORTIONAL_OUTSIDE, AlignMode.LEFT, AlignMode.TOP); ls.addEventListener(Event.RESIZE, onLiquidStageUpdate); This works fine. Now the situation: in thumbsHolder, a batch of images are loaded with loaderMax. after clicking a thumbnail, I try to attach a movieclip (pictureHolder.largeImage) to the liquid stage. using my LoadLArgeImage function. fairly simple so to speak. Inside that function I do a normal ImageLoader set up. But I get an error, Error: The parent of the DisplayObject largeImage added to AutoFitArea instance111 doesn't share the same parent. Using this code: function LoadLargeImage(toload):void { bImageLoader = new ImageLoader(toload, new ImageLoaderVars() .container(bigPicture.largeImage) .width(stage.stageWidth) .height(stage.stageHeight - 50) .scaleMode("proportionalInside") .crop(true) .y((bigPicture.largeImage.height/2) + 25) .smoothing(true) ); var ls2:LiquidStage = new LiquidStage(this.stage, stage.stageWidth, stage.stageHeight, stage.stageWidth, stage.stageHeight); var area2:LiquidArea = new LiquidArea(this, 0, 0, stage.stageWidth, stage.stageHeight-50); area2.attach(bigPicture.largeImage, {scaleMode:ScaleMode.PROPORTIONAL_OUTSIDE, crop:true}); } BAsically whats going on "on stage" are 2 movieClips aka no nesting except for the contents of bigPicture: -thumbsHolder -bigPicture(holds next/previous/close buttons and the largeImage holder) I am not entirely sure what causes this. Could anyone shed a light upon this? Sorry (again) if the answer is rather obvious... at times i seems lost in the displaylist etc. Many thanks.Tom
  11. Thanks again Jack for the insight, glad I was on the right track. however -after reading the docs- I am not very sure how to tween the path's progress. But after killing the tweens & some additional optimalisation so far the project runs at a steady 25-30 fps. with over 6000 loops going on. Which is lovely to see.
  12. Hi Jack. Heres my situation. sorry for the story, but I thought it would explain better vs some code. I have two main displays to show : an overview and some detail views. Attached to a lineholder i add my pathfollowers. Then i tween the followers all this happens in a loop. now this loop its length is quite variable. my biggest loop so far goes over 2000. something like this: myPath .addFollower(createCircle(5, 0x006699), (i/ connectionArray[i].@myvar), true); overviewTween = TweenMax.to(myPath , (connectionArray[i].@myvar), {progress:1,repeat:-1, ease:Linear.easeNone}); lineHolder.addChild(myPath ); //createCircle is a simple function to draw a dynamic dot of 5px with a color these are added to its own child layer named (dotHolder) All this runs okay. and with my skills I didn't find a way to code this any more optimal but heres the catch. When I click an item that needs a detail view(showing even more tweens. the (new) tweens become very slow. I remove my children with this function function removeChildren():void { while (lineHolder.numChildren) { lineHolder.removeChildAt(0); } while (dotHolder.numChildren) { dotHolder.removeChildAt(0); } if (dotHolder.numChildren == 0) { //does nothing, but without it get errors, as some items has no children } trace ("remove lines and dots"); } so here is question nr 1: Does the tweens stop(calculating, free up memory) automatically when I remove the children? question 2: could it be that the cpu is massive due to the way i keep my tweens continuously? In otherwords. the dots flow from point A to B and then restart from its original position, never ending. consider this situation: the user clicks back and forth between overview & detail, on and on, I am concerned that this all will slow down the application. I've currently experimented with the following code in the removeChildren function var currentconnections = connectionArray.length(); while (currentconnections--) { TweenMax.killChildTweensOf(dotHolder); } Which seems to work okay, but all this story telling above, has one major question. Is this a good way to tackle my situation in a -nearly- optimal cpu friendly way? again; please take in regards that the data to be shown (aka for loop(+- 2000 times) with the PathFollower tween) will recreate itself every 10 seconds. + there are about 8 more user-functions that can happen while all this is happening(ofcourse in all situations the tweens will be killed (if needed)). I hope my questions are somewhat clear. I've been working on this for a week now. and duno anymore whats good / bad practice. motivating it sure is. If you want I can screen share the project to you Jack through skype, just let me know and i'll pass on my handler. I sure respect privacy and all that. but I can't put this project(or code) in the open at this point. Thank you for your time, and sorry for the lengthy post.
  13. Thats perfect help for my needs today Jack! thank you so much. I honestly never thought to convert the points back as you mention. insights!! nice one. I am positive your new endavors are the time worthy goodluck. Thanks again for the blazing fast responds I shall code in peace now greetings
  14. Thats a huge help, lol I wasn't aware of the easeNone, thanks!!
  15. Hi Jack. The question When you look up the plugin explorer, in the BezierThroughPoint part. You successfully tween a movieclip that follows a curved line.(thanks for this!!) + draw a line between those 3 (or more points). Would you be so kind to share that technique(i mean the drawing of that curved line through the point)? I am aware of your wonderful motion paths... but I can't find how you draw the curve through the points (lines are ofc. no problem). with the motionPath class (for now) I am unable to make the path a curve. > there are countless examples on the web to draw a curve through 3 points, but each equation gives me a different result. So Drawing a curve ain't all that difficult. Making the object follow the exact curve... is (for me). +additional question: How could I transform this code so its a continuous movement? //tween all of the squares through the path once (wrapping when they reach the end) TweenMax.to(path, 20, {progress:1,repeat:-1}); This tweens the boxes in your motionpath example over 20 seconds, i've experimented with putting the repeat on -1 with keeps doing the animation. however. I'd love it that the time is constant. and not have a certain easing applied to it. (if its possible) Same goes for the circle example: I just can't seem to get the motion continuous (aka revolve 360° and then do it again) (ok i can make an onComplete function, but the tweening never is really continuous, .. it has a certain ease) just wondering... var circle:CirclePath2D = new CirclePath2D(500, 500, 100); var follower:PathFollower = circle.addFollower(myMc, circle.angleToProgress(0)); TweenLite.to(follower, 2, {progress:circle.followerTween(follower, 360, Direction.CLOCKWISE)}); addChild(circle); the suggestion : I was wondering. Are you planning a greensock class in order to tween lineTo's / circle/arc / curveTo's? (with a few cool / handy parameters?) Like for example in your motionPath class : where you can add a circle that represents the motion path. it would be awesome if you could tween the actual drawing of the line/curve as well. Yes I could use the update functionality to do the drawing with, i was just wondering. Maybe all this is capable in greensock right now. but I just can't find it. Any insight is wonderfully appreciated. Thanks for your time in reading this. my best regards
×