Outline. 1.! Development Platforms for Multimedia Programming!

Similar documents
JavaScript By: A. Mousavi & P. Broomhead SERG, School of Engineering Design, Brunel University, UK

Outline. 1.! Development Platforms for Multimedia Programming!

MO 25. Aug. 2008, 17:00 UHR RICH INTERNET APPLICATIONS MEHR BISS FÜR WEBANWENDUNGEN

Making the Most of Existing Public Web Development Frameworks WEB04

Outline. CIW Web Design Specialist. Course Content

Web Design Specialist

THE SOFTWARE EXPERTS Cross-Platform app development with PhoneGap, TypeScript and SVG

Rich Internet Applications

Client-side Web Engineering From HTML to AJAX

Outline. 1.! Development Platforms for Multimedia Programming!

PLAYER DEVELOPER GUIDE

JavaFX Session Agenda

Flash Is Your Friend An introductory level guide for getting acquainted with Flash

JW Player Quick Start Guide

Online Multimedia Winter semester 2015/16

Research on HTML5 in Web Development

Part I! Web Technologies for Interactive Multimedia

Institutionen för systemteknik Department of Electrical Engineering

ipad, a revolutionary device - Apple

Part I. Web Technologies for Interactive Multimedia

Slide.Show Quick Start Guide

ANGULAR JS SOFTWARE ENGINEERING FOR WEB SERVICES HASAN FAIZAL K APRIL,2014

MASTERTAG DEVELOPER GUIDE

Chapter 1 Programming Languages for Web Applications

Visualizing a Neo4j Graph Database with KeyLines

Introduction to WebGL

Study on Parallax Scrolling Web Page Conversion Module

The purpose of jquery is to make it much easier to use JavaScript on your website.

The In-Stream LogoKit is an In-Stream linear and non-linear ad format that plays in VPAID-compliant video players. The ad displays icons in the

Mobile Web Design with HTML5, CSS3, JavaScript and JQuery Mobile Training BSP-2256 Length: 5 days Price: $ 2,895.00

Abusing HTML5. DEF CON 19 Ming Chow Lecturer, Department of Computer Science TuCs University Medford, MA

JW Player for Flash and HTML5

An evaluation of JavaFX as 2D game creation tool

HTML5 the new. standard for Interactive Web

Step into the Future: HTML5 and its Impact on SSL VPNs

Deepak Patil (Technical Director) iasys Technologies Pvt. Ltd.

Flash with CS3/CS4 & ActionScript 3.0 (Flash as a design-tool, techniques & timeline-animations)

Modern browsers support many technologies beyond (X)HTML, CSS, and JavaScript.

Programming 3D Applications with HTML5 and WebGL

San Joaquin County Office of Education Career & Technical Education Web Design ~ Course Outline CBEDS#: 4601

Visualizing an OrientDB Graph Database with KeyLines

DIPLOMA IN GRAPHIC WEB DESIGN AND WEB DEVELOPMENT COURSE INFO PACK

Adobe Flash Professional CC Help

Web Design Technology

SUBJECT CODE : 4074 PERIODS/WEEK : 4 PERIODS/ SEMESTER : 72 CREDIT : 4 TIME SCHEDULE UNIT TOPIC PERIODS 1. INTERNET FUNDAMENTALS & HTML Test 1

JISIS and Web Technologies

Flash MX Image Animation

HTML5 & Digital Signage

WHITE PAPER on Flex to HTML5 The Migration Challenge. April 2014

Your Flash movie is completed. Now you need to publish it in its final

D3.JS: Data-Driven Documents

IMRG Peermap API Documentation V 5.0

Spectrum Technology Platform

Credits: Some of the slides are based on material adapted from

Flash Tutorial Part I

Develop Computer Animation

Performance Optimization and Debug Tools for mobile games with PlayCanvas

Fireworks 3 Animation and Rollovers

Differences between HTML and HTML 5

