大约有 52 项符合查询结果, 库内数据总量为 31,722 项。 (搜索耗时: 0.0080 秒)
...排版不居中 从0.1 版本升级到2.0后, HTMLDivElement 的 contextWidth没有组件的width大,没有相对组件居中。 异常情况 正常情况 代码如下 htmlDiv.width = 300; htmlDiv.height = 100; htmlDiv.style.color = color; htmlDiv.style.leading = leading; htmlDiv.s...
来源: Laya_社区 发布时间: 20190227
...Demo { public function GraCmdsDemo() { //初始化舞台 Laya.init(Browser.width,Browser.height,WebGL); //预加载资源 Laya.loader.load(['apes/monkey0.png','apes/monkey1.png','apes/monkey2.png','apes/monkey3.png'],Handler.create(this,onLoaded)); } private function onLoaded():void { //获取纹理...
来源: Laya_社区 发布时间: 20170519
...nt("canvas"); let cxt:CanvasRenderingContext2D = cav.getContext("2d"); cav.width = 256; cav.height = 256; cxt.fillStyle = 'rgb(' + '255' + ',' + '0' + ',0)'; cxt.font = "bold 50px 宋体"; cxt.textAlign = "center";//文本的对齐方式 cxt.textBaseline = "center";//文本相对于起点的位置 /...
来源: Laya_社区 发布时间: 20191211
...rite(); this._body.graphics.drawCircle(0, 0, this._objectInfo.templateInfo.width, "#ff0000"); this._body.width = this._objectInfo.templateInfo.width; this._body.height = this._objectInfo.templateInfo.height; this.addChild(this._body); this.on(Event.MOUSE_OVER, this, this.__onMouseOverHole); this.on(...
来源: Laya_社区 发布时间: 20180308
...dimage的描述是: loadImage(url:String, x:Number = 0, y:Number = 0, width:Number = 0, height:Number = 0, complete:Handler = null) 官方文档也是这么用的:http://ldc.layabox.com/doc/?nav=zh-ts-1-3-2 我把文档的代码完整复制到vscode里,vs code会报错。IDE F6 运行也编...
来源: Laya_社区 发布时间: 20200522
...完之后才发现的,不想重新算坐标,就这样了。var g_stat_width = 800; var g_stat_heiht = 600; Laya.init(g_stat_width, g_stat_heiht); 加入下列代码设置窗口位置和拉伸效果。Laya.stage.scaleMode = Laya.Stage.SCALE_SHOWALL; Laya.stage.screenMode = Laya.Stage.SCREEN_HORIZ...
来源: Laya_社区 发布时间: 20160623
...edMap.createMap("res/tiledMap/t2.json", new Rectangle(0, 0, Laya.stage.width, Laya.stage.height), Handler.create(this, this.mapLoaded), null, new Point(1600, 800)); } private onStageClick(): void { var p: Point = new Point(0, 0); ...
来源: Laya_社区 发布时间: 20201230
...wifi 2018-01-09 20:50:15.134 ZhuaWawa[2531:1863752] =============onGLReady width=1080,height=1920 2018-01-09 20:50:15.135 ZhuaWawa[2531:1863752] download thread num = 3 2018-01-09 20:50:15.146 ZhuaWawa[2531:1863752] found the file in the package:shaders/todevVS.glsl 2018-01-09 20:50:15.147 ZhuaWawa[...
来源: Laya_社区 发布时间: 20180109
...:Label = new Label(); demoLable2.text = "上个Lable的宽: " + demoLable1.width + ", 高: " + demoLable1.height; demoLable2.fontSize = 50; demoLable2.bgColor = "#0FF"; demo.addChild(demoLable2.pos(0,50)); } 附件 : --> 2018-05-30 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到...
来源: Laya_社区 发布时间: 20180530
...ew Laya.TiledMap(); var viewRect = new Laya.Rectangle(-50,-50,Laya.Browser.width,Laya.Browser.height); this.tMap.createMap("res/map/map.json",viewRect); // 精灵 var sp = new Laya.Sprite(); sp.graphics.drawRect(0, 0, 100, 100, "#FF0000", "#0000FF", 1) sp.zOrder = 1000; 请问这里如何把...
来源: Laya_社区 发布时间: 20180721