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

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

121. Steam扩展实例 · LayaAir3.3 · 引擎文档 · LAYABOX [ 57%]

...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

122. prop 识别不到 [ 57%]

...时也不通过   代码: export default class Index extends Laya.Script {     /* @prop {name: speed, tips: "速度", type: Number, default: 10} */      constructor() {         super();     }      onAwake() {         console.log("场景渲染完...

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

123. ProtocolBuffer通信 · LayaAir3.3 · 引擎文档 · LAYABOX [ 57%]

... protobufjs-cli工具有pbjs和pbts这两个指令,分别用于生成JavaScript 库文件.js和TypeScript 声明文件.d.ts。由于指令参数较多,通常会配置在项目中,直接调用快捷指令即可。 示例代码如下: "scripts": { "pbjs": "pbjs -t static-module -w commonjs -o ...

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

124. 基于Cannon.js的物理系统(ActionScript-3D基础(AS3)-LayaAir3D之物理系统) [ 57%]

...08* [Cannon.js](https://github.com/schteppe/cannon.js) :完全使用 JavaScript 编写的优秀 3D 物理引擎,包含简单的碰撞检测、各种形状的摩擦力、弹力、约束等功能。在LayaAir 2.7.0beta中,完成了对其基本功能的支持,并逐步在后续的版本中完...

来源: Laya2.0_文档 发布时间: 20210714

125. 导航容器组件 · LayaAir3.3 · 引擎文档 · LAYABOX [ 55%]

...代码: 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

126. 使用3D UI · LayaAir3.3 · 引擎文档 · LAYABOX [ 55%]

... { 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

127. 类似古文显示方式脚本,文字垂直显示,可以控制显示速度出现打字效果等 [ 55%]

...果等  /**古文脚本 */ 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

128. UI弹窗 · LayaAir3.0文档 · LAYABOX [ 55%]

...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

129. 项目入口说明 · LayaAir3.3 · 引擎文档 · LAYABOX [ 54%]

... { regClass, property } = Laya; @regClass() export class Main extends Laya.Script { onStart() { console.log("Game start"); } } 2.2 场景的脚本说明 前面讲了项目的入口, 本小节简述一下场景的脚本。场景的脚本主要是两类, 一类是自定义的组件脚本。这种...

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

130. Dialog 第一次打开总是出现在窗口右下角,这是为啥,再打开就正常剧中了? [ 54%]

...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