easeljs

Easeljs (MovieClip) canvas draggable=true does not show ghost image

血红的双手。 提交于 2019-12-13 04:36:15
问题 I have a canvas element which has animations within it that are facilitated by EaselJS. The canvas element has a parent div wrapping it with draggable set to true. <div class="outer-parent" draggable="true"> <div class="inner-parent"> <canvas></canvas> </div> </div> The draggable event is working (I originally had issues with this, but the problem was resolved here: EaselJs canvas dragstart event not bubbling to parent), however the canvas element does not appear to show a "ghost". If I add a

EaselJS Spritesheet and Bitmap ColorFilterMatrix

浪尽此生 提交于 2019-12-13 04:19:22
问题 I am loading spritesheets individually for each sprite on demand using PreloadJS with JSON files. Now, I would like to apply a ColorMatrixFilter to the Sprites or Spritesheet. After some research I found this snippet from Lanny http://jsfiddle.net/lannymcnie/NRH5X/ where the JSON SpriteSheet definition is within the Javascript code and a reference to the Bitmap cacheCanvas [bmp.cacheCanvas] is used to in the SpriteSheet creation. Now, if I'm using JSON files to define the SpriteSheet, I can't

CreateJS getObjectsUnderPoint when alpha = 0

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-13 04:14:59
问题 I need to get all bitmaps under point in a container. The bitmaps alpha is set to 0 and this doesnt seem to work with this method. Are there any alternatives? I cant just add an event listener to the object as that is not enough in this scenario. Thanks 回答1: 1) If you just want to get the objects under a point you'd have to loop through all children of the container and call hitTest(x,y) (http://www.createjs.com/Docs/EaselJS/classes/DisplayObject.html#method_hitTest) this ignores the alpha

EaselJS sprite on("click) returns CORS error

本秂侑毒 提交于 2019-12-13 01:11:24
问题 First off, I am working on a local EaselJS/CreateJS project, only to test some sprite and mouse interaction. I have added a simple sprite image to the stage, and I called it "enemy1": //Create the enemy sprite and add it to the stage var enemy_image = new Image(); enemy_image .src = "enemy_sprite.png"; var enemy1 = new createjs.Bitmap(enemy_image); enemy1 .x = 0; enemy1 .y = 0; stage.addChild(enemy1); Using this code, I want to show an alert every time the user clicks on it: enemy1.on("click"

EaselJs - cross-domain images workaround?

自闭症网瘾萝莉.ら 提交于 2019-12-12 17:57:42
问题 When I try to use: temp = new createjs.Bitmap(obj.path) I get error: Uncaught An error has occurred. This is most likely due to security restrictions on reading canvas pixel data with local or cross-domain images. This is somewhat related to this question. Except in the above case user isn't using a web-server. In my case I'm using a web-server but I need the images to be hosted on an AWS S3 bucket using https. Is there a setting that I can use to allow CORS with EaselJs? CORS Settings on S3

Draw section of shape with EaselJS

試著忘記壹切 提交于 2019-12-12 02:19:27
问题 I have been trying to find out if it is possible to draw only a section of a shape using EaselJS. For example, is it possible to create a Rounded Rectangle, but only draw the top two thirds of it? (Effectively not displaying the bottom third). Thank you in advance for any advice you may have! 回答1: What is the end goal? Depending on what you want to do, there are a few ways to do it: Mask it using another shape to crop it Cache it to the size you want http://jsfiddle.net/lannymcnie/f1zh3qwx/ /

how to debug to find out the reason why the website doesn't get displayed on android browser

耗尽温柔 提交于 2019-12-12 01:42:52
问题 I am doing some tests and realised that android browser does not display my website. The other browsers are ok. I used these libraries: easeljs mathjax jquery I also used html5 webworkers. This is my test website: thewebdesign.org/v16/ My question is:How to find out the reasons. 回答1: Take a look at https://developers.google.com/web/tools/chrome-devtools/debug/remote-debugging/remote-debugging to be able to inspect the chrome console. Hope it helps. 回答2: Remote debugging is the most accurate /

EaselJs canvas dragstart event not bubbling to parent

我的未来我决定 提交于 2019-12-11 19:24:19
问题 I have a number of canvas elements, which need to be draggable. (not elements within the canvas element, i mean the actual canvas DOM node) The code looks like this <div class="top-parent" draggable="true"> <div class="inner-parent"> <canvas></canvas> </div> </div> If I just have a regular canvas element which hasn't been initialized with createjs the drag drop library i'm working works fine (I believe it works off the html5 dragstart event). If I use new createjs.Stage(canvas); the drag and

EaselJS export DisplayObject as bitmap

纵然是瞬间 提交于 2019-12-11 18:32:55
问题 I have a EaselJS Container object and I want to export its contents (children Bitmaps ) as an image (similar to what you would do with ActionScript PNGEncoder.encode ). Is this possible? I have other object present that I don't want to export so exporting the full <canvas> wouldn't work. 回答1: You can use the getCacheDataURL method to export any cached DisplayObject to an image data url. http://jsfiddle.net/lannymcnie/jqfgynve/1/ bmp.cache(0,0,image.width,image.height); var url = bmp

Easeljs Scrollable Container

▼魔方 西西 提交于 2019-12-11 11:18:40
问题 I have an Easeljs container that contains rows of buttons which is taller than the height of the screen. Is it possible to have the container scroll (pan) vertically using touch? Imagine that the container will be the width of the device and approx .80% height. It will be 10% down from the top, and in the bottom 10% will be navigation buttons that should not be scrolled. I guess I could use the DOMElement but the rest of the app has been built using createjs containers only. The app will be