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

大约有 1,204 项符合查询结果, 库内数据总量为 30,784 项。 (搜索耗时: 0.0044 秒)

161. 文本-位图字体 [ 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_示例 发布时间: 20241123

162. 屏幕适配-缩放-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_示例 发布时间: 20241123

163. 屏幕适配-缩放-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_示例 发布时间: 20241123

164. 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_示例 发布时间: 20241123

165. 屏幕适配-缩放-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_示例 发布时间: 20241123

166. 屏幕适配-缩放-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_示例 发布时间: 20241123

167. 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_示例 发布时间: 20241123

168. 多选框组件 · LayaAir3.0文档 · 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_文档 发布时间: 20241014

169. 其他引擎的Demo-Example_04 [ 90%]

... (stars[i].x h) { stars[i].y = stars[i].y - h; } else if (stars[i].y = []; private w:number = Browser.width; private h:number = Browser.height; private slideX:number = this.w / 2; private slideY:number = this.h / 2; private speedInfo:Text; constructor() { Laya.init(this.w, this.h, WebGL); this.creat...

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

170. 鼠标交互-自定义事件 [ 90%]

...t class Interaction_CustomEvent { public static ROTATE: string = "rotate"; private sp: Sprite; constructor() { // 不支持WebGL时自动切换至Canvas Laya.init(Browser.clientWidth, Browser.clientHeight, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.s...

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