大约有 850 项符合查询结果, 库内数据总量为 31,580 项。 (搜索耗时: 0.0042 秒)
Laya_社区(460) Laya3.0_api(77) laya_api(70) Laya2.0_api(64) Laya3.0_文档(53) Laya2.0_文档(50) Laya2.0_示例(39) Laya_示例(37)
...数组:["a.png","b.png"];复杂数组[{url:"a.png",type:Loader.IMAGE,size:100,priority:1},{url:"b.json",type:Loader.JSON,size:50,priority:1}]。 * @param complete 加载结束回调。根据url类型不同分为2种情况:1. url为String类型,也就是单个资源...
来源: Laya_社区 发布时间: 20180502
...还好,就是自定义字体这块,说的好简略。我先是用font-size方式在index.html里面引入字体,在webgl上能正常显示,但是导入到微信小游戏后,就不能正常显示了。 我看了官方的说明书,上面明说了ttf在微信的白皮书里面,为啥就...
来源: Laya_社区 发布时间: 20180728
...laya.ui.Label = new laya.ui.Label(); // label.text = "Hello"; // label.fontSize = 50; // label.color = "#FF00FF"; // label.wordWrap = true; // label.width = 100; // label.height = 100; // label.x = 100; // label.y = 100; // Laya.stage.addChild(label); } } }自己写的label类:package { import lay...
来源: Laya_社区 发布时间: 20170516
...exture repeat : Boolean 是否使用重复模式纹理寻址 BaseTexture size : Size[read-only] 获取尺寸。 BaseTexture source : *[read-only] 获取纹理资源。 BaseTexture width : int[read-only] 获取宽度。 BaseTexturePublic Methods MethodDefined By Texture2D(canRead:Boolean = f...
来源: laya_api 发布时间: 20170929
...; Laya.stage.bgColor = "#FFFFFF"; this.form = new Laya.Sprite(); this.form.size(250,120); this.form.pos((Laya.stage.width - this.form.width) / 2, (Laya.stage.height - this.form.height) / 2); Laya.stage.addChild(this.form); this.rowHeight = 30; this.rowSpacing = 10; var rowHeightDelta = this.rowSpaci...
来源: Laya_示例 发布时间: 20251209
...prite = Laya.Sprite; let btn = new Sprite(); Laya.stage.addChild(btn); btn.size(w, h); btn.graphics.drawRect(0, 0, w, h, "#FF7F50"); btn.graphics.fillText(labelText, w / 2, 8, "24px SimHei", "#FFFFFF", "center"); return btn; } // 播放音效 onPlaySound() { console.log("播放音效"); Laya.SoundMa...
来源: Laya2.0_示例 发布时间: 20251209
...Button(label) { var w = 110; var h = 40; var button = new Sprite(); button.size(w, h); button.graphics.drawRect(0, 0, w, h, "#FF7F50"); button.graphics.fillText(label, w / 2, 8, "25px SimHei", "#FFFFFF", "center"); Laya.stage.addChild(button); return button; } function onPlayMusic(e) { console.log("...
来源: Laya_示例 发布时间: 20251209
...e(); var w = 200, h = 300; sp.graphics.drawRect(0, 0, w, h, "#FF7F50"); sp.size(w, h); sp.pivot(w / 2, h / 2); sp.pos(Laya.stage.width / 2, Laya.stage.height / 2); Laya.stage.addChild(sp); sp.on(Event.MOUSE_DOWN, this, onMouseDown); } function onMouseDown(e) { var touches = e.touches; if (touches &&...
来源: Laya_示例 发布时间: 20251209
...宽高。 或者 如果在已知宽高的情况下,要设置过input.size(),或者input.width和input.height后去取input.width和input.height才是对的(否则宽高值获取不到,均为0)。 2016-06-18 0 3 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 要...
来源: Laya_社区 发布时间: 20160617
...]); var clipnum1 = new FontClip(assets[0]); clipnum.pos(240, 500); clipnum.size(250, 50); clipnum.sheet = "0123456789"; clipnum.value = "114499"; clipnum.spaceY = 10; TestClipNum.pos(200, 400); TestClipNum.sheet = "0123456789"; TestClipNum.value = "0123456789"; clipnum1.pos(150, 200); clipnum1.direc...
来源: Laya2.0_示例 发布时间: 20251209