Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to animate or update image via texture using six different frames? #55

Closed
binita12345 opened this issue Aug 19, 2017 · 1 comment
Closed

Comments

@binita12345
Copy link

binita12345 commented Aug 19, 2017

right now i am using
var butterfly = awe.projections.view('twinks@gmail.com');
alert("butterfly..." +butterfly);
var i = 1;
butterfly.update({
position:{
y:1
},
animation:{
duration:6, // 5 animation steps are 1/5th of a second
repeat:Infinity, // play for 1 second total
persist:true,

                            step_callback:function() { 
                              // alert("callback fun");
                              console.log("hello callback" +i +'img/' + i + '.png');
                              i++; 
                              if (i>6) { 
                                i = 1; 
                              } // add time scaling here if the animation is too fast
                              butterfly.update({ 
                                texture:{ 
                                  path:'img/' + i +'.png'
                                } 
                              });
                            }
                          }
                        });

to update 6 images one by one but it is not working.
My poi id is $scope.poiLocations.push({
poi_id: 'Twinkle',
polar: {
angle: brng,
radius: 50,
height: 20,
email: 'twinks@gmail.com',

                                    },
                                });

and projection is

awe.projections.add({
id: 'twinks@gmail.com',
// geometry: { shape: 'cube', x:50, y:50, z:50 },
geometry: {
shape: 'plane',
height: 10,
width: 20
},
rotation: {
x: 0,
y: getRotation($scope.poiBarrings['Twinkle']),
z: 0
},
// rotation: getRotation($scope.poiBarrings[zoneUser.fullname]),
material: {
type: 'phong',
color: 0xFFFFFF
},
texture: {
path: 'img/1.png'
},
}, {
poi_id: 'Twinkle'
});

how can i update those images on one object.

if i use material: { type: 'phong', color: 0xFFFFFF } using projections.update method then i getting desired result i mean changing the color and position and also rotating object but not changing images another after one.

No any update code given for texture to update image in awe library, so is it compulsory that it should be available in library.

please give me reply soon if possible.

@binita12345 binita12345 changed the title how to animate or update image via texture using different frames? how to animate or update image via texture using six different frames? Aug 21, 2017
@awe-media
Copy link
Owner

This github repos is now focused on supporting the development of apps using awe.js on the awe.media platform. You can still access our older awe.js library as the deprecated branch, however we no longer support that code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants