0

在我遇到的所有画布库中,我发现 cgscenegraph 是一个非常新的库。我一直在使用 kineticjs 和 paperjs。我想为我当前的项目尝试 cgscenegraph。cgscenegraph 是否支持多点触控?是否有关于相同的演示。在网站上找不到任何东西。

4

1 回答 1

0

是的,它受支持:在这里检查

var touch = event;
//if multi-touch, get all the positions
if (event.targetTouches) { // or changedTouches
var touchPoints = (typeof event.targetTouches !== 'undefined') ? event.targetTouches : [event];
for (var i = 0; i < touchPoints.length; i++) {
touch = touchPoints[i];

positions.push(new CGSGPosition((touch.pageX - offsetX) / cgsgDisplayRatio.x,
(touch.pageY - offsetY) / cgsgDisplayRatio.y));
}
}
于 2013-03-15T11:50:03.430 回答