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

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

1. Sprite-切换纹理 [ 100%]

...效。(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_示例 发布时间: 20241118

2. 加载-单一类型资源加载 [ 98%]

...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_示例 发布时间: 20241118

3. 滤镜-发光滤镜 [ 96%]

...Laya.Sprite; var Stage = Laya.Stage; var GlowFilter = Laya.GlowFilter; var Texture = Laya.Texture; var Browser = Laya.Browser; var Handler = Laya.Handler; var WebGL = Laya.WebGL; var apePath = "../../res/apes/monkey2.png"; var ape; (function() { // 不支持WebGL时自动切换至Canvas Laya.init(Br...

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

4. 加载-错误处理和进度 [ 95%]

...效。(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_示例 发布时间: 20241118

5. 材质-PBRStandard材质 [ 95%]

...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_示例 发布时间: 20241118

6. 加载-加载序列 [ 95%]

...开发语言、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_示例 发布时间: 20241118

7. 加载-多种类型资源加载 [ 95%]

...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_示例 发布时间: 20241118

8. 鼠标交互-拖动 [ 94%]

... = Laya.Stage; var Event = Laya.Event; var Rectangle = Laya.Rectangle; var Texture = Laya.Texture; var Browser = Laya.Browser; var Handler = Laya.Handler; var WebGL = Laya.WebGL; var ApePath = "../../res/apes/monkey2.png"; var ape, dragRegion; (function() { // 不支持WebGL时自动切换至Canvas ...

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

9. 鼠标交互-Hold [ 93%]

... Sprite = Laya.Sprite; var Stage = Laya.Stage; var Event = Laya.Event; var Texture = Laya.Texture; var Browser = Laya.Browser; var Ease = Laya.Ease; var Handler = Laya.Handler; var Tween = Laya.Tween; var WebGL = Laya.WebGL; const HOLD_TRIGGER_TIME = 1000; const apePath = "../../res/apes/monkey2.png...

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

10. 射线检测-选取物体 [ 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_示例 发布时间: 20241118