大约有 872 项符合查询结果, 库内数据总量为 31,722 项。 (搜索耗时: 0.0101 秒)
Laya_社区(613) Laya2.0_文档(114) Laya3.0_api(47) laya_api(29) Laya_示例(24) Laya2.0_api(24) Laya3.0_文档(21)
...ines /**注册宏函数**/ public static function __init__(){ CustomTerrainMaterial.shaderDefines = new Laya.ShaderDefines(Laya.BaseMaterial.shaderDefines); //注册宏定义 CustomTerrainMaterial.SHADERDEFINE_DETAIL_NUM1 = CustomTerrainMaterial.shaderDefines.registerDefine("CUSTOM_DETAIL_NUM1"); Cu...
来源: Laya2.0_文档 发布时间: 20210714
...加在2D节点上,如图2-3所示,以Sprite为例,将材质添加在Material属性上。 每一种2D组件都有Material属性。 (图2-3) 总结一下就是,Shader应用到材质上,材质再应用到2D节点上。 2.3 文件结构 在LayaAir引擎中,自定义一个.shader文件需...
来源: Laya3.0_文档 发布时间: 20251010
...re.Sprite3D; import laya.d3.core.light.DirectionLight; import laya.d3.core.material.StandardMaterial; import laya.d3.core.scene.Scene; import laya.d3.math.Quaternion; import laya.d3.math.Vector3; import laya.d3.math.Vector4; import laya.d3.resource.Texture2D; import laya.d3.resource.TextureCube; imp...
来源: Laya_示例 发布时间: 20260303
...ne.addChild(new Laya.MeshSprite3D(sphereMesh)); var mat = new Laya.StandardMaterial(); mat.albedo = new Laya.Vector4(1, 1, 1, 0.5); mat.renderMode = 5; sphereSprite3d.meshRender.material = mat; Laya.timer.frameLoop(1, this, checkHit); } var ray = new Laya.Ray(new Laya.Vector3(0, 0, 0), new Laya.Vect...
来源: Laya_示例 发布时间: 20260303
...的位置可以改变。 可以看到,纹理的位置出现了偏移。 Material:瓦片的材质。 Index:瓦片的索引。 2.5 创建备选瓦片 对于一个已经创建好的瓦片块,开发者可以将这个瓦片块创建一个备选瓦片: 备选瓦片有三个独有的属性: Fli...
来源: Laya3.0_文档 发布时间: 20251010
... extends Laya.Script { //共享材质,用于合批 public batchMat: Laya.Material; //颜色数目 private _colorNums = 20; //精灵数目 private _spriteNums = 200; private _createColorBufferData() { //随机给20个颜色值 let colorBuffer = new Float32Array(20 * 4); for (var i = 0; i < this....
来源: Laya3.0_文档 发布时间: 20251010
...ya.d3.core.MeshSprite3D; import laya.d3.core.Sprite3D; import laya.d3.core.material.StandardMaterial; import laya.d3.core.scene.Scene; import laya.d3.math.Quaternion; import laya.d3.math.Vector3; import laya.d3.math.Vector4; import laya.d3.resource.Texture2D; import laya.d3.resource.TextureCube; imp...
来源: Laya_示例 发布时间: 20260303
...以如何设置,让他每次滑动,只能固定的值。 Laya3D里的material可以设置flat shading么 关于同为object层,层级设置无效的问题 将list里的scrollBar设置mouseWheelEnable=false后过一段时间设置mouseWheelEnable=true;无法滚动 设置pivot后,精灵位置...
来源: Laya_社区 发布时间: 20190531
...hild(new Laya.Glitter()); var glitterTemplet = glitter.templet; var glitterMaterial = glitter.glitterRender.sharedMaterial; glitterMaterial.diffuseTexture = Laya.Texture2D.load("../../res/threeDimen/layabox.png"); glitterMaterial.albedo = new Laya.Vector4(1.3, 1.3, 1.3, 1); glitterTemplet.lifeTime =...
来源: Laya_示例 发布时间: 20260303
.../ console.log(t); } } private onCallBack(){ var mater = new Laya.BlinnPhongMaterial(); //new Laya.UnlitMaterial(); //Laya.BlinnPhongMaterial(); // const x2 = new Uint8Array(data); // let p = new window['PNG'](x2); // let getData = p.decode(); let texture:Laya.Texture2D = new Laya.Texture2D(544,960);...
来源: Laya_社区 发布时间: 20220815