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

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

1. 材质-PBRStandard材质 [ 100%]

...CLEARFLAG_SKY; var skyBox = new Laya.SkyBox(); camera.sky = skyBox; skyBox.textureCube = Laya.TextureCube.load("../../res/threeDimen/skyBox/skyBox1/skyCube.ltc"); //实例PBR材质 var mat = new Laya.PBRStandardMaterial(); //反射贴图 mat.albedoTexture = Laya.Texture2D.load('../../res/threeDimen/...

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

2. 加载-加载序列 [ 98%]

...开发语言、LayaAirIDE让项目开发更高效。(function() { var Texture = Laya.Texture; var Handler = Laya.Handler; var numLoaded = 0; var resAmount = 3; (function() { Laya.init(500, 400); // 按序列加载 monkey2.png - monkey1.png - monkey0.png // 不开启缓存 // 关闭并发加载 La...

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

3. 加载-单一类型资源加载 [ 97%]

...rIDE让项目开发更高效。(function() { var Loader = Laya.Loader; var Texture = Laya.Texture; var Handler = Laya.Handler; (function() { Laya.init(550, 400); // 加载一张png类型资源 Laya.loader.load("../../res/apes/monkey0.png", Handler.create(this, onAssetLoaded1)); // 加载多张png类...

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

4. 材质-物理基础渲染材质 [ 96%]

...RFLAG_SKY; var skyDome = new Laya.SkyDome(); camera.sky = skyDome; skyDome.texture = Laya.Texture2D.load(envpath + envinfoobj.skytex); skyDome.environmentSpecular = Laya.DataTexture2D.load(envpath + envinfoobj.prefiltedEnv); var irrdMat = new Float32Array(envinfoobj.IrradianceMat); skyDome.envDiffus...

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

5. 射线检测-选取物体 [ 93%]

... 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, 0.9, 1); plane.meshRender.material = planeMat; var boxCollider = plane.addComponent(Laya.BoxCollider); bo...

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

6. 自定义shader-边缘光照shader [ 92%]

...() { var customMaterial1 = new CustomMaterial(); customMaterial1.setDiffuseTexture(Laya.Texture2D.load("../../res/threeDimen/skinModel/dude/Assets/dude/head.png")); customMaterial1.setMarginalColor(new Laya.Vector3(1, 0.7, 0)); var customMaterial2 = new CustomMaterial(); customMaterial2.setDiffuseTe...

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

7. 自定义shader-地形shader [ 91%]

... customMaterial = new CustomTerrainMaterial(); customMaterial.setSplatAlphaTexture(Laya.Texture2D.load("../../res/threeDimen/scene/terrain/terrain/splatalpha 0.png")); customMaterial.setLightMapTexture(Laya.Texture2D.load("../../res/threeDimen/scene/terrain/Assets/Scenes/Level/XunLongShi/Lightmap-0_...

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

8. 加载-多种类型资源加载 [ 91%]

...ler; var ROBOT_DATA_PATH = "../../res/skeleton/robot/robot.bin"; var ROBOT_TEXTURE_PATH = "../../res/skeleton/robot/texture.png"; (function() { Laya.init(100, 100); var assets = []; assets.push( { url: ROBOT_DATA_PATH, type: Loader.BUFFER }); assets.push( { url: ROBOT_TEXTURE_PATH, type: Loader.IMAG...

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

9. 加载-错误处理和进度 [ 91%]

...效。(function() { var Event = Laya.Event; var Loader = Laya.Loader; var Texture = Laya.Texture; var Handler = Laya.Handler; (function() { Laya.init(550, 400); // 无加载失败重试 Laya.loader.retryNum = 0; var urls = ["do not exist", "../../res/fighter/fighter.png", "../../res/legend/map.jpg"]...

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

10. Sprite-切换纹理 [ 90%]

...效。(function() { var Sprite = Laya.Sprite; var Stage = Laya.Stage; var Texture = Laya.Texture; var Browser = Laya.Browser; var Handler = Laya.Handler; var WebGL = Laya.WebGL; var texture1 = "../../res/apes/monkey2.png"; var texture2 = "../../res/apes/monkey3.png"; var flag = false; var ape; (func...

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