大约有 6 项符合查询结果, 库内数据总量为 31,722 项。 (搜索耗时: 0.0048 秒)
...于摄像头也有相应的封装,下面我们来看下用法。 class Main { private video:Laya.Video; constructor() { //初始化引擎 Laya.init(Laya.Browser.width,Laya.Browser.height); if(Laya.Media.supported() === false){ alert("当前浏览器不支持"); } else{ this.showMessage(); var opti...
来源: Laya3.0_文档 发布时间: 20251010
...码如下: const { regClass, property } = Laya; @regClass() export class Main extends Laya.Script { @property({ type: Number }) _radian: number = 0; //带下划线的属性,默认不会出现在IDE的属性面板上,只是用来存储输入的弧度 @property({ type: Number, caption: "角度",...
来源: Laya3.0_文档 发布时间: 20251010
...ss } = Laya; import { BloodBarBase } from "./BloodBar.generated"; import { Main } from "./Main"; @regClass() export class BloodBar extends BloodBarBase { onAwake(): void { this.bar.value = 1; this.value.visible = false; Laya.stage.on(Laya.Event.CLICK, this, this.onHurt); } onHurt(): void { this.bar....
来源: Laya3.0_文档 发布时间: 20251010
...自定义嵌入字体"; label.fontSize = 30; label.color = '#FFFFFF'; this.Main.box2D.addChild(label); label.pos(30, 50) }); Copyright ©Layabox 2026 all right reserved,powered by LayaAir Engine更新时间: 2026-01-28 15:12:31 img{cursor:pointer}
来源: Laya3.0_文档 发布时间: 20260128
...的代码: const { regClass, property } = Laya; @regClass() export class Main extends Laya.Script { @property( { type: Laya.Label } ) private label: Laya.Label; @property( { type: Laya.Sprite3D } ) private target: Laya.Sprite3D; private animator : Laya.Animator; onStart() { this.label.on( Laya.Eve...
来源: Laya3.0_文档 发布时间: 20251010
...插件运行环境 编辑器是多进程体系,主要有三个进程:Main进程/UI进程/Scene进程。插件只能运行在UI进程和Scene进程。UI进程没有载入引擎库,也就是没有LayaAir引擎环境;Scene进程有LayaAir引擎环境,与UI通讯只能通过编辑器提供的...
来源: Laya3.0_文档 发布时间: 20251010