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

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

41. 字体切片组件 · LayaAir3.3 · 引擎文档 · LAYABOX [ 78%]

...。下面给出一个示例代码,实现脚本控制FontClip: const { regClass, property } = Laya; @regClass() export class NewScript extends Laya.Script { @property( { type : Laya.FontClip } ) public fontclp: Laya.FontClip; constructor() { super(); } // 组件被激活后执行,此时所有...

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

42. 命令行发布 · LayaAir3.3 · 引擎文档 · LAYABOX [ 77%]

...后台脚本执行结束后,后台进程会自动退出。 @IEditorEnv.regClass() class MyScript { static async buildWeb() { return IEditorEnv.BuildTask.start("web").waitForCompletion(); } } (图2-1) 下面给出各平台的发布脚本, @IEditorEnv.regClass() class MyScript { // 构建web s...

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

43. 显示文本组件 · LayaAir3.3 · 引擎文档 · LAYABOX [ 77%]

...中。下面给出一个示例代码,实现脚本控制Label: const { regClass, property } = Laya; @regClass() export class LabelControl extends Laya.Script { //declare owner : Laya.Sprite3D; @property( { type : Laya.Label } ) public lab: Laya.Label; constructor() { super(); } /** * 组件被激...

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

44. 获取位置信息 · LayaAir3.3 · 引擎文档 · LAYABOX [ 77%]

...添加如下代码,实现鼠标点击后,获取地理位置。 const { regClass, property } = Laya; @regClass() export class NewScript extends Laya.Script { constructor() { super(); } onMouseClick(evt: Laya.Event): void { // 尝试获取当前位置 Laya.Geolocation.getCurrentPosition( Laya.Hand...

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

45. 插件开发说明 · LayaAir3.3 · 引擎文档 · LAYABOX [ 76%]

...ript中使用本地能力 下面是一个推荐做法: //Script.ts @Laya.regClass() class Script extends Laya.Script { wantToUseNode() { EditorEnv.scene.runScript("TestSceneScript.visitNode"); } } //TestSceneScript.ts import fs from "fs"; //注意是IEditorEnv.regClass,不是Laya.regClass!! @IEd...

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

46. 动画节点 · LayaAir3.3 · 引擎文档 · LAYABOX [ 76%]

...”中用代码对Animation进行控制了,示例代码如下: const { regClass, property } = Laya; @regClass() export class Animation extends Laya.Script { //declare owner : Laya.Sprite3D; @property({ type: Laya.Animation }) //在IDE面板中显示属性 ani: Laya.Animation; constructor() { sup...

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

47. 萌新求问classUtils具体是做什么用的? [ 76%]

...s具体是做什么用的? 看到生成的空工程里有Laya.ClassUtils.regClass,一直没有搞明白这个类具体是做什么用的,如何使用。生成的示例工程有有bullet的注册,但是没有看到具体是在什么地方使用的。也没看看到相关的文档,所以这...

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

48. [LayaAir3]V3.2 | 调试结果不一致,导致无法判断结果? [ 75%]

...ayaAir3]V3.2 | 调试结果不一致,导致无法判断结果? const { regClass, property } = Laya;  @regClass() export class Main extends Laya.Script {   testData = new Laya.Vector3(1, 1, 1);   @property(Laya.Camera)   camera: Laya.Camera;    onStart() {     //@ts-ignore     window.ca...

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

49. 输入文本组件 · LayaAir3.3 · 引擎文档 · LAYABOX [ 75%]

...。下面给出一个示例代码,实现脚本控制TextInput: const { regClass, property } = Laya; @regClass() export class TextInputControl extends Laya.Script { //declare owner : Laya.Sprite3D; @property( { type : Laya.TextInput } ) public txtin: Laya.TextInput; constructor() { super(); } /**...

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

50. 单选框组容器组件 · LayaAir3.3 · 引擎文档 · LAYABOX [ 74%]

...要添加如下的示例代码,实现脚本控制RadioGroup: const { regClass, property } = Laya; @regClass() export class NewScript extends Laya.Script { @property({ type: Laya.RadioGroup }) public radiogroup: Laya.RadioGroup; //组件被激活后执行,此时所有节点和组件均已创建...

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