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

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

431. 加载.lh文件 运行后黑屏 无法显示 [ 90%]

...Mode = Laya.Stage.SCREEN_NONE;         Laya.Stat.show();     //var resource = [{url: "res/threeDimen/skinModel/LayaMonkey/LayaMonkey.lh", type: Laya3D.HIERARCHY, priority: 1}];     //Laya.loader.create(resource, Laya.Handler.create(this, this.onComplete));         Laya.loader...

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

432. 3D阴影无法渲染出来 [ 90%]

3D阴影无法渲染出来 //添加方向光 var directionLight = scene.addChild(new Laya.DirectionLight()); directionLight.color = new Laya.Vector3(0.6, 0.6, 0.6); directionLight.direction = new Laya.Vector3(1, -1, 0); directionLight.shadow = true; directionLight.shadowDistance = 3; directionLight...

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

433. sprite.loadImage加载图片怎么设置要显示的x,y坐标和宽高? [ 90%]

...nstructor() { Laya.init(935, 224, Laya.WebGL); this.tMap = new TiledMap(); var viewRect: Laya.Rectangle = new Laya.Rectangle(0, 0, Laya.stage.width, Laya.stage.height); this.tMap.createMap("res/mario_map/new_map2.json", viewRect, Laya.Handler.create(this,this.initMap)); } private initMap(): void { v...

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

434. 为何发生此类报错Uncaught TypeError: Cannot read property '_tf' of null [ 90%]

...相关的链接 提交 6 个回复 melody0529 赞同来自: (function(){ var Stage=Laya.Stage; var WebGL=Laya.WebGL; var config=Config; (function(){ console.log("运行程序。"); Laya.init(1280,720,WebGL); //设置适配模式 Laya.stage.alignH=Stage.ALIGN_CENTER; Laya.stage.alignV=Stage.ALIGN_MID...

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

435. list功能改变图片皮肤 [ 90%]

...第一个list的第一张图片换成我想要的话,要怎么换? for(var q:Number=0;q<130;q++){ var first:Object= new Object(); //first.lbl =Math.floor(Math.random()*3+1) ; if(q == 1) { var cc:*=_tempFruitUi.panel; var dd:List=aa.getChildByName("firstList") as List; var itemB:Box = dd.getCe...

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

436. 2.0版本 ios浏览器旋转,会导致适配出现问题,无法旋转回来 [ 90%]

...QZONE 微信 Laya_Aaron 赞同来自: 先用题主的临时替代方案   var windowInnerWidth=false; var windowOnWidth=true; var isIos=true; window.top.onresize = function () { var u = navigator.userAgent; if (u.indexOf('Android') > -1 || u.indexOf('Linux') > -1) { isIos=false; }else if(!!u....

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

437. 骨骼动画-Spine事件 [ 90%]

... } this.mArmature.play(this.mCurrIndex,false); } private onEvent(e):void { var tEventData:EventData = e as EventData; Laya.stage.addChild(this.mLabelSprite); this.mLabelSprite.x = this.mStartX; this.mLabelSprite.y = this.mStartY; this.mLabelSprite.graphics.clear(); this.mLabelSprite.graphics.fillTex...

来源: Laya2.0_示例 发布时间: 20240930

438. 关于Pivot和Mask联合使用时的显示问题再次提交 [ 90%]

...例-2D-Sprite-遮罩-放大镜示例改为如下: (function() {     var Sprite = Laya.Sprite;     var Stage = Laya.Stage;     var Browser = Laya.Browser;     var Handler = Laya.Handler;     var WebGL = Laya.WebGL;     var maskSp;     var bg2;     (function()     {    ...

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

439. Sprite-新手引导 [ 90%]

...age.alignV = Stage.ALIGN_MIDDLE; //绘制一个蓝色方块,不被抠图 var gameContainer:Sprite = new Sprite(); gameContainer.loadImage("res/guide/crazy_snowball.png"); Laya.stage.addChild(gameContainer); // 引导所在容器 this.guideContainer = new Sprite(); // 设置容器为画布缓存 th...

来源: Laya2.0_示例 发布时间: 20240930

440. 分享:Sprite 转换成3D贴图(Texture2D)的方法,如果有更好的方法,请告诉我。 [ 90%]

...t/javascript"> function convertCanvasToImage(canvas,callback,thisObj) { var image = new Image(); image.onload = function() { console.log("图片已经加载"); callback(image,thisObj) }; console.log("图片加载中...") image.src = canvas.toDataURL("image/png"); return image; } </script>2....

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