SDK | 05. 06. 2013 |
Comments Off
Simple example that shows how to get position of cursor and draw it onto the cube. Color is created each time when the cursor is placed. Function printf can be used for various debugging purposes. This example also shows typical drawing sequence, which is usually used in most complex cases:
ClearCanvas() …. draw scene …. PrintCanvas()
Přečíst článek
SDK | 05. 06. 2013 |
Comments Off
This example shows how to easily setup taps to side to be recognized. Also, double tap signal is used for lighting up entire cube. Example also shows how to use palette colors and how to set up them from arrays. Palette colors are those represented by number lower than 256. (lower 8-bits at color value)
Přečíst článek
SDK | 04. 06. 2013 |
Comments Off
This example shows how walk with walker by taping to sides. If tap from same side is detected, walker continues his direction. Orientation of walker can be optionally displayed by debug function DrawTail. If tap from bottom is detected, red color cube is displayed. AdjustCanvas is used to demonstrate how to fade without using FlashCanvas.
Přečíst článek
SDK | 03. 06. 2013 |
Comments Off
This example shows simple application for painting on the cube with several commands. Serves perfect as script example, that can be placed by CUBE MANAGER into MYCUBE place. Tap from side changes color of brush, tap from top draws with selected brush. Double tap from top fills the top side. Double tap from side runs small animation with music. Double tap from bottom erase whole cube and single tap from bottom moves one action back. This example also shows more advance work with Push Pop Arrays and Variables. Push Pop Array is used for storing actions and variable is used for keeping the art-work in non-volatile memory. If named variable exists, it is loaded every time with animation when the script starts.
Přečíst článek
SDK | 02. 06. 2013 |
Comments Off
This example shows simple implementation of rubik’s cube with animated rotations. Direction of rotation is determined by inclination of tapped side. SolveDir function reads accelerometer data and compares them with threshold “ACC_THRESHOLD” for direction. Also each move is stored into variable, so the progress is never lost. Example of correct use of ICON() is demonstrated as well. Note that definition of icon[] must be placed in global namespace!
Přečíst článek
SDK | 01. 06. 2013 |
Comments Off
This example shows an easy way to determine time of the tap and how to (not completely accurately) extrapolate it to future time. It does not use mean deviation, so after while it is little bit off beat. If you give 8 taps in a row, cube continues in given rhythm. Double tap resets the rhythm and a new one can be entered by another 8 taps.
Přečíst článek
SDK | 30. 05. 2013 |
Comments Off
Motion detector – by Josip Miskovic. This example shows a bit advanced working with raw accelerometer data. Detects motion and colors of the whole cube depending on motion direction. Mildly amusing.
Přečíst článek