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

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

41. 自定义页面基类的时候,会自动添加Laya命名空间导致报错 [ 49%]

...毅 赞同来自: 可以再LayaAir.d.ts的(例如我自己的BaseView) declare module Laya{//在这个module里添加     class BaseView extends Scene{}//继承自Scene }里加上自己定义的页面,然后在编辑页面F9的Code导入类里写上引用和赋值   import BaseView from "...

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

42. 使用layaide进行打包,提示如下错误。 [ 49%]

使用layaide进行打包,提示如下错误。 Block-scoped declarations (let, const, function, class) not yet supported outside strict mode   网上搜索答案,有的说是因为在tsconfig中,将target调整成了es6就不可以运行了,但是我的代码使用了一些es6的特性,...

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

43. 升级到3.0-beta6无法选择资源了 [ 49%]

...如下: @regClass() export class NewScript extends Laya.Script {     //declare owner : Laya.Sprite3D;      @property(String)     public text: string = "";      @property(Laya.Image)     public image: Laya.Image = null;      constructor() {         super();     } } 附件 : -->...

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

44. 引用第三方Js库一直失败,无法解析 [ 49%]

...5311 关注: 3 人 懒货 • 2021-06-16 14:39 是把d.ts里的export改成declare吗,好神奇~为什么这样修改就好了,而github提供的别的ts使用却是export。不太理解 kura • 2021-06-17 17:46 @懒货:因为你已经从index.html导入过了 两种方式都可以用的 看需...

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

45. 关于TS环境下的第三方库导入的疑问 [ 47%]

...  删掉 这样就和Laya库的格式比较像 只是多了个命名空间declare namespace autobahn { export class Session { id: number; realm: string; isOpen: boolean; features: any; ..................................然后在ts文件中 new autobahn.引用华丽丽的出现了   如果谁有更...

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

46. 打开新窗口被拦截,同样的方法用egret和其他h5工程都没有问题 [ 47%]

...看下么 kvs1205 • 2018-03-21 13:59 这里是 laya里面的点击事件 declare function goToNewWindow(url):void; { var url:string = "http://www.baidu.com"; goToNewWindow(url); } 这是index.html的js方法 <script> function goToNewWindow(payurl) { var a = $("<a href='&quo...

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

47. typeScript Java互调问题 [ 46%]

...("js to java");     js2java.back(); } //程序入口 new LayaUISample(); declare var js2java : any;   ————————————————————————————————   错误 05-17 11:33:53.949: E/LayaBox(31963): =====alert=js to java05-17 11:33:54.029: I/MonkVG(...

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

48. 开放数据域组件 · LayaAir3.3 · 引擎文档 · LAYABOX [ 45%]

...perty } = Laya; @regClass() export class NewScript extends Laya.Script { //declare owner : Laya.Sprite3D; constructor() { super(); } /** * 组件被激活后执行,此时所有节点和组件均已创建完毕,此方法只执行一次 */ onAwake(): void { let opendata = new Laya.OpenDataContextV...

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

49. 2D方向光 · LayaAir3.3 · 引擎文档 · LAYABOX [ 45%]

...regClass } = Laya; @regClass() export class DayNight extends Laya.Script { declare owner: Laya.Sprite; private lightComp: Laya.DirectionLight2D; private dayTime: number = 0; private dayDuration: number = 24; // 一个完整周期的秒数 private displayText: Laya.Text; // 文本显示当前时间 o...

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

50. 多行输入文本组件 · LayaAir3.3 · 引擎文档 · LAYABOX [ 45%]

...} = Laya; @regClass() export class TextAreaControl extends Laya.Script { //declare owner : Laya.Sprite3D; @property( { type : Laya.TextArea } ) public txtarea: Laya.TextArea; constructor() { super(); } /** * 组件被激活后执行,此时所有节点和组件均已创建完毕,此方法只执...

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