大约有 159 项符合查询结果, 库内数据总量为 30,961 项。 (搜索耗时: 0.0037 秒)
...aAirDemo { public function LayaAirDemo() { Laya.init(Browser.width,Browser.height); Laya.stage.bgColor="#EEFFCC"; //预加载button的资源,用于tab的项皮肤 Laya.loader.load("button-4.png",Handler.create(this,onLoaded)); } private function onLoaded():void { //添加tab容器 var tab:Tab=new ...
来源: Laya_社区 发布时间: 20170626
...; var SPACING = 100; var INPUT_WIDTH = 300; var INPUT_HEIGHT = 50; var Y_OFFSET = 50; var skins; (function() { // 不支持WebGL时自动切换至Canvas Laya.init(800, 600, WebGL); Laya.stage.alignV = Stage.AL...
来源: Laya_社区 发布时间: 20190814
....mouseY); var tex:Texture = new Texture(hc); trace(tex.width + "---" + tex.height + "---" + getPixel(tex)); /*获取所画曲线鼠标点击处的像素,为何坐标对不上? 导致无法拿到正确位置的Texture*/ /*var spr:Sprite = new Sprite(); spr.graphics.drawTexture(tex); this.addChild...
来源: Laya_社区 发布时间: 20180319
...+) { if(count == 10000) { var htmlCanvas:HTMLCanvas = a.drawToCanvas(width,height,0,0); var texture:Texture = new Texture(htmlCanvas); var b:Sprite = new Sprite(); b.graphics.drawTexture(texture); a.graphics.clear(true); a.destroy(); a = b; } a.graphics.drawRect(10*i, 10*j, 10, 10, "#ff0000"); count...
来源: Laya_社区 发布时间: 20181113
...i*(stageWidth/4) },1500,Ease.sineOut); var bl:Number=texture.width/texture.height ape.graphics.drawTexture(texture,0,0,stageWidth/4,stageWidth/4/bl); apesCtn.addChild(ape); } } 这种方法HBox布局不管用,是不是不能用graphics.drawTexture方法,如果用addChild方法加载Loader.getRes...
来源: Laya_社区 发布时间: 20161026
... 0; i <20; ++i) { let list = new Laya.Sprite(); list.width = 600 ; list.height = 155; list.loadImage('xxx.png'); //此处无论是这样给 list.on(Laya.Event.CLICK, this, () => { console.log(413132131) }) //还是在handler中去渲染,都会滚动不了 txArray.push(list);} storeTxList.arr...
来源: Laya_社区 发布时间: 20190711
...enderTexture = Laya.RenderTexture.createFromPool(viewPort.width,viewPort.height,Laya.RenderTextureFormat.R8G8B8A8,Laya.RenderTextureDepthFormat.DEPTHSTENCIL_NONE); //将RenderTexture设置为渲染目标 buf.setRenderTarget(renderTexture); //清楚...
来源: Laya_社区 发布时间: 20210203
...+) { if(count == 10000) { var htmlCanvas:HTMLCanvas = a.drawToCanvas(width,height,0,0); var texture:Texture = new Texture(htmlCanvas); var b:Sprite = new Sprite(); b.graphics.drawTexture(texture); a.graphics.clear(true); a.destroy(); a = b; } a.graphics.drawRect(10*i, 10*j, 10, 10, "#ff0000"); count...
来源: Laya_社区 发布时间: 20181113
...(var i = 0; i < 10; i++) { var item = new Item(); item.pos(0, i * (item.height + 1)); this.container.addChild(item); } } } 3,加载资源,完成后再加载界面 import WebGL = Laya.WebGL; // 程序入口 class GameMain { constructor() { Laya.init(500, 1000, WebGL); Laya.stage.scaleMode = L...
来源: Laya_社区 发布时间: 20180810
..., 300); tree.x = (Laya.stage.width - tree.width) / 2; tree.y = (Laya.stage.height - tree.height) / 2; tree.bgColor = "#d25454"; this.owner.addChild(tree); } } class Item extends Laya.Box { constructor() { super(); this.right = 0; this.left = 0; var selectBox: Laya.Clip = new Laya.Clip("resources/tre...
来源: Laya3.0_文档 发布时间: 20240910