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

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

771. 场景环境反射(JavaScript-3D基础(JS)-LayaAir3D之场景渲染配置) [ 80%]

...01.lm", Laya.Handler.create(null, function(mesh) { teapot = scene.addChild(new Laya.MeshSprite3D(mesh)); teapot.transform.position = new Laya.Vector3(0, 1.75, 2); teapot.transform.rotate(new Laya.Vector3(-90, 0, 0), false, false); })); //实例PBR材质 var pbrMat = new Laya.PBRStandardMaterial(); /...

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

772. Sprite-切换纹理 [ 80%]

...etRes(monkey1Str), monkey2Res = Laya.loader.getRes(monkey2Str); this.ape = new Laya.Sprite(); Laya.stage.addChild(this.ape); this.ape.pivot(55, 72); this.ape.pos(Laya.stage.width / 2, Laya.stage.height / 2); this.switchTexture(); this.ape.on(Laya.Event.CLICK, this, this.switchTexture); } switchTextu...

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

773. 怎么设置3D相机,模型的绝对值 [ 80%]

怎么设置3D相机,模型的绝对值 this.camera.transform.position = new Laya.Vector3(0, 10, 40); this.camera.transform.translate(new Laya.Vector3(0, 10, 40)); this.camera.transform.rotate(new Laya.Vector3(0, 10, 0), true, false); 做一个按钮,专门切换到90度的视图上,怎么设置相...

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

774. 向TiledMap中的对象层中的矩形框添加精灵,不显示 [ 79%]

...叠 要回复问题请先登录 发起人 spooner 相关问题 两个对象new了一个相同的对象,调用第一个的一个方法,走进了第二方法里 请问LayaAir中如何使图片以圆形的方式显示? 安装layaAirIDE2 ,跟着官网敲hello world 例子,为什么不显示?...

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

775. 如何给Sprite的graphics绘制的线条添加发光滤镜? [ 79%]

...链接 提交 1 个回复 cuixueying 赞同来自: bluesky var sp:Sprite=new Sprite(); sp.graphics.drawLine(0,0,200,200,"#FFFFFF",5); Laya.stage.addChild(sp); sp.filters=[new GlowFilter("#FF0000",10,10,10)];1、发光滤镜只能再webGL模式下使用 2、滤镜只支持赋值给显示对象,grap...

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

776. layaAir2.3克隆以及获取节点重大bug!!! [ 79%]

...s("res/my_res/guns_test.lh");          let a :Laya.Sprite3D = new Laya.Sprite3D();         a.addChild(guns_test.getChildAt(0).clone());         a.transform.translate(new Laya.Vector3(0,1.38,-60))//transform.localPositionX-=2;         a.transform.scale = new ...

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

777. texture可以加载一个canvas吗 [ 79%]

...; share.fillStyle="#0000ff"; share.fillRect(20,20,150,100); var _texture = new Laya.Texture(sharedCanvas); var sp2 = new Laya.Sprite(); sp2.x = 300; sp2.graphics.drawTexture(_texture,0,0,100,100); Laya.stage.addChild(sp2);   文档说好像可以 报错了。 this.bitmap.activeResource is not a fun...

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

778. BackGround.super(this);这个报错 Cannot read property 'call' of undefined [ 79%]

...var shouye=(function(){ (function shouye(){ Laya.init(100,300); this.bgimg=new BackGround(); Laya.stage.addChild(this.bgimg); })(); return shouye; })(); var BackGround = (function (_super) { function BackGround() { BackGround.super(this); this.bg=new Laya.sprite; this.bg.loaImage("war/beijing.png"...

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

779. 关于从网络异步加载图片的问题 [ 79%]

...-1-0   在官网上这个示例 《二进制图片》中 var byte:Byte = new Byte(data);//Byte数组接收arraybufferbyte.writeArrayBuffer(data,4);//从第四个字节开始读取数据var blob:Object = new Browser.window.Blob([byte.buffer], { type: "image/png" });var url:String = Browser.window.U...

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

780. 请问如何在Sprite上显示文本 [ 79%]

... 2018-03-22 15:47 放了 但是显示的时候报错了 我是var text = new text();然后 sprit.addChild(text);但是报错了 Prajna • 2018-03-22 15:48 Error processing "variables": TypeError: Cannot read property 'length' of undefined Prajna • 2018-03-22 15:55 可以了 用new Laya....

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