tween

Animating shape using snap.svg and scrollmagic

爷,独闯天下 提交于 2019-12-14 03:17:37
问题 I am trying to create a code to animate my header as the user scrolls. I have managed to create the animations I want using 2 different plugins: snap.svg and scrollmagic. I'm new to both of these so please excuse my noobiness. Here it is on CodePen: http://codepen.io/anon/pen/dYbPXe /* Animation 1 */ var speed = 250, easing = mina.easeinout; [].slice.call ( document.querySelectorAll( '.header > a' ) ).forEach( function( el ) { var s = Snap( el.querySelector( 'svg' ) ), path = s.select( 'path'

tweening particles in buffergeometry

廉价感情. 提交于 2019-12-13 18:40:00
问题 This question piggybacks on the following questions: Three.js - Buffer geometry particles, need to animate random groups of particles in system How to quickly update a large BufferGeometry? I'm starting a new project that will have tens of thousands of particles in the scene at any time. The concept is that there will be clusters of particles that look like galaxies spread throughout the scene. Sometimes I will need animate a galaxy and its thousands of particles. Can I do this while the

Animate/move/translate/tween image in Unity 4.6 from C# code

核能气质少年 提交于 2019-12-13 12:14:33
问题 How can I move/animate/translate/tween an Image from position A to position B using C# code in Unity 4.6? Assuming Image is a GameObject, so it could be a Button or whatever. There has to be a one-liner for this, right? I've been googling for a while but all I can see out-of-the-box is stuff done in Update, and I firmly believe doing stuff in Update is not a fast way of scripting things. 回答1: If you want to do the movement yourself you can use something like this: public Vector3

Tween multiple blobs in KineticJs

自古美人都是妖i 提交于 2019-12-13 05:05:25
问题 How can I tween multiple blobs in Kinetic JS? I can tween a blob using two set of points, but what about more than that? Here's what I have so far: JS setTimeout(function () { for (var i = 0; i < blobPoints.length; i++) { var tween = new Kinetic.Tween({ node: blob, duration: .5, points: blobPoints[i], onFinish: function () { //this is where I want to call next tween using next set of points } }); tween.play(); }; }, 300); Complete demo here: http://jsfiddle.net/4KLf8/1/ If you notice, it

How can I get rid of non-null hitTestObject error with already instantiated objects?

安稳与你 提交于 2019-12-13 03:25:13
问题 I am a beginner/intermediate AS3 "programmer" trying to complete a skeeball-like flash-based game for a university assessment, and I'm doing myself serious mental damage trying to get even basic object (ball) collisions working with scoring targets on my stage. I'm using a power bar type variable to determine the force of the ball roll which is translated into a tween to create a smooth movement up my "lane" and into the scoring area (this is overhead perspective). The targets are instances

KineticJS and Tween Timelines, integrating with GSAP JS

大城市里の小女人 提交于 2019-12-12 19:41:18
问题 as of version 4.5.1 the old Transition class has been retired and "KineticJS recommends the GreenSock Animation Platform which integrates seamlessly". I am writing a canvas game using KineticJS which relied quite heavily on that old Transition class but having read up on GSAP's abilities I'm quite keen to upgrade. My problem is that when I try using even the simplest TweenLite functions they are completely ignored by my canvas. I'm guessing I must be missing something obvious because I haven

How to draw Three js line geometry with tween animation effect?

谁说胖子不能爱 提交于 2019-12-12 08:28:59
问题 I am new to Three.js. I want to draw curves (based on some parametric equations) on 3D space, using THREE.JS , to illustrate the path of drawing. To achieve this basically I tried in two ways: APPROACH ONE: update values in geometry. : var lineGeometry = new THREE.Geometry(); lineGeometry.vertices.push(new THREE.Vector3(starting_x,starting_y,starting_z)); var lineMaterial = new THREE.LineBasicMaterial({color: 0xffffff}); var line = new THREE.Mesh(lineGeometry, lineMaterial); scene.add(line);

Android tween animation blinks fast and doesn't work

柔情痞子 提交于 2019-12-11 23:43:06
问题 I am trying to make a TextView scale and fade out. My TextView is inside a layout file that is included into my activity's layout with <include android:id="@+id/hud" layout="@layout/hud" android:layout_alignParentBottom="true"/> Now, I can apply a scale animation from within the Java code like this: TextView multiplier = (TextView)findViewById(R.id.hudMultiplier); ScaleAnimation s = new ScaleAnimation(1.0f, 3.0f, 1.0f,3.0f); s.setDuration(5000); multiplier.startAnimation(s); And it works

Timeline animation and AS3 Tween Class

点点圈 提交于 2019-12-11 12:47:23
问题 Is there a way (using the AS 3 Tween Class, NOT TweenMax) to speed up a timeline animation? 回答1: You can do it with timer, set interval lower than second(1000ms)/fps, and use nextFrame() 回答2: tween = new Tween(this, 'frame', None.easeIn, 148, 172, .5, true) private var _frame:int; public function set frame(value:Number):void { _frame = int(value); myMovieClip.gotoAndStop(_frame); } 来源: https://stackoverflow.com/questions/6296929/timeline-animation-and-as3-tween-class

ThreeJS - How do I scale down intersected object on “mouseout”

一世执手 提交于 2019-12-11 07:03:48
问题 I have n+1 hexshapes in a honeycomb grid. The objects are stacked close together. With this code: // Get intersected objects, a.k.a objects "hit" by mouse, a.k.a objects that are mouse-overed const intersects = raycaster.intersectObjects(hexObjects); // If there is one (or more) intersections let scaleTween = null; if (intersects.length > 0) { // If mouse is not currently over an object // Set cursor to pointer so that the user can see that the object is clickable document.body.style.cursor =