大约有 41 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0041 秒)
...素ImageLayaAir之Dom元素videoLayaAir之dom元素FileLayaAir之dom元素script标签LayaAir之dom元素iframeLayaAir和原生Dom 在开发项目中,开发者难免遇到dom元素支持,但是LayaAir中不支持或者支持的不完善。那么本节我们就来看下在开发中遇到的一些...
来源: Laya3.0_文档 发布时间: 20251010
...如下: const { regClass, property } = Laya; @regClass() export class NewScript extends Laya.Script { // 获得Image组件 @property({ type: Laya.Image }) public img: Laya.Image; //组件被激活后执行,此时所有节点和组件均已创建完毕,此方法只执行一次 onAwake(): void {...
来源: Laya3.0_文档 发布时间: 20250826
...代码如下所示: const { regClass } = Laya; @regClass() export class Script extends Laya.Script { } 1.2 IDE中如何找到被识别的组件脚本 只有使用了@regClass()装饰器标识,才会被LayaAir3-IDE识别为自定义组件脚本,可以被节点(实体)所添加, 添加组...
来源: Laya3.0_文档 发布时间: 20251010
...一、开放数据域简介 开放数据域是一个封闭、独立的 JavaScript 作用域。在设计小游戏时,为了使游戏的可玩性更强,开发者需要实现一些社交玩法,例如排行榜,游戏中邀请其它玩家对战等。这些功能需要用到一些玩家的隐私...
来源: Laya3.0_文档 发布时间: 20251010
...s, property } = Laya; /** * 使用视频纹理 */ @regClass() export class Script extends Laya.Script { declare owner: Laya.Sprite3D; @property(Laya.Scene3D) private scene: Laya.Scene3D; private videoPlane: Laya.Sprite3D; private videoTexture = new Laya.VideoTexture(); onAwake(): void { //获取场...
来源: Laya3.0_文档 发布时间: 20251010
...击操作,IDE会弹窗提示创建UI组件脚本文件,默认是RuntimeScript.ts,开发者可以对其进行重命名,最后点击保存即可创建脚本。 (动图2-1) 可以看到,创建以后,除了生成RuntimeScript.ts之外,在项目工程中看到还多了一个 RuntimeScri...
来源: Laya3.0_文档 发布时间: 20251010
...Class, property } = Laya; @regClass() export class LoaderDemo extends Laya.Script { onAwake(): void { this.loadTexture("resources/image/monkey2.png", 500);//需要在resources/image放入相应的资源 this.loadTexture("https://layaair.com/3.x/demo/resources/res/apes/monkey2.png"); } /**加载并...
来源: Laya3.0_文档 发布时间: 20251010
...代码: const { regClass, property } = Laya; @regClass() export class NewScript extends Laya.Script { @property({ type: Laya.ProgressBar }) public progressBar: Laya.ProgressBar; @property({ type: Laya.Text }) public loadText: Laya.Text; //组件被激活后执行,此时所有节点和组件均...
来源: Laya3.0_文档 发布时间: 20251010
...roperty } = Laya; @regClass() export default class DirectMove extends Laya.Script { declare owner: Laya.Sprite3D; private characterController: Laya.CharacterController; onAwake(): void { // 获取 角色控制器 组件并赋值给 characterController this.characterController = this.owner.getCompone...
来源: Laya3.0_文档 发布时间: 20251010
...Radio: const { regClass, property } = Laya; @regClass() export class NewScript extends Laya.Script { @property({ type: Laya.Radio }) public radio: Laya.Radio; //组件被激活后执行,此时所有节点和组件均已创建完毕,此方法只执行一次 onAwake(): void { this.radio.skin = "...
来源: Laya3.0_文档 发布时间: 20251010