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

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

31. 执行回调函数时报is not a function [ 83%]

执行回调函数时报is not a function 解压缩laya_game.rar,双击打开laya_game\hgameStarter\bin\h5目录下的index.html,待浏览器打开后,打开开发者工具查看:    Main.as里把getRolesBack函数作为回调函数传给SocketProxy.as setRoleCall,但是回调回来执...

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

32. 微信小游戏怎么引入DOMParser? [ 83%]

...arser? 以下是laya.wxmini.js中的代码 MiniAdpter.parseXMLFromString=function(value){ var rst; var Parser; value=value.replace(/>\s+</g,'><'); try { /*__JS__ */rst=(new window.Parser.DOMParser()).parseFromString(value,'text/xml'); }catch (error){ throw "需要引入xml解析库文...

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

33. 请问在2.0版本的js中,如何获取mouse_move的鼠标坐标 [ 83%]

...arget=[object Object] game.js:116 target=[object Object] game.js:116 setTo=function (type,currentTarget,target){ this.type=type; this.currentTarget=currentTarget; this.target=target; return this; } game.js:116 stopPropagation=function (){ this._stoped=true; } */ } 2018-10-31 添加评论 免费帖 -...

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

34. "Background is not defined"怎么会没定义呢???求救 [ 83%]

...0 0 分享 微博 QZONE 微信 cuixueying 赞同来自: Game.jsvar Game = (function(){ (function Game(){ Laya.init(600,800); this.bg = new window.Background(); Laya.stage.addChild(this.bg); })(); })();Background.js var Background = (function(_super){ function Background(){ Background.super(this); th...

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

35. android下layabox调用Laya.Texture2D.load报错 [ 81%]

...============================   代码调用: D3Helper.getMaterialByName = function (name) { if (undefined == D3Helper.materialDic[name]) { var material = new Laya.StandardMaterial(); D3Helper.materialDic[name] = material; [b]var testTexture = Laya.Texture2D.load(name);[/b] material.diffuseTexture =...

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

36. 加载UI为什么总是加载白底 [ 81%]

加载UI为什么总是加载白底 var LayaSample = (function(){ (function(){ //初始化引擎 Laya.init(750,1334); //设置stage颜色s Laya.stage.bgColor = "#ffffff"; //加载资源 Laya.loader.load("res/atlas/comp.json",Laya.Handler.create(this,onLoaded),null,Laya.Loader.ATLAS) })(); function ...

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

37. LayaNative中加载自己缓存的资源 [ 81%]

...功了,但是用Laya.loader.load 读取的时候始终读不了private function downloadFile(url:String,onComplete:Handler,onError:Handler=null):void{ if(window.conch) { var folder:String=window.conch.getCachePath()+"/download/"; if (!window.fs_exists(folder)) { window.fs_mkdir(folder); } var file...

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

38. TypeError: Failed to execute 'texImage2D' on 'WebGLRenderingContext' [ 81%]

...dScriptError Failed to execute 'texImage2D' on 'WebGLRenderingContext': No function was found that matched the signature provided. TypeError: Failed to execute 'texImage2D' on 'WebGLRenderingContext': No function was found that matched the signature provided. at TextureCube.__proto._createWebGlTextu...

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

39. WebSocket发送与接收数据(ActionScript-LayaAir基础篇(AS3)-数据与通信) [ 81%]

...blic class Game { private var socket:Socket; private var byte:Byte; public function Game() { //初始化引擎 Laya.init(600, 400,WebGL);// this.byte = new Byte(); this.byte.endian = Byte.LITTLE_ENDIAN;//这里我们采用小端; this.socket = new Socket(); this.socket.endian = Byte.LITTLE_ENDIAN;...

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

40. 关于Matter的初始化问题 [ 80%]

... } }); LayaRender.run(render); 代码是官方的。 以下这段是源码 function createContainer(render) { var con = render.container; spriteCon = new Laya.Sprite(); graphicsCon = new Laya.Sprite(); render.spriteContainer = spriteCon; render.graphicsContainer = graphicsCon; con.addChild(spriteCon...

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