the intro for RPG programmers Making mobile app development easier... of KrengelTech by Aaron Bartell

LAMBDA CONSULTING GROUP Legendary Academy of Management & Business Development Advisories

Drag and Drop in HTML5

GLEN RIDGE PUBLIC SCHOOLS MATHEMATICS MISSION STATEMENT AND GOALS

Chapter 6: Project Planning & Production

COURSE OUTLINE REVISED SPRING 2008

Advanced Online Media Dr. Cindy Royal Texas State University - San Marcos School of Journalism and Mass Communication

Parallel Web Programming

Web Development News, Tips and Tutorials

Developer Tutorial Version 1. 0 February 2015

Adobe Certified Expert Program

GSM Security Camera EYE-02 Publishing pictures from EYE-02 camera on your website

6! Programming with Images

Continue Your Learning with STC Education!

Introduction... Learn to insert event sounds and streaming sounds and to change the effects for a sound... 69

DESIGNING HTML HELPERS TO OPTIMIZE WEB APPLICATION DEVELOPMENT

Web Development. How the Web Works 3/3/2015. Clients / Server

Overview. In the beginning. Issues with Client Side Scripting What is JavaScript? Syntax and the Document Object Model Moving forward with JavaScript

Making Web Application using Tizen Web UI Framework. Koeun Choi

Adobe Dreamweaver Exam Objectives

Visualizing Data: Scalable Interactivity

Standard Languages for Developing Multimodal Applications

DEVELOPING MOBILE APPLICATIONS USING ANDROID

HELIX MEDIA LIBRARY API DEVELOPER S GUIDE

Development Techniques for Native/Hybrid Tizen Apps. Presented by Kirill Kruchinkin

WIRIS quizzes web services Getting started with PHP and Java

Mobile Web Applications. Gary Dubuque IT Research Architect Department of Revenue

Introduction to PhoneGap

