大约有 163 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0041 秒)
... {"child": [{"type": "Clip", "props": {"x": "13", "y": "0", "left": "12", "height": "24", "name": "selectBox", "skin": "ui/clip_selectBox.png", "right": "0", "clipY": "2"}}, {"type": "Clip", "props": {"y": "4", "x": "14", "name": "folder", "clipX": "1", "skin": "ui/clip_tree_folder.png", "clipY": "3...
来源: Laya2.0_文档 发布时间: 20210715
... object or misses all objects. * When not penetrable, the node's width and height define the mouse collision area (a non-penetrable rectangular area). If the rectangular collision area does not meet the requirements, you can use the drawing area of the hit area as the collision area. The hit area ta...
来源: Laya_社区 发布时间: 20250825
..., 300); tree.x = (Laya.stage.width - tree.width) / 2; tree.y = (Laya.stage.height - tree.height) / 2; Laya.stage.addChild(tree); } } } import Box = Laya.Box; import Clip = Laya.Clip; // 此类对应的json对象: // {"child": [{"type": "Clip", "props": {"x": "13", "y": "0", "left": "12", "height":...
来源: Laya2.0_文档 发布时间: 20210714
...// 不支持WebGL时自动切换至Canvas Laya.init(Browser.width, Browser.height, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; this.setup(); } setup() { let xmlValueContainsError =...
来源: Laya2.0_示例 发布时间: 20251130
...proto = Hp.prototype; _proto.init = function(type){ this.width = 180; this.height = 21; var texture1 = Laya.loader.getRes("res/hp_bg.png"); var texture2; switch (type) { case Hp.HP_TYPE_ENERGY: texture2 = Laya.loader.getRes("res/en_bar.png"); break; case Hp.HP_TYPE_SPEED: texture2 = Laya.loader.getR...
来源: Laya_社区 发布时间: 20160803
...nt1.addComponentIntance(pointRB1); let preBody = pointRB1; let width = 20, height = 2.5; for (let i = 0; i { let targetX = (300 + Math.random() * 400) / Laya.Physics.PIXEL_RATIO, targetY = 500 / Laya.Physics.PIXEL_RATIO; let newBall = new Laya.Sprite(); Laya.Laya.stage.addChild(newBall); let circleB...
来源: Laya2.0_示例 发布时间: 20251130
...empSpr2.graphics.drawTexture(tempSpr.texture, 0, 0, tempSpr.width, tempSpr.height);”中 tempSpr.texture 是空的 if (data && data.items != []) { let tempSpr: Sprite = new Sprite(); let tempImg: Laya.Image; let arr: Array<object>...
来源: Laya_社区 发布时间: 20170508
...) { var settings = { canvas:null, canvasWidth:512, //canvas的宽度 canvasHeight:128, //canvas的宽度 font:"40px 'Microsoft Yahei'", //文字样式 text:"请修改掉默认的配置", //需要绘制的文本 color:"#000000", //文字的颜色 backgroundColor:"#f...
来源: Laya_社区 发布时间: 20180814
... /** * 生成一个矩形2D网格 * @param width 矩形的宽度 * @param height 矩形的高度 */ private generateRectVerticesAndUV(width: number, height: number): Laya.Mesh2D { const vertices = new Float32Array(4 * 5); const indices = new Uint16Array(2 * 3); let index = 0; vertices[index++] = 0; ...
来源: Laya3.0_文档 发布时间: 20251120
...l = this._getOneCell(); var cellWidth = cell.width + this._spaceX; var cellHeight = cell.height + this._spaceY; if (this.cacheContent) { var cacheBox = new Box(); cacheBox.cacheAsBitmap = true; cacheBox.pos((this._isVertical ? 0 : startY) * cellWidth, (this._isVertical ? startY : 0) * cellHeight); t...
来源: Laya_社区 发布时间: 20180418