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

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

421. 如何实现类似AS3下的BitmapData.draw去截取区域图片? [ 52%]

...:void         {             var texture:Texture=Laya.loader.getRes("walk.png");             //计算好UV,创建新的texture             var texEnd:Texture=Texture.create(texture,240,248,120,118);             //将新的texture放置到display容器下,...

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

422. Laya.loader.load 加载场景报错 [ 52%]

... 模型url, Laya.Handler.create(this, function(){ this.scene = Laya.loader.getRes(模型url); Laya.stage.addChild(this.scene); }),null, null, 1, true, "scene1"); 执行后,浏览器报 : laya.core.js:13290 Uncaught TypeError: node._setParent is not a function at Stage.__proto.addChild (laya.core...

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

423. 打包之后TEXT可以显示但是 加载其他资源时白屏 [ 52%]

...g(){ var s = new laya.display.Sprite(); s.graphics.drawTexture(Laya.loader.getRes("../res/image/bg.png"),0,0);  Laya.stage.addChild(s); } 新建一个工程 這样写打包之后会白屏 2018-08-08 0 8 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 要回复问题请先登录 ...

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

424. 怎么清理掉 Sprite3D 相关的缓存资源, 资源destroy后内存还下降、。 [ 52%]

... null){ for each (var url:String in arr) { var item:Resource = Laya.loader.getRes(url); if(item != null){ item.destroy(); item = null; } } Loader.clearResByGroup(groupName); } }

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

425. 我来改代码! [ 52%]

...时你也可以通过修改代码来添加保护:var data:*; data=Loader.getRes(_url); if (!data) { event(Event.ERROR,"file not find"); return; } //保护修改-----start------------------ var atlasData:Object = Loader.getAtlas(_atlasPath); if(!atlasData) { event(Event.ERROR,"file not find"); retu...

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

426. 请问一下,怎么将下面这段AS3代码翻译成LayaAir的API [ 52%]

...onLoaded)) } private function onLoaded():void { var texture:Texture=Loader.getRes('res/apes/monkey2.png'); var sp:Sprite=new Sprite(); var matrix:Matrix=new Matrix(); matrix.rotate(Math.PI/4); matrix.translate(150,100); sp.graphics.drawTexture(texture,0,0,texture.width,texture.height,matrix); sp.gra...

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

427. TypeError: Cannot read properties of null (reading '_$id') [ 52%]

...fined错误 laya2.6.0打apk和小游戏都会报_InPool为null Load.loader.getRes返回都是Null 莫名其妙的报错,this.getStyle()是null Error processing "launch": Error: 找不到文件: null 请设置文件配置文件属性runtimeExecutable 求助大佬,同一个spine动画播放偶尔...

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

428. PBR标准材质实时阴影渲染问题 [ 52%]

... super(); //初始化引擎 Laya3D.init(0, 0); var scene_360 = Laya.loader.getRes("LayaScene_PUCHENG3D/Conventional/PUCHENG3D.ls") as Laya.Scene3D; Laya.stage.addChildAt(scene_360, 0); var camera = (scene_360 as Laya.Node).getChildByName('Main Camera') as Laya.Camera; // var camera = new Laya.Camera...

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

429. 求问sprite放大后,graphics绘制的图像位置偏移 [ 52%]

...let sprite: Sprite = new Sprite(); let texture: Laya.Texture = Laya.loader.getRes(this.skin_img1); sprite.graphics.drawTexture(texture, 0, 0, texture.width, texture.height); sprite.size(texture.width, texture.height); let x: number = 300; let y: number = 100; let scaleRatio: number = 1.3; sprite.pos...

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

430. [LayaAir3]3D场景里面鼠标感应区域 3.2.1跟3.3不同 [ 52%]

...his, null, null, false)).then(() => { this.spRole.texture = Laya.loader.getRes("RenderTexture.rendertexture"); //设置纹理的宽高为舞台大小,这样才不会拉伸变形 this.spRole.texture.sourceWidth = Laya.stage.width; this.spRole.texture.sourceHeight = Laya.stage.height; //添加2D...

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