大约有 335 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0054 秒)
Laya3.0_api(110) Laya2.0_api(67) Laya_社区(65) laya_api(61) Laya2.0_文档(16) Laya3.0_文档(14) Laya2.0_示例(1) Laya_示例(1)
请问Texture2D如何用base64字符串构建对象 给模型贴图的时候需要用base64位字符串。官方api中Texture2D的load方法的参数说明为 : Texture2D地址 。这个地址好像只能传入图片的绝对路径,如何使用base64加载呢? 附件 : --> 2018-05-18 添...
来源: Laya_社区 发布时间: 20180518
...y _setCreateURL _setGPUMemory clear destroy event getContext getMemSize getTexture hasListener isCreateFromURL off offAll offAllCaller on once release size toBase64 toBase64Async destroyUnusedResources Constructors constructor new HTMLCanvas(createCanvas?: boolean): HTMLCanvas Overrides Resource.__c...
来源: Laya3.0_api 发布时间: 20231115
...)); console.log(3) var boxMat = new Laya.StandardMaterial(); boxMat.diffuseTexture = Laya.Texture2D.load("https://s2.d2scdn.com/2018/1/2 ... 6quot;); box.meshRender.material = boxMat; // var ape = new Laya.Sprite() // Laya.stage.addChild(ape) // ape.loadImage('https://s2.d2scdn.com/2018/1/2/474ebb47...
来源: Laya_社区 发布时间: 20180104
...下: 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
...nction(){ /** * 地板类 */ function Floor(){ //背景贴图纹理 this.bgTexture = null; //最大右边距离 this.maxRight = 0; //判断是否超过右边最大距离了 this.isOutComplete = false; //背景 this.bg = null; //背景右边补丁 this.rightBg = null; Floor.__super.call(this); } //...
来源: Laya_社区 发布时间: 20160801
...可以使用 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
...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
...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_文档 发布时间: 20251010
...行走区域模型隐藏 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
...自动更新缓存,只能通过调用reCache方法手动刷新。Sprite texture : Texture 设置一个Texture实例,并显示此图片(如果之前有其他绘制,则会被清除掉)。 等同于graphics.clear();graphics.drawImage(),但性能更高 还可以赋值一个图片地址,...
来源: Laya2.0_api 发布时间: 20190513