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

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

61. UI-Input [ 75%]

...omplete));//加载资源。 } private onLoadComplete(): void { for (var i: number = 0; i < this.skins.length; ++i) { var input: TextInput = this.createInput(this.skins[i]); input.prompt = 'Type:'; input.x = (Laya.stage.width - input.width) / 2; input.y = i * this.SPACING + this.Y_OFFSET; } } private...

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

62. UI-Input [ 75%]

...omplete));//加载资源。 } private onLoadComplete(): void { for (var i: number = 0; i < this.skins.length; ++i) { var input: TextInput = this.createInput(this.skins[i]); input.prompt = 'Type:'; input.x = (Laya.stage.width - input.width) / 2; input.y = i * this.SPACING + this.Y_OFFSET; } } private...

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

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

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

64. 鼠标交互-键盘交互 [ 74%]

...} /**键盘按下处理*/ private onKeyDown(e: Event): void { var keyCode: number = e["keyCode"]; this.keyDownList[keyCode] = true; } /**键盘抬起处理*/ private onKeyUp(e: Event): void { delete this.keyDownList[e["keyCode"]]; } private keyboardInspector(): void { var numKeyDown: number = this.k...

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

65. 音频-播放演示 [ 74%]

...tage.bgColor = "#232628"; this.setup(); } private setup(): void { var gap: number = 10; //创建一个Sprite充当音效播放按钮 var soundButton: Sprite = this.createButton("播放音效"); soundButton.x = (Laya.stage.width - soundButton.width * 2 + gap) / 2; soundButton.y = (Laya.stage.height -...

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

66. 音频-播放演示 [ 74%]

...tage.bgColor = "#232628"; this.setup(); } private setup(): void { var gap: number = 10; //创建一个Sprite充当音效播放按钮 var soundButton: Sprite = this.createButton("播放音效"); soundButton.x = (Laya.stage.width - soundButton.width * 2 + gap) / 2; soundButton.y = (Laya.stage.height -...

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

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

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

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

68. 性能测试-卡通人物2 [ 73%]

...ite = Laya.Sprite; export class PerformanceTest_Cartoon2 { private amount: number = 500; private character1: Array = [ "../../res/cartoon2/yd-6_01.png", "../../res/cartoon2/yd-6_02.png", "../../res/cartoon2/yd-6_03.png", "../../res/cartoon2/yd-6_04.png", "../../res/cartoon2/yd-6_05.png", "../../res/...

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

69. socket大型项目回调 [ 73%]

...-websocket'; private JS_WS_CLIENT_VERSION:string = '0.0.5'; private RES_OK:number = 200; private RES_FAIL:number = 500; private RES_OLD_CLIENT:number = 501; private socket:Laya.Socket = null; private callbacks:any = {}; private handlers:any = {}; // Map from request id to route private routeMap = {}...

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

70. 鼠标交互-键盘交互 [ 73%]

...} /**键盘按下处理*/ private onKeyDown(e: Event): void { var keyCode: number = e["keyCode"]; this.keyDownList[keyCode] = true; } /**键盘抬起处理*/ private onKeyUp(e: Event): void { delete this.keyDownList[e["keyCode"]]; } private keyboardInspector(): void { var numKeyDown: number = this.k...

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