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

what can I pass in texture in awe.projections.add as displaying image? #54

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

Comments

@binita12345
Copy link

binita12345 commented Aug 18, 2017

may be i having passed wrong texture in awe.projections.add as below

awe.projections.add({
id: zoneUser.email + '->' + Math.random(),
// geometry: { shape: 'cube', x:50, y:50, z:50 },
geometry: {
shape: 'plane',
height: 10,
width: 20
},
rotation: {
x: 0,
y: getRotation($scope.poiBarrings[zoneUser.fullname]),
z: 0
},
// rotation: getRotation($scope.poiBarrings[zoneUser.fullname]),
material: {
type: 'phong',
color: 0xFFFFFF
},
texture: {
path: 'img/tmp-0.png'
},
}, {
poi_id: zoneUser.fullname
});

and updates by 6 frames using your code

var butterfly = awe.projections.view(zoneUser.fullname);
var i = 1;
b.update({
position:{ y:1 }, // use a minimal non-zero update here
material: {
color: 0xFFFFFF
},
animation:{
duration:0.2, // 5 animation steps are 1/5th of a second
repeat:5, // play for 1 second total
persist:0,

                        step_callback:function() { 
                          i++; if (i>5) { i = 1; } // add time scaling here if the animation is too fast
                          b.update({ texture:{ path:**['img/tmp-0.png', 'img/tmp-1.png', 'img/tmp-2.png', 'img/tmp-3.png', 'img/tmp-4.png', 'img/tmp-5.png']**} });
                        }
                      }

please check n confirm my code to solve the problem..
what should i pass in texture at projection add? and can you send me your working demo with this update code.
thanks in advance

@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