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

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

131. tween对Text的缩放,为何会抖动呢? [ 77%]

...lor = "#ff0000";     txt.fontSize = 30;     txt.pos(Laya.stage.width >> 1, Laya.stage.height >> 1);     Laya.stage.addChild(txt);          Laya.Tween.to(txt, { scaleX: 2, scaleY: 2 }, 5000);   5秒钟把文本放大2倍,感觉是 fontSize在不平...

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

132. 如何在3d场景中添加文字 [ 77%]

...; this.txtName.pos(this._outPos.x / Laya.stage.clientScaleX - this.txtName.width/2, this._outPos.y / Laya.stage.clientScaleY);   2017-10-10 0 0 分享 微博 QZONE 微信 ltmking 赞同来自: //设置其他玩家角色名称跟随角色模型 这后边的代码放到针刷新事件里 2017-10-10 0...

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

133. 进度条组件 · LayaAir3.4 · 引擎文档 · LAYABOX [ 77%]

...res/ui/progressBar.png"); this.progressBar.pos(100, 500); this.progressBar.width = 400; this.progressBar.sizeGrid = "5,5,5,5"; this.progressBar.changeHandler = new Laya.Handler(this, this.onChange); this.owner.addChild(this.progressBar); Laya.timer.loop(100, this, this.changeValue); }); } // 模拟...

来源: Laya3.0_文档 发布时间: 20251010

134. 2D性能优化 · LayaAir3.4 · 引擎文档 · LAYABOX [ 77%]

.../monkey2.png",0,0,0,0,Laya.Handler.create(this,function() { console.log(sp.width,sp.height); })); Laya.stage.addChild(sp); loadImage在加载完成的回调函数触发之后才可以正确获取宽高。 直接调用size设置: Laya.loader.load("res/apes/monkey2.png",Laya.Handler.create(this,func...

来源: Laya3.0_文档 发布时间: 20251010

135. 陀螺仪与加速计(JavaScript-LayaAir基础篇(JS)-硬件设备相关) [ 77%]

...info.fontSize = 50; this.info.color = "#FFFFFF"; this.info.size(Laya.stage.width, Laya.stage.height);  Laya.stage.addChild(this.info);  Laya.Gyroscope.instance.on(Laya.Event.CHANGE, this, onDeviceorientation); function onDeviceorientation(absolute, rotationInfo) { this.info.text = "alpha:" + Math....

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

136. laya.ui.CheckBox_API3.0 [ 76%]

...Prior mouseThrough name tag toggle drawtocanvCtx Accessors _isHeightSet _isWidthSet active activeInHierarchy alpha anchorX anchorY blendMode bottom cacheAs centerX centerY clickHandler components customRenderEnable dataSource destroyed disabled displayHeight displayWidth displayedInStage drawCallOpt...

来源: Laya3.0_api 发布时间: 20231115

137. laya.ui.Button_API3.0 [ 76%]

...Prior mouseThrough name tag toggle drawtocanvCtx Accessors _isHeightSet _isWidthSet active activeInHierarchy alpha anchorX anchorY blendMode bottom cacheAs centerX centerY clickHandler components customRenderEnable dataSource destroyed disabled displayHeight displayWidth displayedInStage drawCallOpt...

来源: Laya3.0_api 发布时间: 20231115

138. 无限循环滚动列表 [ 76%]

... middle         var midX = this._list.scrollPane.posX + this._list.viewWidth / 2;         var cnt = this._list.numChildren;         for (var i = 0; i < cnt; i++) {             var obj = this._list.getChildAt(i);             var dist = Math.abs(midX - obj.x - obj.width / 2)...

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

139. 分享:DrawToCanvas内存释放问题! [ 76%]

...显示截屏后的纹理 public function LayaAirDemo() { Laya.init(Browser.width, Browser.height);//引擎初始化 Laya.stage.bgColor = "#ffcccc";//背景颜色 Stat.show();//显示帧频,用于观察Curmem变化 //添加被截屏对象 sp= new Sprite(); sp.loadImage("bg2.png"); Laya.stage.addChi...

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

140. laya.physics.PhysicsDebugDraw_API3.0 [ 76%]

...hitTestPrior mouseThrough name tag drawtocanvCtx Accessors _isHeightSet _isWidthSet active activeInHierarchy alpha anchorX anchorY blendMode cacheAs components customRenderEnable destroyed displayHeight displayWidth displayedInStage drawCallOptimize filters globalRotation globalScaleX globalScaleY g...

来源: Laya3.0_api 发布时间: 20231115