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

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

21. 文本对齐与自动换行(JavaScript-LayaAir基础篇(JS)-文本) [ 71%]

...直对齐将不会有效果。 ```javascript //初始化引擎 Laya.init(1136,640); var txt = new Laya.Text(); //设置文本内容 txt.text = "hello_world"; //设置文本区背景 txt.bgColor = "#c30c30"; //设置文本的宽高 txt.width = 400; txt.height = 400; //设置文本水平居中 txt.ali...

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

22. 请问引擎中是否支持类似Flash中擦除效果 BlendMode.ERASE [ 71%]

...会变为方块。是使用WebGL是正常的。 不使用WebGL Laya.init(1136, 640)   使用WebGL Laya.init(1136, 640, WebGL);   2017-01-21 0 0 分享 微博 QZONE 微信 wyg3732630 赞同来自: webGl 下 blendMode = "destination-out";出现黑块的问题 需要怎么解决?   2017-12-22 0 1 ...

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

23. 文本对齐与自动换行(ActionScript-LayaAir基础篇(AS3)-文本) [ 70%]

...ss LayaSample { public function LayaSample() { //初始化引擎 Laya.init(1136,640); var txt:Text = new Text(); //设置文本内容 txt.text = "hello_world"; //设置文本区背景 txt.bgColor = "#c30c30"; //设置文本的宽高 txt.width = 400; txt.height = 400; //设置文本水平居中 txt.a...

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

24. 编译前(AS)和编译后(JavaScript)程序的行为是不一致的,求最佳实践和原理。 [ 68%]

...ss LayaSample { public function LayaSample() { //初始化引擎 Laya.init(1136, 640); var func:Function = new A().method; func(); } } } package { public class A { private var _attr:int = 123; public function A() { } public function method():void { trace(_attr); } } } 2016-12-13 添加评论 免费...

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

25. 为什么pannel里显示两张同样的图片显示不出来,只能显示一张 [ 68%]

...nstructor() { super(); this.panel = new Laya.Panel(); this.panel.size(720, 1136); this.panel.vScrollBarSkin = "comp/vscroll.png"; Laya.stage.addChild(this.panel); var img:Laya.Image = new Laya.Image(); img.skin = "res/GameBG2.jpg" this.panel.addChild(img) var img1:Laya.Image = new Laya.Image(); img1...

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

26. 微信小游戏项目 Mask在 webgl 模式下 安卓 手机有bug [ 67%]

...游戏 Laya.MiniAdpter.init(); //mask //使用webg不正常 Laya.init(640, 1136,Laya.WebGL); //不使用webgl正常 //Laya.init(640, 1136); Laya.stage.scaleMode = Laya.Stage.SCALE_FIXED_HEIGHT; Laya.stage.alignH = Laya.Stage.ALIGN_CENTER; Laya.stage.alignV = Laya.Stage.ALIGN_BOTTOM; var icon = new L...

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

27. LayaAir 2.0 TS版编译出错GameConfig跟创建项目时生成的内容不一致了 [ 67%]

...rt default class GameConfig{ static width:number=640; static height:number=1136; static scaleMode:string="fixedwidth"; static screenMode:string="none"; static startScene:string="test/TestScene.scene"; static sceneRoot:string=""; static debug:boolean=false; static stat:boolean=false; static physicsDe...

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

28. 屏幕适配-屏幕适配 [ 65%]

...var txt; (function() { // 不支持WebGL时自动切换至Canvas Laya.init(1136, 640); //设置适配模式 Laya.stage.scaleMode = "noscale"; //设置横竖屏 Laya.stage.screenMode = Stage.SCREEN_HORIZONTAL; //设置水平对齐 Laya.stage.alignH = "center"; //设置垂直对齐 Laya.stage.alignV =...

来源: Laya_示例 发布时间: 20260106

29. Sprite-遮罩-放大镜 [ 63%]

...prite; constructor() { // 不支持WebGL时自动切换至Canvas Laya.init(1136, 640, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = "showall"; Laya.stage.bgColor = "#232628"; Laya.loader.load("res/bg2.png", Handler.create(this, this.se...

来源: Laya2.0_示例 发布时间: 20260106

30. UI页面定位 [ 62%]

UI页面定位 我定义了一个页面,640*1136,但是把足见拉上来的时候,其位置设置为(0,0)的时候,就看不到在页面上,最左上也是(53,240),请问这是什么原因? 2017-10-19 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相...

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