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

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

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

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

452. 求问sprite放大后,graphics绘制的图像位置偏移 [ 72%]

...getRes(this.skin_img1); sprite.graphics.drawTexture(texture, 0, 0, texture.width, texture.height); sprite.size(texture.width, texture.height); let x: number = 300; let y: number = 100; let scaleRatio: number = 1.3; sprite.pos(x, y); // sprite.graphics.drawCircle(texture.width/2, texture.height/2, 10...

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

453. 对象mask的区域改变问题! [ 71%]

...__mask = new Laya.Sprite(); this.__mask.graphics.drawRect(0,0,this.img_bar.width,this.img_bar.height,"#000000"); this.setValue(0); } private setValue(v:number):void{ this.__mask.scaleX = v; this.img_bar.mask = null;//第二次设置mask的时候必须给原对象的mask置空,否则无效 this.img_b...

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

454. 刚刚接触2天layaair,有几个问题请教。 [ 71%]

...据IDE设置初始化引擎 if (window["Laya3D"]) Laya3D.init(GameConfig.width, GameConfig.height); else Laya.init(GameConfig.width, GameConfig.height, Laya["WebGL"]); Laya["Physics"] && Laya["Physics"].enable(); Laya["DebugPanel"] && Laya["DebugPanel"].enable(); Laya.stage.scaleMode...

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

455. [LayaAirIDE3]2d相机打包后问题 [ 71%]

...meraController);          // 设置边界参数         const MAP_WIDTH = 6294;         const MAP_HEIGHT = 4196;         const MAP_X = -1230;         const MAP_Y = -849;          this.playerScript.mapMinX = MAP_X;         this.playerScript.mapMaxX = MAP_X + MAP_WIDTH; ...

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

456. Laya.timer.frameLoop(1, this, this.aaa);对象移动会出现颤抖现象 [ 71%]

... new logic.UI.role.PlayerHealthBar(); this.playerHB.pivotX = this.playerHB.width / 2; this.playerHB.pivotY = this.playerHB.height / 2; this.playerHB.y = 500; this.playerHB.txtName.text = "搞个毛啊"; // this.playerVO.name; this.addChild(this.playerHB); } private aaa():void { this.playerHB.x += th...

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

457. Sprite-缓存为静态图像 [ 71%]

...a.Stage; // 不支持WebGL时自动切换至Canvas Laya.init(Browser.clientWidth, Browser.clientHeight, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; Laya.Stat.show(); this.cacheText...

来源: Laya2.0_示例 发布时间: 20260303

458. [LayaAir3]list.selectHandler [ 71%]

...lbl=new Laya.Label(val); this.lbl.name="val"; this.lbl.size(Item.width,Item.height); this.lbl.align="center"; this.lbl.valign="bottom"; this.lbl.padding="0,0,1,0"; this.btn.addChild(this.lbl); } this.btn.name=index.toString(); this.uiCtrl=uiCtrl; this.btn.on(&...

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

459. 想用camera做一个类似照相机的功能 [ 71%]

...  this.renderTargetCamera.renderTarget = new RenderTexture(Laya.stage.width, Laya.stage.height);             //渲染顺序             this.renderTargetCamera.renderingOrder = -1;             //清除标记             this.renderTargetCamera....

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

460. runTime使用(ActionScript-IDE篇(AS3)-组件化开发相关) [ 71%]

...据IDE设置初始化引擎 if (window["Laya3D"]) Laya3D.init(GameConfig.width, GameConfig.height); else Laya.init(GameConfig.width, GameConfig.height, Laya["WebGL"]); Laya["Physics"] && Laya["Physics"].enable(); Laya["DebugPanel"] && Laya["DebugPanel"].enable(); Laya.stage.scaleMode = GameConfig.sc...

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