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

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

161. UI-ComboBox [ 90%]

...dler = Laya.Handler; import WebGL = Laya.WebGL; export class UI_ComboBox { private skin: string = "res/ui/combobox.png"; constructor() { // 不支持WebGL时自动切换至Canvas Laya.init(800, 600, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.sc...

来源: Laya2.0_示例 发布时间: 20251130

162. Spine适配版(JavaScript-LayaAir基础篇(JS)-动画基础) [ 90%]

...多个动画。 代码示例: ```typescript export class SpineBinary { private aniPath = "res/bone/spineboy-pma.skel"; private templet:SpineTempletBinary; private skeleton:SpineSkeleton; private index: number = -1; constructor() { Laya.init(Browser.width, Browser.height, WebGL); Laya.stage.scaleMo...

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

163. 复选框组件 · LayaAir3.3 · 引擎文档 · LAYABOX [ 90%]

...perty } = Laya; @regClass() export class UI_CheckBox extends Laya.Script { private COL_AMOUNT: number = 2; private ROW_AMOUNT: number = 3; private HORIZONTAL_SPACING: number = 200; private VERTICAL_SPACING: number = 100; private X_OFFSET: number = 100; private Y_OFFSET: number = 50; // 图片资源...

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

164. 文本-位图字体 [ 90%]

... = Laya.Handler; import WebGL = Laya.WebGL; export class Text_BitmapFont { private fontName: string = "diyFont"; constructor() { // 不支持WebGL时自动切换至Canvas Laya.init(Browser.clientWidth, Browser.clientHeight, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.AL...

来源: Laya2.0_示例 发布时间: 20251130

165. 屏幕适配-缩放-No Border [ 90%]

...prite; import Stage = Laya.Stage; export class SmartScale_Scale_NOBORDER { private rect: Sprite; constructor() { Laya.init(550, 400); Laya.stage.scaleMode = Stage.SCALE_NOBORDER; Laya.stage.bgColor = "#232628"; this.createCantralRect(); } private createCantralRect(): void { this.rect = new Sprite();...

来源: Laya2.0_示例 发布时间: 20251130

166. 屏幕适配-缩放-No Scale [ 90%]

...Sprite; import Stage = Laya.Stage; export class SmartScale_Scale_NOSCALE { private rect: Sprite; constructor() { Laya.init(550, 400); Laya.stage.scaleMode = Stage.SCALE_NOSCALE; Laya.stage.bgColor = "#232628"; this.createCantralRect(); } private createCantralRect(): void { this.rect = new Sprite(); ...

来源: Laya2.0_示例 发布时间: 20251130

167. UI-ProgressBar [ 90%]

...r = Laya.Handler; import WebGL = Laya.WebGL; export class UI_ProgressBar { private progressBar: ProgressBar; constructor() { // 不支持WebGL时自动切换至Canvas Laya.init(800, 600, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = St...

来源: Laya2.0_示例 发布时间: 20251130

168. 屏幕适配-缩放-Extract Fit [ 90%]

...te; import Stage = Laya.Stage; export class SmartScale_Scale_EXTRACT_FIT { private rect: Sprite; constructor() { Laya.init(550, 400); Laya.stage.scaleMode = Stage.SCALE_EXACTFIT; Laya.stage.bgColor = "#232628"; this.createCantralRect(); } private createCantralRect(): void { this.rect = new Sprite();...

来源: Laya2.0_示例 发布时间: 20251130

169. 屏幕适配-缩放-Show All [ 90%]

...prite; import Stage = Laya.Stage; export class SmartScale_Scale_SHOW_ALL { private rect: Sprite; constructor() { Laya.init(550, 400); Laya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; this.createCantralRect(); } private createCantralRect(): void { this.rect = new Sprite(); ...

来源: Laya2.0_示例 发布时间: 20251130

170. Sprite-节点控制 [ 90%]

...Laya.Browser; import WebGL = Laya.WebGL; export class Sprite_NodeControl { private ape1: Sprite; private ape2: Sprite; constructor() { // 不支持WebGL时自动切换至Canvas Laya.init(Browser.clientWidth, Browser.clientHeight, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = St...

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