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

大约有 1,300 项符合查询结果, 库内数据总量为 30,724 项。 (搜索耗时: 0.0051 秒)

451. 请问HtmlDivElement控件在innerHTML中有<div>标签的情况下获取实际宽高为0的问题? [ 65%]

...ML文本&lt;/span&gt;"; html += "&lt;/div&gt;" p.innerHTML = html; console.log(p.contextWidth); //0 p.frameOnce(2,this,function(){ console.log(p.contextWidth); //0 }) } function showExternalHTML() { var p = new HTMLIframeElement(); Laya.stage.addChild(p); p.href = "../../res/html/test.html"; p.y = 2...

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

452. LayaNative 2.8.0 加载的TTF字体不生效,附复现工程。 [ 65%]

....Handler.create(this, (success) =&gt; {             console.log("2.8.0 字体加载是否成功:", success);             Laya.Text.defaultFont = "OPPOSANS-H";         }), null, Laya.Loader.TTF) 附件 : --> laya复现工程_2.6_.0和2_.8_.0_.zip 相关链接 ...

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

453. 计时器-延迟调用 [ 65%]

...is, this.onCallLater); } } onCallLater() { const Text = Laya.Text; console.log("onCallLater triggered"); let text = new Text(); text.font = "SimHei"; text.fontSize = 30; text.color = "#FFFFFF"; text.text = "打开控制台可见该函数仅触发了一次"; text.size(Laya.stage.width, Laya.stage.hei...

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

454. matter中有没有类似于unity中的OnCollision碰撞检测函数呀,用js怎么写 [ 65%]

...onCollision);   2.碰撞检测 private onCollision(event): void { console.log("碰撞了..");  var home = _gamePage._mainPage._playPage;  for(var i = 0; i &lt; event.pairs.length; i++) {  var pair = event.pairs[i];  if(!(pair.bodyA.label === 'gun' || pair.bodyB.label == "gun")) continue;  var ...

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

455. 自定义组件时,设置组件子节点的image的skin时,路径为layaIde的路径而非项目路径 [ 65%]

...hangeValue(); _proMask.scaleX = _value / _max; _proMask.repaint(); console.log("改变值: " + _proMask.scaleX); } /** *@inheritDoc */ override public function destroy(destroyChild:Boolean = true):void { super.destroy(destroyChild); _proMask &amp;&amp; _proMask.destroy(_proMask); _progress &amp;&amp...

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

456. 微信实机测试游戏,粒子效果异常 [ 65%]

... • 2018-01-29 15:42 @qian:我在ShurikenParticleSystem的emit方法中打log,可以看到log刷的很快 说明粒子数量并没有减少,是因为某种原因没有显示出来 qian • 2018-01-29 15:57 上传一下改完粒子数的demo LagField • 2018-01-29 16:02 @qian:在下面上传了...

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

457. 在UI类里调用启动类的静态函数失败了 [ 65%]

..._btn, { y: 200 }, 800, Laya.Ease.backOut, Laya.Handler.create(this, this.onLogoCompete)); } onLogoCompete(): void { Laya.Tween.to(this.biaoti_lable, { y: 120 }, 800, Laya.Ease.backOut); } onStart(): void { Laya.Tween.to(this.kaishi_btn, { y: 400 }, 800, Laya.Ease.backIn, Laya.Handler.create(this, th...

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

458. 事件绑定不触发bug [ 64%]

...            function callback(event) {             console.log(" callback test");         }                  function laya_test()         {             // 不支持WebGL时自动切换至Canvas             Laya.init(Browser.clientWidth, Browser.cli...

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

459. layaBOX实时语音聊天与微信登陆接口分享 [ 64%]

...端的SDK会用到这些TOKEN YIM.AddUserAuth(obj,function(res){ console.log(res); }) router.get('/', function (req, res, next) { //微信签名验证 YIM.WXCheckSignature(req,token,function(err,rows){ if(err){ res.send("error"); }else{ res.send(rows); } }) }); router.get('/token', function (req, re...

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

460. 新手入坑请教下各位大神关于LayaMaxUI问题 [ 64%]

... please do not make any modifications. */ import View=Laya.View; import Dialog=Laya.Dialog; import Scene=Laya.Scene; var REG: Function = Laya.ClassUtils.regClass; export module ui.test { export class TestSceneUI extends Laya.Scene {         public scoreLbl:Laya.Label;         public ...

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