大约有 6,598 项符合查询结果, 库内数据总量为 31,722 项。 (搜索耗时: 0.0144 秒)
Laya_社区(5247) Laya3.0_api(482) Laya2.0_文档(363) Laya_示例(154) Laya2.0_示例(116) Laya3.0_文档(105) Laya2.0_api(67) laya_api(64)
...。 > 开启并且修改多光源渲染参数 ```typescript var config = new Laya.Config3D(); //开启多光源 config.enbaleMultiLight = true; //设置最大光源数 config.maxLightCount = 16; Laya3D.init(750, 1334, config); ``` > 关闭多光源渲染 ```typescript var config = new Laya.Config3D(...
来源: Laya2.0_文档 发布时间: 20210715
...。 > 开启并且修改多光源渲染参数 ```typescript var config = new Laya.Config3D(); //开启多光源 config.enbaleMultiLight = true; //设置最大光源数 config.maxLightCount = 16; Laya3D.init(750, 1334, config); ``` > 关闭多光源渲染 ```typescript var config = new Laya.Config3D(...
来源: Laya2.0_文档 发布时间: 20210715
...ene = null Laya.Scene.setLoadingPage(null) } _load(url, progress) { return new Promise((resolve, reject) => { Laya.Scene.load(url, Laya.Handler.create(this, function (scene) { // setLoadingPage为null 是为了避免引擎加载完场景自动关闭loadingPage Laya.Scene.setLoadingPage(null) reso...
来源: Laya_社区 发布时间: 20181124
...要知道。 1. 使用getBounds/ getGraphicBounds。 ```typescript var sp=new Laya.Sprite(); sp.graphics.drawRect(0,0,100,100,"#FF0000"); var bounds:Laya.Rectangle=sp.getGraphicBounds(); Laya.stage.addChild(sp); ``` getBounds可以满足多数多数需求,但由于其需要计算边界,不适合...
来源: Laya2.0_文档 发布时间: 20210714
...一个红色的文本和一个灰色的文本let t1 = Laya.stage.addChild(new Laya.Label);t1.text = "aaaa";t1.color = "#ff0000";let t2 = Laya.stage.addChild(new Laya.Label);t2.text = "bbb";t2.color = "#ff0000";t2.y = 100;t2.disabled = true 步骤二:复制下面代码继续在浏览器控制台...
来源: Laya_社区 发布时间: 20240117
...olor = "#232628"; this.setup(); } private setup(): void { var list: List = new List(); list.itemRender = Item; list.repeatX = 1; list.repeatY = 4; list.x = (Laya.stage.width - Item.WID) / 2; list.y = (Laya.stage.height - Item.HEI * list.repeatY) / 2; // 使用但隐藏滚动条 list.vScrollBarSkin =...
来源: Laya2.0_文档 发布时间: 20210715
... void { var texture:Texture = Laya.loader.getRes("start/sg.png"); var sp = new Laya.Sprite(); sp.graphics.drawTexture(texture,0,0); Laya.stage.addChild(sp); var ani: Laya.Animation = new Laya.Animation(); ani.loadAtlas("res/start.json"); // 加载图集动画 ani.interval = 30; // 设置播放间隔...
来源: Laya_社区 发布时间: 20170329
...lass main{ constructor(){ Laya.init(600,400); console.log(common.num); } } new main(); 这里面访问了另外一个文件common.ts中定义的类: class common{ constructor(){ } public static num : number = 1000000; } 然后启动调试,居然报了这个错: Uncaught ReferenceError: com...
来源: Laya_社区 发布时间: 20180208
...tEnable = true; this.imgList.array = listArr; this.imgList.renderHandler = new Laya.Handler(this, this.onRender); this.imgList.selectHandler = new Laya.Handler(this, this.onSelect); } onSelect(index) { this.reqImage.skin = listArr[index].img.skin; if (defaultImgs[this.reqImage.skin]) { this.reqImage...
来源: Laya_社区 发布时间: 20190318
...我要这样去测,假定有游戏类Game()里的init函数里 hero1 = new Hero1; hero2 = new Hero2; 分别对其调用他们的skill();(一个1.5s后触发,一个3s后触发) 语法上几乎是和开始的连续调用相同,但是结果是:触发了两次,且是正确的时间触...
来源: Laya_社区 发布时间: 20161216