大约有 667 项符合查询结果, 库内数据总量为 31,580 项。 (搜索耗时: 0.0074 秒)
Laya_社区(279) Laya3.0_api(93) Laya2.0_api(73) laya_api(62) Laya_示例(54) Laya2.0_示例(54) Laya2.0_文档(33) Laya3.0_文档(19)
...说 上代码 Laya.stage.scaleMode = Laya.Stage.SCALE_FULL nWidth:number; nHeight:number; ImgX:number; ImgY:number; Img:Laya.Image =new Laya.Image(); this.nWidth =this.bg.width; //背景图宽 this.nHeight =this.bg.height;//背景图的高 this.Img.x =0; this.Img.y =0; this.Img.url ="../game/1.png...
来源: Laya_社区 发布时间: 20181123
...向坐标值。 shape.width = 100;//设置 shape 对象的宽度。 shape.height = 100;//设置 shape 对象的高度。 shape.pivotX = 50;//设置 shape 对象的水平方法轴心点坐标。 shape.pivotY = 50;//设置 shape 对象的垂直方法轴心点坐标。 Laya.stage.addChild(shape);//将...
来源: Laya3.0_api 发布时间: 20231115
...截屏当前sprite 的绘制 let new_texture = sprite.drawToCanvas(width, height, 0, 0) 这里的 width 和height 指的是当前的sprite在游戏中设置的大小 new_texture = ls.Texture.create(new_texture, 0, 0) 重新获取纹理然后将textureHost设置为new_texture sprite.shaderValue.te...
来源: Laya_社区 发布时间: 20180531
..., 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
...位置。 textInput.width = 300;//设置 textInput 的宽度。 textInput.height = 200;//设置 textInput 的高度。 textInput.bgColor = "#aabbcc"; Laya.stage.addChild(textInput);//将 textInput 添加到显示列表。 } function Text_InputMultiline(){ var textInput = new Laya.TextInput("多行...
来源: Laya2.0_文档 发布时间: 20210714
...ation mouseThrough name relativeX relativeY tag drawtocanvCtx Accessors _isHeightSet _isWidthSet active activeInHierarchy alpha anchorX anchorY blendMode cacheAs components customRenderEnable destroyed displayHeight displayWidth displayedInStage drawCallOptimize filters globalRotation globalScaleX g...
来源: Laya3.0_api 发布时间: 20231115
...d(this.ball); this.ball.x = Laya.stage.width / 2; this.ball.y = Laya.stage.height / 2; Laya.stage.on(Laya.Event.CLICK,this,this.onClick); Laya.timer.frameLoop(1,this,this.onEnterFrame); } private onEnterFrame():void{ if(this.points.length>0){ if(this.i<this.points.length){ this.ball.x = this.p...
来源: Laya_社区 发布时间: 20171108
... 对象的网格信息。 bg.width = 150;//设置 bg 对象的宽度。 bg.height = 250;//设置 bg 对象的高度。 Laya.stage.addChild(bg);//将此 bg 对象添加到显示列表。 var image:Image = new Image("resource/ui/image.png");//创建一个 Image 类的实例对象 image ,并传入它...
来源: Laya3.0_api 发布时间: 20231115
...割每个切片的宽度 clipWidth、竖向分割每个切片的高度 clipHeight,从左向右,从上到下,分割组合为一个切片动画。 Clip 组件可以用来播放切片动画,和显示切片动画的某一帧图片。 点击资源面板里的 Clip 组件,拖放到页面...
来源: Laya2.0_文档 发布时间: 20210714
...自定义渲染,才能使用customRender函数渲染。 Sprite designHeight : Number = 0设计高度(初始化时设置的高度Laya.init(width,height))Stage designWidth : Number = 0设计宽度(初始化时设置的宽度Laya.init(width,height))Stage destroyed : Boolean = false[只...
来源: Laya2.0_api 发布时间: 20190513