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

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

21. IDE-显示IDE创建的界面 [ 90%]

...的value为2 //复杂复制,可以通知某个属性,比如:label:{color:"#ff0000",text:"Hello LayaAir"} this.box.dataSource = {slider: 50, scroll: 80, progress: 0.2, input: "This is a input", label: {color: "#ff0000", text: "Hello LayaAir"}}; //list赋值,先获得一个数据源数组 var ...

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

22. 计时器-延迟调用 [ 90%]

...age.ALIGN_CENTER; Laya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; demonstrate(); })(); function demonstrate() { for (var i = 0; i < 10; i++) { Laya.timer.callLater(this, onCallLater); } } function onCallLater() { console.log("onCallLater triggered"); var text = new Text()...

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

23. Sprite-缓存为静态图像 [ 90%]

...lignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = "showall"; Laya.stage.bgColor = "#232628"; Stat.show(); setup(); })(); function setup() { var textBox = new Sprite(); // 随机摆放文本 var text; for (var i = 0; i < 1000; i++) { text = new Text(); text.fontSize = 20; text.text = (Math.random() ...

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

24. 计时器-延迟调用 [ 90%]

...age.ALIGN_CENTER; Laya.stage.scaleMode = 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...

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

25. Sprite-缓存为静态图像 [ 90%]

...age.ALIGN_CENTER; Laya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; Laya.Stat.show(); this.cacheText(); } cacheText() { const Sprite = Laya.Sprite, Text = Laya.Text; let textBox = new Sprite(); Laya.stage.addChild(textBox); // 随机摆放文本 let text; for (let i = 0; i ...

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

26. list ,增加item ,我想在末尾增加,但是每次都给我翻倍的增加,如何解决 [ 89%]

...ext = new Text(); this.text.fontSize = 20; this.text.pos(12, 5); this.text.color = "#FF00FF"; this.text.zOrder = 1; this.addChild(this.text); this.setImg = function(data) { var aar=[[150,160],[10,80],[150,0],[300,80]]; this.text.text="房号:1000000\n底分:222222\n玩法:看牌抢庄" this.jushu = ...

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

27. 文本-自动调整文本尺寸 [ 89%]

...lignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = "showall"; Laya.stage.bgColor = "#232628"; setup(); })(); function setup() { // 该文本自动适应尺寸 var autoSizeText = createSampleText(); autoSizeText.overflow = Text.VISIBLE; autoSizeText.y = 50; // 该文本被限制了宽度 var widthLim...

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

28. 文本-自动调整文本尺寸 [ 89%]

...age.ALIGN_CENTER; Laya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; this.setup(); } setup() { const Text = Laya.Text; // 该文本自动适应尺寸 var autoSizeText = this.createSampleText(); autoSizeText.overflow = Text.VISIBLE; autoSizeText.y = 50; // 该文本被限制...

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

29. 文本-自动换行 [ 88%]

...age.ALIGN_CENTER; Laya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; this.createText(); } createText() { const Text = Laya.Text; var txt = new Text(); Laya.stage.addChild(txt); txt.text = "Layabox是HTML5引擎技术提供商与优秀的游戏发行商,面向AS/JS/TS开发...

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

30. 文本-自动换行 [ 88%]

...age.ALIGN_CENTER; Laya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; createText(); })(); function createText() { var txt = new Text(); txt.text = "Layabox是HTML5引擎技术提供商与优秀的游戏发行商,面向AS/JS/TS开发者提供HTML5开发技术方案!"; txt....

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