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

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

971. laya.ui.Tree_API3.0 [ 36%]

...a.utils.Browser; import Handler = laya.utils.Handler; class Tree_Example { constructor() { Laya.init(640, 800); Laya.stage.bgColor = "#efefef";//设置画布的背景颜色。 Laya.loader.load(["resource/ui/vscroll.png", "resource/ui/vscroll$bar.png", "resource/ui/vscroll$down.png", "resource/ui/vsc...

来源: Laya3.0_api 发布时间: 20231115

972. laya.resource.Texture2D [ 36%]

...property public static var whiteTexture:Texture2D = null纯白色纹理。Constructor DetailTexture2D()Constructorpublic function Texture2D(width:int = 0, height:int = 0, format:int, mipmap:Boolean = true, canRead:Boolean = false) 创建一个 Texture2D 实例。 Parameters width:int (default = 0) ...

来源: Laya2.0_api 发布时间: 20190513

973. Sprite-新手引导 [ 36%]

...eStep:number = 0; private hitArea:HitArea; private interactionArea:Sprite; constructor() { Laya.init(1285, 727); Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.alignV = Stage.ALIGN_MIDDLE; //绘制一个蓝色方块,不被抠图 var gameContainer:Sprite = new Sprite(); gameContainer.loadImage(...

来源: Laya_示例 发布时间: 20251209

974. 鼠标交互-修正交互区域 [ 36%]

...bGL; export class Interaction_FixInteractiveRegion { private logger: Text; constructor() { // 不支持WebGL时自动切换至Canvas Laya.init(Browser.clientWidth, Browser.clientHeight, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = "sh...

来源: Laya_示例 发布时间: 20251209

975. 灯光-聚光 [ 36%]

...ne; private _quaternion: Laya.Quaternion; private _position: Laya.Vector3; constructor() { Laya3D.init(0, 0, true); Laya.stage.scaleMode = Laya.Stage.SCALE_FULL; Laya.stage.screenMode = Laya.Stage.SCREEN_NONE; Laya.Stat.show(); this.scene = new Laya.Scene(); Laya.stage.addChild(this.scene); this._qu...

来源: Laya_示例 发布时间: 20251209

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

...egClass() export class DemoPreviewPlugin extends IEditorEnv.AssetPreview { constructor() { super(); this.sprite.graphics.drawCircle(100, 100, 50, "#ffff00"); this.sprite.size(100, 100); } async setAsset(asset: IEditorEnv.IAssetInfo): Promise<any> { this.renderTarget = this.sprite; } } 显示...

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

977. 精灵 · LayaAir3.3 · 引擎文档 · LAYABOX [ 35%]

...Laya.Sprite; @property({ type: Laya.Sprite }) public sprite2: Laya.Sprite; constructor() { super(); } /** * 组件被激活后执行,此时所有节点和组件均已创建完毕,此方法只执行一次 */ onAwake(): void { this.sprite2.on(Laya.Event.MOUSE_DOWN, this, this.test2);//设置监听...

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

978. 微信小游戏运行导出项目的时候报错:Scene: the .lh file root type must be Scene [ 35%]

... 2018-03-17 11:32 是我加载方式不对吗?这是主要的代码: constructor() { Laya.MiniAdpter.init(); //初始化引擎 Laya3D.init(0, 0, true); //适配模式 Laya.stage.scaleMode = Laya.Stage.SCALE_FULL; Laya.stage.screenMode = Laya.Stage.SCREEN_NONE; //开启统计信息 Laya.Stat.show...

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

979. 屏幕适配-屏幕适配 [ 35%]

...索引 private index: number = 0; //全局文本信息 private txt: Text; constructor() { // 不支持WebGL时自动切换至Canvas Laya.init(1136, 640, WebGL); //设置适配模式 Laya.stage.scaleMode = "noscale"; //设置横竖屏 Laya.stage.screenMode = Stage.SCREEN_HORIZONTAL; //设置水平对...

来源: Laya_示例 发布时间: 20251209

980. 动画-新版骨骼动画 [ 35%]

...pName: Array = ["walk", "attack", "left_fall", "right_fall", "back_fall"]; constructor() { Laya3D.init(0, 0, true); Laya.stage.scaleMode = Laya.Stage.SCALE_FULL; Laya.stage.screenMode = Laya.Stage.SCREEN_NONE; Laya.Stat.show(); var scene: Laya.Scene = Laya.stage.addChild(new Laya.Scene()) as Laya.Sc...

来源: Laya_示例 发布时间: 20251209