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

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

881. 材质-BlinnPhong-漫反射贴图 [ 54%]

...2.transform.rotate(this.rotation, false); });class BlinnPhong_DiffuseMap { private rotation: Laya.Vector3 = new Laya.Vector3(0, 0.01, 0); constructor() { Laya3D.init(0, 0, true); Laya.stage.scaleMode = Laya.Stage.SCALE_FULL; Laya.stage.screenMode = Laya.Stage.SCREEN_NONE; Laya.Stat.show(); var scene...

来源: Laya_示例 发布时间: 20251209

882. textinput动态修改宽度 会出现重叠的文字 [ 54%]

...t.align = "center"; input.on(Laya.Event.INPUT, this, this.input, [input]); private input(input:Laya.TextInput, event:Event){ if(input.text.length > 2){ input.width += 20; } } 请问怎么解决这个问题? 附件 : --> 2017-08-20 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找...

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

883. 取handler有概率取错 [ 54%]

...了,然后cid 和mid 用字符串拼接起来 cid +' _' +mid       private _getHandler(caller: any, method: any): LaterHandler {         var cid: number = caller ? caller.$_GID || (caller.$_GID = ILaya.Utils.getGID()) : 0;         var mid: number = method.$_TID || (method.$_TID = (ILay...

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

884. ui list 里面的元素不能点击两次 [ 54%]

...selectHandler的使用 示例 list.mouseHandler=new Handler(this,onMouse); private function onMouse(e:Event,index:Number):void { // TODO Auto Generated method stub if(e.type==Event.CLICK) { trace("click"); } } 2016-12-02 3 2 分享 微博 QZONE 微信 sunkehappy 赞同来自: @cuixueying 感谢提...

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

885. 对于使用spine切换动作后显示异常解决方法 [ 54%]

...this.catSprite.load(xxx,回调)--加载好使用spine或dragbones的文件 private function 回调(){ catSprite.showSkinByName("动作名") //最初使用这种方式显示 结果是图片乱跳 显示异常 请使用 catSprite.play("动作索引") //动作索引为 0-第一套 1-第二套类推。...

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

886. 求助。资源加载问题,按照官方demo出现问题 [ 54%]

...r.create(url, Laya.Hander.create(this, this.onLoadComplete))(会报错)   private onLoadComplete(){     const scene = new Laya.Scene3D()     Laya.stage.addChild(scene)          const prefab = Laya.loader.getRes(url)     scene.addChild(prefab) } 2020-03-13 添加评论 免费帖 --> 分...

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

887. laya获取图片像素后重新设置回去带有透明像素的地方显示有问题 [ 54%]

...live, Laya.Handler.create(this, this.LoadFinish));      }      private LoadFinish(success:boolean):void     {         if(success)         {             let tex:any = Laya.Loader.getRes("res/FGUIMain/Common_atlas0.png");              let x...

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

888. 一行居中的动态文字,怎么设置不同样式。 [ 54%]

...changeHtml('#0000FF',"哈哈哈哈哈",html); Laya.stage.addChild(html); } private function changeHtml(color:String,text:String,html:HTMLDivElement):void { html.innerHTML="<p><span style=\'color:"+color+"\'>"+"提示:</span><span style='color:#FF0000'>"+text+"</span>&lt...

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

889. 运动刚体(TypeScript-3D基础(TS)-LayaAir3D之物理系统) [ 54%]

...体 rigidBody.isKinematic = true; ...... //在场景上添加的loop事件 private onKeyDown():void { Laya.KeyBoardManager.hasKeyDown(87) && this.kinematicSphere.transform.translate(new Laya.Vector3(0, 0, -0.2));//W Laya.KeyBoardManager.hasKeyDown(83) && this.kinematicSphere.transform.translate(new ...

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

890. 2.6.0在微信小游戏TTFLoader加载ttf字体失败 [ 54%]

...面的逻辑条件一直无法达成所以也调不了this._complete();:private _checkComplete(): void { //该条件一直无法达成 if (ILaya.Browser.measureText(TTFLoader._testString, this._fontTxt).width != this._txtWidth) { this._complete(); } } 请问该怎么处理ttf字体文件? 附件...

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