Lesson 17: Building an App: Canvas Painter

Slides:



Advertisements
Similar presentations
Image Maps and Graphics Internet Basics and Far Beyond! Mrs. Wilson.
Advertisements

11/1/06 1 Hofstra University, CSC005 Chapter 8 (Part 3) High Level Programming Languages.
Chapter 3 Working with Symbols and Interactivity.
BIM211 – Visual Programming Objects, Collections, and Events 1.
© 2011 Delmar, Cengage Learning Chapter 3 Working with Symbols and Interactivity.
Working with Symbols and Interactivity
© 2010 Delmar, Cengage Learning Chapter 3: Working with Symbols and Interactivity.
JavaScript - A Web Script Language Fred Durao
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1 Tutorial 21 - “Cat and Mouse” Painter Application.
Test 2 Review. General Info. All tests are comprehensive. You are still responsible for the material covered prior to the first exam. You will be tested.
Getting started with the turtle Find the latest version of this document at
School of Computing and Information Systems RIA Animation, part I.
Implement User Input Windows Development Fundamentals LESSON 2.4A.
Programming Logic and Design Seventh Edition Chapter 12 Event-Driven GUI Programming, Multithreading, and Animation.
Animations & Multimedia LESSON 9 #2.09 USING ANIMATION AND MULTIMEDIA.
Scratch Programming Cards
Microsoft® PowerPoint® 2016
FOP: Multi-Screen Apps
Dive Into® Visual Basic 2010 Express
AP CSP: Creating Functions & Top-Down Design
Introducing a Framework ... and a few patterns
Collision Theory and Logic
Canvas and Arrays in Apps
Unit 5: Canvas Painter.
CIIT-Human Computer Interaction-CSC456-Fall-2015-Mr
Vocabulary Algorithm - A precise sequence of instructions for processes that can be executed by a computer Low level programming language: A programming.
Programming & Scratch.
AP Computer Science Principles
Working in the Forms Developer Environment
UNIT 2 – LESSON 3 Encoding B&W Images.
Learning to Program D is for Digital.
Collision Theory and Logic
Introduction to Event-Driven Programming
FOP: Buttons and Events
Keyboard Input.
Lesson 5-2 AP Computer Science Principles
UNIT 3 – LESSON 5 Creating Functions.
Game Engines By James Tedder.
Example: Card Game Create a class called “Card”
APIs and Function Parameters
Lesson 1: Buttons and Events – 12/18
Computational Thinking
Introduction to Events
Exploring the Basics of Windows XP
Event Driven Programming
Lesson 2: Multi-Screen Apps
LESSON 12 - Loops and Simulations
Building an App: Multi-Screen App
Concepts From Alice Switching to Java Copyright © Curt Hill.
LESSON 14 - Building an App: Image Scroller
Lesson 16: Functions with Return Values
Lesson 6: User Input and Strings
LESSON 13 – INTRO TO ARRAYS
Lesson 15: Processing Arrays
UNIT 3 CHAPTER 1 LESSON 4 Using Simple Commands.
Lesson 5: Building an App: Clicker Game
Creating Functions with Parameters
HAPPY NEW YEAR! Lesson 7: If-statements unplugged
Looping and Random Numbers
Unit 11 – PowerPoint Interaction
Lesson 3.2 Review: Identifying concepts
Exercise 1 Modify some parameters in the histogram.js and see what would happen (one by one) 20 in Line 2  in Line 3  in Line 15  .9.
Working with Symbols and Interactivity
Web Design and Development
Explain what touch develop is to your students:
Loops and Arrays in JavaScript
JavaScript and Events CS Programming Languages for Web Applications
Announcements How to save your work? Quiz solution 5/5/2019
CS7026 jQuery Events.
JavaScript and Events CS Programming Languages for Web Applications
Presentation transcript:

Lesson 17: Building an App: Canvas Painter UNIT 5 – JANUARY 19, 2018

VOCABULARY ALERT: Canvas - a user interface element to use in HTML/JavaScript which acts as a digital canvas, allowing the programmatic drawing and manipulation of pixels, basic shapes, figures and images. Key Event - in JavaScript an event triggered by pressing or releasing a key on the keyboard. For example: "keyup" and "keydown" are event types you can specify. Use event.key - from the "event" parameter of the onEvent callback function - to figure out which key was pressed.

NEW CODE

PURPOSE: Programmatically control the canvas element in response to user interactions. Maintain a dynamically generated array through the running of a program in order to record and reuse user input. Use nested loops within a program to repeat a command on the same array index multiple times. Perform variable arithmetic within an array index to access items in an array by their relative position.

You will continue to practice working with arrays and are introduced to a new user interface element, the canvas. The canvas includes commands for drawing simple geometric shapes (circles, rectangles, lines) and also triggers mouse and key events like any other user interface element. 

Today we are going to be building a drawing app in App Lab Today we are going to be building a drawing app in App Lab. Along the way, we’ll be introduced to a couple new ideas and concepts, but for the most part, we will be combining old skills. At this point, you all know most of the core concepts of programming, and so as we move forward, we’ll spend more time thinking about interesting ways to combine them. With that in mind, let’s get into Code Studio and start building our next app!

GO INTO CODE STUDIO AND COMPLETE THE LESSONS

We’ve seen a few ways to process our array of events over the course of this lesson, but there are many other effects we could produce. How else could we use the information we stored in our array? What other effects do you think we could make?

Processing lists of information is a very powerful ability Processing lists of information is a very powerful ability. We’ve just brainstormed many different ways we could process lists of points in a drawing app, but those same skills could be used to process lists of transactions, images, messages sent through an app, or anything else that is stored in a list. Keep an eye out for other instances where we can use list processing to create new features in your programs.

TO TURN IN FOR UNIT 5, LESSON 17: #7 – DRAW DOTS WITH CLICK #11 – DRAW AND DELETE #15 – ADJUST CIRCLE SIZE #18 – MAKE SPRAY PAINT WITH NESTED LOOPS #19 – RELATIVE INDEXES CANVAS FREE PLAY – MAKE YOUR OWN