• Log In
  • Log In
Science Leadership Academy @ Center City
Science Leadership Academy @ Center City Learn · Create · Lead
  • Students
    • Mission and Vision
  • Parents
  • Community
    • Mission and Vision
  • Calendar

Computer Science Engineering - Advanced - Alfano Public Feed

Create a Post

  HTML5 canvas sandbox v3 - Multiple objects

Posted by Chris Alfano in Computer Science Engineering - Advanced - Alfano on Thursday, January 19, 2012 at 9:56 am

We now use an array to store a list of circles so that we can track more than one. Each item in the array is an object containing x, y, dx, dy, and r for one circle

The script listens for the space bar to add circles to the system (click inside the red box first so it will hear you)

Be the first to comment.

UPDATED: HTML5 bouncing ball example

Posted by Chris Alfano in Computer Science Engineering - Advanced - Alfano on Monday, January 9, 2012 at 1:29 pm

This new version of the example features better comments explaining each line of code.

It also includes the changes we made in class today to create a variable (radius or r) that holds the ball's radius and is used to make the ball bounce before any of its edges goes off any side of the canvas. (notice in the previous example that the ball doesn't bounce until its center reaches an edge)

Be the first to comment.

HTML5 Canvas - bouncing ball example

Posted by Chris Alfano in Computer Science Engineering - Advanced - Alfano on Thursday, January 5, 2012 at 10:48 am

Be the first to comment.

Sencha Touch Example - Carousel

Posted by Chris Alfano in Computer Science Engineering - Advanced - Alfano on Monday, December 19, 2011 at 12:06 pm

View and edit the code here

Use this link to load the app fullscreen on a mobile device or in the iOS simulator

Be the first to comment.

HTML5 Canvas - Solar System Example

Posted by Chris Alfano in Computer Science Engineering - Advanced - Alfano on Thursday, December 15, 2011 at 10:12 am

This project shows how you can use SOHCAHTOA from math class to animate things moving along a circular path. Animate the angles of a triangle and use your trig functions to turn angles into X and Y positions (the sides of the triangle)
Be the first to comment.

My benchmark

Posted by Jonathan Sample in Computer Science Engineering - Advanced - Alfano on Monday, October 31, 2011 at 10:52 pm

A brief description
myBenchmark
Be the first to comment.
RSS

CSE-003

Term
2011-12

Teachers

  • Chris Alfano
  • Jonathan Sample
Science Leadership Academy @ Center City · Location: 1482 Green St · Shipping: 550 N. Broad St Suite 202 · Philadelphia, PA 19130 · (215) 400-7830 (phone)
×

Log In