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

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

651. ani时间轴动画问题 [ 53%]

...a.loader.load("res/atlas/move.json", Laya.Handler.create(this, onLoaded)); function onLoaded() {     //创建一个Animation实例     var tl = new Laya.Animation();     //加载动画文件     tl.loadAnimation("TimeLine.ani");     //添加到舞台     Laya.stage.addChild(tl);  ...

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

652. 图片居中的问题 [ 53%]

...("res/bg-480x720.jpg"); Laya.stage.on(Laya.Event.RESIZE,this,onResize);   function onResize() {     var scale,scaleX,scaleY;     scaleX = Browser.clientWidth/480;     scaleY = Browser.clientHeight/720;     scale = scaleX > scaleY ? scaleX : scaleY;     bg.scale(scale,scale);     bg.p...

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

653. Dialog.show 的 showEffect参数在微信真机上的问题 [ 53%]

...: Laya.loader.load(["res/atlas/comp.atlas"], Laya.Handler.create(this, function(){ console.log("load atals ok"); var dlg1:ui.TestDlgUI = new ui.TestDlgUI(); Laya.stage.addChild(dlg1); dlg1.show(); }));在微信小游戏的模拟器上是正常的,但是在手机上就看不到UI。 后来经过...

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

654. 请大家帮助优化一下这个抛物线的代码 [ 53%]

...tance; // this.centerY = this.ball.y + Math.sin(this.angle2)*distance; } } function CreateBezierPoints(anchorpoints, pointsAmount) { var points = ; for (var i = 0; i < pointsAmount; i++) { var point = MultiPointBezier(anchorpoints, i / pointsAmount); points.push(point); } return points; } functio...

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

655. Laya.BlinnPhongMaterial.RENDERMODE_TRANSPARENT设置透明度不行了? [ 53%]

...       Laya.Texture2D.load("res/layabox.png", Laya.Handler.create(null, function (tex: Laya.Texture2D) {             material.albedoTexture = tex;         }));         material.albedoColor = new Laya.Vector4(1.0, 1.0, 1.0, 0.5);         material.renderMode = Laya.BlinnPhongMater...

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

656. 导入3D模型有问题 [ 53%]

...("res/dg/dg.lh"));        mesh.once(Laya.Event.HIERARCHY_LOADED, null, function (sprite) {        setMeshParams(sprite, Laya.StandardMaterial.RENDERMODE_CUTOUT, new Vector4(3.5, 3.5, 3.5, 1.0), new Vector3(0.6, 0.6,               0.6), new Vector2(1.0, 1.0));        });       ...

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

657. 3D开启多线程报错 [ 53%]

...t TypeError: Failed to execute 'texImage2D' on 'WebGLRenderingContext': No function was found that matched the signature provided.     at Texture2D.__proto._createWebGlTexture (laya.d3.js:37225)     at Texture2D.__proto.recreateResource (laya.d3.js:37271)     at Texture2D.__proto.onAsynLoaded ...

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

658. 加载U3D导出的LH格式粒子特效,加载完成不回调 [ 53%]

...t/Effect.lh")) as Laya.Sprite3D; this.lz.once(Event.HIERARCHY_LOADED, this,function():void{ console.error("改变大小"); }); 之前是按照ls导出的不回调,你们在线技术说场景只能用相机操作。我现在改成了Sprite3D ,lh文件 依旧不回调 2018-03-27 添加评论 免...

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

659. LayaAir和原生DOM交互(JavaScript-2D进阶篇(JS)-扩展模块) [ 53%]

...r); this.qrcodeSp = new Laya.Sprite(); Laya.stage.addChild(this.qrcodeSp); function clickHandler(){ var url = this.qrcode._oDrawing._elImage.src;//获取,注意这里是异步的,开发者可以加个延时在获取。 this.qrcodeSp.loadImage(url,0,0,100,100); } ``` 编译运行上面的代码...

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

660. 在UI编辑器里可以看到位图字体,但是进入游戏后没有显示,怎么解决 [ 53%]

...his.mBitmapFont.loadFont("font/test.fnt",new Laya.Handler(this,onLoaded)); function onLoaded(){ init(); } function init(){ //如果位图字体中,没放空格,最好设置一个空格宽度 this.mBitmapFont.setSpaceWidth(10); Laya.Text.registerBitmapFont(this.mFontName,this.mBitmapFont); var test =...

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