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

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

21. Sprite-遮罩-放大镜 [ 74%]

...2; (function() { // 不支持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, setup))...

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

22. 手机游戏,一般做多大分辨率的呀?? [ 74%]

...半,为320*480,请问怎么解决? 有个需求,pc分辨率为1136x640,手机上分辨率为640x1136,这个要怎么实现? 如何获得浏览器的窗口分辨率 不同手机分辨率怎么适配 怎么根据分辨率加载不同资源 咨询一下.laya的分辨率为什么和物理...

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

23. 文本基础样式(ActionScript-LayaAir基础篇(AS3)-文本) [ 74%]

...aSample { public function LayaSample() { //初始化引擎 Laya.init(1136, 640); var txt:Text = new Text(); txt.text = "hello_world"; txt.color = "#ffffff"; Laya.stage.addChild(txt); } } } ``` 这个时候我们就可以看到txt已经添加到舞台上了,显示了txt中 白色的hello_world。 ...

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

24. 在2.0里如何调用在编辑模式下创建的对话框 [ 73%]

...{ "x":0, "type":"Dialog", "selectedBox":1, "selecteID":3, "props":{"width":640,"sceneColor":"#000000","height":480}, "nodeParent":-1, "label":"Dialog", "isOpen":true, "isDirectory":true, "isAniNode":true, "hasChild":true, "compId":1, "child":[ { "x":15, "type":"Image", "props":{"y":0,"x":0,"width":6...

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

25. 关于video [ 73%]

...件,视频好像就一直处于底部,这个是什么问题 Laya.init(640,960,Laya.WebGL); Laya.stage.scaleMode = "exactfit"; Laya.stage.alignH = "center"; var Sprite = laya.display.Sprite; var Bg = new Sprite(); Bg.loadImage("../laya/assets/bg_back.png"); Laya.stage.addChild(Bg); Bg.on(Laya.Eve...

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

26. scalefixed适配模式设置后,image的ceterX,centerY,top,bottom,left,right这些都没用 [ 73%]

...都没用 如标题,我设置了fixedheight,stage设计分辨率1136x640,我在iphoneX分辨率下看,高度不变,宽度放大,stage是1386,640(从左边到最右黑色部分,我鼠标点击打印出了stage上的mousex,mousey,参考截图)。imgae设置的right:0,bottom...

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

27. 奇葩遮罩BUG [ 73%]

...以运行并重现问题的例子吗,我们看下这个问题! 137*****640 • 2017-09-21 13:17 我app也遇到了,请问后来解决了没有 q12647 • 2017-09-30 17:04 @137*****640:用新版没有问题

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

28. 设置遮罩(ActionScript-LayaAir基础篇(AS3)-位图) [ 72%]

...tring; private var img:Sprite; public function MaskDemo() { Laya.init(1136,640); //设置舞台背景色 Laya.stage.bgColor = "#ffffff" //资源路径 Res = "res/img/monkey1.png"; //先加载图片资源,在图片资源加载成功后,通过回调方法绘制图片并添加到舞台 Laya.loader....

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

29. LayaBox如何多点触摸? [ 72%]

...e function startDemoTest():void { var bmd:BitmapData = new BitmapData(960, 640, false, 0xcccccc); var bmp:Bitmap = new Bitmap(bmd); bmp.width = 960; bmp.height = 640; var sp:Sprite = new Sprite(); sp.addChild(bmp); this.addChildAt(sp, 0); Multitouch.inputMode = MultitouchInputMode.TOUCH_POINT; sp.ad...

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

30. drawPath的绘制问题 [ 72%]

...eTo,544,448,moveTo,576,0,lineTo,576,448,moveTo,608,0,lineTo,608,448,moveTo,640,0,lineTo,640,448,moveTo,672,0,lineTo,672,448,moveTo,704,0,lineTo,704,448,moveTo,736,0,lineTo,736,448,moveTo,768,0,lineTo,768,448,closePath显示成了 绘制的代码为: for(x = 0 ; x < gridWidthPx ; x += gridPx) { ...

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