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

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

231. 对象mask的区域改变问题! [ 67%]

...__mask = new Laya.Sprite(); this.__mask.graphics.drawRect(0,0,this.img_bar.width,this.img_bar.height,"#000000"); this.setValue(0); } private setValue(v:number):void{ this.__mask.scaleX = v; this.img_bar.mask = null;//第二次设置mask的时候必须给原对象的mask置空,否则无效 this.img_b...

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

232. drawTexture 画出来的数据会有以前的数据 [ 67%]

...lhjicon_5.png"); img.x = 640; img.y = 320; iconSpr = new Sprite(); iconSpr.width = 1280; iconSpr.height = 640; iconSpr.addChild(img); btn.on(Event.CLICK,this,runGame1); } private function runGame1():void { xNum = Math.random()*7 - 3; yNum = Math.random()*7 - 3; Laya.timer.loop(20,this,onRun); Laya.t...

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

233. laya.display.Input_API3.0 [ 67%]

...ordChar drawtocanvCtx isAppUseNewInput langPacks Accessors _isHeightSet _isWidthSet active activeInHierarchy align alpha anchorX anchorY bgColor blendMode bold borderColor cacheAs color components customRenderEnable destroyed displayHeight displayWidth displayedInStage drawCallOptimize editable filt...

来源: Laya3.0_api 发布时间: 20231115

234. js环境下使用Loader加载图片在Sprite对象的.on函数无效 [ 67%]

...被触发 //设置背景图片 this.bgimg = new Laya.Sprite(); this.bgimg.width=2*scronw; this.bgimg.height=2*scronh; //加载显示图片,坐标位于0,0 var temptexture=Loader.getRes(pic); if (typeof(temptexture)!="undefined"){ this.bgimg.texture=Loader.getRes(pic) }else{ this.bgimg.loadImage(pi...

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

235. Cannot read property 'toDefault' of undefined报错是什么原因 [ 66%]

...HADING; Laya.stage.addChild(new MousePickingScene()); // Laya.init(Browser.width, Browser.height); // Laya.stage.scaleMode = Stage.SCALE_NOSCALE; infoText = "距离:null"; mySwitch = true; target = new BMap.Point(113.392307, 23.062487); createDom(); initMap(); createButton(); var successHandler = ...

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

236. IDE1.7.19.1beta打包apk后后,播放spine动画出现图片缺失 [ 66%]

...' /> <title>XXXXX</title> <meta name='viewport' content='width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no' /> <meta name="renderer" content="webkit" /> <meta name='apple-mobile-web-app-capable' content='yes' /> <meta name='...

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

237. LayaAir下加载阿拉伯TTF字体,手机上显示时左右顺序反了。 [ 66%]

...text.fontSize=50; text.text="لحسن نهر123"; text.pos(100, 100); text.width = 500; text.height = 500; Laya.stage.addChild(text); }   参考该贴加载字体方式: https://ask.layabox.com/question/332 附件 : --> LayaFontTest.zip 2018-07-05 添加评论 已悬赏10元 --> 分享 微博 QZO...

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

238. 使用laya官方示例代码制作微信小游戏无法显示 [ 66%]

...vate createLabel(color: string, strokeColor: string): Label { const STROKE_WIDTH: number = 4; var label: Label = new Label(); label.font = "Microsoft YaHei"; label.text = "SAMPLE DEMO"; label.fontSize = 30; label.color = color; if (strokeColor) { label.stroke = STROKE_WIDTH; label.strokeColor = stro...

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

239. LayaAir和原生DOM交互(TypeScript-2D进阶篇(TS)-扩展模块) [ 66%]

...t.createElement("div"); this.qrcode = new Laya.Browser.window.QRCode(div,{ width:100, height:100 }); var url:string = "http://layabox.com/"; this.qrcode.makeCode(url); Laya.stage.once("click",this,this.clickHandler); this.qrcodeSp = new Laya.Sprite(); Laya.stage.addChild(this.qrcodeSp); } private cl...

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

240. Laya.loader.load(xx) 当地址""的时候,会报错。 [ 66%]

...D)) {                     tex = new Texture2D(data.width, data.height, 1, false, false);                     tex.wrapModeU = exports.WarpMode.Clamp;                     tex.wrapModeV = exports.WarpMode.Clamp;          ...

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