大约有 2,258 项符合查询结果, 库内数据总量为 31,580 项。 (搜索耗时: 0.0069 秒)
Laya_社区(1808) Laya3.0_api(129) laya_api(84) Laya2.0_api(82) Laya2.0_文档(76) Laya_示例(36) Laya3.0_文档(28) Laya2.0_示例(15)
...请: 与内容相关的链接 提交 1 个回复 Laya_Aaron 赞同来自: texture类里有 create 方法 /** * 根据指定资源和坐标、宽高、偏移量等创建 <code>Texture</code> 对象。 * @param source 绘图资源 img 或者 Text...
来源: Laya_社区 发布时间: 20180906
... } } private function onAssetLoaded(texture:Texture):void { var ape:Sprite = new Sprite; ape.x=(apesCtn._childs.length)*(stageWidth/4) var bl:Number=texture.width/texture.height ...
来源: Laya_社区 发布时间: 20161023
...is,function():void{ var htmlC:HTMLCanvas=sp.drawToCanvas(200,200,0,0); var texture:Texture=new Texture(htmlC); var sp2:Sprite=new Sprite(); sp2.graphics.drawTexture(texture,100,100,100,100); sp2.pos(300,0); Laya.stage.addChild(sp2); })注意加个延迟,1-2帧左右即可! 2018-04-03 0 0 分享 ...
来源: Laya_社区 发布时间: 20180403
...下: 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
...准备好的图片放置项目资源目录下,并预加载资源,获取texture 准备好的图片head3.png 放置资源目录下 获取texture Laya.loader.load('head3.png',Handler.create(this,onTextureLoaded)); } private var texture:Texture; private function onTextureLoaded():void { texture=Load...
来源: Laya_社区 发布时间: 20170324
webgl 模式下 用graphics.drawTexture 平铺图片 图片不显示是什么原因 this.texture1 = Laya.loader.getRes('res/images/bg1.png'); this.texture2 = Laya.loader.getRes('res/images/bg2.png'); var repeatX = 8 ; var repeatCount = Math.ceil(stageW / repeatX); for(let i = 0; i < repeatCount ...
来源: Laya_社区 发布时间: 20180129
...erarchy MeshData SkinMeshForGraphic Index Properties canvasPadding indexes texture useUvTransform uvTransform uvs vertices Methods getBounds Properties canvasPadding canvasPadding: number = 1 Defined in laya/ani/bone/canvasmesh/MeshData.ts:43 扩展像素,用来去除黑边 indexes indexes: Uint16Ar...
来源: Laya3.0_api 发布时间: 20231115
...nvas = htmlCanvas.getCanvas(); trace(canvas.toDataURL('image/png')); const texture = new Laya.Texture(htmlCanvas); const sp = new Sprite(); sp.graphics.drawTexture(texture); this.shot.addChild(sp);对,是可以的。当时drawToCanvas的第一个参数设置小了,没看到后面的元素。 这...
来源: Laya_社区 发布时间: 20171018
...置数据 ParticleTemplateBaseProtected Properties PropertyDefined By texture : Texture 粒子贴图 ParticleTemplateBasePublic Methods MethodDefined By ParticleTemplateBase() 创建一个新的 ParticleTemplateBase 类实例。 ParticleTemplateBase addParticleArray(position:Float32Array...
来源: laya_api 发布时间: 20170929
...ropertyDefined By height : Number (可选)高度。 DrawImageCmd texture : Texture 纹理。 DrawImageCmd width : Number (可选)宽度。 DrawImageCmd x : Number (可选)X轴偏移量。 DrawImageCmd y : Number (可选)Y轴偏移量。 DrawImageCmdPublic Methods Met...
来源: Laya2.0_api 发布时间: 20190513