大约有 667 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0054 秒)
Laya_社区(279) Laya3.0_api(93) Laya2.0_api(73) laya_api(62) Laya_示例(54) Laya2.0_示例(54) Laya2.0_文档(33) Laya3.0_文档(19)
...WebGL时自动切换至Canvas Laya.init(Browser.clientWidth, Browser.clientHeight, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; setup(); })(); function setup() { var vGap = 100; but...
来源: Laya_示例 发布时间: 20251130
...ction updateRectPos() { rect.x = Laya.stage.width / 2; rect.y = Laya.stage.height / 2; } })();module laya { import Sprite = Laya.Sprite; import Stage = Laya.Stage; export class SmartScale_Scale_SHOW_ALL { private rect: Sprite; constructor() { Laya.init(550, 400); Laya.stage.scaleMode = Stage.SCALE_S...
来源: Laya_示例 发布时间: 20251130
...ction updateRectPos() { rect.x = Laya.stage.width / 2; rect.y = Laya.stage.height / 2; } })();module laya { import Sprite = Laya.Sprite; import Stage = Laya.Stage; export class SmartScale_Scale_EXTRACT_FIT { private rect: Sprite; constructor() { Laya.init(550, 400); Laya.stage.scaleMode = Stage.SCAL...
来源: Laya_示例 发布时间: 20251130
... 如下 AppConfig.viewRect = {};var divWidth = window.innerWidth; var divHeight = window.innerHeight; var devicePixelRatio = Laya.Browser.pixelRatio; var divH = divHeight * devicePixelRatio; var divW = divWidth * devicePixelRatio; var desH = Laya.stage.height; var desW = Laya.stage.width; //设备...
来源: Laya_社区 发布时间: 20171205
...神解答 // 初始化ListView function createListView(x, y, width, height, item_width, item_height) { var list = new Laya.List(); list.itemRender = initItem(item_width, item_height); list.repeatX = 1; list.size(width, height); list.x = x; list...
来源: Laya_社区 发布时间: 20180724
...private init():void { console.log("init", this.x, this.y, this.width, this.height, this.scaleX, this.scaleY); var createOption: any = { isStatic: false, }; this.matterBody = Matter.Bodies.rectangle(this.x, this.y, this.width, this.height, createOption); Matter.World.add(GameMain.instance.engine.worl...
来源: Laya_社区 发布时间: 20180530
...this.closeBtn.x-10,this.closeBtn.y-10,this.closeBtn.width+20,this.closeBtn.height+20,"#FF0000"); let hitA:Laya.HitArea = new Laya.HitArea(); hitA.hit = g; this.closeBtn.hitArea = hitA; // 写法二 this.closeBtn.graphics.drawRect(this.closeBtn.x-10,this.closeBtn.y-10,this.closeBtn.width+20,this.clos...
来源: Laya_社区 发布时间: 20170920
...个bug drawCanvas(canvas: HTMLCanvas, x: number, y: number, width: number, height: number): void { if (!canvas) return; var src: Context = canvas.context as Context; var submit: ISubmit; if (src._targets) { //生成渲染结果到src._targets上 /* this._submits[this._submits._length++] = SubmitCanv...
来源: Laya_社区 发布时间: 20210527
...口,Sprite所有的绘图操作都通过Graphics来实现的。Sprite height : Number 显示对象的高度,单位为像素,默认为0。 此高度用于鼠标碰撞检测,并不影响显示对象图像大小。需要对显示对象的图像进行缩放,请使用scale、scaleX、scaleY...
来源: laya_api 发布时间: 20170929
...以通过getbounds获取显示对象图像的实际高度。</p> */ height: number; 2018-09-04 1 1 分享 微博 QZONE 微信 阿耀 赞同来自: srr5220 role对象有个layaSprite属性,这个layaSprite就是一个普通的sprite对象,改变这个对象的大小即可。 不过要注意...
来源: Laya_社区 发布时间: 20180827