How To Embed A Youtube Video On A Computer Or Ipad Or Ipa Computer Or Tvplayer On A Pc Or Mac Or Ipro Or Ipo Or Ipode Or Iporode On A Mac Or Tvode On Your Computer Or Mac (

HTML5 - Key Feature of Responsive Web Design

Your First Web Page. It all starts with an idea. Create an Azure Web App

Building Web Applications with HTML5, CSS3, and Javascript: An Introduction to HTML5

Creative Cloud for Web Design

Getting Started with SitePal

and the OPEN WEB PLATFORM HTML5Fest, Tel Aviv, Israel 25 Oct 2011 by J. Alan Bird, W3C

Issues of Hybrid Mobile Application Development with PhoneGap: a Case Study of Insurance Mobile Application

Digital Advertising setup guide

KIVY - A Framework for Natural User Interfaces

Short notes on webpage programming languages

Multimedia im Netz Online Multimedia Winter semester 2015/16. Tutorial 03 Major Subject

WEB DESIGN COURSE CONTENT

Transcription:

Outline 1.! Development Platforms for Multimedia Programming! 1.1.! Classification of Development Platforms! 1.2.! A Quick Tour of Various Development Platforms! 2.! Multimedia Programming with Python and Pygame! 2.1.! Introduction to Python! 2.2.! Pygame: A Multimedia/Game Framework for Python! 3.! Multimedia Programming with Java FX! 4.! Multimedia Programming with JavaScript and CreateJS! 5.! History of Multimedia Programming! 6.! Programming with Images! 7.! Programming with Vector Graphics and Animations! 8.! Programming with Sound! 9.! Programming with Video! 10.! Software Engineering Techniques for Multimedia Programs! 10.1.!Design Patterns! 10.2.!Multimedia Modeling Languages! 11.! Development Process for Multimedia Projects 1

4! Multimedia Programming with!! JavaScript and CreateJS 4.1! HTML5, JavaScript and Multimedia! 4.2! CreateJS Libraries! 4.3! Slideshow Example with CreateJS! 4.4! Generation of JavaScript Code Literature:! www.createjs.com!! www.gskinner.com 2

HTML5 WHATWG: Web Hypertext Application Technology Working Group! Founded in 2004 by individuals from Apple, Mozilla Foundation, and Opera! Editor of WHATWG specs, Ian Hickson, now at Google! Response to slow development of W3C standards for HTML! Opposition against XML dominance in W3C HTML standards! HTML5! Collection of various technologies, being unbundled now! Realized in leading browsers, in parallel to standardization process! Since 2007, W3C HTML working group takes WHATWG HTML5 as starting point for refining HTML! Multimedia features in HTML5:! Audio & video elements! Canvas 2D graphics element! Support for OpenGL 3D graphics ( WebGL ) 3

Immediate and Retained Mode Graphics Immediate mode:! Application directly draws on graphics surface! Application has full responsibility, must re-issue adequate drawing commands in case of changes! Retained mode:! Graphics library contains model of objects to be rendered! Graphics library takes over part of the responsibility for updating display in case of changes! Types of retained mode data structures (increasing sophistication):! Display list! Hierarchical display list! Scene graph 4

HTML5 Canvas Element Origin:! Apple MacOS X WebKit component 2004! Later adopted in Gecko engine and Opera browser! Standardized by WHATWG! Idea: 2D graphics surface! Rendering of graphics through JavaScript drawing API! Attention: Immediate mode graphics! Danger of low performance! Additional programming techniques needed (e.g. pre-rendering of canvas)! Libraries/frameworks to approach retained mode graphics 5

4! Multimedia Programming with!! JavaScript and CreateJS 4.1! HTML5, JavaScript and Multimedia! 4.2! CreateJS Libraries! 4.3! Slideshow Example with CreateJS! 4.4! Generation of JavaScript Code! Literature:! www.createjs.com 6

CreateJS - Idea and History Grant Skinner, March 2012: Announcing CreateJS! Private project with high ambitions! Has quickly won support from major industry players: Adobe, Microsoft, AOL, Mozilla foundation! Basic idea: HTML5 canvas for Flash-educated developers! Creates abstraction layer on top of (pixel-based) HTML5 canvas! EaselJS: Hierarchical display list, mouse interaction mode! Uses Metaphors very close to Flash terms! Stage, Timeline, Tween, Movieclip,. 7

Libraries in CreateJS EaselJS! Assistance in working with HTML5 canvas! Hierarchical display list, interaction model, helper classes! TweenJS! Tweening" library for JavaScript (= interpolation of object properties)! SoundJS! Cross-Browser audio support for HTML5! PreloadJS! Assistance in pre-loading assets, like graphics, sound, code! Uses queues and supports multiple connections! Movieclip! Analogy to Flash swf movieclips! Not meant for use in manually written programs! Currently not part of standard EaselJS 8

CreateJS Embedding in HTML Make library accessible, e.g. by loading from network:! <script "http://code.createjs.com/ createjs-2013.12.12.min.js"></script> Provide init function to be called after loading of HTML is complete! Provide HTML5 canvas element and associate with init function <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <script src="http://code.createjs.com/ "></script> <script> function init() { CreateJS API usage } </script> </head> <body onload="init();"> <canvas id="mycanvas" width= height= ></canvas> </body> </html> 9

CreateJS Stage and HTML5 Canvas Stage (Bühne):! Frequently used metaphor for the space for animated program behavior! createjs.stage class:! To be instantiated in script code! HTML id of stage element as parameter for constructor (or selection through classical means, e.g. DOM)! For naming the window use HTML window title! Stage contents are not organized as full scene graph here!! Stage contents have to be added and made visible explicitly (hierarchical display list):! stage.addchild() stage.update() (or tick method calling update() regularly) 10

Example: Pre-Loading Assets (1) var manifest = [ "pics/tiger.jpg", "pics/elephant.jpg", "pics/jbeans.jpg", "pics/peppers.jpg", "pics/butterfly.jpg" ];! var loader = new createjs.loadqueue(false); // do not use XMLHttpRequest loader.addeventlistener("fileload", handlefileload); loader.addeventlistener("complete", handlecomplete); loader.loadmanifest(manifest); 11

Example: Pre-Loading Assets (2) var images = new Array(); var imagecount = 0;! function handlefileload(event) { if (event.item.type == "image") { images[imagecount] = event.result; imagecount++; } }! function handlecomplete() { proceed after all assets have been loaded } 12

4! Multimedia Programming with!! JavaScript and CreateJS 4.1! HTML5, JavaScript and Multimedia! 4.2! CreateJS Libraries! 4.3! Slideshow Example with CreateJS! 4.4! Generation of JavaScript Code! Literature:! www.createjs.com 13

CreateJS JavaScript Kernel for Slideshow var timeline = new createjs.timeline({}, null,{loop: true}); for (var i=0; i<imagecount; i++) { var image = new createjs.bitmap(images[i]).set({x: 50, y: 50, visible: false}); stage.addchild(image); timeline.addtween(createjs.tween.get(image).wait(4000*i).to({visible: true}).wait(4000).to({visible: false})); } createjs.ticker.setfps(30); createjs.ticker.addeventlistener("tick", stage); timeline.gotoandplay(); 14

Method Chaining in CreateJS Many methods return the object on which they were invoked as result! Chains of method calls: simple to write and easy to read! Example:! new createjs.bitmap(images[i]).set({x: 50, y: 50, visible: false}); Technique often used in modern JavaScript frameworks! 15

Tweens in CreateJS Tween = Interpolation! Modifies properties of graphical object over time! Methods used here:! tween.get(object) Obtain target object to modify! tween.to(prop-values) Modification of properties,!! specified as object containing property/value pairs;!!! may specify additional time duration for linear interpolation! tween.wait(msecs) Pause for a specified time! Automatic updates work only if an event listener for the tick event of the Ticker class is registered.! Stage as parameter: Citing createjs.com on Stage:! Each time its Stage/tick method is called, it will render its display list to its target canvas. 16

Timeline in CreateJS Timeline object:! Provides temporal structure to execute several tweens! Constructor parameters:! Array of tweens to add (alternatively add with addtween())! Object defining labels to be addressed in goto method calls! Initial timeline properties as object, for instance {loop: true} Looping timeline causes embedded tweens to be executed repeatedly! Executing timeline at a defined point in time (time in msecs or label):! gotoandplay() gotoandstop() 17

Timeline for Slideshow Example Time (secs) 0 image[0].! visible 4 8 12 wait() image[1].! visible wait() wait() image[2].! visible wait() wait() wait() image[3].! visible 18

4! Multimedia Programming with!! JavaScript and CreateJS 4.1! HTML5, JavaScript and Multimedia! 4.2! CreateJS Libraries! 4.3! Slideshow Example with CreateJS! 4.4! Generation of JavaScript Code! Literature:! www.createjs.com 19

Flash Toolkit for CreateJS Adobe-suported plug-in for Flash Pro authoring system! Provides additional exporting function! Standard export: As swf (shockwave flash) file for Flash player! Added export: JavaScript/CreateJS code, relatively well readable 20

Publishing CreateJS Code from Flash 21

Created JavaScript Code (Excerpt) (function (lib, img, cjs) {! var p; // shortcut to reference prototypes! // stage content: (lib.slideshow0 = function(mode,startposition,loop) { this.initialize(mode,startposition,loop, {Tiger:0,Elephant:96,JellyBeans:192,Peppers:289,Butterfly:3! // Layer 1 this.instance = new lib.tiger(); this.instance.settransform(50,50); this.timeline.addtween(cjs.tween.get({}).to({state:[{t:this.shape},{t:this.instance}]}).to({state:[{t:this.instance_1}]},96).to({state:[{t:this.instance_2}]},96).wait(96));! 22