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

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

1321. 同一类型光源互斥的问题报告 [ 67%]

...模型赋材质 plane.meshRender.material = material2; Laya.timer.loop(10, this, loopfun); function loopfun() { if(!camera || !box){ return; } camera.transform.lookAt(box.transform.position, new Laya.Vector3(0, 1, 0), false); } })(); 纹理图片:     附件 : --> 2018-01-03 添加评论 免费...

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

1322. Laya.loader.clearTextureRes引起的内存泄露以及恢复图片显示闪烁 [ 67%]

...都有这个bug。 代码如下:             Laya.loader.load(this.skPath.replace(".atlas",".png"),Laya.Handler.create(this,function(bit){                 var arr = Laya.Loader.getAtlas(this.skPath);                 arr.forEach(resUrl=>{          ...

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

1323. 屏幕适配-自动竖屏 [ 67%]

....stage.screenMode = Stage.SCREEN_VERTICAL; Laya.stage.bgColor = "#232628"; this.showText(); } showText() { const Text = Laya.Text; let text = new Text(); text.text = "Orientation-Portrait"; text.color = "gray"; text.font = "Impact"; text.fontSize = 50; text.x = Laya.stage.width - text.width >> 1; te...

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

1324. 屏幕适配-自动横屏 [ 67%]

...tage.screenMode = Stage.SCREEN_HORIZONTAL; Laya.stage.bgColor = "#232628"; this.showText(); } showText() { const Text = Laya.Text; let text = new Text(); text.text = "Orientation-Landscape"; text.color = "gray"; text.font = "Impact"; text.fontSize = 50; text.x = Laya.stage.width - text.width >> 1; t...

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

1325. Sprite-绘制各种形状 [ 67%]

...aya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; this.drawSomething(); } drawSomething() { let sp = new Laya.Sprite(); Laya.stage.addChild(sp); //画线 sp.graphics.drawLine(10, 58, 146, 58, "#ff0000", 3); //画连续直线 sp.graphics.drawLines(176, 58, [0, 0, 39, -50, 78,...

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

1326. swf预加载问题 [ 67%]

...ets.push(QUAN); assets.push(RUNBIN); assets.push(YUAN); mc.on(Event.LOADED,this,load); } public function load(e:* = null):void{ if(assets.length > 0){ mc.load(assets.shift()); }else{ onAssetsLoaded(); } } private function onAssetsLoaded(e:*=null):void { this.event(BEFORLOADERFINISH); } } } 2016-1...

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

1327. 没有预加载的图片怎么获取width和height ? [ 67%]

...ets/comp/image.png","../laya/assets/comp/vscroll.png"],Laya.Handler.create(this,onAssetLoad));      } function onAssetLoad() {      older = new Laya.Sprite();      older.loadImage("../laya/assets/comp/image.png");     Laya.stage.addChild(older);     console.log(older.scaleX,older.s...

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

1328. 排坑:Laya.HttpRequest()无效 [ 67%]

... xhr.http.timeout = 10000;//设置超时时间; xhr.once(Event.COMPLETE, this, completeHandler); xhr.once(Event.ERROR, this, errorHandler); xhr.on(Event.PROGRESS, this, processHandler); xhr.send("http://www.baidu.com", "", "get", "text"); function processHandler(data) { console.log(data); } functi...

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

1329. 文本-字数限制 [ 67%]

...aya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; this.createInput(); } createInput() { const Input = Laya.Input; let inputText = new Input(); Laya.stage.addChild(inputText); inputText.size(350, 100); inputText.x = Laya.stage.width - inputText.width >> 1; inputText.y = Laya....

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

1330. 使用laya官方示例代码制作微信小游戏无法显示 [ 67%]

...aya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; this.setup(); } private setup(): void { this.createLabel("#FFFFFF", null).pos(30, 50); this.createLabel("#00FFFF", null).pos(290, 50); this.createLabel("#FFFF00", "#FFFFFF").pos(30, 100); this.createLabel("#000000", "#FFFFFF"...

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