• 首页
  • 动态
  • 案例
  • 引擎社区
  • API
  • 文档
  • 示例
  • 引擎下载

大约有 12 项符合查询结果, 库内数据总量为 30,723 项。 (搜索耗时: 0.0044 秒)

1. Sprite.loadImage在Android平台无法卡死,web和iOS平台正常 [ 100%]

Sprite.loadImage在Android平台无法卡死,web和iOS平台正常 在Android平台使用Spirte.loadImage方法初始Sprite卡死,log中一直打印日志“JCGraphicsCmdDispath::calcBoundingBox Wrong command number!,cmd=-65536” 同样的代码和图片地址在web和iOS平台正常; 代码...

来源: Laya_社区 发布时间: 20171229

2. 使用sprite的loadImage遇到的两个问题 [ 99%]

使用sprite的loadImage遇到的两个问题 1、loadImage设置的坐标,宽高,显示没问题,为什么获取sprite的x,y,width,height都和设置的不相符? 2、先loadImage加载图片,再设置宽高无效 2019-02-13 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找...

来源: Laya_社区 发布时间: 20190213

3. getimagedata直接调用无法获取有效像素问题 [ 98%]

... })();       function showApe()     {         // 方法1:使用loadImage         var ape = new Sprite();         Laya.stage.addChild(ape);         ape.loadImage("../../res/apes/monkey3.png");           // 方法2:使用drawTexture         Laya.loader.load("../../res...

来源: Laya_社区 发布时间: 20171201

4. 关于创建Sprite获取大小 [ 96%]

...于创建Sprite获取大小 发现个奇怪的问题,new Laya.Sprite().loadImage() 创建的对象大小不是图像大小,然后用getBounds获取也拿不到真实的大小?    这个建议官方改下接口,理论上width和height用来检测碰撞,那你看到的就应该是碰撞...

来源: Laya_社区 发布时间: 20180530

5. 【紧急】laya2.0的loadImage方法为什么不触发complete? [ 94%]

【紧急】laya2.0的loadImage方法为什么不触发complete? var logo = new Sprite(); Laya.stage.addChild(logo); logo.loadImage("img/load_logo.png", 0, 0, 0, 0, Handler.create(this, function(){ trace("complete!!"); })); 我在laya1.0这么写,触发complete没毛病,为什么到了2.0这...

来源: Laya_社区 发布时间: 20181010

6. 关于laya生成的canvas定位问题导致内部事件不正确 [ 73%]

..._NOSCALE; Laya.stage.bgColor = "#232628"; var img = new Laya.Sprite(); img.loadImage('images/item_5.png'); Laya.stage.addChild(img); img.on(Laya.Event.MOUSE_DOWN, img, onStartDrag); function onStartDrag(){ console.log(this); clickIndex++; msgDiv.html('图片选中了' + clickIndex + '次'); // img.s...

来源: Laya_社区 发布时间: 20170427

7. 怎么获取手机相册内容 [ 71%]

...FileReader.DONE==fileReader.readyState) { var sp:Sprite = new Sprite(); sp.loadImage(fileReader.result,0,0,100,100); Laya.stage.addChild(sp); } }; } } } 2018-05-29 0 8 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 该问题目前已经被锁定, 无法添加新回复 发起人 ...

来源: Laya_社区 发布时间: 20180529

8. Laya.Loader.getRes("xxx.png")取出来的资源为什么是Texture2D,不是Texture [ 70%]

...    报错堆栈 TypeError: tex.getIsReady is not a function at Graphics.loadImage (file:///D:/zxl/2.0_stable/lfGame2.0/bin/libs/laya.core.js:11477:26) at Function.createFrames (file:///D:/zxl/2.0_stable/lfGame2.0/bin/libs/laya.core.js:23134:23) at Animation.loadImages (file:///D:/zxl/2.0_stable/l...

来源: Laya_社区 发布时间: 20200417

9. layaAir如何实现for循环加载多张图片,并且通过事件按比例缩小 [ 68%]

...event.targe指向。layaair折腾半天,搞不明白image组件,sprite.loadImage,Laya.loader.load如果用for循环操作,响应事件中用什么方法指向事件的发起对象?原来用e.target和e.data。现在事件发起者和加载的数据怎么得到呢?(不用循环可以用...

来源: Laya_社区 发布时间: 20161023

10. 请大家帮助优化一下这个抛物线的代码 [ 65%]

...Ball.cached){ Ball.cached = true; this.body = new Laya.Sprite(); this.body.loadImage("war/ball.png"); this.body.pivot(12,12); } this.addChild(this.body); Laya.timer.frameLoop(1,this,this.animate); } private animate(e):void{ this.body.rotation += 10; } } class Main{ private ball:Ball; private target...

来源: Laya_社区 发布时间: 20171108