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

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

71. 加载-加载序列 [ 81%]

... Handler = Laya.Handler; export class Loader_Sequence { private numLoaded: number = 0; private resAmount: number = 3; constructor() { Laya.init(500, 400); // 按序列加载 monkey2.png - monkey1.png - monkey0.png // 不开启缓存 // 关闭并发加载 Laya.loader.maxLoader = 1; Laya.loader.load("...

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

72. 骨骼动画-Spine事件 [ 81%]

...xport class Skeleton_SpineEvent { private mAniPath:string; private mStartX:number = 400; private mStartY:number = 500; private mFactory:Templet; private mActionIndex:number = 0; private mCurrIndex:number = 0; private mArmature:Skeleton; private mCurrSkinIndex:number = 0; private mFactory2:Templet; p...

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

73. UI-ProgressBar [ 81%]

...ssBar.value = 0; this.progressBar.value += 0.05; } private onChange(value: number): void { console.log("进度:" + Math.floor(value * 100) + "%"); } } } new laya.UI_ProgressBar();package { import laya.display.Stage; import laya.ui.ProgressBar; import laya.utils.Handler; import laya.webgl.WebGL; pu...

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

74. 骨骼动画-Spine事件 [ 81%]

...xport class Skeleton_SpineEvent { private mAniPath:string; private mStartX:number = 400; private mStartY:number = 500; private mFactory:Templet; private mActionIndex:number = 0; private mCurrIndex:number = 0; private mArmature:Skeleton; private mCurrSkinIndex:number = 0; private mFactory2:Templet; p...

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

75. 鼠标交互-双指旋转(多点触控) [ 80%]

...; export class Interaction_Rotate { private sp: Sprite; private preRadian: number = 0; constructor() { // 不支持WebGL时自动切换至Canvas Laya.init(Browser.clientWidth, Browser.clientHeight, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.sca...

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

76. 混合模式-Lighter [ 80%]

...de_Lighter { // 一只凤凰的分辨率是550 * 400 private phoenixWidth: number = 550; private phoenixHeight: number = 400; private bgColorTweener: Tween = new Tween(); private gradientInterval: number = 2000; private bgColorChannels: any = { r: 99, g: 0, b: 0xFF }; constructor() { // 不支持Web...

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

77. 计时器-间隔循环 [ 80%]

...age.bgColor = "#232628"; this.setup(); } private setup(): void { var vGap: number = 200; this.rotateTimeBasedText = this.createText("基于时间旋转", Laya.stage.width / 2, (Laya.stage.height - vGap) / 2); this.rotateFrameRateBasedText = this.createText("基于帧频旋转", this.rotateTimeBasedT...

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

78. 加载-错误处理和进度 [ 80%]

...og("加载结束"); } // 加载进度侦听器 private onLoading(progress: number): void { console.log("加载进度: " + progress); } private onError(err: String): void { console.log("加载失败: " + err); } } } new laya.Loader_ProgressAndErrorHandle();package { import laya.events.Event; import l...

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

79. UI-ProgressBar [ 80%]

...ssBar.value = 0; this.progressBar.value += 0.05; } private onChange(value: number): void { console.log("进度:" + Math.floor(value * 100) + "%"); } } } new laya.UI_ProgressBar();package { import laya.display.Stage; import laya.ui.ProgressBar; import laya.utils.Handler; import laya.webgl.WebGL; pu...

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

80. 混合模式-Lighter [ 80%]

...de_Lighter { // 一只凤凰的分辨率是550 * 400 private phoenixWidth: number = 550; private phoenixHeight: number = 400; private bgColorTweener: Tween = new Tween(); private gradientInterval: number = 2000; private bgColorChannels: any = { r: 99, g: 0, b: 0xFF }; constructor() { // 不支持Web...

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