Hi Everyone,
I am new to famous, So i don't know, my code is either wrong or right.
I just apply logic that if user touchmove them i will set the modifier origin.
I just created a surface
{{#Modifier}}
{{>Surface template="image" align="[0.5,0.5]" origin="[0.5, 0.5]" size="[200,200]"}
{{/Modifier}}
In my js file add a event like this.
touchmove':function(evt, tpl){
tpl.modifier.setOrigin(
evt.changedTouches[0].clientX/($( window ).width()), evt.changedTouches[0].clientY/$( window ).height()
);
Hi Everyone, I am new to famous, So i don't know, my code is either wrong or right. I just apply logic that if user touchmove them i will set the modifier origin.
I just created a surface {{#Modifier}} {{>Surface template="image" align="[0.5,0.5]" origin="[0.5, 0.5]" size="[200,200]"} {{/Modifier}}
In my js file add a event like this. touchmove':function(evt, tpl){ tpl.modifier.setOrigin( evt.changedTouches[0].clientX/($( window ).width()), evt.changedTouches[0].clientY/$( window ).height() );
thanks in advanced.