Motion Input

Demo Website

This test explores the use of a device camera as an input control. The Three.js library can visually compare two images. By capturing images from the device camera in rapid succession, the resulting image differences are most pronounced in the areas where motion is occurring. Calculations can be applied to detect when motion in one area satisfies a threshold to be treated as a trigger for some action.