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

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

191. HTTP通信 · LayaAir3.3 · 引擎文档 · LAYABOX [ 49%]

...xt.text = "请查看源码和调试信息,了解如何使用"; this.text.color = "#FFFFFF"; this.text.font = "Impact"; this.text.fontSize = 25; this.text.width = 800; this.text.anchorX = 0.5; this.text.align = "center"; this.text.y = 20; this.text.centerX = 0; this.owner.addChild(this.text); } /**...

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

192. 屏幕方向:自动横屏与自动竖屏的设置详解(JavaScript-LayaAir基础篇(JS)-屏幕适配) [ 48%]

...字 var text = new Laya.Label(); text.text = "游戏的水平方向"; text.color = "gray"; text.fontSize = 100; text.centerX = 0; text.centerY = 50; Laya.stage.addChild(text); } Laya.init(0, 0, Laya.WebGL); Laya.stage.scaleMode = "full"; Laya.stage.bgColor = "#232628"; //自动横屏,游戏的水...

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

193. 关于laya生成的canvas定位问题导致内部事件不正确 [ 48%]

...: 10% auto 0;background: #ccc;position: relative;} .msgDiv{font-size: 30px;color: #fff;text-align: center;padding-top: 30px;} </style> </head> <body> <div class="layaDiv"></div> <div class="msgDiv">日志</div> </body> <script src="https://cdn.bootc...

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

194. laya.utils.PerfHUD [ 47%]

...Intance(comp:Component):* 添加组件实例。 Node  addDataDef(id:int, color:int, name:String, scale:Number):voidPerfHUD addInputChild(node:Node):NodeNode callLater(method:Function, args:Array = null):void 延迟运行指定的函数。 在控件被显示在屏幕之前调用,一般用于延...

来源: Laya2.0_api 发布时间: 20190513

195. LayaAir和原生DOM交互(JavaScript-2D进阶篇(JS)-扩展模块) [ 45%]

...typescript //初始化引擎 Laya.init(600, 400, Laya.WebGL); Laya.stage.bgColor = "#ffcccc"; var data = "data:image/svg+xml," + '' + '' + '' + 'I like ' + '' + 'cheese' + '' + '' + ''; var sp = new Laya.Sprite(); sp.loadImage(data, 0, 0, 200, 200); Laya.stage.addChild(sp); ``` 通过data来当做ur...

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

196. LayaAir和原生DOM交互(TypeScript-2D进阶篇(TS)-扩展模块) [ 44%]

...mple { constructor() { //初始化引擎 Laya.init(600, 400); Laya.stage.bgColor = "#ffcccc"; var data: string = "data:image/svg+xml," + '' + '' + '' + 'I like ' + '' + 'cheese' + '' + '' + ''; var sp: Laya.Sprite = new Laya.Sprite(); sp.loadImage(data, 0, 0, 200, 200); Laya.stage.addChild(sp); } } ...

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

197. laya.ui.TextInput_API3.0 [ 39%]

...a.init(640, 800);//设置游戏画布宽高、渲染模式。 Laya.stage.bgColor = "#efefef";//设置画布的背景颜色。 Laya.loader.load(["resource/ui/input.png"], Handler.create(this, onLoadComplete));//加载资源。 } private function onLoadComplete():void { var textInput:TextInput = new T...

来源: Laya3.0_api 发布时间: 20231115

198. laya.ui.TextArea_API3.0 [ 39%]

...Example() { Laya.init(640, 800);//设置游戏画布宽高。 Laya.stage.bgColor = "#efefef";//设置画布的背景颜色。 Laya.loader.load(["resource/ui/input.png"], Handler.create(this, onLoadComplete));//加载资源。 } private function onLoadComplete():void { var textArea:TextArea = new Tex...

来源: Laya3.0_api 发布时间: 20231115

199. 2.12.2beta1 诸多bug [ 38%]

... Laya.HTMLDivElement(); ele.innerHTML = "<span href='_test' style='color:#FFFFFF;font-weight:bold'>HTMLDivElement</span>"; ele.on(Laya.Event.LINK, this, (event: Laya.Event) => { console.log(event); }); Laya.stage.addChild(ele); zyy • 2021-11-09 13:51 @Laya_Fred: 这段代...

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

200. laya.html.dom.HTMLDivElement [ 37%]

... 字体大小 font-weight:bold:none; 字体是否是粗体,功能同bold color:#ff0000; 字体颜色 stroke:2px; 字体描边宽度 strokeColor:#ff0000; 字体描边颜色 padding:10px 10px 20px 20px; 边缘的距离 vertical-align:top|bottom|middle; 垂直对齐方式 align:left|right|center; 水...

来源: Laya2.0_api 发布时间: 20190513