translate-animation

How can I rotate around the center of a group in Three.js

≯℡__Kan透↙ 提交于 2019-12-07 14:31:56
问题 I've created a group of cubes and I'm trying to figure out how to set the center so I can rotate them. Here is the fiddle: https://jsfiddle.net/of1vfhzz/ Here I add the cubes: side1 = new THREE.Object3D(); addCube({ name: 'side1topleft', x: -8.5, y: 7.5, z: 5 }); addCube({ name: 'side1topmiddle', x: -4, y: 7.5, z: 5 }); addCube({ name: 'side1topright', x: .5, y: 7.5, z: 5 }); addCube({ name: 'side1middleleft', x: -8.5, y: 3, z: 5 }); addCube({ name: 'side1middlemiddle', x: -4, y: 3, z: 5 });

Android Translate Animation

試著忘記壹切 提交于 2019-12-07 06:54:57
问题 I have an ImageView that is 250dp above the bottom and with translate animation i want to move it to 50dp above the bottom. I know how to use a translate animation, but I don't know what would be the ToYValue field. The code wil be something like this: TranslateAnimation translate = new TranslateAnimation(Animation.RELATIVE_TO_PARENT,0,Animation.RELATIVE_TO_PARENT,0,Animation.ABSOLUTE,250,Animation.ABSOLUTE,50); translate.setDuration(1000); translate.reset(); translate.setFillAfter(true); iv

Smooth floating animation using translation in XML

和自甴很熟 提交于 2019-12-07 03:49:26
问题 I'm developing a game for Android in Eclipse and I'm trying to get an image to smoothly translate up and down to look like it's floating up and down infinitely. As is, it translates smoothly, but looks choppy in the transition from going down to going up and vice versa. I don't believe I have a firm grasp on how fromDelta and toDelta work as far as units. I've tried searching this site and google for information on this, but, while able to find solutions to all my other issues this way, was

Animate a object across the width of its parent using css transforms

会有一股神秘感。 提交于 2019-12-07 03:03:54
问题 I'm trying to improve my animation performance using css transforms to translate the position of an element inside a 100% width wrapper. So it enters the screen from the lefthand side and exits on the right, before repeating the animation. I figured I could use percentages for this animation. what I am finding is that translate is relative to the object you are animating. So, if you have an object that is 100px wide and you set the animation as follows: @keyframes moveme { 0% { transform:

Using Matrix. Rotate in OpenGL ES 2.0

你。 提交于 2019-12-07 00:15:01
问题 Edit - Added more code Having a lot of problems attempting to correctly rotate my quad using OpenGL ES 2.0. It always seems to rotate around the centre of the screen co-ordinates. I'm trying to get it to rotate around it's own centre (for 2d, so z axis only). I've been experimenting with Matrix.translate as show below. However, changing the x or y pos here simply draws the quad at a different place on the screen, but when it rotates, again it rotates around the centre of the screen. Please

Can a panorama viewer effect be done with TranslateAnimation?

梦想的初衷 提交于 2019-12-06 12:25:16
问题 I made an Image Viewer with TouchImageView that I forked to my needs. In particular, you can fit the image vertically in the screen, and then drag the image from left to right. This is nice for a panorama, for example, that you can drag and see it all. Now I want to do exactly this with panoramas without touching the screen, that is, an automatic constant drag. I tried to implement this through a TranslateAnimation, but failed miserably: TranslateAnimation "moves the view", and the image is

TranslateAnimation on ImageView (Android)

好久不见. 提交于 2019-12-06 08:53:29
问题 So I have an ImageView in my layout and I wanted to slide it to the right or left when the user swipe over the latter. I used TranslateAnimation to translate the ImageView, as shown below. ImageView logoFocus = (ImageView) findViewById(R.id.logoFocus); Animation animSurprise2Movement = new TranslateAnimation(logoFocus.getLeft(), logoFocus.getLeft()+150, logoFocus.getTop(), logoFocus.getTop()); animSurprise2Movement.setDuration(1000); animSurprise2Movement.setFillAfter(true);

Top to bottom - translate animation

断了今生、忘了曾经 提交于 2019-12-05 09:43:32
Need to make next animation (on android 2.2 and above): 1.Moving button from top to bottom (after clicking on him), 2.Moving back from bottom to top (After clicking on him again). First animation works fine, but the second not, the btn "jumps" from bottom to top and not animate. Code: public class MainActivity extends Activity { static RelativeLayout relativeLayout; static Button btn; static Boolean isUp = true; public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); btn = (Button) findViewById(R.id.button1); relativeLayout

How programmatically apply translate & scale animation simultaneously on a view

我们两清 提交于 2019-12-05 02:38:34
问题 How apply translate animation with scale animation on a view. I have to move a view to another view location with zoom out simultaneously. How scale a view from its position to another view position (Second view is not fixed)? startView - view that translate finishView - where animation finish. **Code ** private void startAnimation(View startView, View finishView) { int startX = startView.getLeft() + startView.getWidth() / 2; int startY = startView.getTop() + startView.getHeight() / 2; int

Can a panorama viewer effect be done with TranslateAnimation?

只愿长相守 提交于 2019-12-04 18:22:41
I made an Image Viewer with TouchImageView that I forked to my needs. In particular, you can fit the image vertically in the screen, and then drag the image from left to right. This is nice for a panorama, for example, that you can drag and see it all. Now I want to do exactly this with panoramas without touching the screen, that is, an automatic constant drag. I tried to implement this through a TranslateAnimation, but failed miserably: TranslateAnimation "moves the view", and the image is slowly being replaced with a growing black strip instead of more image. Of course I can move the image 1