大约有 2,026 项符合查询结果, 库内数据总量为 30,897 项。 (搜索耗时: 0.0065 秒)
Laya_社区(1419) Laya2.0_文档(233) Laya_示例(141) Laya2.0_示例(117) Laya3.0_api(61) Laya3.0_文档(42) Laya2.0_api(7) laya_api(6)
...n{ private tMap:TiledMap; constructor() { Laya.init(935, 224, Laya.WebGL); this.tMap = new TiledMap(); var viewRect: Laya.Rectangle = new Laya.Rectangle(0, 0, Laya.stage.width, Laya.stage.height); this.tMap.createMap("res/mario_map/new_map2.json", viewRect, Laya.Handler.create(this,this.initMap)); }...
来源: Laya_社区 发布时间: 20190214
...er.png", "res/ui/vslider$bar.png"); Laya.loader.load(skins, Handler.create(this, this.onLoadComplete)); } onLoadComplete() { this.placeHSlider(); this.placeVSlider(); } placeHSlider() { const HSlider = Laya.HSlider, Handler = Laya.Handler; let hs = new HSlider("res/ui/hslider.png"); Laya.stage.addCh...
来源: Laya2.0_示例 发布时间: 20250219
...aya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; this.showApe(); } showApe() { this.ape = new Laya.Sprite(); Laya.stage.addChild(this.ape); this.ape.loadImage("res/apes/monkey2.png"); this.ape.pivot(55, 72); // this.ape.pos( Laya.stage.width / 2, Laya.stage.height / 2); thi...
来源: Laya2.0_示例 发布时间: 20250219
...话只水平居中没有垂直居中。 调试的时候,在Layout.layout(this),跳进去 在Layout._multiLineLayout(element)里面的updatePos(0,tWidth,i,tY,align,valign,lineHeight)函数里对元素根据对齐方式重新设置坐标。这里面感觉对垂直居中的y坐标的计算方式...
来源: Laya_社区 发布时间: 20180104
...= Laya.Image; var WID = 373, HEI = 85; function Item() { Item.__super.call(this); this.size(WID, HEI); this.img = new Image(); this.addChild(this.img); this.setImg = function(src) { this.img.skin = src; } } Laya.class(Item, "Item", Box); // 主要逻辑代码 var Stage = Laya.Stage; var List = Laya....
来源: Laya2.0_文档 发布时间: 20210714
...ya.stage.bgColor = "#232628"; Laya.loader.load(AniConfPath, Handler.create(this, createAnimation), null, Loader.ATLAS); })(); function createAnimation() { var ani = new Animation(); ani.loadAtlas(AniConfPath); // 加载图集动画 ani.interval = 30; // 设置播放间隔(单位:毫秒) ani.in...
来源: Laya_示例 发布时间: 20250219
...Laya.Vector3(-1.0, -1.0, -1.0)); directionLight.transform.worldMatrix=mat; this.sprite3D = scene.addChild(new Laya.Sprite3D()) as Laya.Sprite3D; //正方体 var box = this.sprite3D.addChild(new Laya.MeshSprite3D(Laya.PrimitiveMesh.createPlane())) as Laya.MeshSprite3D; this.box = box; box.transform.p...
来源: Laya_社区 发布时间: 20220815
...发语言、LayaAirIDE让项目开发更高效。Laya3D.init(0, 0, true); this.rotation = new Laya.Vector3(0, 0.01, 0); Laya.stage.scaleMode = Laya.Stage.SCALE_FULL; Laya.stage.screenMode = Laya.Stage.SCREEN_NONE; Laya.Stat.show(); var scene = Laya.stage.addChild(new Laya.Scene()); var camera = (sce...
来源: Laya_示例 发布时间: 20250219
... = laya.d3.math.Quaternion; /* 用法: //初始化照相机 var camera = this.newScene.addChild(new Laya.Camera(0, 0.1, 100)) as Laya.Camera; camera.transform.rotationEuler = new Laya.Vector3(-32, -75, 0); camera.transform.position =new Laya.Vector3(-8.2, 5.3, 2.2); var modelViewer = camera.addCom...
来源: Laya_社区 发布时间: 20170714
...= Laya.SpineTemplet; class SpineBinary { constructor() { this.aniPath = "res/powerup-pro.skel"; this.index = -1; // Laya.init(Browser.width, Browser.height, WebGL); // Laya.stage.scaleMode = Stage.SCALE_NOSCALE; // Laya.stage.bgColor ...
来源: Laya_社区 发布时间: 20211013