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

大约有 3,003 项符合查询结果, 库内数据总量为 30,723 项。 (搜索耗时: 0.0069 秒)

141. 列表组件 · LayaAir3.0文档 · LAYABOX [ 65%]

...t组件设置数据源。 const { regClass, property } = Laya; @regClass() export class Script extends Laya.Script { @property({ type: Laya.List }) list: Laya.List constructor() { super(); } // 组件被启用后执行,例如节点被添加到舞台后 onEnable(): void { // 给List对象赋值 var...

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

142. 组件属性的代码使用 · LayaAir3.0文档 · LAYABOX [ 65%]

...例代码如下所示: const { regClass, property } = Laya; @regClass() export class NewScript extends Laya.Script { @property({ type : Laya.Sprite}) public spr: Laya.Sprite; onAwake(): void { this.spr.size(512, 313); //设置Sprite大小 this.spr.loadImage("atlas/comp/image.png"); //添加纹理 ...

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

143. 多行输入文本组件 · LayaAir3.0文档 · LAYABOX [ 64%]

... 1.3 脚本控制TextArea const { regClass, property } = Laya; @regClass() export class TextAreaControl extends Laya.Script { //declare owner : Laya.Sprite3D; @property( { type : Laya.TextArea } ) public txtarea: Laya.TextArea; constructor() { super(); } /** * 组件被激活后执行,此时所有...

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

144. 关于laya图片资源缓存的问题 增量更新文件缓存 [ 64%]

...rd/card_item_bg.png"), type: Laya.Loader.IMAGE }] /** 添加文件hash */ export const setStaticPrefix = (url:string) :string => { if (staticHash[`images/${url}`]) { return staticHash[`images/${url}`] } return `images/${url}` }然后资源导出的时候使用gulp生成文件hash 这样增量更...

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

145. 面板容器组件 · LayaAir3.0文档 · LAYABOX [ 64%]

...现脚本控制Panel: const { regClass, property } = Laya; @regClass() export class NewScript extends Laya.Script { @property({ type: Laya.Panel }) public panel: Laya.Panel; //组件被激活后执行,此时所有节点和组件均已创建完毕,此方法只执行一次 onAwake(): void { this...

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

146. LayaBox进阶之UI管理类 [ 64%]

...分; 打开界底层是addChild打开的;     新建一个UIManagerexport class UIManager { private mainContent: Laya.Sprite; private scene: GameScence; private uiList:any; constructor() { this.mainContent = new Laya.Sprite(); this.uiList = ; } }mainContent 为默认添加到的层级, GameS...

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

147. 设置滤镜(TypeScript-LayaAir基础篇(TS)-位图) [ 64%]

... = Laya.Browser; import Handler = Laya.Handler; import WebGL = Laya.WebGL; export class Main { private ApePath: string = "../../res/apes/monkey2.png"; private apeTexture: Texture; constructor() { // 不支持WebGL时自动切换至Canvas Laya.init(Browser.clientWidth, Browser.clientHeight, WebGL); L...

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

148. 加载.lh文件 运行后黑屏 无法显示 [ 64%]

...andler.create(this, this.onComplete));         Laya.loader.create("Export/LayaScene_JJF/Conventional/JJF.lh", Laya.Handler.create(this, this.onComplete));     }     public onComplete():void {     //创建场景     var scene = Laya.stage.addChild(new Laya.Scene3D());     ...

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

149. 2.0版本可用的CameraMoveScript.ts [ 63%]

...一个2.0,跟示例里效果一样的文件:   /** * ... * @author */ export class CameraMoveScript extends Laya.Script {      /** @private */     protected _tempVector3: Laya.Vector3 = new Laya.Vector3();     protected lastMouseX: number;     protected lastMouseY: number;   ...

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

150. 用npm的protobuf导出的ts代码。然后用import { } from "" 运行到这里没反应,不继续执行,也不报错。 [ 63%]

...写了一个模块 MyModuleimport { com} from "../libs/protobuf/area.js"; export function testProto():void { console.log("call testProto"); var ProtobufUtil = com.bee.protobuf; let msg = ProtobufUtil.ProtoArea.create(); let buffer = ProtobufUtil.ProtoArea.encode(msg).finish(); let decode = ProtobufU...

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