大约有 1,720 项符合查询结果, 库内数据总量为 31,580 项。 (搜索耗时: 0.0054 秒)
Laya_社区(1002) Laya3.0_api(243) Laya2.0_示例(91) Laya_示例(90) Laya2.0_文档(89) Laya2.0_api(82) laya_api(75) Laya3.0_文档(48)
...是相对于屏幕坐标。 假设父物体a的坐标是(0,Laya.stage.height/2),挂载了刚体的物体b是a的子物体,设置b的坐标为(0,0),若将b上刚体的position设置成(1,0),此时b会出现在屏幕坐标(1,0)的位置,b的x,y是(1,-Laya.stage.height/2...
来源: Laya_社区 发布时间: 20250124
...景 txt.bgColor = "#c30c30"; //设置文本的宽高 txt.width = 400; txt.height = 400; //设置文本水平居中 txt.align = "center"; //设置文本垂直居中 txt.valign = "middle"; Laya.stage.addChild(txt); ```  在实际编码中如果需要其他的对齐模式,请参考API...
来源: Laya2.0_文档 发布时间: 20210715
... VScrollBar(); Laya.stage.addChild(vs); vs.skin = "res/ui/vscroll.png"; vs.height = 300; vs.pos(400, 50); vs.min = 0; vs.max = 100; vs.changeHandler = new Handler(this, this.onChange); } onChange(value) { console.log("滚动条的位置: value=" + value); } } new UI_ScrollBar();module laya { impor...
来源: Laya2.0_示例 发布时间: 20251209
...// 不支持WebGL时自动切换至Canvas Laya.init(Browser.width, Browser.height, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#3da8bb"; Stat.show(); this.createCanvases(); Laya.timer.frameL...
来源: Laya2.0_示例 发布时间: 20251209
...是LayaAirIDE2.3,图片偶尔显示不了,经查parent,visible,x,y,width,height,alpha,skin都正常,资源所在图集也存在,不过小图的source的_referecentCount==0,_texture==null。不知是不是这个原因引起? 如附件图,black.png是用到的小图,所在图集...
来源: Laya_社区 发布时间: 20220722
..."); testPan.on(Event.CLICK,this,onMouseClick); testPan.width = 90; testPan.height = 100; var mcSp:Sprite = new Sprite(); mcSp.graphics.drawRect(0,0,90,100,"#fff000"); testPan.addChild( mcSp); mcSp.pos( -25,-90 ); } private function onMouseClick(e:Event):void { trace( e.target ); } } } 点击b区域...
来源: Laya_社区 发布时间: 20161124
...iddle; 垂直对齐方式 align:left|right|center; 水平对齐方式 line-height:20px; 行高 background-color:#ff0000; 背景颜色 border-color:#ff0000; 边框颜色 width:100px; 对象宽度 height:100px; 对象高度 示例用法: var div:HTMLDivElement=new HTMLDivElement(); div.innerHTML = "...
来源: Laya2.0_api 发布时间: 20190513
...成功 斜角透视的感觉怎么弄出来呀?? Sprite中的width,height和size(width,height)感觉没作用啊 layabox2d例子,虽然出来效果,但是总感觉跟laya挂钩不上。 关于动画模板 除了官网的介绍有没有什么比较好的 实例 或者demo的没有?...
来源: Laya_社区 发布时间: 20190104
...rtWord,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.y,lastWords.x+lastWords.width-startWord.x,lastWor...
来源: Laya_社区 发布时间: 20190801
...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"; Laya.loader.load(AniConfPath, Handler.create(this, createAnimat...
来源: Laya_社区 发布时间: 20170628