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

大约有 27 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0039 秒)

11. playSound和playMusic结束时候有异常抛出 [ 72%]

...是否需要关注? Demo代码(已测试有效):  // 程序入口 class GameMain {     constructor()     {         Laya.init(640,1100, Laya.WebGL);         //设置适配模式         Laya.stage.scaleMode = "showall";         //设置剧中对齐         Laya.stage....

来源: Laya_社区 发布时间: 20170105

12. Laya2.0编译后所有js都自动合并到bundle.js中,导致bundle.js过大,加载速度很慢,bundle.js可以拆分吗 [ 70%]

...lization": true,  /* Enable strict checking of property initialization in classes. */     // "noImplicitThis": true,                /* Raise error on 'this' expressions with an implied 'any' type. */     // "alwaysStrict": true,                  /* Parse in strict mode and emit...

来源: Laya_社区 发布时间: 20190408

13. laya.utils.Browser [ 68%]

API DocumentationAll Packages | All Classes | Index | Frames No Frames BrowserProperties | Methods Packagelaya.utilsClasspublic class BrowserInheritanceBrowser Object Browser 是浏览器代理类。封装浏览器及原生 js 提供的一些功能。 Public Properties PropertyDefined By ...

来源: Laya2.0_api 发布时间: 20190513

14. Cannot read property 'load' of null [ 66%]

...Laya.loader是null,为什么会出现为null的情况?  代码如下: class main{ constructor(){ MapManager.getInstance().LoadMapResource(); } } new main(); class MapManager { private static s_instance = null; public static getInstance():MapManager { if(null==this.s_instance) { this.s_instance=...

来源: Laya_社区 发布时间: 20171124

15. laya.utils.Browser [ 64%]

API DocumentationAll Packages | All Classes | Index | Frames No Frames BrowserProperties | Methods Packagelaya.utilsClasspublic class BrowserInheritanceBrowser Object Browser 是浏览器代理类。封装浏览器及原生 js 提供的一些功能。 Public Properties PropertyDefined By ...

来源: laya_api 发布时间: 20170929

16. 压缩纹理 · LayaAir3.3 · 引擎文档 · LAYABOX [ 54%]

...。以给Image组件添加皮肤为例,示例代码如下: const { regClass, property } = Laya; @regClass() export class Main extends Laya.Script { onAwake(): void { let img = new Laya.Image; Laya.stage.addChild(img); img.pos(500,100); img.skin = "resources/layabox.png"; //纹理压缩的图片...

来源: Laya3.0_文档 发布时间: 20251010

17. socket大型项目回调 [ 53%]

...型项目回调 /** * 创建时间 2017/04/16 */ module PomeloLaya{ export class Pomelo{ static DEBUG:boolean = true; static EVENT_IO_ERROR:string = "io-error"; static EVENT_CLOSE:string = "close"; static EVENT_KICK:string = "onKick"; static EVENT_HEART_BEAT_TIMEOUT:string = 'heartbeat timeout'; pri...

来源: Laya_社区 发布时间: 20180119

18. Windows扩展 · LayaAir3.3 · 引擎文档 · LAYABOX [ 52%]

...Main.ts中添加代码: import { testLib } from "./TestLib"; const { regClass, property } = Laya; @regClass() export class Main extends Laya.Script { onStart() { alert(testLib.nativeAdd(10, 11)); } } 因为LayaNative的扩展功能只支持Windows平台,所以只能通过Windows预览或发布...

来源: Laya3.0_文档 发布时间: 20251010

19. 和原生Dom交互 · LayaAir3.3 · 引擎文档 · LAYABOX [ 49%]

...载到自己的项目中或者服务器中。 下面是主类的逻辑: class LayaUISample { constructor() { //初始化引擎 Laya.init(0,0); var Hls:any = Laya.Browser.window.Hls;//获取对Hls的引用。 var plyr:any = Laya.Browser.window.plyr;//获取对plyr的引用 //获取video对象,就...

来源: Laya3.0_文档 发布时间: 20251010

20. HTML文本 · LayaAir3.0文档 · LAYABOX [ 49%]

...;<p>p</p><img src='res/boy.png'></img>"; */ export class HTMLDivElement extends Sprite { 下面我们通过一些示例代码来看看运行效果: 3.1 同一个文本中设置Bold、Font、FontSize、Color、下划线 【注意:目前不支持斜体、描边、span标签...

来源: Laya3.0_文档 发布时间: 20230303