大约有 229 项符合查询结果, 库内数据总量为 31,580 项。 (搜索耗时: 0.0045 秒)
Laya_社区(174) Laya2.0_示例(20) Laya_示例(18) Laya2.0_文档(9) Laya3.0_api(3) Laya3.0_文档(3) laya_api(1) Laya2.0_api(1)
...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
...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
...使用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
... 微信 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
... ){ 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
...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
... { 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
...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
...码有什么问题? 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
...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