Dev
搜索

Dev

用easeljs不能一个对象位于两个地方
发表于2015-12-17|createjs
今天遇到一个错误 我在stage放了一个图 然后又把这个位图放到了一个container里,结果后面的就不显示 因为,一个图不可能出现在两个位置 实例化两个就好了
createjs easeljs 实现图片渐隐渐显
发表于2015-12-17|createjs
主要是使用set方法 Bitmap的set方法可以设定他的alpha属性 也可以直接修改alpha属性值
easljs 精灵集
发表于2015-12-17|createjs
示例 [pcsh lang=”js” tab_size=”4” message=”” hl_lines=”” provider=”manual”] function init(){ var stage = new createjs.Stage('gameview'); var image = new Image(); var data; var spriteSheet; image.src = './spritesheet.png'; image.onload = function(e){ var text = new createjs.Text("Hello World", "20px Arial", "#ff7700"); stage.addChild(text); data = { framerate: 30, images:[image],//图片路径 frames:{"regX...
easljs drawCircle x 和 y属性
发表于2015-12-17|createjs
两个属性是指相对圆心的位置 示例: [pcsh lang=”js” tab_size=”4” message=”” hl_lines=”” provider=”manual”] var shape = new createjs.Shape(); shape.graphics.beginFill("#000").drawCircle(0,0,100); shape.x = 0; shape.y = 0; [/pcsh]
easljs drawCircle 变椭圆的解决办法
发表于2015-12-17|createjs
很可能是设置了canvas的css样式 canvas应该通过属性width和height去设置长高,否则会出现椭圆 示例: [pcsh lang=”js” tab_size=”4” message=”” hl_lines=”” provider=”manual”] <canvas id='gameview' width="210" height="210"></canvas> [/pcsh]  
easljs Shape 类
发表于2015-12-17|createjs
使用方法: 会生成一个Graphic实例,用graphics属性可以获取他 示例: [pcsh lang=”js” tab_size=”4” message=”” hl_lines=”” provider=”manual”] var shape = new createjs.Shape(); shape.graphics.beginFill("#ff0000").drawCircle(0, 0, 50); [/pcsh]    
js 事件 默认传参
发表于2015-12-17|js
使用easljs时,要在图片完全加载后才能使用Bitmap进行初始化 用到了onload事件,发现这个事件会默认传递事件‘event’过去 不知其他事件是不是都是这样的 示例: [pcsh lang=”js” tab_size=”4” message=”” hl_lines=”” provider=”manual”] image.onload = function(e){ img = new createjs.Bitmap(e.target); stage.addChild(img); stage.update(); } [/pcsh]    
createjs easeljs 容器
发表于2015-12-16|createjs
createjs有两个‘容器’ 一个是‘stage’ 一个是‘container’ 如果东西向过多,可以放到‘container’中 刷新之后才能显示 示例:  
PHP 关闭错误提示的方法
发表于2015-12-16|php
[pcsh lang=”php” tab_size=”4” message=”” hl_lines=”” provider=”manual”] ini_set("display_errors", "Off"); error_reporting(E_ALL | E_STRICT); [/pcsh]      
apache 阿帕奇 2.4.x 2.4.9 403 允许外部访问
发表于2015-12-16|others
1.检查 Require all granted 2.apache的www目录最好别有空格!!!
1…757677…103
avatar
developer
AI相伴的开发者博客
文章
1024
标签
725
分类
35
Follow Me
公告
This is my Blog
最新文章
opencode自定义模型2026-06-18
pdf操作2026-06-04
pdf按章节拆分到文件2026-05-03
svg转png2026-04-09
taro+tailwind开发记录2026-04-07
分类
  • apicloud3
  • bootstrap8
  • cmder1
  • cocos2d-js5
  • createjs17
  • day45
  • docker16
  • egret14
标签
备份 运营网站记录 dd mb_ereg_replace 封禁ip jssdk Anaconda 创建软连接 apache 路由不生效 Shortcode xss htmlspecialchars 中 解密 企业支付返回数据 搭建php开发环境 worker 函数 开启url 微信分享定制注意事项 排序 乌龟 注意点 vue 魔术方法 php Post Formats 报错 sftp 协程 serverless 类型转换 Promise对象 时间戳 discover alter 过大的 但是无效果 opencode
归档
  • 六月 2026 2
  • 五月 2026 1
  • 四月 2026 2
  • 三月 2026 3
  • 二月 2026 5
  • 一月 2026 3
  • 十二月 2025 5
  • 十一月 2025 2
网站信息
文章数目 :
1024
最后更新时间 :
© 2025 - 2026 By developer框架 Hexo 8.1.1|主题 Butterfly 5.5.4
搜索
数据加载中