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

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

811. this.bitmap.activeResource is not a function [ 83%]

...//开放域 this._openZone = new Laya.Sprite(); } this._openZone.size(Laya.stage.width,Laya.stage.height); if(this._openZone.parent) return; console.log("打开开放域",Laya.Browser.onMiniGame) Laya.stage.addChild(this._openZone); this._openZone.x = vx; this._openZone.y = vy; if(Laya.Browser.onMin...

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

812. dialog设置缩放问题 [ 83%]

...dialog.scale(dialog.scaleH, dialog.scaleH); dialog.x = Math.round(((Laya.stage.width - dialog.width * dialog.scaleH) >> 1) + dialog.pivotX);  dialog.y = Math.round(((Laya.stage.height - dialog.height * dialog.scaleH) >> 1) + dialog.pivotY);   希望官方能优化一下!!感谢 201...

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

813. layaAir真的没办法做涂鸦板? [ 83%]

... 2018-08-22 15:24 @138*****047:var arr=[]; var s=new Laya.Sprite(); Laya.stage.addChild(s); Laya.stage.on(Laya.Event.MOUSE_DOWN,this,function(e){ arr.push([e.stageX,e.stageY]); Laya.stage.on(Laya.Event.MOUSE_MOVE,this,bb) }) Laya.stage.on(Laya.Event.MOUSE_UP,this,function(){ Laya.stage.off(Laya.Even...

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

814. 改变画布 样式的 宽高后 鼠标定位问题 [ 83%]

...urce.style.width = "100%" 自适应外部的DIV 但我画笔的定位 this.stage.mouseX 取不到正确位。这怎么处理?   如图,白色画布是1024 x 650  外层div 是 500 x 500 按照鼠标点下去的 位置。在白色画布中。应该有x = 900 多才合理 附件 : --> test9.rar 20...

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

815. sprite 设置为静态变量后,无法从舞台移除 [ 83%]

...WebGL); Stat.show(); sp=new Sprite(); sp.loadImage("background.jpg"); Laya.stage.addChild(sp); Laya.stage.on(Event.CLICK,this,onClick); function onClick():void { // TODO Auto Generated method stub Laya.stage.off(Event.CLICK,this,onClick); Laya.stage.removeChild(sp); Loader.clearRes("background.jpg")...

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

816. LayaAir和原生DOM交互(ActionScript-2D进阶篇(AS3)-扩展模块) [ 83%]

...blic function LayaUISample() { //初始化引擎 Laya.init(600, 400); Laya.stage.bgColor ="#cccccc"; var data:String= "data:image/svg+xml,"+'' + '' + '' + 'I like ' + '' + 'cheese' + '' + '' + ''; var sp:Sprite = new Sprite(); sp.loadImage(data,0,0,200,200); Laya.stage.addChild(sp); } } } ``` 通过...

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

817. 使用对象池重复使用skeleton报错,请问有解决方案吗?谢谢 [ 83%]

...unction() { WebGL.enable(); Laya.init(Browser.width, Browser.height); Laya.stage.bgColor = "#ffffff"; Stat.show(); startFun(); })(); function startFun() { mAniPath = "res/spine/spineRes1/dragon.sk"; mFactory = new Templet(); mFactory.on(Event.COMPLETE, this, parseComplete); mFactory.on(Event.ERROR, ...

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

818. 图集打包后使用Texture不显示啊 [ 83%]

... GameMain{ constructor() { Laya.init(1080,1321); //设置适配模式 Laya.stage.scaleMode = "showall"; //设置剧中对齐 Laya.stage.alignH = "center"; //设置横竖屏 //Laya.stage.screenMode = "vertical"; var texture:Texture = Laya.loader.getRes("start/sg.png"); var sp = new Laya.Sprite(); sp....

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

819. LayaAir IDE 语言包的使用? [ 83%]

...就用刚才的.lang文件 代码如下: package { import laya.display.Stage; import laya.display.Text; import laya.net.Loader; import laya.utils.Handler; import laya.webgl.WebGL; public class Main { public function Main() { Laya.init(640, 960, WebGL); Laya.stage.scaleMode = Stage.SCALE_FULL; Laya...

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

820. 物理Bodies绑定Laya.Sprite [ 83%]

...画布,使用 WebGL 渲染,不支持时会自动切换为 Canvas Laya.stage.alignV = 'top'; // 适配垂直对齐方式 Laya.stage.alignH = 'middle'; // 适配水平对齐方式 Laya.stage.screenMode = this.Stage.SCREEN_HORIZONTAL; // 始终以横屏展示 Laya.stage.scaleMode = "fixedwidth"; //...

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