大约有 31 项符合查询结果, 库内数据总量为 30,786 项。 (搜索耗时: 0.0022 秒)
...e++; laser.life = 0; let pos1; let pos2; if (type % 2) { pos1 = new Point(-20, Math.random() * viewHeight); pos2 = new Point(viewWidth, Math.random() * viewHeight + 20); } else { pos1 = new Point(Math.random() * viewWidth, -20); pos2 = new Point(Math.random() * viewWidth, viewHeight + 20); } let dis...
来源: Laya2.0_示例 发布时间: 20241124
...(); } createTexts() { this.createLabel("只允许输入数字:").pos(50, 20); let input = this.createInput(); input.pos(50, 50); input.restrict = "0-9"; this.createLabel("只允许输入字母:").pos(50, 100); input = this.createInput(); input.pos(50, 130); input.restrict = "a-zA-Z"; this.create...
来源: Laya2.0_示例 发布时间: 20241124
... var heightLimitText = this.createSampleText(); heightLimitText.height = 20; heightLimitText.y = 320; } createSampleText() { const Text = Laya.Text; let text = new Text(); Laya.stage.addChild(text); text.overflow = Text.HIDDEN; text.color = "#FFFFFF"; text.font = "Impact"; text.fontSize = 20; text.b...
来源: Laya2.0_示例 发布时间: 20241124
...ctor() { this.ecount = 30; Laya.Config.isAntialias = true; Laya.Laya.init(1200, 700, Laya.WebGL); Laya.Stat.show(); Laya.Physics.enable(); Laya.PhysicsDebugDraw.enable(); Laya.Laya.stage.alignV = Laya.Stage.ALIGN_MIDDLE; Laya.Laya.stage.alignH = Laya.Stage.ALIGN_CENTER; Laya.Laya.stage.scaleMode = L...
来源: Laya2.0_示例 发布时间: 20241124
...发语言、LayaAirIDE让项目开发更高效。let character, duration = 2000, tween; class Tween_EaseFunctionsDemo { constructor() { const WebGL = Laya.WebGL, Stage = Laya.Stage, Browser = Laya.Browser, Stat = Laya.Stat, Handler = Laya.Handler; // 不支持WebGL时自动切换至Canvas Laya.init(...
来源: Laya2.0_示例 发布时间: 20241124
... Physics_Physics_Tumbler { constructor() { this.count = 0; this.totalBox = 200; Laya.Config.isAntialias = true; Laya.Laya.init(Laya.Browser.clientWidth, Laya.Browser.clientHeight, Laya.WebGL); Laya.Stat.show(); Laya.Physics.enable({ gravity: 0 }); Laya.PhysicsDebugDraw.enable(); Laya.Laya.stage.alig...
来源: Laya2.0_示例 发布时间: 20241124
....height) / 2; } makeRedApe() { const ColorFilter = Laya.ColorFilter; //由 20 个项目(排列成 4 x 5 矩阵)组成的数组,红色 let redMat = [ 1, 0, 0, 0, 0, // R 0, 0, 0, 0, 0, // G 0, 0, 0, 0, 0, // B 0, 0, 0, 1, 0 // A ]; //创建一个颜色滤镜对象,红色 let redFilter = new Col...
来源: Laya2.0_示例 发布时间: 20241124
...ext.bgColor = "#666666"; inputText.color = "#ffffff"; inputText.fontSize = 20; inputText.maxChars = 5; } } new Text_MaxChars();module laya { import Input = Laya.Input; import Stage = Laya.Stage; import Browser = Laya.Browser; import WebGL = Laya.WebGL; export class Text_MaxChars { constructor() { //...
来源: Laya2.0_示例 发布时间: 20241124
...ext.bgColor = "#666666"; inputText.color = "#ffffff"; inputText.fontSize = 20; } } new Text_InputSingleline();module laya { import Input = Laya.Input; import Stage = Laya.Stage; import Browser = Laya.Browser; import WebGL = Laya.WebGL; export class Text_InputSingleline { constructor() { // 不支持...
来源: Laya2.0_示例 发布时间: 20241124
...ext.bgColor = "#666666"; inputText.color = "#ffffff"; inputText.fontSize = 20; } } new Text_Editable();module laya { import Input = Laya.Input; import Stage = Laya.Stage; import Browser = Laya.Browser; import WebGL = Laya.WebGL; export class Text_Editable { constructor() { // 不支持WebGL时自动...
来源: Laya2.0_示例 发布时间: 20241124