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

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

1421. 场景切换问题 [ 82%]

场景切换问题 场景切换   this.removeSelf(); gamewbz.removeSelf(); hallwbz = hallwbz || new HallViewwbz(); Laya.stage.addChild(hallwbz);   这样写 有没有问题,,,用这样的方式写  ,我切换 了 3个页面  ,然后发现这3个页面都还存在,,这样是不是...

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

1422. Uint8Array的像素数据在ios中无法改变图片纹理,安卓正常 [ 82%]

...,赋给另一张 代码如下: private _testSetPixels() { let data = this.test1.texture.getPixels(0, 0, this.test1.width, this.test1.height); let width = this.test1.width; let height = data.length / 4 / width; let tex2d = new Laya.Texture2D(width, height, 1); tex2d.setPixels(data); this.imgAr.te...

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

1423. HttpRequest详解(JavaScript-LayaAir基础篇(JS)-数据与通信) [ 82%]

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

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

1424. 生成的粒子特效怎么设置colorComponentInter无效? [ 82%]

...nentInter无效? function UILetterBox(letter, width) { UILetterBox.super(this); letter = letter; this.loadImage('res/jiezou/wenzi2.png'); Laya.loader.load("res/parts/qipao.part", Handler.create(this, onAssetsLoaded), null, Loader.JSON); } function onAssetsLoaded(settings) { settings.colorComponent...

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

1425. png使用base64显示异常 [ 82%]

...在显示正常了。 __proto.parseImgForBuffer = function(url,data){ var _this = this; var image; var onload = function () { // image.onload = null; // image.onerror = null; // var data = Laya.Texture2D._parse(image); // data._url = "sdfasf" // _this.onLoaded(data); img=HTMLImage.create(image.width...

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

1426. 一个场景,两个线形碰撞体,出错 [ 82%]

...   _setShape(false);             }             this.label = (this.label || "ChainCollider");             return super.getDef();         }   改成这样既可 2018-11-19 0 0 分享 微博 QZONE 微信 Laya_Aaron 赞同来自: 下个版本修复,   ...

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

1427. 请问怎么把arraybuffer作为图片显示出来 [ 82%]

...神帮忙 let xhr = new Laya.HttpRequest(); xhr.once(Laya.Event.COMPLETE, this, this.completeHandler); xhr.once(Laya.Event.ERROR, this, this.errorHandler); xhr.send("https://ask.layabox.com/static ... ot%3B, "", "get", "arraybuffer"); private completeHandler(data: ArrayBuffer) { //请问怎么把...

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

1428. LayaBox用Matter.js时无法清理显示对象 [ 82%]

LayaBox用Matter.js时无法清理显示对象 使用this.Matter.World.remove(this.engine.world,BodyA);时可以同时清除刚体和显示对面 但是使用this.Matter.World.clear(this.engine.world);清理整个场景时,只有刚体被清除了 显示对象还在 2018-10-25 添加评论 免费...

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

1429. 重写X Y在android studio里运行会变成00 [ 82%]

... XSprite extends Sprite 3 new出这个对象 将对象addChild到TestUI里 this.addChild(xSprite); 4 然后设置xSprite.x = 100; xSprite.y = 200; 5 然后再XSprite这个类里将XY复写比如 public set x(val: number) { this._x = val; } public get x(): number { return this._x; } public set y(val:...

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

1430. 求教 JS项目的Promise如何使用 [ 82%]

.../初始化舞台 Laya.init(1334, 750); //需要切换的图片资源路径 this.monkey2 = "res/img/monkey2.png"; //设置舞台背景色 Laya.stage.bgColor = "#ffffff"; //先加载图片资源,在图片资源加载成功后,通过回调方法绘制图片并添加到舞台 Laya.loader.load(this.m...

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