大约有 12 项符合查询结果, 库内数据总量为 30,778 项。 (搜索耗时: 0.0021 秒)
...exture) { // 使用texture } function onAssetLoaded2() { var pic1 = Loader.getRes("../../res/apes/monkey0.png"); var pic2 = Loader.getRes("../../res/apes/monkey1.png"); var pic3 = Loader.getRes("../../res/apes/monkey2.png"); // 使用资源 } })();module laya { import Loader = Laya.Loader; import Te...
来源: Laya_示例 发布时间: 20241118
...onAssetsLoaded)); })(); function onAssetsLoaded() { var robotData = Loader.getRes(ROBOT_DATA_PATH); var robotTexture = Loader.getRes(ROBOT_TEXTURE_PATH); // 使用资源 } })();module laya { import Loader = Laya.Loader; import Handler = Laya.Handler; export class Loader_MultipleType { private ROBOT_...
来源: Laya_示例 发布时间: 20241118
...ssetsLoaded)); } init(); function onAssetsLoaded() { var tTexture = Loader.getRes(mTexturePath); var arraybuffer = Loader.getRes(mAniPath); mFactory = new Templet(); mFactory.on(Event.COMPLETE, this, parseComplete); mFactory.parseData(tTexture, arraybuffer, 10); } function parseComplete() { for (var...
来源: Laya_示例 发布时间: 20241118
...s/apes/monkey2.png", Handler.create(this, function() { var t = Laya.loader.getRes("../../res/apes/monkey2.png"); var ape = new Sprite(); ape.graphics.drawTexture(t, 0, 0); Laya.stage.addChild(ape); ape.pos(200, 0); })); } })();module laya { import Sprite = Laya.Sprite; import Stage = Laya.Stage; imp...
来源: Laya_示例 发布时间: 20241118
...() { ape = new Sprite(); ape.loadImage(apePath); var texture = Laya.loader.getRes(apePath); ape.x = (Laya.stage.width - texture.width) / 2; ape.y = (Laya.stage.height - texture.height) / 2; Laya.stage.addChild(ape); } function applayFilter() { //创建一个发光滤镜 var glowFilter = new GlowFilt...
来源: Laya_示例 发布时间: 20241118
...reLoaded)); })(); function onTextureLoaded() { maggotTexture = Laya.loader.getRes(texturePath); initMaggots(); Laya.timer.frameLoop(1, this, animate); } function initMaggots() { var maggotContainer; for (var i = 0; i wb.x + wb.width) x -= wb.width; if (y wb.y + wb.height) y -= wb.height; maggot.pos(...
来源: Laya_示例 发布时间: 20241118
... texture2; // 更换纹理 ape.graphics.clear(); var texture = Laya.loader.getRes(textureUrl); ape.graphics.drawTexture(texture, 0, 0); // 设置交互区域 ape.size(texture.width, texture.height); } })();module laya { import Sprite = Laya.Sprite; import Stage = Laya.Stage; import Texture = Laya.Te...
来源: Laya_示例 发布时间: 20241118
...pe.loadImage(ApePath); Laya.stage.addChild(ape); var texture = Laya.loader.getRes(ApePath); ape.pivot(texture.width / 2, texture.height / 2); ape.x = Laya.stage.width / 2; ape.y = Laya.stage.height / 2; ape.on(Event.MOUSE_DOWN, this, onStartDrag); } function showDragRegion() { //拖动限制区域 v...
来源: Laya_示例 发布时间: 20241118
...域模型隐藏 meshSprite3D.active = false; var heightMap = Laya.Loader.getRes("../../res/threeDimen/scene/TerrainScene/Assets/HeightMap.png"); //初始化MeshTerrainSprite3D this.terrainSprite = Laya.MeshTerrainSprite3D.createFromMeshAndHeightMap(meshSprite3D.meshFilter.sharedMesh, heightMap, 6.57...
来源: Laya_示例 发布时间: 20241118
...猩 ape = new Sprite(); ape.loadImage(apePath); var texture = Laya.loader.getRes(apePath); ape.pivot(texture.width / 2, texture.height / 2); ape.pos(Laya.stage.width / 2, Laya.stage.height / 2); ape.scale(0.8, 0.8); Laya.stage.addChild(ape); // 鼠标交互 ape.on(Event.MOUSE_DOWN, this, onApePress)...
来源: Laya_示例 发布时间: 20241118