createjs

看你有多色游戏

只愿长相守 提交于 2020-03-25 20:49:16
3 月,跳不动了?>>> 开发工具:pycharm 游戏介绍 : 这是一款小游戏,虽然名字有点猥琐,但是游戏确实是很纯洁的,纯洁到不能再纯洁了 。 这款游戏的玩法就是找出所有风格中颜色比较淡的,主要是考你的眼力和注意力 。 最开始是最简单的,轻易可以辨认出,越到后面就越难 , 方块越来越多,颜色的对比度也越来越小 , 到最后要非常专注才能看出 , 总之,这游戏就是在规定时间内尽可能的过更多关,对练眼还是有一定好处的,小伙伴快来玩吧 。 main.html <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>无标题文档</title> <script src="js/easeljs.min.js"></script> <script src="js/Rect.js"></script> </head> <body> <canvas id =

围住神经猫

霸气de小男生 提交于 2020-03-25 20:22:46
3 月,跳不动了?>>> 开发工具: VS code 游戏案例: 围住神经猫 游戏玩法: 蓝色圆圈表示神经猫,用户点击灰色圆圈表示对神经猫的围捕,最终让神经猫无处可逃即可获胜。 运行效果图: 参考代码: easeljs-0.7.1.min.js为CreateJS套件的js 来源: oschina 链接: https://my.oschina.net/u/4463082/blog/3211445

JavaScript - extremely confused on removing elements from Container

☆樱花仙子☆ 提交于 2020-03-16 08:45:12
问题 I'm making a 2D, top-down Zelda style web rpg single player in JavaScript. When the player (purple shirt) walks near a cat, it will "rescue" it... which basically removes the animalContainer from the ContainerOfAnimals (thereby removing animalContainer's BMP from the stage), and then add the id of that animalContainer to a rescuedTotal_Array ... The weird thing is, In the pic below, I'm able to rescue animalContainer2 and then rescue animalContainer1 ... But if I go from animalContainer1 to

easeljs splitting an image into pieces

为君一笑 提交于 2020-01-21 23:53:14
问题 I'm new to easeljs and was wondering how would you split an image into a given number of pieces. From what I've gathered so far, I'm supposed to use SpriteSheets to accomplish this. However, the only tutorials I've seen are ones with multiple images in one Spritesheet, not one image divided into multiple images and put into a SpriteSheet. This is my code so far (I know that the variable frames is undefined since I cannot properly access the spriteSheet array yet): var data = { images: ["

easeljs splitting an image into pieces

微笑、不失礼 提交于 2020-01-21 23:52:08
问题 I'm new to easeljs and was wondering how would you split an image into a given number of pieces. From what I've gathered so far, I'm supposed to use SpriteSheets to accomplish this. However, the only tutorials I've seen are ones with multiple images in one Spritesheet, not one image divided into multiple images and put into a SpriteSheet. This is my code so far (I know that the variable frames is undefined since I cannot properly access the spriteSheet array yet): var data = { images: ["

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: Using updateCache() with AlphaMaskFilter When Dragging Mask

一世执手 提交于 2020-01-06 01:52:18
问题 I'm using an imported png with an alpha gradient that I'm setting as a mask that reveals the bitmap it is assigned to. The mask object is draggable (kind of like a flashlight). I know I'm supposed to use an AlphaMaskFilter as one of the filters, and I know I'm supposed to use .updateCache()... I'm just not sure I'm using them correctly? var stage; var assetQueue; var bg; var bgMask; var container; var amf; $(document).ready(function(){ loadImages(); }); function loadImages() { // Set up

Using Adobe Animate CC in HTML5 canvas mode with external JavaScript files

对着背影说爱祢 提交于 2020-01-01 19:04:57
问题 I'm transitioning a large FLA AS3 project into Canvas/JS. I have a large external folder structure of AS files and many library objects associated with classes. I've converted FLA into a canvas mode but I can't find a way to associate JS files to the objects. I've seen online examples about including JS in frame scripts but I really hope to find a way to do it with external files and library objects association. I'd appreciate any direction or example of how it can be done. Thank you 回答1:

Using Adobe Animate CC in HTML5 canvas mode with external JavaScript files

…衆ロ難τιáo~ 提交于 2020-01-01 19:04:17
问题 I'm transitioning a large FLA AS3 project into Canvas/JS. I have a large external folder structure of AS files and many library objects associated with classes. I've converted FLA into a canvas mode but I can't find a way to associate JS files to the objects. I've seen online examples about including JS in frame scripts but I really hope to find a way to do it with external files and library objects association. I'd appreciate any direction or example of how it can be done. Thank you 回答1:

Unable to preload and display SVG with CreateJS

别来无恙 提交于 2019-12-30 11:08:10
问题 I am trying to preload a set of SVG objects and display them using CreateJS/PreloadJS. So far I was able to display a SVG object without preloading, but as soon as I use the LoadQueue from PreloadJS, I can't get my sample to work. Does somebody know what I am doing wrong here? Thanks! http://jsfiddle.net/trudeo/05eqqp49/ Javascript var imageManifest = [ { id: "MySvgImage", src: "http://dev.w3.org/SVG/tools/svgweb/samples/svg-files/check.svg" } ]; var stage = new createjs.Stage(document