大约有 232 项符合查询结果, 库内数据总量为 31,671 项。 (搜索耗时: 0.0045 秒)
...并且已经加载完成,图片原大小51*23,Image的宽高设置为640*49 当给这张图片设置新的skin时(新的skin为187*10),新的skin无法正确的拉伸到640*49,会出现显示错误。 在UI编辑器和代码中,都是这样。 UI编辑器中,要选一下其他地...
来源: Laya_社区 发布时间: 20170423
...对齐将不会有效果。 ```javascript //初始化引擎 Laya.init(1136,640); var txt = new Laya.Text(); //设置文本内容 txt.text = "hello_world"; //设置文本区背景 txt.bgColor = "#c30c30"; //设置文本的宽高 txt.width = 400; txt.height = 400; //设置文本水平居中 txt.align ...
来源: Laya2.0_文档 发布时间: 20210715
...为方块。是使用WebGL是正常的。 不使用WebGL Laya.init(1136, 640) 使用WebGL Laya.init(1136, 640, WebGL); 2017-01-21 0 0 分享 微博 QZONE 微信 wyg3732630 赞同来自: webGl 下 blendMode = "destination-out";出现黑块的问题 需要怎么解决? 2017-12-22 0 1 分享...
来源: Laya_社区 发布时间: 20170120
...yaSample { public function LayaSample() { //初始化引擎 Laya.init(1136,640); var txt:Text = new Text(); //设置文本内容 txt.text = "hello_world"; //设置文本区背景 txt.bgColor = "#c30c30"; //设置文本的宽高 txt.width = 400; txt.height = 400; //设置文本水平居中 txt.align ...
来源: Laya2.0_文档 发布时间: 20210715
...oid { removeEventListener(Event.ADDED_TO_STAGE, init); IFlash.setSize(960, 640); //2D项目中设置场景尺寸 IFlash.setOrientationEx(1); //是否为横屏模式 IFlash.setBgcolor("#000000"); //背景色 IFlash.showInfo(false); //是否显示帧率 //[IF-JS]value = 100; } } } 代码中使用La...
来源: Laya_社区 发布时间: 20151218
...ublic function TestView() { img = new Image("comp/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.rand...
来源: Laya_社区 发布时间: 20180113
...sp1.addChild(sp2); this.addChild(sp1); const htmlCanvas = sp1.drawToCanvas(640, 200, 0, 0); const canvas = htmlCanvas.getCanvas(); trace(canvas.toDataURL('image/png')); const texture = new Laya.Texture(htmlCanvas); const sp = new Sprite(); sp.graphics.drawTexture(texture); this.shot.addChild(sp);对...
来源: Laya_社区 发布时间: 20171018
...帮忙看下这个是什么问题 代码如下 //Laya初始化: Laya.init(640, 960, WebGL); // 这个图片是模糊的 Laya.init(640, 960, WebGL); // 这个图片是清晰的 //纹理创建 sharedCanvasTexture = new Texture(Browser.window.sharedCanvas); sharedCanvasTexture.bitmap.alwaysChange ...
来源: Laya_社区 发布时间: 20180522
...aSample { public function LayaSample() { //初始化引擎 Laya.init(1136, 640); var func:Function = new A().method; func(); } } } package { public class A { private var _attr:int = 123; public function A() { } public function method():void { trace(_attr); } } } 2016-12-13 添加评论 免费帖 -->...
来源: Laya_社区 发布时间: 20161213
...ate Res: string; private img: Laya.Image; constructor() { //Laya.init(400, 640, Laya.WebGL); //设置舞台背景色 Laya.stage.bgColor = "#ffffff" Laya.Stat.show() //资源路径 this.Res = "test.png"; this.img = new Laya.Image(); this.img.pos(200, 200) //获取图片资源,绘制到画布 this.i...
来源: Laya_社区 发布时间: 20171211