大约有 573 项符合查询结果, 库内数据总量为 30,784 项。 (搜索耗时: 0.0047 秒)
Laya_社区(216) Laya3.0_api(192) Laya2.0_api(58) laya_api(53) Laya2.0_文档(26) Laya3.0_文档(14) Laya2.0_示例(8) Laya_示例(6)
...{ private var list:List; public function LayaAirDemo() { Laya.init(Browser.width,Browser.height); Laya.stage.bgColor="#EEFFCC"; Laya.loader.load("res/atlas/comp.json",Handler.create(this,onLoaded),null,Loader.ATLAS); } private function onLoaded():void { list=new List(); Laya.stage.addChild(list); li...
来源: Laya_社区 发布时间: 20170626
...getRes(this.skin_img1); sprite.graphics.drawTexture(texture, 0, 0, texture.width, texture.height); sprite.size(texture.width, texture.height); let x: number = 300; let y: number = 100; let scaleRatio: number = 1.3; sprite.pos(x, y); // sprite.graphics.drawCircle(texture.width/2, texture.height/2, 10...
来源: Laya_社区 发布时间: 20170821
...bg:Image = new Image("resource/ui/bg.png"); bg.sizeGrid = "40,10,5,10"; bg.width = 150; bg.height = 250; addChild(bg); var image:Image = new Image("resource/ui/image.png"); addChild(image); var button:Button = new Button("resource/ui/btn_close.png"); button.name = Dialog.CLOSE;//设置button的name...
来源: Laya3.0_api 发布时间: 20231115
...9/xlink" version="1.1" '; data += 'viewBox="0 0 ' + this.width + ' ' + this.height + '" '; // set svg width and height data += 'width="' + this.width + '" height="' + this.height + '">'; data += '<defs>'; ...
来源: Laya_社区 发布时间: 20180824
...tion() { // 不支持WebGL时自动切换至Canvas Laya.init(Browser.clientWidth, Browser.clientHeight, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = "showall"; Laya.stage.bgColor = "#232628"; setup(); })(); function setup() { createPa...
来源: Laya_社区 发布时间: 20180808
...ublic saveImg() { let htmlCanvas: any = Laya.stage.drawToCanvas(Laya.stage.width, Laya.stage.height, 0, 0); let canvas: any = htmlCanvas.sourse; canvas.toTempFilePath({ x: 100, y: 200, width: 50, height: 50, destWidth: 100, destHeight: 100, fileType: "png", quality: 1.0, success: (res) => { conso...
来源: Laya_社区 发布时间: 20200108
...建input z_file.style="filter:alpha(opacity=0);opacity:0;width: 29%;height:11%;"; z_file.type ="file";//设置类型是file类型。 z_file.id ="z_sfz";//设置ID。 z_file.accept="image/*";//设置文件的格式为png; ...
来源: Laya_社区 发布时间: 20171128
...如图这种适配问题 适配方案是这样的: const GAME_CONFIG = { WIDTH: 1334, HEIGHT: 750, SCREEN_MODE: Laya.Stage.SCREEN_HORIZONTAL, //可选自动横屏:Laya.Stage.SCREEN_HORIZONTAL 或者 自动竖屏:Laya.Stage.SCREEN_VERTICAL SCALE_MODE: Laya.Stage.SCALE_FIXED_WIDTH, //自动横屏时...
来源: Laya_社区 发布时间: 20200410
...w Laya.Sprite(); progressBar.loadImage("comp/BG1.jpg",50,300); progressBar.width=300; progressBar.sizeGrid="5,5,5,5"; progressBar.changeHandler=new Handler(this,onChange); //当progressBar的value值改变时触发 Laya.stage.addChild(progressBar); onchange(); } function onChange(value) { trace("进...
来源: Laya_社区 发布时间: 20170701
...eo.loop = true; var texture2D = new Laya.Texture2D(videoTexture.video.videoWidth,videoTexture.video.videoHeight); var texture:Laya.Texture = new Laya.Texture(texture2D); var image:Laya.Image = new Laya.Image(); image.texture = texture; image.width = videoTexture.video.videoWidth; image.height = vide...
来源: Laya_社区 发布时间: 20240305