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

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

91. 文本-滚动文本 [ 78%]

...= Laya.WebGL; export class Text_Scroll { private txt: Text; private prevX: number = 0; private prevY: number = 0; constructor(){ // 不支持WebGL时自动切换至Canvas Laya.init(Browser.clientWidth, Browser.clientHeight, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.AL...

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

92. Laya.stage.mouseX; Laya.stage.mouseY取到的坐标用来赋给画曲线方法的起点;在左顶点正常,越往右下角起点就越偏移了 [ 78%]

...越偏移了 // 程序入口 class GameMain { private ps: Laya.Sprite; a: number; b: number; path: Array<number> = ; constructor() { Laya.init(1600, 1400); Laya.stage.bgColor = "#000000"; this.ps = new Laya.Sprite(); Laya.stage.on(Laya.Event.MOUSE_DOWN, this, this.down2) Laya.stage.on(Laya.Eve...

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

93. 计时器-间隔循环 [ 78%]

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

94. 动画-SWF动画 [ 78%]

...F { private SWFPath: string = "../../res/swf/dragon.swf"; private MCWidth: number = 318; private MCHeight: number = 406; constructor() { // 不支持WebGL时自动切换至Canvas Laya.init(Browser.clientWidth, Browser.clientHeight, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = ...

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

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

...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...

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

96. 动画-SWF动画 [ 78%]

...ion_SWF { private SWFPath: string = "res/swf/dragon.swf"; private MCWidth: number = 318; private MCHeight: number = 406; constructor() { // 不支持WebGL时自动切换至Canvas Laya.init(Browser.clientWidth, Browser.clientHeight, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = ...

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

97. 这种进度条怎么实现? [ 78%]

...e = Laya.Sprite export default class Test extends Sprite{ public DEF_SIZE: number = 200 public CIRCLE_WIDTH: number = 20 public $circleSprite: Sprite = new Sprite() public startY: number = -90 constructor() { super() this._init() } private _init() { this.cacheAs = "bitmap" this.size(this.DEF_SIZE,th...

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

98. 计时器-间隔循环 [ 78%]

...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...

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

99. 输入设备-摇一摇 [ 78%]

...; import Event = Laya.Event; export class InputDevice_Shake { private picW:number = 484; private picH:number = 484; private console:Text; private shakeCount:number = 0; constructor() { Laya.init(this.picW, Browser.height * this.picW / Browser.width); Laya.stage.scaleMode = Stage.SCALE_SHOWALL; this....

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

100. Laya.Sprite loadImage 参数问题 [ 77%]

...个问题。api上对loadimage的描述是:   loadImage(url:String, x:Number = 0, y:Number = 0, width:Number = 0, height:Number = 0, complete:Handler = null) 官方文档也是这么用的:http://ldc.layabox.com/doc/?nav=zh-ts-1-3-2 我把文档的代码完整复制到vscode里,vs code会报...

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