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

大约有 2,310 项符合查询结果, 库内数据总量为 31,625 项。 (搜索耗时: 0.0062 秒)

681. 设置滤镜(ActionScript-LayaAir基础篇(AS3)-位图) [ 71%]

...Sprite { var ape:Sprite = new Sprite(); ape.loadImage(ApePath); Laya.stage.addChild(ape); return ape; } } } ``` 在上面的代码中,我们创建了一个原始位图、一个红色滤镜效果位图、一个灰色滤镜效果位图。运行效果如图1所示: ![图1](img/1.png) (图1) ## 2、...

来源: Laya2.0_文档 发布时间: 20210715

682. 鼠标事件能否在有图形的区域感应,特别是子项坐标为负数时(已经找到问题) [ 71%]

...500,500,"#fff0cc"); testPan = new Sprite(); testPan.name = "testPan"; this.addChild( testPan ); testPan.pos( 300,300); testPan.graphics.drawRect(0,0,90,100,"#faaff0"); testPan.on(Event.CLICK,this,onMouseClick); testPan.width = 90; testPan.height = 100; var mcSp:Sprite = new Sprite(); mcSp.graphics.d...

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

683. 关于适配有点疑惑 [ 71%]

...Sprite(); rect.graphics.drawRect(-100, -100, 200, 200, "gray"); Laya.stage.addChild(rect); var rect1 = new Sprite(); rect1.graphics.drawRect(Laya.stage.width / 3 * 2 , Laya.stage.height / 3 * 2 - 65, 100, 100, "blue"); // rect1.graphics.drawRect(Laya.stage.width / 2 , Laya.stage.height / 2, 100, 100...

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

684. [LayaAir3]laya3.3图集使用平铺功能后绘制错误内容 [ 71%]

...gt;{             let aaa = new Laya.Sprite();             this.addChild(aaa);             aaa.x = 100;             aaa.y = 100;             aaa.texture = data.frames[0];             let bbb = new Laya.Sprite();             this.addChild(bbb);           ...

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

685. 图集动画(ActionScript-LayaAir基础篇(AS3)-动画基础) [ 71%]

...niUrls("die",6),"dizziness"); roleAni.play(0,true,"dizziness"); Laya.stage.addChild(roleAni); } /** * 创建一组动画的url数组(美术资源地址数组) * @param aniName 动作的名称,用于生成url * @param length 动画最后一帧的索引值, */ private function aniUrls(aniName:...

来源: Laya2.0_文档 发布时间: 20210715

686. 二进制图片(TypeScript-2D进阶篇(TS)-游戏加载策略) [ 71%]

...台 var sp:Laya.Sprite = new Laya.Sprite(); sp.loadImage(url); Laya.stage.addChild(sp);//添加到舞台 } private errorHandler(e:Object):void{ } } new GameMain(); ``` 第二种我们可以绘制一个纹理来显示: ```typescript private completeHandler(data:Object):void{ //加载完成返回的...

来源: Laya2.0_文档 发布时间: 20210714

687. [LayaAir3]反馈一个文本合批的bug [ 71%]

...以看到一个红色的文本和一个灰色的文本let t1 = Laya.stage.addChild(new Laya.Label);t1.text = "aaaa";t1.color = "#ff0000";let t2 = Laya.stage.addChild(new Laya.Label);t2.text = "bbb";t2.color = "#ff0000";t2.y = 100;t2.disabled = true   步骤二:复制下面代码继续在浏览器...

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

688. ios15遮罩引起的黑屏在1.x的版本上如何解决 [ 71%]

...ge.width, Laya.stage.height, "#000000"); maskArea.setName("maskArea") mask.addChild(maskArea);   //绘制一个圆形区域,利用叠加模式,从遮罩区域抠出可交互区 highLightArea = new Sprite(); highLightArea.visible = false; //设置叠加模式 highLightArea.blendMode = "destinati...

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

689. 鼠标交互-拖动 [ 71%]

...ction createApe() { ape = new Sprite(); ape.loadImage(ApePath); Laya.stage.addChild(ape); var texture = Laya.loader.getRes(ApePath); ape.pivot(texture.width / 2, texture.height / 2); ape.x = Laya.stage.width / 2; ape.y = Laya.stage.height / 2; ape.on(Event.MOUSE_DOWN, this, onStartDrag); } function ...

来源: Laya_示例 发布时间: 20251219

690. 鼠标事件:为什么没有设置穿透,也会发生穿透现象? [ 71%]

...= CreateObj.createSprite(McUrlMgr.LOAD_BG_Path);             this.addChild(bg);             bg.x = 0;             bg.y = 0;                          var bg2:Sprite = CreateObj.createSprite(McUrlMgr.LOAD_BG_Path);             bg2.x = 0;      ...

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