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

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

1701. Matter.js创建好的刚体怎么改变位置? [ 78%]

...变他的位置,刚体就乱跑,我改变了他的位置这样写的 this.realBall.position= { x: this.initX, y: this.initY }; 能改变是能改变,按道理他应该他回到initXY位置后,然后继续落下啊。 为什么会乱跑?而且值越来越大,直到卡死。 附件 : --> P...

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

1702. 使用Pool的时候创建的对象怎么传递参数 [ 78%]

...用Pool的时候创建的对象怎么传递参数 我之前是这样写的this.movingBlock = new MovingBlock(this.direction, movingBlockY), 但是这样每次都是new对象,太耗性能了,所以我用了这个,但是不知道怎么传递参数: this.movingBlock = Laya.Pool.getItemByClass...

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

1703. 排坑:Laya.HttpRequest()无效 [ 78%]

... 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

1704. 加载成功要怎样判断呢? [ 78%]

...a.loader.load(url, onLoaded, ...) 还是Laya.loader.on(Event.COMPLETE, this, onLoaded); 加载失败都会到onLoaded,那怎么区分是不是加载成功? 2017-03-25 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 2 ...

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

1705. PBRStandardMaterial材质详解(ActionScript-3D基础(AS3)-模型材质详解) [ 78%]

...R Barrel/Materials/Textures/Barrel_AlbedoTransparency.png', Handler.create(this, function(texture:Texture2D):void { mat.albedoTexture = texture; })); //法线贴图 Texture2D.load('res/threeDimen/scene/PBRMaterialScene/Assets/PBR Barrel/Materials/Textures/Barrel_Normal.png', Handler.create(this, fun...

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

1706. Sprite-显示图片 [ 78%]

...drawTexture Laya.loader.load("../../res/apes/monkey2.png", Handler.create(this, function() { var t = Laya.loader.getRes("../../res/apes/monkey2.png"); var ape = new Sprite(); ape.graphics.drawTexture(t, 0, 0); Laya.stage.addChild(ape); ape.pos(200, 0); })); } })();module laya { import Sprite = Laya....

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

1707. 播放声音出错,求指教 [ 78%]

...function playbgm() { SoundManager.playMusic("comp/bgm.mp3", 1, new Handler(this, bgmComplete)); } function bgmComplete() { console.log("播放完成"); }   附件 : --> 2018-03-06 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提...

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

1708. 请问如何加载base64的图片 [ 78%]

...45050878 赞同来自: __proto.uploaderHandler=function (files) { var self=this; var file=files[0]; var reader=new FileReader(); reader.onload=function () { this.headIcon.loadImage(this.result); } reader.readAsDataURL(file); } 是这样显示的吗?我的为何也不显示,通过html的input上...

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

1709. Steam扩展实例 · LayaAir3.3 · 引擎文档 · LAYABOX [ 78%]

...perty({type: Laya.Button}) public initBtn: Laya.Button; onEnable(): void { this.initBtn.on(Laya.Event.CLICK, this.onInit); } onInit() { alert(extendLib.initializeSteam()); } } 构建发布Windows后,需要在exe的同级目录下,新建一个steam_appid.txt 文件,其中只包含 AppID。 (...

来源: Laya3.0_文档 发布时间: 20251010

1710. [求助]无法使用loader预先加载 [ 78%]

...o.png", "res/mainpage/BtnYes.png" ]; Laya.loader.load(urls, Handler.create(this, onAssetLoaded), Handler.create(this, onLoading, null, false), Loader.TEXT); Laya.loader.on(Event.ERROR, this, onError);   private function onAssetLoaded(texture:Texture):void{             //console.log("111...

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