Loading presentation...

Present Remotely

Send the link below via email or IM

Copy

Present to your audience

Start remote presentation

  • Invited audience members will follow you as you navigate and present
  • People invited to a presentation do not need a Prezi account
  • This link expires 10 minutes after you close the presentation
  • A maximum of 30 users can follow your presentation
  • Learn more about this feature in our knowledge base article

Do you really want to delete this prezi?

Neither you, nor the coeditors you shared it with will be able to recover it again.

DeleteCancel

Make your likes visible on Facebook?

Connect your Facebook account to Prezi and let your likes appear on your timeline.
You can change this under Settings & Account at any time.

No, thanks

Drawing with Two.js

This is my session for CAT Hackathon
by

Heba Albaba

on 29 November 2013

Comments (0)

Please log in to add your comment.

Report abuse

Transcript of Drawing with Two.js

Drawing with
.js
2- Setting up
The Great
WEB
- Introduction.
- Setting up Two.js
- Some little basics.
- The BEST part ...... Coding
** Two Object **
Basics Shapes
Groups
Animation
two.min.js two.js
C@T

1- Introduction :) :)
Canvas
SVG
webGI
<script src="two.min.js"></script>
Flat shapes creation
and animation,
no image or text

Relied in scene
graph
<< two >>
main object
Animation Loop
+
with other lib
SVG
Interpreter

3- Basics للآآ
var element = document.getElementById("main"),
two = new Two({
fullscreen: true,
//width, height
type: Two.Types.svg,
autostart : true
});
two.appendTo(element);

ٍShapes
var circle = two.makeCircle(110, 110, 100);

var rect = two.makeRectangle(115, 90, 150, 100);

var line = two.makeLine(10, 10, 110, 210);
var curve = two.makeCurve(110, 100, 120, 50, 140, 150, 160, 50, 180, 150, 190, 100, true);
Making Groups
provide an easy way to
move your content through
translation, rotation, and scale.
Animating Shapes
play()
update()
bind (‘event’ , ‘function);
Let's Code :)
Full transcript