大约有 778 项符合查询结果, 库内数据总量为 31,722 项。 (搜索耗时: 0.0061 秒)
Laya_社区(405) Laya2.0_文档(169) Laya_示例(108) Laya2.0_示例(67) Laya3.0_文档(16) Laya3.0_api(11) Laya2.0_api(2)
...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
...("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
...: 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
...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
... 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
...("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
...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
...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
...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
...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