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

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

541. 关于HttpRequest [ 70%]

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

542. 微信小游戏iPhone X 等解决方案 [ 70%]

...caleY = height/SCREEN_HEIGHT;     var scaleX = width/SCREEN_WIDTH;     if(scaleX > scaleY)     {          var scale = scaleY/scaleX;          //场景          if(SCENE) {                 SCENE.scaleX = scale;          }          //存放的dialog       ...

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

543. 新手引导在ios浏览器表现异常 [ 70%]

... = new Laya.Handler(this, () => {                 if (button) {                     if (button instanceof Laya.Button) {                         if (button.clickHandler) {                          ...

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

544. native下不支持大图合集吗? [ 70%]

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

545. laya 1.0 源码中 RunDriver.as里measureText的问题 [ 70%]

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

546. 其他引擎的Demo-Example_21 [ 70%]

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

547. 微信小游戏自定义震动效果 [ 70%]

...       wx.vibrateShort();         index++;         if (index > count) {                 Laya.timer.clearAll(obj);         }     }); }   JS代码: /** * 震动时间 * @param time  毫秒数 */ function vibrate(time){  let count=time/...

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

548. ZipFile类用readFile读取文件内容时,整个界面都会卡住 [ 70%]

...复正常。   示例代码: 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

549. 关于下拉列表的选择触发 [ 70%]

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

550. 刮刮卡效果实现 [ 70%]

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