大约有 175 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0044 秒)
...lt; } 最后,在LayaExtInit函数中,导出初始化功能,使得JavaScript代码可以调用这些原生功能。 extern "C" { LAYAEXTAPI void LayaExtInit(jsvm_env env, jsvm_value exp) { ... // 注册Steam初始化函数 jsvm_value fnInitSteam; jsvm_create_function(env, "initializeSteam", SIZ...
来源: Laya3.0_文档 发布时间: 20251010
...时也不通过 代码: export default class Index extends Laya.Script { /* @prop {name: speed, tips: "速度", type: Number, default: 10} */ constructor() { super(); } onAwake() { console.log("场景渲染完...
来源: Laya_社区 发布时间: 20191227
... protobufjs-cli工具有pbjs和pbts这两个指令,分别用于生成JavaScript 库文件.js和TypeScript 声明文件.d.ts。由于指令参数较多,通常会配置在项目中,直接调用快捷指令即可。 示例代码如下: "scripts": { "pbjs": "pbjs -t static-module -w commonjs -o ...
来源: Laya3.0_文档 发布时间: 20251010
...08* [Cannon.js](https://github.com/schteppe/cannon.js) :完全使用 JavaScript 编写的优秀 3D 物理引擎,包含简单的碰撞检测、各种形状的摩擦力、弹力、约束等功能。在LayaAir 2.7.0beta中,完成了对其基本功能的支持,并逐步在后续的版本中完...
来源: Laya2.0_文档 发布时间: 20210714
...代码: const { regClass, property } = Laya; @regClass() export class NewScript extends Laya.Script { @property({ type: Laya.ViewStack }) public viewstack: Laya.ViewStack; @property({ type: Laya.Tab }) public tab: Laya.Tab; //组件被激活后执行,此时所有节点和组件均已创建完毕...
来源: Laya3.0_文档 发布时间: 20251010
... { regClass, property } = Laya; @regClass() export class Main extends Laya.Script { // 设置单例 static instance: Main; constructor() { super(); Main.instance = this; } @property({type:Laya.Sprite3D}) private target: Laya.Sprite3D; @property({type:Laya.UI3D}) private ui3d: Laya.UI3D; public anima...
来源: Laya3.0_文档 发布时间: 20251010
...果等 /**古文脚本 */ export default class TextAncient extends Laya.Script { /** @prop {name:text, tips:"显示文本", type:String, default:"hello world"}*/ public text: string = "hello world"; /** @prop {name:color, tips:"字符串类型示例", type:String, default:"#0000ff"}*/ public color...
来源: Laya_社区 发布时间: 20191103
...gClass, property } = Laya; @regClass() export class UI_Dialog extends Laya.Script { private DIALOG_WIDTH: number = 220; private DIALOG_HEIGHT: number = 275; private CLOSE_BTN_WIDTH: number = 43; private CLOSE_BTN_PADDING: number = 5; private assets: any[]; private dialog: Laya.Dialog; constructor() ...
来源: Laya3.0_文档 发布时间: 20230303
... { regClass, property } = Laya; @regClass() export class Main extends Laya.Script { onStart() { console.log("Game start"); } } 2.2 场景的脚本说明 前面讲了项目的入口, 本小节简述一下场景的脚本。场景的脚本主要是两类, 一类是自定义的组件脚本。这种...
来源: Laya3.0_文档 发布时间: 20251103
...archKey":"Dialog", "props":{"width":1624,"sceneColor":"#000000","runtime":"script/view/dialogs/SettingDialog.js","height":750}, "nodeParent":-1, "maxID":4, "label":"Dialog", "isOpen":true, "isDirectory":true, "isAniNode":true, "hasChild":true, "compId":2, "child":[ { "x":15, "type":"Image", "searchK...
来源: Laya_社区 发布时间: 20200417