大约有 2,792 项符合查询结果, 库内数据总量为 31,722 项。 (搜索耗时: 0.0403 秒)
Laya_社区(2262) Laya2.0_文档(123) Laya3.0_api(106) Laya_示例(84) Laya2.0_api(57) Laya2.0_示例(55) laya_api(53) Laya3.0_文档(52)
...pi,报错如一楼图。添加绘图api代码如下 module laya { import Sprite = Laya.Sprite; import Stage = Laya.Stage; import WebGL = Laya.WebGL; export class Sprite_DrawShapes { private sp: Sprite; constructor() { // 不支持WebGL时自动切换至Canvas Laya.MiniAdpter.init(); Laya.init(740,...
来源: Laya_社区 发布时间: 20180115
...的效果。 二、在LayaAir-IDE中使用 在LayaAir-IDE中,创建一个sprite,在sprite上添加2D网格渲染器组件,如动图2-1所示。 (动图2-1) 添加后的组件属性如图2-2所示, (图2-2) 其中渲染图层和接受光照属性都与光照相关,具体用法参考...
来源: Laya3.0_文档 发布时间: 20251120
...1.jpg",Laya.Handler.create(this,load)); function load(){ let ctn2=new Laya.Sprite(); Laya.stage.addChild(ctn2); var gq=new Laya.Sprite(); gq.loadImage("res/img/m1.jpg",100,100,100,100); ctn2.addChild(gq); gq.on(Laya.Event.CLICK,this,Is); } function Is(){ console.log(1); } 2018-08-06 0 0 分...
来源: Laya_社区 发布时间: 20180806
如何获取Sprite上用graphics.drawTexture绘制的texture? 如何获取Sprite上用graphics.drawTexture绘制的texture? 如定义为faceImage的Sprite,我用faceImage.graphics.drawTexture绘制图片哦,也有正常显示了,但我通过faceImage.texture却是null。我需要拷贝该...
来源: Laya_社区 发布时间: 20170816
... Laya.stage.screenMode = "vertical"; Laya.Stat.show(); var icon = new Laya.Sprite(); icon.loadImage('img/test.png'); Laya.stage.addChild(icon); document.body.addEventListener("click",function(){ var kk = icon.drawToCanvas(431, 428).getContext('2d').canvas; var img = new Image(); img.src = kk.toDataU...
来源: Laya_社区 发布时间: 20161107
怎么清理掉 Sprite3D 相关的缓存资源 通过 lh格式 生成的 Sprite3D, Laya.loader.create(_path, Handler.create(this,OnComplete),null,Sprite3D); 要怎么清理掉他的所有缓存资源? 附件 : --> 2018-05-17 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关...
来源: Laya_社区 发布时间: 20180517
...的document.getElementById的ID过去?原生div中的id,是对应laya Sprite中的哪个属性或定义? 2017-08-17 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 2 个回复 survivor - 翻身做咸鱼 赞同来自: 186...
来源: Laya_社区 发布时间: 20170817
sprite.graphics.fillTexture 调用多次,如何在每次调用前清除sprite之前绘制的内容?(像cleanByTexture效果) 2017-08-24 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 1 个回复 cuixueying 赞同来...
来源: Laya_社区 发布时间: 20170824
...于3d场景下的两个节点) //添加自定义模型 var box: Laya.MeshSprite3D = scene.addChild(new Laya.MeshSprite3D(Laya.PrimitiveMesh.createBox(1, 1, 1))) as Laya.MeshSprite3D; box.transform.rotate(new Laya.Vector3(0, 45, 0), false, false); var material: Laya.BlinnPhongMaterial = new Laya.Blin...
来源: Laya_社区 发布时间: 20190717
... 相关问题 求问shader中的attribute变量怎么动态修改 new Laya.Sprite();绘制图形以后,怎么删除释放资源? 2.2.0beta4,微信上动态合批报错. 使用getChildByName()无法得到子节点对象 请问一下怎样动态加载prefab protobuf.js 转小游戏 动态生...
来源: Laya_社区 发布时间: 20170811