api camera - TouchDevelop

Download Report

Transcript api camera - TouchDevelop

api
camera
taking pictures, videos
Disclaimer: This document is provided “as-is”. Information and views expressed in this document, including URL and other Internet
Web site references, may change without notice. You bear the risk of using it. This document does not provide you with any legal rights
to any intellectual property in any Microsoft product. You may copy and use this document for your internal, reference purposes. ©
2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, and Windows Live are trademarks of the Microsoft group of
companies. All other trademarks are property of their respective owners.
touchdevelop api
camera
o
up to 2 cameras: front, back
touchdevelop api
apis
o
Senses→take camera picture
Takes a picture and returns it. This picture does not
contain the gps location.
o
Senses→camera
Gets the primary camera
o
Senses→front camera
Gets the front facing camera
touchdevelop api
apis
o
Camera→post to wall
Displays the camera video stream in full screen.
o
Camera→preview
Takes a low quality picture from the camera.
o
Camera→height
Gets the height of the camera image in pixels.
o
Camera→width
Gets the width of the camera image in pixels.
touchdevelop api
apis
o
Board→set background camera
Sets the background camera
touchdevelop api
examples
o
bouncy balls
☁ http://touchdevelop.com/ojfl
o
camera walker
☁ http://touchdevelop.com/qoxx
o
gray picture
☁ http://touchdevelop.com/yprb
touchdevelop api
exercises
►write a script that takes 5 camera pictures
in a row (camera→preview) and posts them
to the wall
►modify the script so that it uses sprites on
a board to cycle through the taken pictures
(tip: use a board, a sprite set, and hide all
except one picture that is shown at any time)
touchdevelop api
homework
►complete what you didn’t finish at home
touchdevelop api