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

1009 questions
7
votes
1 answer

Center text in a container (EaselJS)

I am new to EaselJS and I am trying to create a colored container with a centered text. This is my code: var width = 100, height = 100; canvas.width = width + 10; canvas.height = height + 10; var container = new c.Container(); container.x =…
Naor
  • 23,465
  • 48
  • 152
  • 268
7
votes
2 answers

CreateJS / EaselJS Strange Performance with certain size shapes

I am currently developing a game, it uses a large tiled map, that can be dragged around, and moves quickly with your character. I have created a simple version of the problem JSFiddle Example Each tile is a Shape and is cached. All shapes go inside…
Bodman
  • 7,938
  • 3
  • 29
  • 34
6
votes
0 answers

Play animated gif using easeljs

I am looking for a way to display animated gifs using the EaselJS/CreateJS library. The only source I find are on displaying an animated spritesheet, but in this case I simply want to show an animated gif instead.
Kristof
  • 1,684
  • 2
  • 23
  • 49
6
votes
1 answer

How to get a random color in my CreateJS shape?

I want to have a random color where "Crimson" is defined var stage = new createjs.Stage("demoCanvas"); var circle = new createjs.Shape(); circle.graphics.beginFill("Crimson").drawCircle(0, 0, 50); circle.x = 100; circle.y =…
Jim Peeters
  • 2,573
  • 9
  • 31
  • 53
6
votes
3 answers

EaselJS: glitchy drag/drop

I have a bitmap inside of a container. When I drag the container the cursor changes to the edit-text shape, and also the image jumps to the bottom-right side of the cursor (as though I'm holding the image from the top-left corner and dragging…
Mossi
  • 997
  • 5
  • 15
  • 28
6
votes
0 answers

Safely disposing stage element in EaselJS (CreateJS)

I have an app with a little animation class. The animation class creates a canvas (using jQuery), creates a createjs.Stage element that uses this canvas, and then this stage element is used to do some animations for a short period of time. When the…
Øyvind
  • 139
  • 2
  • 9
6
votes
1 answer

Using touch events with Createjs / Easeljs

I'm trying to use touch events with Createjs / Easeljs objects. For example, I'm trying to attach a touchstart and touchmove event using addEventListener. Touchstart and mousedown seems to work: I'm using a browser and a touch device to test it and…
Cod1ngFree
  • 1,873
  • 6
  • 21
  • 33
6
votes
1 answer

click event on transparent rect with EaselJS

is it possible to make a transparent rect clickable? I don't want to fill it so it looks like shape.graphics.setStrokeStyle(2).beginStroke("#000").rect(0, 0, 100, 100)
Misha
  • 828
  • 10
  • 23
6
votes
3 answers

Android 4+ html5 canvas not redrawing

I am currently developing an android application using phonegap. I have an html5 canvas that I am drawing and animating objects on. It works great on android 2.3, but on android 4+ it is not redrawing the canvas. I tried using both kinetic.js and…
Dan Fischer
  • 235
  • 2
  • 8
6
votes
3 answers

EaselJs errors in chrome

Am using Easeljs library. Everthing works fine in firefox and ie9 except in google chrome mouse events wont work and I got this error "Uncaught An error has occured. This is most likely due to security restrictions on reading canvas pixel data with…
Mohamed Omezzine
  • 1,074
  • 3
  • 15
  • 28
5
votes
1 answer

Text in EaselJS framework

As a little problem , I got the solution ! But why it did like that ? var label = new Text(text.toString(), "20px Arial", "orange"); label.textAlign = "center"; label.x = 708; label.y = 435; label.maxWidth=40; stage.addChild(label); Firstly,I did…
Jayce Lin
  • 447
  • 1
  • 6
  • 10
5
votes
0 answers

Node.js npm error node-gyp

I have a big problem for install module with npm of node.js... I have install Python 2.7, visual studio 2010, 2012, 2013... I search during a lot of days but it's impossible I try with canvas but it's the same for all... My error:…
Kaoder
  • 61
  • 4
5
votes
1 answer

Dragging a container in EaselJS

I would like to create a pan function with my mouse in EaselJS. Is it possible to fill a container in such a way that I can make it draggable. Or is there another similar solution where I can move a group of children elements on my canvas? Right…
user2717511
  • 205
  • 5
  • 12
5
votes
1 answer

Adding multiple levels in game created with JSON

For one of my school projects, I have to create a game with Javascript. My Javascript experience is very minimal, and therefore I'm really stuck on how to create multiple levels within my game. With JSON, I load blocks for Mario to walk…
Caat
  • 77
  • 1
  • 6
5
votes
3 answers

EaselJS - Best way to detect collision

I'm trying to find a good way for collision detection for my easelJS small app. I've just created 2 rectangle using createjs.Shape But after creating a rectangle shape, the API doesn't let me know the width and height of the rectangle (I don't know…
Thịnh Phạm
  • 2,528
  • 5
  • 26
  • 39
1
2
3
67 68