### WORKSHOP

make Games Puzzles Apps Art and more with CODE

## Workshops for the modern, simplified world of coding!

- Make a Browser or Mobile Puzzle, Game, etc. with just one page of text
- New HTML Canvas for Wondrous Free-form Interactive Features
- Code the Canvas with ZIM using the Popular and Powerful JavaScript
- ZIM designed for all ~ Absolute Beginner to Absolute Professional
- Tutorials, Workshops and Lessons prepared by ZIM Founder, Dan Zen
- Canadian New Media Awards Programmer and Educator of the Year

ZIM is a free JavaScript framework for making Interactive Media on the HTML Canvas with easy shapes, drag and drop, hit tests, components like buttons, sliders, dials and more powered by the robust CreateJS.

- The Canvas is an HTML tag introduced in HTML 5
- The Canvas is a picture (bitmap) that we can change with code (computer programming)
- JavaScript gives us basic commands to draw on and update the Canvas
- The CreateJS Library gives us the EaselJS module for working on Canvas

- In HTML and JavaScript we have a Document Object Model (DOM) to access tags within tags
- Similarly, EaselJS gives us a Bitmap Object Model (BOM) with a stage to view things on the Canvas
- The BOM allows us to nest containers and make shapes, images and text, etc.
- EaselJS also gives us events to capture interaction

- ZIM works with CreateJS to bring us even more functionality often with one line of code

-     circle.drag(), circle.animate(), circle.hitTestRect(rectangle), etc.

- ZIM also provides a set of components for features you make

-     zim.Button(), zim.Label(), zim.Slider(), zim.Dial(), etc.

- ZIM also sets up a framework in which we can work - ZIM makes the Canvas and Stage

MORE BACKGROUND

| Create on the HTML Canvas - learn the basics of Interactive Media. Dedicated to Carrie Fisher - an eternal idol Add shapes, images and text to a stage and set properties like position, rotation, scale and alpha. Nest objects in Containers. Drag content and apply mouse interactivity. Use components like buttons and sliders to control a small application including sound and animation.

You will need a computer of any sort like a PC or Mac. A text editor preferably with syntax coloring (Atom, NotePad++, Sublime, Brackets, DreamWeaver, etc.). And any modern browser such as Firefox, Chrome, IE, Edge or Safari. Requirements have never been so freely available!
GOAL
The goal of the workshop is to teach the core elements of the topic, including:

- Canvas Template with Stage
- Shapes and Registration Points
- Properties like x, y, rotation, scale and alpha
- Containers and Nesting
- Dragging and Dropping
- Events and Targets
- Images and Sounds
- Components like Buttons and Sliders

STEPS
Here are a few TIPS when taking the workshop:

1. Keep your font big so you can see punctuation better.
2. Nest your code properly - indent any block of code between { }
3. Get things working before building the next bit of code.
4. Ask your instructor if there are problems - others have them too!

1. Download the workshop ZIP FILE. The file contains:
   - A canvas folder to put your code - includes an assets folder
   - A resources/docs folder with ZIM Docs (here are online DOCS)
   - A resources/libraries folder with ZIM and CreateJS
   - A resources/site folder with images for the steps page
   - A resources/zim folder with templates - matches ZIM ZIP from ZIM site
   - This steps.html page to get you set up for this workshop
   - NOTE: see the ZIM Site for up to date ZIM versions and templates
2. Copy (not move) the fit.html page from the zim folder to the canvas folder.
3. Rename the fit.html page to canvas.html - this is where we will work.
4. Open the page in a text editor like Atom, NotePad++, Brackets, Sublime, etc.
5. To open, right click and chose open with... or open the file through the editor.
6. Change the title of the page to "ZIM Canvas Workshop".
7. Note in the template where we say "// put your code here".
8. The code underneath is a sample button - have a look.
9. Open the file in a browser see the button - okay, we are done with the button.
10. Go back to the code (keep editor and browser open) and delete the button.
11. Follow the teacher as they go through the workshop with you to learn:
    1. TEMPLATE FOR CANVAS
    2. SHAPES AND PROPERTIES
    3. BOUNDS AND OUTLINE
    4. REGISTRATION POINTS
    5. CENTERING OBJECTS
    6. ROTATION AND SCALING
    7. PLACING OBJECTS
    8. CONTAINERS AND CLONING
    9. DRAGGING AND DROPPING
    10. EVENTS AND TARGETS
    11. RANDOM NUMBERS
    12. ANIMATION AND TWEENING
    13. CONFIGURATION OBJECTS
    14. IMAGES AND SOUND
    15. COMPONENTS
12. Have a look at the RESOURCES below to help you code after this workshop.
13. Ask if there is a full or advanced example relating to the workshop.

RESOURCES

- ZIM: https://zimjs.com
- ZIM DOCS: https://zimjs.com/docs
- ZIM LEARN: https://zimjs.com/learn
- ZIM SKOOL: https://zimjs.com/skool
- ZIM KIDS: https://zimjs.com/kids
- WHAT IZ?: https://zimjs.com/whatiz
- ZIM CAPTURE: https://zimjs.com/capture
- ZIM BITS: https://zimjs.com/bits
- ZIM NEWS: https://zimjs.com/news
- ZIM Updates: https://zimjs.com/updates

- Support: https://zimjs.com/slack
- CodePen: https://codepen.io/zimjs
- Facebook: https://facebook.com/zimjs
- Twitter: https://twitter.com/zimlearn
- CreateJS: http://createjs.com
- JavaScript: https://developer.mozilla.org
- Sheridan: http://imm.sheridanc.on.ca