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

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

191. UI-Label [ 88%]

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

192. 滤镜-发光滤镜 [ 88%]

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

193. UI-ComboBox [ 88%]

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

194. 文本-位图字体 [ 88%]

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

195. UI-ProgressBar [ 88%]

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

196. 文本-复杂的文本样式 [ 88%]

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

197. Clip属性详解(TypeScript-IDE篇(TS)-IDE组件属性详解) [ 87%]

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

198. 缓动-简单的Tween [ 87%]

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

199. 文本-下划线 [ 87%]

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

200. 文本-复杂的文本样式 [ 87%]

... } createText() { const Text = Laya.Text; let txt = new Text(); Laya.stage.addChild(txt); //给文本的text属性赋值 txt.text = "Layabox是性能最强的HTML5引擎技术提供商与优秀的游戏发行商,面向Flash开发者提供HTML5开发技术方案!"; //设置宽度,高度自动...

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