大约有 2,789 项符合查询结果, 库内数据总量为 31,722 项。 (搜索耗时: 0.0078 秒)
Laya_社区(1162) Laya3.0_api(543) Laya2.0_api(297) laya_api(221) Laya2.0_文档(201) Laya_示例(139) Laya3.0_文档(117) Laya2.0_示例(109)
...; uniform mat4 u_WorldMat; attribute vec3 a_Normal; varying vec3 v_Normal; void main() { gl_Position = u_MvpMatrix * a_Position; mat3 worldMat=mat3(u_WorldMat); v_Normal=worldMat*a_Normal; gl_Position=remapGLPositionZ(gl_Position); } ``` 片元着色器 `simpleShader.fs` 代码如下: ```c++ #ifdef ...
来源: Laya2.0_文档 发布时间: 20210715
...鼠标弹起事件响应 Laya.stage.on(Event.MOUSE_UP, this, function (): void { //起始和目标点 var start = this.graph.grid[this.startPoint.x][this.startPoint.y]; var end = this.graph.grid[this.endPoint.x][this.endPoint.y]; //调用A* serach方法获得最短路径 this._everyPath = (window as...
来源: Laya3.0_文档 发布时间: 20230303
...有节点和组件均已创建完毕,此方法只执行一次 onAwake(): void { this.btn.scale(5, 5); //放大五倍 this.btn.skin = "atlas/comp/button.png"; //皮肤 this.btn.stateNum = 3; //皮肤状态 this.btn.label = "确定"; //文本标签 this.btn.labelFont = "宋体"; //文本标签字体...
来源: Laya3.0_文档 发布时间: 20251010
....onCreateComplete)); //预加载完成后回调 private onCreateComplete():void { //创建预加载的模型网格 var mesh:Laya.Mesh = Laya.loader.getRes("LayaScene_01/Assets/model/loveScene_jianzhu.lm"); //创建3D模型 var meshSprite3D:Laya.MeshSprite3D = new Laya.MeshSprite3D(mesh); this.scene....
来源: Laya_社区 发布时间: 20171109
...ya.stage.bgColor = "#232628"; this.createTexts(); } private createTexts(): void { this.createLabel("只允许输入数字:").pos(50, 20); var input: Input = this.createInput(); input.pos(50, 50); input.restrict = "0-9"; this.createLabel("只允许输入字母:").pos(50, 100); input = this.create...
来源: Laya_示例 发布时间: 20260303
...有节点和组件均已创建完毕,此方法只执行一次 onAwake(): void { this.panel.pos(100, 100); this.panel.size(200, 200); this.panel.scrollType = Laya.ScrollType.Both; //滚动类型:水平与垂直都滚动 this.panel.vScrollBarSkin = "atlas/comp/vscroll.png"; this.panel.hScrollBarSk...
来源: Laya3.0_文档 发布时间: 20251010
..., coordinateSpace:Sprite, x:Number, y:Number, width:Number, height:Number):void[static] 使DOM元素使用舞台内的某块区域内。 Utils getGID():int[static] 获取一个全局唯一ID。Utils getGlobalPosAndScale(sprite:Sprite):Rectangle[static] 计算传入的显示对象 Sprite 的全...
来源: Laya2.0_api 发布时间: 20190513
...er.create(this, this.onSkinLoadComplete)); } private onSkinLoadComplete(): void { var dialog: Dialog = new Dialog(); var bg: Image = new Image(this.assets[0]); dialog.addChild(bg); var button: Button = new Button(this.assets[1]); button.name = Dialog.CLOSE; button.pos(this.DIALOG_WIDTH - this.CLOSE_...
来源: Laya_示例 发布时间: 20260303
...ya.stage.bgColor = "#232628"; this.createTexts(); } private createTexts(): void { this.createLabel("只允许输入数字:").pos(50, 20); var input: Input = this.createInput(); input.pos(50, 50); input.restrict = "0-9"; this.createLabel("只允许输入字母:").pos(50, 100); input = this.create...
来源: Laya2.0_示例 发布时间: 20260303
...动文本 this.createTween(); } //创建缓动文本 private createTween():void{ //"LayaBox字符串总宽度" var w:number = 800; //文本创建的起始位置(>>在此使用右移运算符,相当于/2 用>>效率更高) var offsetX:number = Laya.stage.width - w >> 1; //显示的字符串 var dem...
来源: Laya2.0_文档 发布时间: 20210715