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

大约有 573 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0045 秒)

31. 计时器-延迟调用 [ 96%]

...leMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; Stat.show(); this.demonstrate(); } demonstrate() { for (let i = 0; i < 10; i++) { Laya.timer.callLater(this, this.onCallLater); } } onCallLater() { const Text = Laya.Text; console.log("onCallLater triggered"); let text = new Text(); text....

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

32. SVG渐变精灵的扩展脚本继承了多个精灵, 在safari环境下重叠了渲染 [ 96%]

...向, 求大大指点, 感激   附上渐变SVG文字的代码:   /** * this class is a extension of texts with gradient color  */ var effect; (function (effect) {     var GradientText = (function (_super) {         const style = {             DEFAULT: "default",             VERT...

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

33. http无响应 [ 96%]

...ar LoginView = (function (_super) { function LoginView() { LoginView.super(this); //调用父类构造函数 this.dlg; } function connect() { var hr = new Laya.HttpRequest(); hr.once(Event.PROGRESS, this, onHttpRequestProgress); hr.once(Event.COMPLETE, this, onHttpRequestComplete); hr.once(Event.ERR...

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

34. 文本-滚动文本 [ 96%]

... txt.color = "#ffffff"; Laya.stage.addChild(txt); txt.on(Event.MOUSE_DOWN, this, startScrollText); } /* 开始滚动文本 */ function startScrollText(e) { prevX = txt.mouseX; prevY = txt.mouseY; Laya.stage.on(Event.MOUSE_MOVE, this, scrollText); Laya.stage.on(Event.MOUSE_UP, this, finishScrollText)...

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

35. HTTP通信 · LayaAir3.3 · 引擎文档 · LAYABOX [ 96%]

...a.TextArea; private text: Laya.Label = new Laya.Label(); onAwake(): void { this.initUI(); this.connect(); } /** * 初始化UI */ private initUI(): void { this.showLogger(); this.text.text = "请查看源码和调试信息,了解如何使用"; this.text.color = "#FFFFFF"; this.text.font = "Impact";...

来源: Laya3.0_文档 发布时间: 20251010

36. 文本-Overflow [ 95%]

...aya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; this.createInput(); } createInput() { const Text = Laya.Text; let t1 = this.createText(); t1.overflow = Text.VISIBLE; t1.pos(10, 10); let t2 = this.createText(); t2.overflow = Text.SCROLL; t2.pos(10, 110); let t3 = this.creat...

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

37. 屏幕适配-屏幕适配 [ 95%]

...e(); bg.skin = "res/bg.jpg"; Laya.stage.addChild(bg); //实例一个文本 this.txt = new Text(); this.txt.text = "点击我切换适配模式(noscale)"; this.txt.bold = true; this.txt.pos(0, 200); this.txt.fontSize = 30; this.txt.on("click", this, this.onTxtClick); Laya.stage.addChild(this.txt); //...

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

38. 动画状态脚本(JavaScript-3D基础(JS)-LayaAir3D之Animator动画) [ 95%]

...tateScriptTest extends Laya.AnimatorStateScript { constructor() { super(); this._text = null; } get text() { return this._text; } set text(value) { this._text = value; } /** * 动画状态开始时执行。 */ onStateEnter() { console.log("动画开始播放了"); this._text.text = "动画状态:...

来源: Laya2.0_文档 发布时间: 20210715

39. 屏幕适配-屏幕适配 [ 95%]

...le)"; txt.bold = true; txt.pos(0, 200); txt.fontSize = 30; txt.on("click", this, onTxtClick); Laya.stage.addChild(txt); //实例一个小人,放到右上角,并相对布局 var boy1 = new Image(); boy1.skin = "../../res/cartoonCharacters/1.png"; boy1.top = 0; boy1.right = 0; boy1.on("click", thi...

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

40. 文本-下划线 [ 95%]

...aya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; this.createTexts(); } createTexts() { this.createText('left', null, 100, 10); this.createText('center', "#00BFFF", 155, 150); this.createText('right', "#FF7F50", 210, 290); } createText(align, underlineColor, x, y) { const Te...

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