• 首页
  • 动态
  • 案例
  • 引擎社区
  • API
  • 文档
  • 示例
  • 引擎下载

大约有 778 项符合查询结果, 库内数据总量为 31,722 项。 (搜索耗时: 0.0064 秒)

741. LayaAir DebugPanel 调试工具(ActionScript-2D进阶篇(AS3)-调试相关) [ 45%]

...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

742. 关于创建Sprite获取大小 [ 44%]

...个获取的话 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

743. 官方LayaAir之灯光一节示例背景在微信里表现不一致 [ 44%]

...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

744. 动效模板(JavaScript-LayaAir基础篇(JS)-动画基础) [ 44%]

....loader.load("./res/atlas/comp.atlas",Laya.Handler.create(this,onLoaded)); function onLoaded(){ //实例化导出的UI类 var efc = new ui.TestPUI(); //添加到舞台 Laya.stage.addChild(efc); } ``` 运行后,按钮被按下时,动画效果如动图11所示: ![12](img/12.gif)(图11) ### 4、...

来源: Laya2.0_文档 发布时间: 20210715

745. 新手引导 挖洞 不用 cacheAs="bitmap" 希望能帮助那些和我一样有需求的码农!你好我好大家好才是真的好!请各位大佬批评指教! [ 43%]

...    image.src = "res/atlas/pixel.png";         image.onload = function()         {             // 界面上按钮所在的位置以及按钮的宽高             drawImage(image, 462, 194, 156, 48, 0); // 调用绘图以及 挖洞         }    ...

来源: Laya_社区 发布时间: 20200604

746. Button属性详解(JavaScript-IDE篇(JS)-IDE组件属性详解) [ 43%]

...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

747. 加载prefab的代码编译失败,提示“Property 'transform' does not exist on type 'Node'” [ 43%]

....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

748. Skeleton骨骼动画内存泄漏 [ 43%]

...这个问题  修改 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

749. rigidBody.applyForce 物体不会移动 [ 43%]

...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

750. [LayaAirIDE3]应该如何定义@property才能像GTextField一样加载字体? [ 42%]

...项目设置-脚本编译-启动脚本 启动脚本代码: 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