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

大约有 3,979 项符合查询结果, 库内数据总量为 30,903 项。 (搜索耗时: 0.0075 秒)

861. socket连续发送消息导致无法写出 [ 83%]

...消息导致无法写出 public function send(cmd:int , req:Object):void { var json:String = JSON.stringify(req); var data:ByteArray = new ByteArray(); data.writeUTFBytes(json); data.compress(); var obj:Object = {}; var headByte:ByteArray = new ByteArray(); writeHeader(obj, headByte); _socket.output...

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

862. 关于protobuf反序化的问题,求大神解答~~~ [ 83%]

...k  { required string uid = 1; required string token = 2; } js的代码: var proto = this.ProtoBuf.loadProtoFile("user_login.proto"); var Build = proto.build("user_login_pack"); var login = new Build(); login.uid = '100001'; login.token = "xxxxx"; var buffer = login.toArrayBuffer() this.socket.se...

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

863. 骨骼释放纹理 Templet.TEMPLET_DICTIONARY[this.url] url用错了导致Templet删不掉 [ 83%]

...estroy=function(){         this._isDestroyed=true;         var tTexture;         var $each_tTexture;         /*for each*/for($each_tTexture in this.subTextureDic){             tTexture=this.subTextureDic[$each_tTexture];             if(tTexture...

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

864. 怎么获取手机相册内容 [ 83%]

...c function Main() { //初始化引擎 Laya.init(500,500);//初始化引擎 var skins:Array = [ "res/button-1.png" ]; Laya.loader.load(skins, Handler.create(this, onUIAssetsLoaded)); } public function onUIAssetsLoaded():void { var btn:Button = new Button("res/button-1.png"); Laya.stage.addChild(btn);...

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

865. Sprite3D添加组件或脚本(TypeScript-3D基础(TS)-LayaAir3D之精灵) [ 83%]

...L; Laya.stage.screenMode = Laya.Stage.SCREEN_NONE; //预加载所有资源 var resource:Array = ["res/threeDimen/skinModel/LayaMonkey/LayaMonkey.lh"]; Laya.loader.create(resource, Laya.Handler.create(this, this.onComplete)); } onComplete(){ //记载场景 var scene = Laya.stage.addChild(new Laya.Sce...

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

866. 屏幕适配-缩放-Show All [ 83%]

...ipt三种开发语言、LayaAirIDE让项目开发更高效。(function() { var Sprite = Laya.Sprite; var Stage = Laya.Stage; var rect; (function() { Laya.init(550, 400); Laya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; createCantralRect(); })(); function createCantralRect(...

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

867. 屏幕适配-缩放-Extract Fit [ 83%]

...ipt三种开发语言、LayaAirIDE让项目开发更高效。(function() { var Sprite = Laya.Sprite; var Stage = Laya.Stage; var rect; (function() { Laya.init(550, 400); Laya.stage.scaleMode = Stage.SCALE_EXACTFIT; Laya.stage.bgColor = "#232628"; createCantralRect(); })(); function createCantralRect...

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

868. rigidBody.applyForce 物体不会移动 [ 83%]

...台上 this.scene = scene; Laya.stage.addChild(scene); //添加方向光 var directionlight: Laya.DirectionLight = scene.getChildByName( "Directional Light" ) as Laya.DirectionLight; this.directionlight = directionlight; //加入子層人物腳色到舞台 var littleGirl: Laya.Sprite3D = scene.getCh...

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

869. 求问:西文字体下半部分被遮挡,怎么处理? [ 83%]

...on 赞同来自: class TextRender getFontSizeInfo 函数,最后部分    var xoff:int = Math.max( orix - pixelBBX[0], 0);    var yoff:int = Math.max( oriy - pixelBBX[1], 0);    var bbxw:int = pixelBBX[2] - pixelBBX[0];    var bbxh:int = pixelBBX[3] - pixelBBX[1]+1; 原来没有+1,如果不...

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

870. 为啥我克隆的对象,动画会相互影响 [ 83%]

...象,动画会相互影响 _shou是一个网格模型; ///自己的手 var myClone:MeshSprite3D = _shou.clone();                 var myAmn:SkinAnimations = myClone.addComponent(SkinAnimations) as SkinAnimations;                 myAmn.templet = AnimationTemplet.load( "3d/sh...

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