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

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

121. 关于mouseover的问题 [ 76%]

...             var sp:Sprite=new Sprite();             sp.width=100;             sp.height=100;             sp.graphics.drawRect(0,0,100,100,"#ff0000");             sp.on(Event.MOUSE_OVER,this,onMouse);             sp.on(Event.MOUSE_OUT,this,onMous...

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

122. 绘制三角形、多边形及根据数据绘制图案(TypeScript-LayaAir基础篇(TS)-矢量图) [ 76%]

...J点坐标               canvas.graphics.drawPoly(Laya.stage.width / 2, Laya.stage.height / 2, path, "#FF7F50");       }     } } new laya.Sprite_DrawShapes(); ``` 代码运行效果如下图所示: ​ ![blob.png](img/4.png) ​ (图4) ​ 通过上面的示例...

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

123. 被遮罩的显示对象的子显示对象再添加遮罩,则子显示对象显示不正确 [ 76%]

...clear(true); this.img.mask.graphics.drawRect(100 - this.img.x, 0, this.img.width, 300, "#ffffff"); } 附件 : --> LayaTest.rar 2019-07-22 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 1 个回复 Laya_Aaron 赞同来自: 不...

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

124. 克隆sprite [ 76%]

...面的“   tempSpr2.graphics.drawTexture(tempSpr.texture, 0, 0, tempSpr.width, tempSpr.height);”中 tempSpr.texture 是空的 if (data && data.items != []) {             let tempSpr: Sprite = new Sprite();             let tempImg: Laya.Image;             let arr: Arr...

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

125. 如何将原生iframe嵌入某个节点,像addChild那样嵌入 [ 76%]

...on(){ this.frame=Laya.Browser.document.createElement("iframe"); this.frame.width=this.con.width; this.frame.height=850; this.frame.style.margin="0"; this.frame.style.padding="0"; this.frame.style.left="0"; this.frame.style.top="50px"; this.frame.id="OneGou"; this.frame.style.position="absolute"; thi...

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

126. list 加载动画为什么实现的效果会错乱掉? [ 76%]

...的边界信息 var bounds = ani.getGraphicBounds(); ani.scale(80/bounds.width ,80/bounds.height) this.addChild(ani) } } Laya.class(Item1, "Item1", Box); var List = Laya.List; function setup(effList) { var list = new List(); list.itemRender = Item1; list.repeatX = 3; list.repeatY = 4; list.x = (Laya...

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

127. wx.canvasToTempFilePath在TS下如何使用啊? [ 76%]

...mpFilePath在TS下如何使用啊? wx.canvasToTempFilePath({ x: 0, y: 0, width: 100, height: 100, destWidth: 100, destHeight: 100, canvasId: 'myCanvas', success: function (res) { wxd.shareUrl = res.tempFilePath wxd.ShareAppMessage() console.log(res.tempFilePath) } }) 一直报错[ts] The 'this' co...

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

128. Label属性详解(TypeScript-IDE篇(TS)-IDE组件属性详解) [ 76%]

...vate createLabel(color: string, strokeColor: string): Label { const STROKE_WIDTH: number = 4; var label: Label = new Label(); label.font = "Microsoft YaHei"; label.text = "SAMPLE DEMO"; label.fontSize = 30; label.color = color; if (strokeColor) { label.stroke = STROKE_WIDTH; label.strokeColor = stro...

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

129. 鼠标交互-滑动 [ 76%]

...tion() { // 不支持WebGL时自动切换至Canvas Laya.init(Browser.clientWidth, Browser.clientHeight, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = "showall"; Laya.stage.bgColor = "#232628"; setup(); })(); function setup() { createSp...

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

130. 被遮罩的对象的子显示对象再添加遮罩,子显示对象的遮罩显示不正确 [ 75%]

...clear(true); this.img.mask.graphics.drawRect(100 - this.img.x, 0, this.img.width, 300, "#ffffff"); } 附件 : --> LayaTest.rar 2019-07-22 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 2 个回复 zengjoeng 赞同来自: 谁...

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