1 / 14

Sketchlet Tutorial Variables

Learn how to use variables in Sketchlet to exchange messages, manipulate data, and trigger actions. Understand the scope, interface, and examples of working with variables.

lynseyv
Download Presentation

Sketchlet Tutorial Variables

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Sketchlet TutorialVariables sketchet.sf.net Željko Obrenović obren.info/

  2. Agenda • Variables • Using variables

  3. Variables • Many elements of Sketchlet communicate indirectly by exchanging messages through a centralized repository of variables. • Variables can have two scopes: page or global • Variables provide a simple and uniform abstraction mechanism, enabling a designer to work with very diverse elements using the same set of operations. • Properties of freehand sketches, such as their position or transparency, or user actions such as item selections, can be mapped to blackboard variables.

  4. Variables • Spreadsheets or scripts can subsequently read, process, and update these variables. • I/O services can receive arguments and send back results through such variables. • Lastly, through extension mechanisms other platforms can update, read or register for the notification of variables.

  5. Interface for Working with Variables System event variables Delete selected variables • Variables can be accessed through a spreadsheet-like interface, making all data immediately visible and manipulatable. • A designer can directly observe and update variables. Derived variables Disable variables’ updates Add new variable Dynamic variables Filter

  6. Examples of Using Variables • Capturing user motion • Setting region and sketch properties • Updating variables based on events • Actions triggered by variable updates

  7. Capturing User Motion in Variables • Step 1: Creating variable “rot”

  8. Capturing User Motion in Variables • Step 2: drag-and-drop the variable on the active region motion mapping icon

  9. Capturing User Motion in Variables • Step 3: select properties of motion that you want to capture in the variable • In this exampleit is “rotation”

  10. Capturing User Motion in Variables • Step 4: interact with the region and observe variables changes • In this example, dragging the region with right mouse button will rotate it and update the variable “rot”

  11. Setting Region and Sketch Properties • You can drag-and-drop the variable on the region properties icon, and select property

  12. Setting Region and Sketch Properties • In this example we are using variable “rot” to control rotation property of another region

  13. Updating Variables on Events • Events • Mouse Events • Keyboard Events • Sketch events: entry, exit • Variable Actions • Update variable • Increment variable • Append variable

More Related