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

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

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

...", Laya.Handler.create(this, (success) => {             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

372. image在相应loaded的时候,无法正确获取高度 [ 65%]

...or() { super(); this.on('start', this, this.init); } private init():void { console.log("init", this.x, this.y, this.width, this.height, this.scaleX, this.scaleY); var createOption: any = { isStatic: false, }; this.matterBody = Matter.Bodies.rectangle(this.x, this.y, this.width, this.height, createOp...

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

373. 计时器-延迟调用 [ 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_示例 发布时间: 20250224

374. 请问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

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

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

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

376. 微信小游戏分包实战(JavaScript-小游戏适配文档-微信小游戏) [ 65%]

...。示例代码如下: ```javascript loadTask.onProgressUpdate(res => { console.log('下载进度', res.progress) console.log('已经下载的数据长度', res.totalBytesWritten) console.log('预期需要下载的数据总长度', res.totalBytesExpectedToWrite) }) ``` 本篇文档主要是讲分...

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

377. 自定义组件时,设置组件子节点的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 && _proMask.destroy(_proMask); _progress &...

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

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

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

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

379. putimagedata 不起作用 [ 64%]

...stage.bgColor = "#232628"; showApe(); })(); function distort (imageData) { console.log(imageData) var data = imageData.data, copy = Array.prototype.slice.apply(data, [0]), w = imageData.width, h = imageData.height, i = 0, l = data.length, x, y, d for (i; i < l; i += 4) { if (data[i]!== 0) { conso...

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

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

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

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