大约有 2,258 项符合查询结果, 库内数据总量为 31,580 项。 (搜索耗时: 0.0070 秒)
Laya_社区(1808) Laya3.0_api(129) laya_api(84) Laya2.0_api(82) Laya2.0_文档(76) Laya_示例(36) Laya3.0_文档(28) Laya2.0_示例(15)
...= Laya.Sprite; this.ape = new Sprite(); Laya.stage.addChild(this.ape); let texture = Laya.loader.getRes(apePath); this.ape.graphics.drawTexture(texture); this.ape.x = (Laya.stage.width - texture.width) / 2; this.ape.y = (Laya.stage.height - texture.height) / 2; } applayFilter() { // 创建一个模...
来源: Laya2.0_示例 发布时间: 20251209
...ss(myShaderSprite, "myShaderSprite", _super); /* 初始化此类 texture纹理对象 vb顶点数组 ib顶点索引数组 */ myShaderSprite.prototype.init = function(texture,width_Size,height_Size,vb,ib){ this.vBuffer = Laya.VertexBuffer2D.create(); this.iBuffer = Laya.IndexBuffer2D.create(...
来源: Laya_社区 发布时间: 20180619
laya的drawToTexture太坑 我之前做flash as3的,默认认为drawToTexture是要画目标sprite里面的0,0点。 结果怎么画都没有东西显示,看了下源码发现,里面把它自己(该sprite)的x, y给减掉了, 所以我只能每次在drawToTexture的两个offset参数里...
来源: Laya_社区 发布时间: 20200330
...r = "role/herohead"+Hero.getHeadID()+".png"; m_herohead = new Image(); var texture = Laya.loader.getRes(heroidstr); m_herohead.graphics.drawTexture(texture); m_herohead.anchorX = 0.5; m_herohead.anchorY = 1; m_herohead.pos(m_heroPosX,m_heroPosY); m_mapbg.addChild(m_herohead); 我在代码里...
来源: Laya_社区 发布时间: 20171109
...10000) { var htmlCanvas:HTMLCanvas = a.drawToCanvas(width,height,0,0); var texture:Texture = new Texture(htmlCanvas); var b:Sprite = new Sprite(); b.graphics.drawTexture(texture); a.graphics.clear(true); a.destroy(); a = b; } a.graphics.drawRect(10*i, 10*j, 10, 10, "#ff0000"); count++; } } 2018-11-1...
来源: Laya_社区 发布时间: 20181113
...渲染的错,但是在PC端没有问题 在device.js中WebGLContext.bindTexture方法报的texture bound to texture unit 0 is not renderable. It maybe non-power-of-2 and have incompatible texture filtering 2019-11-01 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 ...
来源: Laya_社区 发布时间: 20191101
...合集中的话可以在资源预加载后添加以下两行代码: var texture:Texture = Laya.loader.getRes(e.url); texture.bitmap.enableMerageInAtlas = false; 2017-10-31 0 0 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 要回复问题请先登录 发起人 FearWood 相...
来源: Laya_社区 发布时间: 20171031
...行走区域模型隐藏 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
... this.renderTargetCamera.renderTarget = new RenderTexture(Laya.stage.width, Laya.stage.height); //渲染顺序 this.renderTargetCamera.renderingOrder = -1; //清除标记 this.r...
来源: Laya_社区 发布时间: 20200529
...创建了 Textture2D如何对其进行宽高赋值 你好,我在创建了Texture2D后 ,我想对其进行宽高赋值,我发现没有相关的方法,而width和hight都是只读的。求解答。 另外我想设置像素,我看到可以getPixels ,但没有setPixels也同样求解。 我...
来源: Laya_社区 发布时间: 20190313