大约有 1,491 项符合查询结果, 库内数据总量为 31,624 项。 (搜索耗时: 0.0154 秒)
...ublic static urlEncode(param:any, key?:any, encode:boolean = true):string{ if (param == null) return ''; var paramStr = ''; var t = typeof (param); if (t == 'string' || t == 'number' || t == 'boolean') { paramStr += '&' + key + '=' + ((encode == null || encode) ? encodeURIComponent(param) : para...
来源: Laya_社区 发布时间: 20170628
...caleY = height/SCREEN_HEIGHT; var scaleX = width/SCREEN_WIDTH; if(scaleX > scaleY) { var scale = scaleY/scaleX; //场景 if(SCENE) { SCENE.scaleX = scale; } //存放的dialog ...
来源: Laya_社区 发布时间: 20200423
... = new Laya.Handler(this, () => { if (button) { if (button instanceof Laya.Button) { if (button.clickHandler) { ...
来源: Laya_社区 发布时间: 20200119
...8-07-30 14:56 请问需要怎么开启吗,默认代码是被return了的 if (Render.isConchApp){ if (!Render.isConchWebGL){ RunDriver.skinAniSprite=function (){ var tSkinSprite=new SkinMesh() return tSkinSprite; } WebGL.expandContext(); return false; } Laya_Aaron • 2018-07-30 15:45 这个不是...
来源: Laya_社区 发布时间: 20180730
...tion(txt:String, font:String):* { var isChinese:Boolean = hanzi.test(txt); if (isChinese && fontMap[font]) { return fontMap[font]; } var ctx:* = Browser.context; ctx.font = font; var r:* = ctx.measureText(txt); if (isChinese) fontMap[font] = r; return r; }相关源码如上所示 因为最...
来源: Laya_社区 发布时间: 20190610
...colorCount++ % colors.length]; path.length = 0; } function onMouseMove() { if (!isDown) return; path.push(Laya.stage.mouseX); path.push(Laya.stage.mouseY); } function onMouseUp() { isDown = false; canvasGraphics.drawPoly(0, 0, path.concat(), color); } function animate() { liveGraphics.clear(); liveG...
来源: Laya_示例 发布时间: 20251218
... wx.vibrateShort(); index++; if (index > count) { Laya.timer.clearAll(obj); } }); } JS代码: /** * 震动时间 * @param time 毫秒数 */ function vibrate(time){ let count=time/...
来源: Laya_社区 发布时间: 20190401
...复正常。 示例代码: zip.forEach(function (id, name, dir, sz) { if (!dir) { var buf = zip.readFile(id);//执行这一步时界面就会卡住 var fid = window["appcache"].hashstr('/' + name); if (window["appcache"].updateFile(fid, 0, buf, false)) { console.log("更新缓存文件" + fid +...
来源: Laya_社区 发布时间: 20181228
....small_map.selectedLabel Laya.map_small_c = e } function onSelect_big(e) { if (e != 0) { if (Laya.keys > 0) { Laya.big_switch = 0 Laya.map_big = e Laya.maptype = "big" this.small_map.selectedIndex = 0 this.now_map.text = "当前地图:" + this.big_map.selectedLabel } else { var dia1 = new loadi...
来源: Laya_社区 发布时间: 20180719
...actionArea); interactionArea.graphics.clear(); } function onMouseMove(e) { if(mouseX!=0){ if(Math.abs(mouseX-ape.mouseX)>= 360){ //滑动超过多少距离 自动开奖 ape.visible = false; mouseX = ape.mouseX; } }else{ mouseX = ape.mouseX; } interactionArea.graphics.drawCircle(ape.mouseX, ape.mo...
来源: Laya_社区 发布时间: 20170615