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

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

211. 发现TimeLine的一些问题,像是BUG [ 54%]

...eateSprite(xx:int,yy:int):Sprite { var sp:Sprite=new Sprite(); sp.graphics.drawRect(0, 0, 50, 50, "#ffffff"); sp.x=xx; sp.y=yy; Laya.stage.addChild(sp); return sp; } //添加缓动的函数 private function addTime(timeLine:TimeLine,sp:Sprite,yy:Number):void { timeLine=new TimeLine(); timeLine.to(sp...

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

212. 【字节小游戏】游戏中播放视频 [ 53%]

...ce); reference.pos(100, 100); reference.size(600, 400); reference.graphics.drawRect(0, 0, reference.width, reference.height, "#CCCCCC"); // 每次舞台尺寸变更时,都会调用Utils.fitDOMElementInArea设置Video的位置,对齐的位置和refence重合 Laya.stage.on(Laya.Event.RESIZE, this,...

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

213. 2D性能优化 · LayaAir3.3 · 引擎文档 · LAYABOX [ 53%]

...使用getBounds/ getGraphicBounds。 var sp=new Laya.Sprite(); sp.graphics.drawRect(0,0,100,100,"#FF0000"); var bounds:Laya.Rectangle=sp.getGraphicBounds(); Laya.stage.addChild(sp); getBounds可以满足多数多数需求,但由于其需要计算边界,不适合频繁调用。 设置容器的aut...

来源: Laya3.0_文档 发布时间: 20251010

214. 对staticCache的疑问 [ 53%]

... 微信 hujian0318 赞同来自: var sp:Sprite = new Sprite(); sp.graphics.drawRect(0, 0, 100, 100, "#ffff00"); Laya.stage.addChild(sp); sp.x = 50; trace(sp.x); // 输出50 sp.cacheAs = "bitmap"; sp.staticCache = true; sp.x = 100; trace(sp.x); // 输出100,且编译出来的效果也是在这个...

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

215. 模拟石头下落过程不明抖动 [ 53%]

... ){ return this.balls[i]; } } let ball = new Laya.Sprite(); ball .graphics.drawRect( 0,0,140,140,"#d9d919"); this.balls.push( ball ); return ball; } } new TexasMain(); [/i][/i] 附件 : --> 不明抖动.rar 2018-02-26 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已...

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

216. 微信浏览器,input输入完成后,游戏不能还原 [ 53%]

...width = Laya.stage.width; scene.height = Laya.stage.height; scene.graphics.drawRect(0, 0, Laya.stage.width, Laya.stage.height, "#3e3534"); Laya.stage.addChild(scene);  var inputText = new Laya.Input(); inputText.size(350, 100); inputText.x = Laya.stage.width - 400; inputText.y = Laya.stage.height *...

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

217. TimeLine.addLabel(label:String, offset:Number):TimeLine 亲测! 方法中第二个参数offset无效 [ 52%]

... { Laya.init(600,400); var sp:Laya.Sprite = new Laya.Sprite(); sp.graphics.drawRect(0,0,50,50,"#ff8822"); Laya.stage.addChild(sp); var delay:number = 5000; var timeLine:Laya.TimeLine = new Laya.TimeLine(); timeLine.addLabel("0",delay).to(sp,{x:550},500,null,0); timeLine.addLabel("1",delay).to(sp,{y:...

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

218. sprite点击事件 位置便宜 [ 52%]

...unction createInteractiveTarget() { var rect = new Sprite(); rect.graphics.drawRect(0, 0, 200, 200, "#D2691E"); rect.size(200, 200); rect.pivot(100,100); rect.x = Laya.stage.width /2; rect.y = Laya.stage.height / 2; // let hitArea = new Laya.Rectangle(rect.x-100,rect.y-100,200,200); // rect.hitArea ...

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

219. 可以帮我测试一下吗? 使用mask的场景,放着就会出现记忆体用完的讯息? [ 51%]

...码有什么问题? let s: Laya.Sprite = new Laya.Sprite(); s.graphics.drawRect(10, 10, 580, 470, "#000000"); s.pos(0,0); console.log("=mask container=>>", s.width, s.height)//打印出是0,0 this.scrollContainer.mask = s;//scrollContainer是一个有宽高的Box,为什...

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

220. video在安卓手机上,怎么设置同层播放,还有怎么设置隐藏控制播放按钮 [ 51%]

...ize(GoldConsts.contextWidth, GoldConsts.contextHeight); reference.graphics.drawRect(0, 0, reference.width, reference.height, "#cccccc"); // 每次舞台尺寸变更时,都会调用Utils.fitDOMElementInArea设置Video的位置,对齐的位置和refence重合 Laya.stage.on(Event.RESIZE, this, Util...

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