大约有 778 项符合查询结果, 库内数据总量为 31,722 项。 (搜索耗时: 0.0064 秒)
Laya_社区(405) Laya2.0_文档(169) Laya_示例(108) Laya2.0_示例(67) Laya3.0_文档(16) Laya3.0_api(11) Laya2.0_api(2)
...a.debug.DebugPanel; import laya.display.Sprite; public class Main { public function Main() { //初始化舞台 Laya.init(1334,750); //调用DebugPanel调试面板 Laya.enableDebugPanel(); //设置舞台背景色 Laya.stage.bgColor = "#ffffff"; var Img:Sprite = new Sprite(); //添加到舞台 Laya.st...
来源: Laya2.0_文档 发布时间: 20210714
...个获取的话 window.Laya.loader.load(value.url, ls.Handler.create(this, function () { _this.graphics.clear() var texture = window.Laya.loader.getRes(value.url) _this.graphics.drawTexture(texture) _this.scaleX = _this.set_width / texture.sourceWidth _this.pivotX = _this.row_data.property.x_m * tex...
来源: Laya_社区 发布时间: 20180530
...new Laya.Vector3(1,1,0); //每10毫秒旋转一次 Laya.timer.loop(10,null,function(){ box.transform.rotate(vect,true,false); }); } } new LayaAir3D(); 附件 : --> 2018-03-07 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 2 ...
来源: Laya_社区 发布时间: 20180307
....loader.load("./res/atlas/comp.atlas",Laya.Handler.create(this,onLoaded)); function onLoaded(){ //实例化导出的UI类 var efc = new ui.TestPUI(); //添加到舞台 Laya.stage.addChild(efc); } ``` 运行后,按钮被按下时,动画效果如动图11所示: (图11) ### 4、...
来源: Laya2.0_文档 发布时间: 20210715
... image.src = "res/atlas/pixel.png"; image.onload = function() { // 界面上按钮所在的位置以及按钮的宽高 drawImage(image, 462, 194, 156, 48, 0); // 调用绘图以及 挖洞 } ...
来源: Laya_社区 发布时间: 20200604
...ded回调方法 Laya.loader.load(skin,Laya.Handler.create(this,onLoaded)); function onLoaded(){ //创建一个Button实例 var btn = new Laya.Button(skin); //将Button添加到舞台上 Laya.stage.addChild(btn); //设置Button相关属性 btn.width = 100; btn.height = 50; btn.pos(100,100); btn.label...
来源: Laya2.0_文档 发布时间: 20210714
....load("res/prefabs/Conventional/SampleScene.lh", Laya.Handler.create(null, function(sp) { var layaMonkey2 = scene.addChild(sp); layaMonkey2.transform.localScale = new Laya.Vector3(4, 4, 4); layaMonkey2.transf...
来源: Laya_社区 发布时间: 20211009
...这个问题 修改 laya.core.js var Texture 对象里 __proto.destroy=function(){ if (!this._destroyed){ this._destroyed=true; if (this.bitmap){ this.bitmap._removeReference(this._referenceCount); if (this.bitmap.referenceCount===0){ this.bitmap.destroy(); // console.log("texture2d destory"); } t...
来源: Laya_社区 发布时间: 20190320
...erial(); Laya.Texture2D.load( "res/layabox.png", Laya.Handler.create(null, function (tex: Laya.Texture2D) { material.albedoTexture = tex; }) ); box.meshRenderer.material = material; //设置文本显示框位置 this.text.x = Laya.stage.width / 2 - 50; //显示文本显示框 this.text = new Laya.Te...
来源: Laya_社区 发布时间: 20200917
...项目设置-脚本编译-启动脚本 启动脚本代码: export async function main() { console.log("Hello LayaAir!"); Laya.loader.load("resources/BitmapFont.fnt", Laya.Loader.FONT).then((res) => { Laya.Scene.open(Laya.PlayerConfig.startupScene); //可以设置场景...
来源: Laya_社区 发布时间: 20250910