easeljs

Has anyone gotten angular2 working with EaselJS?

最后都变了- 提交于 2020-01-07 02:50:19
问题 just getting into angular 2 - having trouble figuring out how to get typeScript to access easeljs class system .. any suggestions/fiddles? 回答1: It looks like your in luck because there are already type defintions for easeljs in the DefinitelyTyped repo In order to access the types install typings and then pull the definitions npm install typings --global typings install dt~easeljs --global --save Edit: updated to reflect the fact that tsd has been deprecated and replaced by tsd 来源: https:/

EaselJS with 200+ vector shapes : performance and aesthetics

北战南征 提交于 2020-01-06 12:56:29
问题 I'm having a huge perf issue when using EaselJS vs Canvas native method : 2.2 s vs 0.01 s (although EaselJS do map canvas native methods...). I wrote a canvas app which draws a tree*. In order to animate the growth af the tree, it seems cleaner and handier to tween an EaselJS graphics object than writing a custom drawing function. *(actually it'll look more like a virginia creeper) 1) I must have done something wrong, as the perf with EaselJS are awfull. The significant piece of the code :

How to remove bitmap image on click from canvas

陌路散爱 提交于 2020-01-06 06:18:09
问题 I am using createjs as my framework. I've placed a Bitmap on the canvas and I created a function to try and remove it but I keep getting an error message in the console that image is not defined. This is what my code looks like: // onload=init() called in html doc function init(){ var canvas = new createjs.Stage("canvas"); // Add image to canvas image = new createjs.Bitmap("image.png"); image.x = 200; image.y = 180; image.scaleX = 0.35; image.scaleY = 0.35; canvas.addChild(image); image

EaselJS custom font lineheight cross browser issues

馋奶兔 提交于 2020-01-04 13:59:28
问题 I'm having a few issues with the positioning of text looking vastly different in different browsers with Easel JS when embedding a custom font. I think it may be the line height, but there is no way to control this with EaselJS as far as I am aware. I have tried changing the line-height as well as some other properties of the body in CSS and in the font-face declaration but had no success! as you can see it is only Firefox causing any problems, It also appears correctly (like chrome, IE and

Graphics BitMapFill TypeError

我是研究僧i 提交于 2020-01-03 05:21:09
问题 I'm working with the easeljs javascript to make a sort of game. I'm using this example: http://www.createjs.com/#!/EaselJS/demos/game As you can see there are spacerocks. This are graphics objects: this.graphics.beginStroke("#FFFFFF"); I would like to fill the background with an image like this: var bitmap = new createjs.Bitmap("http://nielsvroman.be/twitter/root/easeljs/image.png"); this.graphics.beginBitmapFill(bitmap, "no-repeat"); But I always get this error: Uncaught TypeError: Type

EaselJS perspective image transformation

99封情书 提交于 2020-01-02 11:31:57
问题 Is it possible to make perspective image transformation in html5 canvas? I am using EaselJS right now and can't find a solution for my need. 回答1: I don't tried the easel.js yet, but every image transformation is done with matrix operations: translate, rotate, skew etc. Looking on the easel.js source code there is a Matrix2D class, and the documentation to it: http://www.createjs.com/Docs/EaselJS/Matrix2D.html. For a perspective transformation you need to use rotation , scaling and skewing .

EaselJS perspective image transformation

僤鯓⒐⒋嵵緔 提交于 2020-01-02 11:31:10
问题 Is it possible to make perspective image transformation in html5 canvas? I am using EaselJS right now and can't find a solution for my need. 回答1: I don't tried the easel.js yet, but every image transformation is done with matrix operations: translate, rotate, skew etc. Looking on the easel.js source code there is a Matrix2D class, and the documentation to it: http://www.createjs.com/Docs/EaselJS/Matrix2D.html. For a perspective transformation you need to use rotation , scaling and skewing .

EaselJS: Can somebody explain the inheritance pattern used in demos?

陌路散爱 提交于 2019-12-29 01:37:30
问题 I'm creating a game using EaselJS, and I'm wondering if somebody can explain how the inheritance pattern used in the demo files works. Specifically, I'm looking at the following file: https://github.com/CreateJS/EaselJS/blob/master/examples/assets/Ship.js On line 7, the Ship's prototype is set to an instance of a createjs.container() ... var p = Ship.prototype = new createjs.Container(); And then on line 28, a reference to the original constructor is stored: p.Container_initialize = p

Position Labels on a coordinate System Easeljs

一笑奈何 提交于 2019-12-25 07:16:46
问题 Hey I am trying to build the following picture in canvas using the library:EaselJS. My Picture components are: two circles - yellow and red and a light green background a coordinate system from 0 to 1 with all the necessary labels which appear in the picture. I have succeeded in my two goals. I have build a Coordinate System based on stackoverflow discussion: How to draw a full coordinate system with Easeljs?. I have left with 2 main problems which concern me a lot: I need to draw a rectangle

EaselJS Keyboard Ticker Problems

你说的曾经没有我的故事 提交于 2019-12-25 05:09:23
问题 I'm experimenting with EaselJS for the first time, and I'm trying to make a normal square move. I created used a Ticker to animate a square from the left to the right of the screen. It seemed choppy, so I raised the FPS of that ticker (via Ticker.setFPS(60) ). My next step is to add keyboard events to allow the square to move. I've done so successfully, but the same choppiness has come back. I've tried setting the FPS of the Ticker to a higher rate, which isn't fixing my problem at all. Here