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

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

151. PC端web应用开发,想把生成的canvas放进一个div中并调整在页面上的位置,请给出一个方案。 [ 66%]

...on: absolute;  left: 0px;  top: 0px;  background: rgb(255, 255, 255);  transform-origin: 0px 0px 0px;  transform: matrix(0.8, 0, 0, 0.8, 0, 0);   但我想把该canvas放进一个div中,然后把div在页面上调整位置。该怎么弄?   我试过把position改成static或relative,...

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

152. 要让2DUI跟随3D物件,比如说敌人头上有血条。请问要怎么做? [ 66%]

...同来自: let out = window.app.fcUtil.worldToViewportPoint(this.owner.transform.position, window.GameMag.Camera1); this.hpNode.x = out.x - this.hpNode.width / 2 this.hpNode.y = out.y + this.hpNode.height *3.5 //this.owner.transform 3d的物体 //this.hpNode 2d的ui   //3d坐标转2d...

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

153. Effect材质详解(JavaScript-3D基础(JS)-模型材质详解) [ 66%]

....addChild(new Laya.MeshSprite3D(Laya.PrimitiveMesh.createSphere())); earth.transform.position = new Laya.Vector3(0, 0, 0); //创建EffectMaterial材质 var material = new Laya.EffectMaterial(); //加载地球贴图 Laya.Texture2D.load("res/threeDimen/texture/earth.png", Laya.Handler.create(this, fun...

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

154. 碰撞检测 outHitInfo.distance 一直等于 -1 ?(TS代码) [ 66%]

...er.getChildByName("girl1") as Laya.Sprite3D; //模型缩放 this.roleModel.transform.localScale = new Laya.Vector3(0.8,0.8,0.8); //获取角色动画组件 this.roleAni = this.roleModel.getComponentByType(Laya.Animator) as Laya.Animator; //动画完成事件监听 this.roleAni.on(Laya.Event.COMPLETE...

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

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

...mera = new Laya.Camera(0, 0.1, 100); // scene_360.addChild(camera); camera.transform.rotationEuler = new Laya.Vector3(-32, -75, 0); camera.transform.position = new Laya.Vector3(-8.2, 5.3, 2.2); var modelViewer = camera.addComponent(ModelViewer); modelViewer.AroundPos = Laya.Vector3._ZERO; var direct...

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

156. 自定义shader-地形shader [ 66%]

....ls")); var camera = scene.addChild(new Laya.Camera(0, 0.1, 1000)); camera.transform.rotate(new Laya.Vector3(-38, 180, 0), false, false); camera.transform.translate(new Laya.Vector3(-5, 20, -30), false); camera.addComponent(CameraMoveScript); scene.once(Laya.Event.HIERARCHY_LOADED, this, function ()...

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

157. 3D灯光与阴影 · LayaAir3.0文档 · LAYABOX [ 66%]

... 0.5, 0.0, 1); //设置点光源的范围 pointCom.range = 3.0; pointLight.transform.position = new Laya.Vector3(0.0, 1, 0.0); 三、DirectionLight Direction Light(平行光)与点光区别较大,它有固定的一个方向,可通过弧度值设定,并且也没有衰减和光照范围,...

来源: Laya3.0_文档 发布时间: 20240624

158. Effect材质详解(TypeScript-3D基础(TS)-模型材质详解) [ 66%]

...shSprite3D(Laya.PrimitiveMesh.createSphere())) as Laya.MeshSprite3D; earth.transform.position = new Laya.Vector3(0, 0, 0); //创建EffectMaterial材质 var material = new Laya.EffectMaterial(); //加载地球贴图 Laya.Texture2D.load("res/threeDimen/texture/earth.png", Laya.Handler.create(this, fun...

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

159. 导出的3D资源加载报错 [ 66%]

...; //加载到场景 scene.addChild(camera); //旋转摄像机角度 camera.transform.rotate(new Vector3( -25, 0, 0), false, false); //移动摄像机位置 camera.transform.position=new Vector3(0, 5, 10); //加入摄像机移动控制脚本 //camera.addComponent(CameraMoveScript); //添加蒙皮动...

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

160. PointLight介绍(JavaScript-3D基础(JS)-LayaAir3D之灯光) [ 66%]

...= new Laya.Vector3(1.0, 0.5, 0.0); //设置点光源位置 this.pointLight.transform.position = new Laya.Vector3(0.4, 0.4, 0.0); //设置点光源的范围 this.pointLight.range = 3.0; ``` **range** 为设置点光源的范围,相当于点光的照射范围,数值越大,光照范围越大。 ...

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