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

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

1261. 物理Bodies绑定Laya.Sprite [ 84%]

...age.alignH = 'middle'; // 适配水平对齐方式 Laya.stage.screenMode = this.Stage.SCREEN_HORIZONTAL; // 始终以横屏展示 Laya.stage.scaleMode = "fixedwidth"; // 宽度不变 this.engine; var world; this.engine = Matter.Engine.create({ enableSleeping: true // 开启睡眠 }); world = this.en...

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

1262. 怎么循环数组的时候给他定时第一个执行完在执行下一个 [ 84%]

...0 0 1 分享 微博 QZONE 微信 乐趣 赞同来自: Laya.timer.loop(1000,this,this.CardAnimation);  //定时执行某个函数  this.CardAnimation是你要自己实现的动画 动画执行玩后清理掉这个定时器 Laya.timer.clear(this,this.CardAnimation); //清理定时器 这些API里...

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

1263. 三个图好像无法绑定不同的事件? [ 84%]

...2.png',100,100,90,90); Laya.stage.addChild(img1); img1.on(Laya.Event.CLICK,this, function(name){ console.log(name);},['图1']); var img2 = new Laya.Sprite(); img2.loadImage('https://layaair.ldc.layabox.com/demo/h5/res/apes/monkey2.png',200,300,90,90); Laya.stage.addChild(img2); img2.on(Laya.Event.CL...

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

1264. 在Unity中设置动画事件(TypeScript-3D基础(TS)-LayaAir3D之Animator动画) [ 84%]

...件函数,名字是可以对应上的 ShowMsg(){ console.log("ShowMsg"); this.showMsgFunc && this.showMsgFunc(); } } ``` 在加载好场景之后,我们将我们创建的这个脚本添加给cube。 ```typescript //加载场景 Laya.Scene3D.load("res/threeDimen/scene/LayaScene_AnimationEvent/Con...

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

1265. linearVelocity 获取的线速度不正确 [ 84%]

...全是不正确的       let vectory = new Laya.Vector3(-Math.cos(this.angle) * this.v,0,0);         // this.rigidbody.applyForce(vectory);         this.rigidbody.linearVelocity = vectory;         console.log("施加的线速度:");         console.log...

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

1266. 关于HTMLCanvas对象的释放问题 [ 84%]

...age  dispose,内存也不见释放。代码如下: var kk1:HTMLCanvas = this.HistoryArray.pop()[0];                var img:Image = new Image();                 img.src = kk1.toDataURL();                 img.dispose();   详见附件。这次不会那么强大了 2...

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

1267. 释放资源报错 [ 84%]

...rite3D.__proto.destroy (laya.d3.js:43737)   发现           if (this._cacheRootBone){             this._cacheRootBone.transform.off(/*laya.events.Event.TRANSFORM_CHANGED*/"transformchanged",this,this._boundChange); 这里的this._cacheRootBone非空,但是上面transform是...

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

1268. Tiled Map 为啥始终显示在最上面,求解 [ 84%]

...后续添加的图元。 求解。。。。 贴上代码: // 2D 场景 this.tMap = new Laya.TiledMap(); var viewRect:Laya.Rectangle = new Laya.Rectangle(); this.tMap.createMap("res/TiledMap/orthogonal-test-movelayer.json",viewRect,Laya.Handler.create(this,this.onMapLoaded)); this.tMap.scale = 1; ...

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

1269. 3D文本纹理demo问题 [ 84%]

...abox直接扫描右侧的二维码真机调试也是如此。  TypeError: this.cxt.fillText is not a function             this.cxt.fillText(text, this.cav.width / 2, this.cav.height);                      ^^                                                  ...

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

1270. WebGL模式下用遮罩实现圆形头像会有警告出现 [ 84%]

...ERATION: bindTexture: attempt to bind a deleted texture   代码示例: this.img = new Laya.Image(); this.img.loadImage("url"); const mask = new Laya.Sprite(); mask.graphics.drawCircle(75, 75, 75, "#ffffff"); this.img.mask = mask; this.img.pos(Laya.stage.width / 2, Laya.stage.height / 2); Laya.st...

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