大约有 1,017 项符合查询结果, 库内数据总量为 31,722 项。 (搜索耗时: 0.0098 秒)
Laya_社区(720) Laya3.0_api(64) Laya2.0_api(59) laya_api(56) Laya2.0_文档(43) Laya2.0_示例(32) Laya_示例(32) Laya3.0_文档(11)
如何使用graphics.loadImage加载图片资源的时候,如何判断加载失败? 伪代码: this.avatar.graphics.loadImage(url, 0, 0, 0, 0, __complete);这个时候,如果我的url为空或者为一个不存在的图片地址,我如何判断它加载失败呢? 我尝试使用了这...
来源: Laya_社区 发布时间: 20170928
...接 提交 1 个回复 Laya_XS 赞同来自: sprite的示例,然后调用graphics去画个颜色,sprite不能直接设置颜色值 2018-04-10 0 1 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 要回复问题请先登录 发起人 jcd404552157 相关问题 求问shader中的...
来源: Laya_社区 发布时间: 20180410
graphic画图跟其他图片重叠的时候,修改父级别容器alpha值产生透明度问题 情形如下: View中,有子级Image A和Box B Box B的graphic上画图,并且遮挡住Image A 然后修改View的alpha值,出现问题: 原本不透明的graphic会变成半透明,导致原...
来源: Laya_社区 发布时间: 20170116
...法绘制图片并添加到舞台 Laya.loader.load(Res,Handler.create(this,graphicsImg)); } private function graphicsImg():void { img = new Sprite(); //获取图片资源,绘制到画布 img.graphics.drawTexture(Laya.loader.getRes(Res),150,50); //添加到舞台 Laya.stage.addChild(img); } } } ```...
来源: Laya2.0_文档 发布时间: 20210714
...createSprtie() { const w = 50; const h = 30; button = new Sprite(); button.graphics.drawRect(0, 0, w, h, "#FF7F50"); button.pivot(w / 2, h / 2); //设置宽高(要接收鼠标事件必须设置宽高,否则不会被命中) button.size(w, h); button.x = (Laya.stage.width - TrackLength) / 2; but...
来源: Laya_示例 发布时间: 20260303
...多种做法,而其间差异很有必要知道。 1. 使用getBounds/ getGraphicBounds。 ```javascript var sp:Sprite = new Sprite(); sp.graphics.drawRect(0, 0, 100, 100, "#FF0000"); var bounds:Rectangle = sp.getGraphicBounds(); Laya.stage.addChild(sp); ``` getBounds可以满足多...
来源: Laya2.0_文档 发布时间: 20210715
请问如果想实现文字颜色渐变, Laya graphics支持通过createLinearGradient设置fillStlye吗? 请问如果想实现文字颜色渐变, Laya graphics支持通过createLinearGradient设置fillStlye吗? 如果不支持, 还有其他方式实现吗? 2016-11-01 添加评论 免费帖 --> 分...
来源: Laya_社区 发布时间: 20161101
...ite { private var testPan:Sprite; public function MainUi() { super(); this.graphics.drawRect(0,0,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,onMouse...
来源: Laya_社区 发布时间: 20161124
...e(); imgSprite.x = 300 imgSprite.graphics.drawTexture(imgTextTure,0,0); avatarContainer.addChild(imgSprite); var mask = new Sprite(); mask.graphics.drawCircle(50,50,50,"#00ffff") ...
来源: Laya_社区 发布时间: 20170209
webLG模式下使用graphics.drawTexture绘制voide内存暴增 附件 : --> web.rar 2019-06-10 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 2 个回复 138*****275 赞同来自: webLG模式下使用graphics.drawTexture绘...
来源: Laya_社区 发布时间: 20190610