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

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

221. UI-ScrollBar [ 88%]

... Laya.loader.load(skins, Handler.create(this, this.onSkinLoadComplete)); } private onSkinLoadComplete(): void { this.placeHScroller(); this.placeVScroller(); } private placeHScroller(): void { var hs: HScrollBar = new HScrollBar(); hs.skin = "res/ui/hscroll.png"; hs.width = 300; hs.pos(50, 170); hs....

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

222. 加载-加载序列 [ 88%]

...aya.Texture; import 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;...

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

223. Image.loadImage 方法加载问题 [ 88%]

..._publicSpacesInfo;  this.publicSpaceList.array = this.publicSpacesInfo; } private updateListItem(cell: gamepublicspaceitem.PublicSpaceItem, index: number) : void {          cell.publicSpaceData = cell.dataSource; } module gamepublicspaceitem {  export class PublicSpaceItem extends Laya.Box...

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

224. 圆环不跟随 sprite 一起缩放? [ 88%]

... Browser.height, WebGL); this.CreateCircle(); // this.CreateRectangle(); } private firstSp: Laya.Sprite; private _adaptSp: Laya.Sprite; private _pointList : Point[]; private _rootSp : Laya.Sprite;  public CreateCircle() { this._rootSp = new Laya.Sprite();  this.firstSp = new Laya.Sprite(); this.fi...

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

225. UI-ColorPicker [ 88%]

...r = Laya.Handler; import WebGL = Laya.WebGL; export class UI_ColorPicker { private skin: string = "res/ui/colorPicker.png"; constructor() { // 不支持WebGL时自动切换至Canvas Laya.init(Browser.clientWidth, Browser.clientHeight, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH...

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

226. 分享:LayaAir实现曲线运动 [ 88%]

...传附件 package { import laya.display.Sprite; public class CurveDemo { private var ball:Sprite; private var xflag:Boolean; private var v:uint=2; private var d:uint=150; public function CurveDemo() { Laya.init(800,400); ball=new Sprite(); ball.graphics.drawCircle(0,0,50,"#FF00FF"); Laya.stage.addC...

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

227. 文本-HTML文本 [ 88%]

...age.scaleMode = "showall"; Laya.stage.bgColor = "#232628"; this.setup(); } private setup(): void { this.createParagraph(); // 代码创建 this.showExternalHTML(); // 使用外部定义的html } private createParagraph(): void { var p: HTMLDivElement = new HTMLDivElement(); Laya.stage.addChild(p); p...

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

228. 滤镜-模糊滤镜 [ 87%]

...ler = Laya.Handler; import WebGL = Laya.WebGL; export class Filters_Blur { private apePath: string = "../../res/apes/monkey2.png"; constructor() { // 不支持WebGL时自动切换至Canvas Laya.init(Browser.clientWidth, Browser.clientHeight, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage...

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

229. 动画-新版骨骼动画 [ 87%]

...e[++curStateIndex % clipName.length]); }); })); }class SkinAnimation_New { private changeActionButton: Laya.Button; private zombieAnimator: Laya.Animator; private curStateIndex: number = 0; private clipName: Array = ["walk", "attack", "left_fall", "right_fall", "back_fall"]; constructor() { Laya3D.i...

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

230. UI-List [ 87%]

...skins/4.jpg"); data.push("res/ui/listskins/5.jpg"); } list.array = data; } private updateItem(cell: Item, index: number): void { cell.setImg(cell.dataSource); } private onSelect(index: number): void { console.log("当前选择的索引:" + index); } } import Box = Laya.Box; import Image = Laya.Ima...

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