大约有 10 项符合查询结果, 库内数据总量为 30,956 项。 (搜索耗时: 0.0049 秒)
...dFromAStarMap(texture): any { var textureWidth = texture.width; var textureHeight = texture.height; var pixelsInfo = texture.getPixels(); var aStarArr = []; var index = 0; for (var w = 0; w < textureWidth; w++) { var colaStarArr = aStarArr[w] = []; for (var h = 0; h < textureHeight; h++) { var...
来源: Laya3.0_文档 发布时间: 20230303
...e var renderTexture = RenderTexture.createFromPool(viewPort.width,viewPort.height,RenderTextureFormat.R8G8B8,RenderTextureDepthFormat.DEPTHSTENCIL_NONE); this.texture = renderTexture; //将当前渲染的结果拷贝到创建好的RenderTexture buf.blitScreenTriangle(null,renderTexture); //获得模...
来源: Laya3.0_文档 发布时间: 20240910
...果。 var data = '<svg xmlns="http://www.w3.org/2000/svg" width="200" height="200">' + '<foreignObject width="100%" height="100%">' + '<div xmlns="http://www.w3.org/1999/xhtml" style="font-size:40px">' + '<em>I</em> like ' + '<span style="color:white; text-shadow: 0...
来源: Laya3.0_文档 发布时间: 20240910
... /** * 生成一个矩形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_文档 发布时间: 20250321
..., 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
.../ onAwake(): void { this.txtin.pos(Laya.stage.width >> 1, Laya.stage.height >> 1); //位置 this.txtin.size(500, 60); //大小 this.txtin.pivot(this.txtin.width/2, this.txtin.height/2); //轴心点 this.txtin.font = "宋体"; //字体 this.txtin.fontSize = 50; //字体大小 this.txtin.c...
来源: Laya3.0_文档 发布时间: 20240910
...te COLUMNS: number = 2; private BUTTON_WIDTH: number = 147; private BUTTON_HEIGHT: number = 165 / 3; private HORIZONTAL_SPACING: number = 200; private VERTICAL_SPACING: number = 100; private xOffset: number; private yOffset: number; private skins: any[]; //组件被激活后执行,此时所有节...
来源: Laya3.0_文档 发布时间: 20240910
...eatY = 4; list.x = (Laya.stage.width - Item.WID) / 2; list.y = (Laya.stage.height - Item.HEI * list.repeatY) / 2; // 设置List的垂直滚动 list.scrollType = Laya.ScrollType.Vertical; // 设置List的垂直滚动皮肤,不设置或者""就没有滚动条皮肤 list.vScrollBarSkin = ""; // 开...
来源: Laya3.0_文档 发布时间: 20240910
...png",0,0,0,0,Laya.Handler.create(this,function() { console.log(sp.width,sp.height); })); Laya.stage.addChild(sp); loadImage在加载完成的回调函数触发之后才可以正确获取宽高。 直接调用size设置: Laya.loader.load("res/apes/monkey2.png",Laya.Handler.create(this,function() { ...
来源: Laya3.0_文档 发布时间: 20240910
...iewport.y; this._rayViewport.width = ILaya.stage._width; this._rayViewport.height = ILaya.stage._height; Picker.calculateCursorRay(point, this._rayViewport, this._projectionMatrix, this.viewMatrix, null, out); } 参照3D-RPG项目,我们加上一段代码,当鼠标点击屏幕时,会发射一...
来源: Laya3.0_文档 发布时间: 20240910