generic sen­sor API

Web Designer - - Javascript in 2019 -

The sen­sors on the de­vices we carry around ev­ery day are a great way of pro­vid­ing ex­tra ben­e­fit to an ap­pli­ca­tion. Us­ing the phys­i­cal en­vi­ron­ment, such as with an ac­celerom­e­ter, can pro­vide added im­mer­sion for cre­ative ex­pe­ri­ence.

If we al­ready have events for these kinds of things, why is there a new API? De­vices are con­stantly chang­ing and adding new and var­ied sen­sors. To save hav­ing to cre­ate new APIS for each new sen­sor that comes out, the Generic Sen­sor API cre­ates a sim­pli­fied in­ter­face for them all.

While the API is still in de­vel­op­ment, Chrome and Fire­fox both in­clude it be­hind flags to play around with. Other browsers have it un­der con­sid­er­a­tion for the fu­ture. •­sor

Newspapers in English

Newspapers from UK

© PressReader. All rights reserved.