大约有 1,608 项符合查询结果, 库内数据总量为 30,778 项。 (搜索耗时: 0.0054 秒)
Laya_社区(977) Laya2.0_文档(192) Laya_示例(138) Laya2.0_示例(101) Laya3.0_api(61) Laya2.0_api(57) laya_api(53) Laya3.0_文档(29)
... = Laya.Label; const STROKE_WIDTH = 4; var label = new Label(); Laya.stage.addChild(label); label.font = "Microsoft YaHei"; label.text = "SAMPLE DEMO"; label.fontSize = 30; label.color = color; if (strokeColor) { label.stroke = STROKE_WIDTH; label.strokeColor = strokeColor; } return label; } } new U...
来源: Laya2.0_示例 发布时间: 20241117
...mboBox.selectHandler = new Handler(this, onSelect, [comboBox]); Laya.stage.addChild(comboBox); return comboBox; } function onSelect(cb) { console.log("选中了: " + cb.selectedLabel); } })();module laya { import Stage = Laya.Stage; import ComboBox = Laya.ComboBox; import Handler = Laya.Handler; i...
来源: Laya_示例 发布时间: 20241117
...e.width - txt.width >> 1, Laya.stage.height - txt.height >> 1); Laya.stage.addChild(txt); } })();module laya { import BitmapFont = Laya.BitmapFont; import Stage = Laya.Stage; import Text = Laya.Text; import Browser = Laya.Browser; import Handler = Laya.Handler; import WebGL = Laya.WebGL; export clas...
来源: Laya_示例 发布时间: 20241117
...ateApe() { const Sprite = Laya.Sprite; this.ape = new Sprite(); Laya.stage.addChild(this.ape); let texture = Laya.loader.getRes(apePath); this.ape.graphics.drawTexture(texture); this.ape.x = (Laya.stage.width - texture.width) / 2; this.ape.y = (Laya.stage.height - texture.height) / 2; } applayFilter...
来源: Laya2.0_示例 发布时间: 20241117
...,5,5"; progressBar.changeHandler = new Handler(this, onChange); Laya.stage.addChild(progressBar); Laya.timer.loop(100, this, changeValue); } function changeValue() { if (progressBar.value >= 1) progressBar.value = 0; progressBar.value += 0.05; } function onChange(value) { console.log("进度:" + M...
来源: Laya_示例 发布时间: 20241117
...xtWidth) / 2; txt.y = (Laya.stage.height - txt.textHeight) / 2; Laya.stage.addChild(txt); } })();module laya { import Stage = Laya.Stage; import Text = Laya.Text; import Browser = Laya.Browser; import WebGL = Laya.WebGL; export class Text_ComplexStyle { constructor() { // 不支持WebGL时自动切...
来源: Laya_示例 发布时间: 20241117
...age.width - bg.width >> 1, Laya.stage.height - bg.height >> 1); Laya.stage.addChild(bg); } private createTimerAnimation(): void { this.counter = new Clip(this.clipSkin, 10, 1); this.counter.autoPlay = true; this.counter.interval = 1000; this.counter.x = (Laya.stage.width - this.counter.width) / 2 - ...
来源: Laya2.0_文档 发布时间: 20210714
...ineColor, x, y) { const Text = Laya.Text; let txt = new Text(); Laya.stage.addChild(txt); txt.text = "Layabox\n是HTML5引擎技术提供商\n与优秀的游戏发行商\n面向AS/JS/TS开发者提供HTML5开发技术方案"; txt.size(300, 50); txt.fontSize = 20; txt.color = "#ffffff"; txt.align = a...
来源: Laya2.0_示例 发布时间: 20241117
...prite; let character = new Sprite(); character.loadImage(skin); Laya.stage.addChild(character); return character; } } new Tween_SimpleSample();module laya { import Sprite = Laya.Sprite; import Stage = Laya.Stage; import Browser = Laya.Browser; import Tween = Laya.Tween; import WebGL = Laya.WebGL; ex...
来源: Laya2.0_示例 发布时间: 20241117
... } createText() { const Text = Laya.Text; let txt = new Text(); Laya.stage.addChild(txt); //给文本的text属性赋值 txt.text = "Layabox是性能最强的HTML5引擎技术提供商与优秀的游戏发行商,面向Flash开发者提供HTML5开发技术方案!"; //设置宽度,高度自动...
来源: Laya2.0_示例 发布时间: 20241117