• 首页
  • 动态
  • 案例
  • 引擎社区
  • API
  • 文档
  • 示例
  • 引擎下载

大约有 328 项符合查询结果, 库内数据总量为 30,724 项。 (搜索耗时: 0.0055 秒)

231. 一个关于getPixels的问题 [ 71%]

...下: Main.js: const Sprite = Laya.Sprite; const Text = Laya.Text; const Texture = Laya.Texture;  Laya.init(800, 600);  var txt = new Text(); txt.pos(200, 200); txt.color = "#FFFFFF"; txt.text = "000000"; Laya.stage.addChild(txt);  var spr = new Sprite(); spr.size(50, 50); Laya.stage.addChild(sp...

来源: Laya_社区 发布时间: 20190401

232. 【简单跑酷--JS版】---Lv.5 玩家踩地板 [ 71%]

...nction(){ /** * 地板类 */ function Floor(){ //背景贴图纹理 this.bgTexture = null; //最大右边距离 this.maxRight = 0; //判断是否超过右边最大距离了 this.isOutComplete = false; //背景 this.bg = null; //背景右边补丁 this.rightBg = null; Floor.__super.call(this); } //...

来源: Laya_社区 发布时间: 20160801

233. 关于要自定shader的同学 [ 71%]

...可以使用 drawToCanvas从游戏中截屏当前sprite 的绘制 let new_texture = sprite.drawToCanvas(width, height, 0, 0) 这里的 width 和height 指的是当前的sprite在游戏中设置的大小 new_texture = ls.Texture.create(new_texture, 0, 0)   重新获取纹理然后将textureHost设...

来源: Laya_社区 发布时间: 20180531

234. 2D性能优化 · LayaAir3.0文档 · LAYABOX [ 70%]

...ader.load("res/apes/monkey2.png",Laya.Handler.create(this,function() { var texture=Laya.loader.getRes("res/apes/monkey2.png"); var sp=new Laya.Sprite(); sp.graphics.drawTexture(texture,0,0); sp.size(texture.width,texture.height); Laya.stage.addChild(sp); })); 使用Graphics.drawTexture并不会自...

来源: Laya3.0_文档 发布时间: 20231008

235. 【简单跑酷--JS版】---Lv.3 添加地板 [ 70%]

...nction(){ /** * 地板类 */ function Floor(){ //背景贴图纹理 this.bgTexture = null; //背景 this.bg = null; Floor.__super.call(this); } //Floor 是一个显示对象 继承此 Sprite Laya.class(Floor, "Floor", laya.display.Sprite); var _proto = Floor.prototype; _proto.init = function(){ //...

来源: Laya_社区 发布时间: 20160728

236. 寻路导航示例中添加Laya.PathFind组件报异常 [ 70%]

...行走区域模型隐藏 meshSprite3D.active = false; var heightMap: Laya.Texture2D = Laya.Loader.getRes("../../res/threeDimen/scene/TerrainScene/Assets/HeightMap.png") as Laya.Texture2D; //初始化MeshTerrainSprite3D this.terrainSprite = Laya.MeshTerrainSprite3D.createFromMeshAndHeightMap(meshSpri...

来源: Laya_社区 发布时间: 20180309

237. laya.display.Stage [ 70%]

...自动更新缓存,只能通过调用reCache方法手动刷新。Sprite texture : Texture 设置一个Texture实例,并显示此图片(如果之前有其他绘制,则会被清除掉)。 等同于graphics.clear();graphics.drawImage(),但性能更高 还可以赋值一个图片地址,...

来源: Laya2.0_api 发布时间: 20190513

238. laya.ui.TextArea_API3.0 [ 69%]

...kewY skin stage staticCache stroke strokeColor templateVars text textField texture timer toolTip top transform type ubb underline underlineColor url vScrollBar vScrollBarSkin valign viewport visible width wordWrap x y zOrder Methods _initialize _processActive _setHeight _setSkin _setWidth addChild a...

来源: Laya3.0_api 发布时间: 20231115

239. 场景环境反射(ActionScript-3D基础(AS3)-LayaAir3D之场景渲染配置) [ 69%]

...material = mat; //设置场景的反射贴图 scene.customReflection = mat.textureCube; //设置曝光强度 var exposureNumber:Number = 0; mat.exposure = 0.6 + 1; })); ..... //加载Mesh Mesh.load("res/threeDimen/staticModel/teapot/teapot-Teapot001.lm", Handler.create(null, function(mesh:Mesh):void...

来源: Laya2.0_文档 发布时间: 20210715

240. laya.resource.AtlasResource_API3.0 [ 69%]

...ctors constructor Properties _id destroyedImmediately dir frames lock name textures url uuid DEBUG Accessors cpuMemory destroyed gpuMemory id obsolute referenceCount cpuMemory gpuMemory Methods _addReference _clearReference _removeReference _setCPUMemory _setCreateURL _setGPUMemory destroy event has...

来源: Laya3.0_api 发布时间: 20231115