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

大约有 1,142 项符合查询结果, 库内数据总量为 31,580 项。 (搜索耗时: 0.0053 秒)

221. 计时器-延迟执行 [ 78%]

...eateButton(label) { var w = 300, h = 60; var button = new Sprite(); button.graphics.drawRect(0, 0, w, h, "#FF7F50"); button.size(w, h); button.graphics.fillText(label, w / 2, 17, "20px simHei", "#ffffff", "center"); return button; } function onDecreaseAlpha1(e) { //移除鼠标单击事件 button1.o...

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

222. 屏幕适配-缩放-Extract Fit [ 78%]

...alRect() { const Sprite = Laya.Sprite; this.rect = new Sprite(); this.rect.graphics.drawRect(-100, -100, 200, 200, "gray"); Laya.stage.addChild(this.rect); this.updateRectPos(); } updateRectPos() { this.rect.x = Laya.stage.width / 2; this.rect.y = Laya.stage.height / 2; } } new SmartScale_Scale_EXTR...

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

223. 屏幕适配-缩放-Show All [ 78%]

...alRect() { const Sprite = Laya.Sprite; this.rect = new Sprite(); this.rect.graphics.drawRect(-100, -100, 200, 200, "gray"); Laya.stage.addChild(this.rect); this.updateRectPos(); } updateRectPos() { this.rect.x = Laya.stage.width / 2; this.rect.y = Laya.stage.height / 2; } } new SmartScale_Scale_SHOW...

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

224. 引擎示例中的新手引导自己写了一次,不知道为什么无法实现点击。 [ 78%]

...; var maskArea = new Sprite(); guideContainer.addChild(maskArea); maskArea.graphics.drawRect(0, 0, width, height, "#000000"); maskArea.alpha = 0.5; var interactionArea = new Sprite(); guideContainer.addChild(interactionArea); interactionArea.blendMode = "destination-out"; var tipContainer = new Spri...

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

225. 一个LayaAir moveout target 设计上的疑问? [ 78%]

...       Laya.stage.addChild(sp[j + i * 10]);         sp[j + i * 10].graphics.drawRect(0, 0, 50, 50, "black");         sp[j + i * 10].size(50, 50);         sp[j + i * 10].pos(i * 60, j * 60);         sp[j + i * 10].on(Laya.Event.MOUSE_OVER, this, over);         sp[j + i * 10].on...

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

226. Laya对骨骼插槽添加滤镜 [ 77%]

...的渲染中,会遍历所有的插槽,调用BoneSlot中的draw方法(graphics.drawTexture和graphics.drawSkin) ,将插槽中的纹理通过封装cmd的形式通过方法加入_cmd的队列中,通过_renderAll遍历执行所有_cmd队列中的指令进行渲染从而更新画面 。可以...

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

227. 计时器-延迟执行 [ 77%]

...00, h = 60; let button = new Sprite(); Laya.stage.addChild(button); button.graphics.drawRect(0, 0, w, h, "#FF7F50"); button.size(w, h); button.graphics.fillText(label, w / 2, 17, "20px simHei", "#ffffff", "center"); return button; } onDecreaseAlpha1(e) { const Event = Laya.Event; //移除鼠标单...

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

228. Sprite.getGraphicBounds的问题 [ 77%]

Sprite.getGraphicBounds的问题 看4张图就知道了,图片是有加载显示成功,但是在handler里面返回的参数为undefined,getGraphicBounds内容始终为0 附件 : --> 2018-11-16 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关...

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

229. HTMLDivElement下划线换行时,下划线颜色错误 [ 77%]

...代码造成。 __proto.createOneLine=function(startWord,lastWords,hasLine,graphic,recList){ var lineY=lastWords.y+lastWords.height; if(hasLine) graphic.drawLine(startWord.x,lineY,lastWords.x+lastWords.width,lineY,this.color,1); var hitRec=HTMLHitRect.create(); hitRec.rec.setTo(startWord.x,lastWords...

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

230. 图片已加载,却无法显示图片, [ 77%]

...,却无法显示图片, 使用loadIMage可以显示图片,但使用graphics.drawTexture()却无法显示图片(图片已经预加载了),求解,是最新的layaair引擎不支持graphics.drawTexture()的方法了? 2017-01-17 添加评论 免费帖 --> 分享 微博 QZONE 微信 没...

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