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

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

171. 一直很奇怪laya为啥不能改图片混颜色,必须通过滤镜来做 [ 62%]

...颜色上面就行。其实就是所谓的顶点色。因为默认所有的sprite都带这个数据,不会影响batch 现在laya实现的这个滤镜,功能确实是更强大,可以实现各种效果,本质是在fs里面将颜色乘以一个颜色矩阵,问题是这样做有两个缺点;...

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

172. 射线检测-放置物体 [ 62%]

... Laya.Vector3(1, -1, -1); //平面 var plane = scene.addChild(new Laya.MeshSprite3D(new Laya.PlaneMesh(6, 6, 10, 10))); var planeMat = new Laya.StandardMaterial(); planeMat.diffuseTexture = Laya.Texture2D.load("../../res/threeDimen/texture/layabox.png"); planeMat.albedo = new Laya.Vector4(0.9, 0.9, ...

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

173. LayaAir graphics透明度无效? [ 62%]

LayaAir graphics透明度无效? Sprite对象使用graphics画圆,然后获取Sprite的width,height属性,居然还是0,晕,这正常??? 还有啊,graphics.alpha(0.5)设置图形透明度无效哦。怎么回事? 查看了api是这样的啊。。 2016-10-26 添加评论 免费...

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

174. 关于要自定shader的同学 [ 62%]

...会出现极小的情况 可以使用 drawToCanvas从游戏中截屏当前sprite 的绘制 let new_texture = sprite.drawToCanvas(width, height, 0, 0) 这里的 width 和height 指的是当前的sprite在游戏中设置的大小 new_texture = ls.Texture.create(new_texture, 0, 0)   重新获取纹...

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

175. 一个关于getPixels的问题 [ 62%]

一个关于getPixels的问题 空工程中代码如下: Main.js: const Sprite = Laya.Sprite; const Text = Laya.Text; const Texture = Laya.Texture;  Laya.init(800, 600);  var txt = new Text(); txt.pos(200, 200); txt.color = "#FFFFFF"; txt.text = "000000"; Laya.stage.addChild(txt);  var spr = n...

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

176. 关于自定义Shader中使用 u_AmbientColor 这个Uniform变量的问题 [ 62%]

...答(最新版本:1.7.16) TS项目使用matter.js库无智能提示 sprite3d怎样使用Laya.Tween.to来做缓动呢?比如position或者scale Laya2.0 WebGl模式,使用 drawToCanvas 报错 ImageData is not defined? 使用3D时候,Property 'getComponentByType' does not exist on type 'Node...

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

177. 第一个hellolayabox就报错了,求助! [ 62%]

... 代码: package { /** * ... * @author xueyandy */ import flash.display.Sprite; import laya.display.Text; public class HelloLayabox extends Sprite { public function HelloLayabox() { trace("Hello,World"); //创建舞台,默认背景色是黑色的 Laya.init(600, 300); return; var txt:Text = new T...

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

178. 材质-BlinnPhong材质加载 [ 62%]

... new Laya.Vector3(1, -1, -1); var layaMonkey = scene.addChild(new Laya.MeshSprite3D(Laya.Mesh.load("../../res/threeDimen/skinModel/LayaMonkey/Assets/LayaMonkey/LayaMonkey-LayaMonkey.lm"))); //加载材质 layaMonkey.meshRender.material = Laya.StandardMaterial.load("../../res/threeDimen/skinModel/Lay...

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

179. 2D光遮挡器与阴影 · LayaAir3.3 · 引擎文档 · LAYABOX [ 62%]

...) export class LightOccluder extends Laya.Script { private spotLight: Laya.Sprite = new Laya.Sprite(); private background: Laya.Sprite = new Laya.Sprite(); private lightOccluder: Laya.Sprite = new Laya.Sprite(); private backgroundTexture: string = "resources/bg2.png"; //组件被启用后执行,...

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

180. 自定义3D Shader · LayaAir3.3 · 引擎文档 · LAYABOX [ 62%]

...属GLSL文件(高阶操作不推荐直接使用) u_WorldMat 世界矩阵 Sprite3DCommon.glsl u_ProjectionParams(near, far, invert, 1 / far) 投影参数 Camera.glsl u_Viewport(x, y, width, height) 视口 Camera.glsl u_CameraDirection 相机方向 Camera.glsl u_CameraUp 相机上朝向 Camera.glsl u_...

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