Questions tagged [easeljs]

EaselJS is a JavaScript library for working with the HTML5 canvas element. Part of the CreateJS suite.

The new Canvas element in HTML5 is powerful, but it can be difficult to work with. It has no internal concept of discrete display elements, so you are required to manage updates manually. The EaselJS JavaScript library provides a retained graphics mode for a canvas including a full, hierarchical display list, a core interaction model, and helper classes to make working with Canvas much easier.

When asking EaselJS questions, you should:

  1. Read the EaselJS API Documentation.
  2. Search Stack Overflow to see if your question has already been answered. Include the text [easeljs] to match questions and answers tagged .
  3. Try to provide a minimalistic example online to illustrate. This is best done with Stack Snippets (the <> toolbar button), but if you like you can also use jsFiddle or JSBin provided you include all the code in the question (not just in jsFiddle/JSBin).
  4. Tag the question appropriately. Always include the tag, and use the other web development such as , , , where appropriate.
  5. Determine whether this problem is browser specific and be sure to note which in the question.
  6. Make sure your code can pass the list. JSHint or the more strict JSLint are excellent tools that determine whether your code contains common errors that will break your JavaScript program.

Resources


Related tags

1004 questions
78
votes
5 answers

Simplest way to detect keypresses in javascript

I have an idea for a game in javascript (I'm going to make it with EaselJS) and I'll have to detect keypresses. After looking around on the internet I've seen a lot of suggestions (use window.onkeypress, use jQuery, etc.) but for almost every option…
bobismijnnaam
  • 1,067
  • 1
  • 9
  • 18
59
votes
1 answer

Visual bug in Safari using jQuery Mobile - Content duplication

I'm building a mobile app using jQuery Mobile 1.3.0, EaselJs 0.6.0 and TweenJs 0.4.0. So, when I load the page, some content gets visually duplicated. The DIVs are not really duplicated, it is just visual. This bug only appears on Safari (Windows…
Adrien A.
  • 691
  • 4
  • 3
23
votes
5 answers

How to add event listeners to an array of objects

I have an array of objects (specifically easelJS images) - something like this: var imageArray = new Array; gShape = new createjs.Shape(); // shape is something imageArray.push(gShape); What I want to do is have an event listener instead…
Ryan Williams
  • 623
  • 3
  • 11
  • 27
14
votes
2 answers

How can I set the z-index of EaselJS Graphics and Shapes

I have EaselJS Shapes on the canvas and then I start drawing Graphics each tick. At the moment the graphics are being drawn over the Shapes. Is there a way to define the z-index so that the Shapes are drawn over the Graphics each frame? Any help…
RobotEyes
  • 4,375
  • 6
  • 33
  • 50
13
votes
2 answers

EaselJS Alpha Mask Filter

I'm fairly new to Canvas. I've been trying to get the images reversed in this EaselJS Alpha Mask example so that the initial image is clear, and what you paint is blurry; basically, the reverse of the demo. I've been playing around with it for…
timgavin
  • 3,971
  • 4
  • 28
  • 43
13
votes
2 answers

Mouse click (or touch) events on canvas causes selection using HTML5, Phonegap and Android

I am working on an HTML5 game using easlejs + phonegap and am running into an issue where the screen flashes everytime you click/touch/mousedown on the canvas. Below is the very simple code I created to test the issue and see if it was related to…
Gautam
  • 2,035
  • 1
  • 24
  • 24
12
votes
1 answer

Code assist - external javascript library in Aptana

Trying to get Easeljs js library in Aptana 3 (as web project). Dragged the files in the project (files are indexed). It doesn't recognize the library as code assist. Is the only way for external js library to make a sdocml (if so is there a…
user1114103
  • 121
  • 4
12
votes
2 answers

Approach comparison: EaselJS vs Multiple Canvases vs Hidden Canvas for interactiveness

1.) I found a canvas API called EaselJS, it does an amazing job of creating a display list for each elements you draw. They essentially become individually recognizable objects on the canvas (on one single canvas) 2.) Then I saw on…
William Sham
  • 11,175
  • 10
  • 47
  • 66
10
votes
1 answer

easeljs not showing bitmap

This is my easel js function, it draws a red circle and an image, however the circle is showing but the image isn't. function Start() { var stage = new createjs.Stage("DogeCanvas"); var dog = new createjs.Bitmap("doge.jpg"); …
i maed dis
  • 154
  • 1
  • 2
  • 10
9
votes
4 answers

How to draw a polygon using EaselJS?

There are Shape.graphic methods to draw circles and rectangles easily, but no obvious method to draw polygons such as hexagons and polygons? How do you draw them using EaselJS?
quik_silv
  • 2,281
  • 1
  • 13
  • 20
9
votes
6 answers

LimeJS vs CreateJS for game development

I want to start developing HTML5/JS games. And I see these 2 frameworks LimeJS and CreateJS & EaselJS. Which one is better? Does anyone have experience with these 2 frameworks? And what about the documentation?
user1877165
  • 129
  • 1
  • 3
  • 3
9
votes
2 answers

Easel.js stage.clear() not working

Pretty simple concept but it doesn't seem to be working. Here is my code: stage.clear(); stage.update(); Simple stuff -- nothing happens. The docs aren't helping.
skandocious
  • 764
  • 8
  • 19
8
votes
4 answers

HTML5 Canvas: Moving/panning world with arrow keys in EaselJS

After a year of studying and experimenting through trial-and-error, I feel that I am starting to understand JavaScript a bit more. So, now, I wanna try my hand at writing a simple 2D platform game (think Super Mario World or Sonic the Hedgehog). For…
AKG
  • 1,788
  • 3
  • 22
  • 34
7
votes
1 answer

EaselJS line fuzziness

I am using EaselJS as an API for HTML5 canvas. I noticed that the following code: line.graphics.setStrokeStyle(1).beginStroke("black").moveTo(100,100).lineTo(200,200); stage.addChild(line); ...produces following line: I set the thickness to 1 -…
William Sham
  • 11,175
  • 10
  • 47
  • 66
7
votes
1 answer

What is the Best Practice in EaselJS for Ticker

Currently the problem I'm running into is, when I'm running locally (in a ubuntuVM), using WebStorm as a webserver, I run my game and it plays fine and its responsive, but when I uploaded it to my webhosting and play it from there it is laggy and…
Niko
  • 422
  • 1
  • 6
  • 13
1
2 3
66 67