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

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

561. 请大家帮助优化一下这个抛物线的代码 [ 69%]

...dy:Laya.Sprite; constructor(){ super(); this.init(); } public init():void{ if(!Ball.cached){ Ball.cached = true; this.body = new Laya.Sprite(); this.body.loadImage("war/ball.png"); this.body.pivot(12,12); } this.addChild(this.body); Laya.timer.frameLoop(1,this,this.animate); } private animate(e):voi...

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

562. 微信小游戏播放音效无法连续反复播放 [ 69%]

...秒播放 2018-08-17 0 0 分享 微博 QZONE 微信  赞同来自:   if (!MiniSound._musicAudio)MiniSound._musicAudio=MiniSound._createSound();       tSound=MiniSound._musicAudio;       }else {     /*  if(MiniSound._audioCache[this.readyUrl]){         tSound=MiniSound....

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

563. Byte writeArrayBuffer的Bug [ 69%]

...);         (length===void 0)&& (length=0);         if (offset < 0 || length < 0)throw "writeArrayBuffer error - Out of bounds";         if (length==0)length=arraybuffer.byteLength-offset;         this.ensureWrite(this._pos_+length);         var u...

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

564. 基于Cannon.js的物理系统(ActionScript-3D基础(AS3)-LayaAir3D之物理系统) [ 69%]

...itResult对象的succeeded属性中会存储本次射线检测是否成功 if(out.succeeded) { //获取射线检测到的精灵对象 var selectSprite3D:MeshSprite3D = out.collider.owner as MeshSprite3D; (selectSprite3D.meshRenderer.sharedMaterial as BlinnPhongMaterial).albedoColor = this.colorRed; ...

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

565. 电脑上跟手机上运行不一样(手机上判断是进不去的,但我打印出来是满足条件的,必现) [ 69%]

...判断是进不去的,但我打印出来是满足条件的,必现) if(this._view && this._tableInfo.hasOwnProperty('players'))             {                 let data = this._tableInfo;                 alert(param.players[0].uid +' '+App.uid +...

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

566. LocalStorage的bug [ 69%]

...'laya', '1');Storage.removeItem('laya');Storage.support = true;} catch(e){}if(!Storage.support)console.log('LocalStorage is not supprot or browser is private mode.')"); }   改成 public static function init():void { __JS__("try{Storage.items=window.localStorage;Storage.setItem('laya', '1');Storage...

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

567. LayaAir编译器错之for_in [ 69%]

...              var t:Texture = null;                 if(Loader.loadedMap[i] is Texture)                 {                     t=Loader.loadedMap[i];                     t.destroy();                 }               ...

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

568. 关于大量图片加载绘制后的内存暴增的疑问 [ 69%]

...同的image chageTexture(); //如果texture有值,进行绘制并排序 if(texture) { sp.graphics.drawTexture(texture,(num-1)*70,Math.floor((num-1)/10)*70+10); } } private function chageTexture():void { //如果图片的张数超出100,将不再执行 if(num>=100) { Laya.timer.clear(this,onLo...

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

569. 陀螺仪接口无效呢?Gyroscope.instance.on(Event.CHANGE, this, onOrientationChange); 什么原因呢 [ 69%]

...this, onOrientationChange); function onOrientationChange(absolute, info) { if (info.alpha === null) { addLog("当前设备不支持陀螺仪。"); return; } else if (firstTime && !absolute && !Browser.onIOS) { firstTime = false; addLog("在当前设备中无法获取地球坐标系...

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

570. 2.0.2发布的提取本地包不支持相对路径 [ 69%]

...   // 筛选4M包 gulp.task("packfile", ["version2"], function() {     if (config.version) {         // 从release目录取得带有版本号的目录         let tempPackfile = `${workSpaceDir}/.laya/configTemp.json`;         let releasePackfile = `${releaseDir}/configTemp.json`;   ...

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