func (pp *pixelPosition) fromTouch(event js.Value) pixelPosition {
	event.Call("preventDefault")
	touches := event.Get("touches")
	touch := touches.Index(0)
	canvasRect := event.Get("target").Call("getBoundingClientRect")
	pp.x = touch.Get("clientX").Int() - canvasRect.Get("left").Int()
	pp.y = touch.Get("clientY").Int() - canvasRect.Get("top").Int()
	return *pp
}
// fromTouch updates the pixelPosition for the first touch of the touch event and returns it
fromTouch updates the pixelPosition for the first touch of the touch event and returns it
// fromTouch updates the pixelPosition for the first touch of the touch event and returns it
func (pp *pixelPosition) fromTouch(event js.Value) pixelPosition {
	event.Call("preventDefault")
	touches := event.Get("touches")
	touch := touches.Index(0)
	canvasRect := event.Get("target").Call("getBoundingClientRect")
	pp.x = touch.Get("clientX").Int() - canvasRect.Get("left").Int()
	pp.y = touch.Get("clientY").Int() - canvasRect.Get("top").Int()
	return *pp
}
func ( pp * pixelPosition ) fromTouch ( event js . Value ) pixelPosition { event . Call ( " " ) touches := event . Get ( " " ) touch := touches . Index ( 0 ) canvasRect := event . Get ( " " ) . Call ( " " ) pp . x = touch . Get ( " " ) . Int ( ) - canvasRect . Get ( " " ) . Int ( ) pp . y = touch . Get ( " " ) . Int ( ) - canvasRect . Get ( " " ) . Int ( ) return * pp }
fromTouch updates the pixelPosition for the first touch of the touch event and returns it
fromTouch updates the pixelPosition for the first touch of the touch event and returns it