1
모바일 장치에서 손가락 두 개로 이미지를 회전하려면 Kineticjs을 사용하고 싶습니다.키 네틱 : 두 손가락 터치 제스처로 이미지 회전?
이미지 표시는 here입니다. 어느 기본적으로 이것이다 :
<script src="http://d3lp1msu2r81bx.cloudfront.net/kjs/js/lib/kinetic-v5.0.1.min.js"></script>
<script defer="defer">
var stage = new Kinetic.Stage({
container: 'container',
width: 578,
height: 200
});
var layer = new Kinetic.Layer();
var imageObj = new Image();
imageObj.onload = function() {
var yoda = new Kinetic.Image({
x: 200,
y: 50,
image: imageObj,
width: 106,
height: 118
});
// add the shape to the layer
layer.add(yoda);
// add the layer to the stage
stage.add(layer);
};
imageObj.src = 'http://www.html5canvastutorials.com/demos/assets/yoda.jpg';
</script>
이 터치 이벤트가 나는 이미지의 중심을 두 손가락 터치 제스처로 이미지를 회전 할 수있는 방법
imageObj.on('touchmove', function() {
// do something
});
수행 할 수 있습니다 추가?
도 순수 KineticJS있는 버전이 있습니까? – confile