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

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

1041. cavans上触发不了input的点击事件 [ 84%]

cavans上触发不了input的点击事件 在舞台上添加一个sprite,给sprite添加一个点击事件,this.hitimg.on(Laya.Event.CLICK,this,this.onStart); onStart: _proto.onStart = function(){ console.log(111111122222); $("#fileInput").trigger('click'); } 可以打印数字,但是触发...

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

1042. 子容器的事件问题 [ 84%]

...); }); } /**  * ViewHeadViewTest  */ class ViewHeadViewTest extends Laya.Sprite {     constructor() {         super();         this.graphics.drawRect(0, 0, 1500, 1500, "#0000ff");         this.on(Laya.Event.CLICK, this, this.onclickTest);     }     onclickTest(): void {       ...

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

1043. hBox使用问题 [ 83%]

...<picAy.length;i++) { var texture:Texture= Loader.getRes(picAy); var ape:Sprite = new Sprite; //ape.x=i*(stageWidth/4) //Tween.to(ape, { x : i*(stageWidth/4) },1500,Ease.sineOut); var bl:Number=texture.width/texture.height ape.graphics.drawTexture(texture,0,0,stageWidth/4,stageWidth/4/bl); apesCtn...

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

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

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

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

1045. BoxCollider 不会随着父节点 翻转 scaleX=-1 [ 83%]

BoxCollider 不会随着父节点 翻转 scaleX=-1 给他Sprite 添加了 BoxCollider,在场景编辑器里设置了Sprite scaleX为-1,编辑器里显示Sprite和BoxCollider都有翻转 但在运行效果里BoxCollider却没有翻转? 2018-10-30 添加评论 免费帖 --> 分享 微博 QZONE ...

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

1046. Unity插件导出模型 [ 83%]

...报错   附件包含导出的资源文件,麻烦帮忙看下   Laya.Sprite3D.load("res/LayaScene_Model_71008/Model_71008.lh", Laya.Handler.create(null, function(sprite:Laya.Sprite3D):void { scene.addChild(sprite); sprite.transform.localScale = new Laya.Vector3(0.2, 0.2, 0.2); }));   报错信...

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

1047. graphics绘制报错 [ 83%]

graphics绘制报错 class Sprite_DisplayImage { constructor() { Laya.init(Laya.Browser.clientWidth, Laya.Browser.clientHeight, Laya.WebGL); const path = "./res/apes/monkey2.png"; Laya.loader.load(path, Laya.Handler.create(this, function() { let tex = Laya.loader.getRes(path); let sp = new Laya.Spr...

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

1048. 关于webGL下遮罩效率问题 [ 83%]

...需要不断的重绘遮罩,这个时候掉帧会很厉害,drawCall和sprite数量也都不变,可以试试下面的例子 代码如下: var spr:Sprite = new Sprite(); spr.graphics.drawCircle(0,0,100,"#ff0000"); spr.mask = new Sprite(); Laya.stage.frameLoop(1, null, drawMask); var index:int ...

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

1049. 如何实现渐变填充对象呀? [ 83%]

...ient.addColorStop(0,"#FF0000"); my_gradient.addColorStop(1,"#0000FF"); let sprite = new Laya.Sprite(); Laya.stage.addChild(sprite); sprite.graphics.drawRect(0,0,640,1136,my_gradient); 2018-09-06 0 0 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 要回复问题请先登录 发...

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

1050. 性能测试-卡通人物2 [ 83%]

...= 0) { text.text = Stat.FPS.toString(); } } } class Character extends Laya.Sprite { constructor(images) { super(); this.speed = 5; this.bloodBar; this.animation; this.nameLabel; this.createAnimation(images); this.createBloodBar(); this.createNameLabel(); } createAnimation(images) { const Animation =...

来源: Laya2.0_示例 发布时间: 20250226