motion

This method communicates to the renderer that it should move the second triangle by deltaX, deltaY.

319     public void motion(float deltaX, float deltaY)
320     {
321         translation.x += deltaX;
322         translation.y += deltaY;
323     }

Notes

In the WebGL example, we had a sliderChanged method that generated a new model-view matrix, and rerendered the scene. This method was invoked by the slider event listener and showed how HTML controls can interact with a WebGL scene.

We already saw that this translation variable is used in onDrawFrame, can you guess when this method is invoked?

This method is invoked when you drag your finger across the image! In the android world, wherever possible, choose gestures over controls.