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

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

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

...3'&gt;HTML文本&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";...

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

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

...", Laya.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

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

...Later(this, 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.s...

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

344. 请问graphics.drawTexture(texture)中如何增加一个matrix,只显示图中的一个圆形区域 [ 65%]

...n(){ if(miniMap.complete==true){ var img = circle_image(miniMap,750,1334); console.log(miniMap); var miniMap1 = new Laya.Image(); miniMap1.loadImage(img); Laya.stage.addChild(miniMap1); } } miniMap.src=url;     function circle_image(img, oldImgWidth, oldImgHeight) { var width, height, canvas, cont...

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

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

...', this.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...

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

346. layacmd compile 项目出现无法显示直接在ui里面添加的龙骨动画 [ 65%]

...是好的. 使用layacmd compile 之后 无法显示龙骨动画, chrome console 显示 can not create:SkeletonPlayer, 其他的好像没有什么问题 附件 : --> animation.zip log.zip 2017-03-17 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容...

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

347. Text无法识别换行符\n?? [ 65%]

...确实会把该符号识别为普通字符串。 这点我们可以通过console.log看出来。 当我们直接在代码里面定义一个 var a = xxx\nyyy 的时候,log输出是这样的: xxx yyy 而当我们从http请求拿到一个字符串 var b = xxx\nyyy 的时候,log输出是这样的...

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

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

... super.changeValue(); _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 &...

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

349. 深入理解LayaAir引擎架构和实现原理(二)项目调试原理及完美开发调试方案 [ 65%]

....ts', onwarn:(waring,warn)=&gt;{ if(waring.code == "CIRCULAR_DEPENDENCY"){ console.log("warnning Circular dependency:"); console.log(waring); } }, treeshake: false, //建议忽略 plugins: [ typescript({ tsconfig:workSpaceDir + "/tsconfig.json", check: true, //Set to false to avoid doing any diagnos...

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

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

...se.backIn, Laya.Handler.create(this, this.startGame)); } birdFly(): void { console.log("我飞!"); } startGame(): void { console.log("开始游戏!"); GameMain.aaa(); } } } 2018-05-07 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 ...

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