大约有 1,413 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0048 秒)
Laya_社区(868) Laya2.0_文档(129) Laya3.0_api(105) Laya_示例(75) Laya2.0_api(66) laya_api(61) Laya3.0_文档(58) Laya2.0_示例(51)
...属性 var img:Sprite = new Sprite(); //加载显示图片,坐标位于100,50 img.loadImage("res/layabox.png"); img.x=(Laya.stage.width-256)/2; //添加到舞台 Laya.stage.addChild(img); var img2:Sprite = new Sprite(); //加载显示图片,坐标位于100,50 img2.loadImage("res/layabox.png"); i...
来源: Laya_社区 发布时间: 20200217
...已创建完毕,此方法只执行一次 onAwake(): void { this.vbox.pos(100, 100); this.vbox.bgColor = "#ffffff"; this.vbox.space = 30; this.vbox.align = "center"; } } 二、通过代码创建VBox 有时,需要用代码管理UI,创建UI_VBox类用于创建VBox组件。由于单独创建一个...
来源: Laya3.0_文档 发布时间: 20251010
...ave(); var matrix:Matrix=new Matrix(); matrix.rotate(45); matrix.translate(100,100); sp.graphics.transform(matrix); sp.graphics.drawRect(0,0,200,100,"#FF0000"); sp.graphics.restore(); Laya.stage.addChild(sp);我测试没有问题,可以把你详细的代码发下,我们看下! 2017-06-09 0 0 ...
来源: Laya_社区 发布时间: 20170609
...Bounds。 ```typescript var sp=new Laya.Sprite(); sp.graphics.drawRect(0,0,100,100,"#FF0000"); var bounds:Laya.Rectangle=sp.getGraphicBounds(); Laya.stage.addChild(sp); ``` getBounds可以满足多数多数需求,但由于其需要计算边界,不适合频繁调用。 1. 设置容器的autoSize...
来源: Laya2.0_文档 发布时间: 20210714
...ics.drawRect(0,0,200,200,'#ff0000') containr.size(200,200); containr.pivot(100,100); containr.x = 200 containr.y = 200 senceLayer.addChild(containr); var rect = new Rectangle(0,0,200,200); containr.scrollRect = rect; var itemContainr = new Sprite(); itemContainr.size(156,200); containr.addChild(item...
来源: Laya_社区 发布时间: 20170329
按钮点击的位置发生偏移 <div style="padding: 50px 0px;height:100vh"> <div style="position: relative"> <div id="mylayaCanvas" ></div> </div> </div>如代码所示 指定layacanvas外包两层div 样式如代码这样设置后发生点击的范围跟实...
来源: Laya_社区 发布时间: 20200825
...oid { let panel:Laya.Sprite = new Laya.Sprite(); panel.graphics.drawRect(0,100,100,20,0xffffff); this.addChild(panel); let box:laya.physics.BoxCollider = panel.addComponent(laya.physics.BoxCollider); box.height = 20; box.width = 100; let rigid:Laya.RigidBody = panel.addComponent(Laya.RigidBody); rig...
来源: Laya_社区 发布时间: 20190428
..."absolute";//设置布局定位。这个不能少。 iframe.style.zIndex = 100;//设置层级 iframe.style.left ="100px"; iframe.style.top ="100px"; iframe.src = "http://ask.layabox.com/"; Browser.document.body.appendChild(iframe); } } } 2018-02-26 0 1 分享 微博 QZONE 微信 Laya_Aaron 赞同来...
来源: Laya_社区 发布时间: 20180223
...c class TestTTFLoader { public function TestTTFLoader() { Laya.init(1000, 900); Laya.loader.load("res/remember.ttf",new Handler(this,test)); } private function test():void { var text:Text; text = new Text(); text.fontSize = 30; text.color = "#ff0000"; text.text = "你好"; text.pos(100,...
来源: Laya_社区 发布时间: 20191211
...this.chuanBox.x+this.chuanBox.width/2,this.chuanBox.y+this.chuanBox.height-100, this.chuanBox.width/2,100); //世嘉SAGE区 Laya.stage.graphics.drawRect( this.sageBox.x, this.sageBox.y, this.sageBox.width, this.sageBox.height, null, "#FFFFFF", 2); 2018-10-26 添加评论 免费帖 --> 分享 微博 ...
来源: Laya_社区 发布时间: 20181026