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

大约有 1,873 项符合查询结果, 库内数据总量为 31,722 项。 (搜索耗时: 0.0062 秒)

1691. 请问这是原因? [ 48%]

... point.x-500; var deltaY:int = point.x-500; //计算旋转角度 var angle:Number = Math.atan2(deltaX,deltaY)*180/Math.PI; //在鼠标的位置生成一个圆来测试本地坐标 flagCircle.drawCircle(0,0,50,"#000000") flag.graphics = flagCircle; flag.pos(deltaX,deltaY); //添加舞台 sprite.addCh...

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

1692. layaAir如何实现for循环加载多张图片,并且通过事件按比例缩小 [ 48%]

...ape.x=(apesCtn._childs.length)*(stageWidth/4)             var bl:Number=texture.width/texture.height             ape.graphics.drawTexture(texture,0,0,stageWidth/4,stageWidth/4/bl);             apesCtn.addChild(ape);         } 2016-10-23 添加评论 免费帖 --> 分...

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

1693. 微信小游戏提审后,提示说代码侵权 [ 48%]

...; let name = str.substr(len, str.length - len - 1); console.log(name); let number = Math.floor(Math.random() * 9999); let name2; let lastIndex = name.lastIndexOf("_"); if(lastIndex == -1){ name2 = name + "_" + number; }else{ name2 = name.substr(0, lastIndex) + "_" + number; } let name2s = name2 + "(...

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

1694. 在一个页面多放几个iframe,里面使用引擎,一般3-4个就报错了 [ 48%]

...报错了 Uncaught DOMException: Failed to construct 'AudioContext': The number of hardware contexts provided (6) is greater than or equal to the maximum bound (6). at Function.<anonymous> (<anonymous>:10787:310) at Function.get (<anonymous>:168:66) at Function.WebAudioSound.initWe...

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

1695. Laya如何处理类与类之间的依赖关系 [ 47%]

...00, FATAL = 1000, OFF = 0xFFFFFFFF }class Logger { public static logLevel: number = LogLevelEnum.ALL; // 获取或设置日志输出的分级 }编译运行会报错。 可行的办法是改成getter去懒初始化, 用三斜线指令(ts推荐的,但是貌似没用?) 手动修改index.html...

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

1696. timer无法执行 [ 47%]

...); }   public shootBall(): void{ //生成空中降落的球 //var random: number = Math.random()*24-7; let ball: Laya.MeshSprite3D = new Laya.MeshSprite3D(Laya.PrimitiveMesh.createSphere(1)); this.scene1.addChild(ball);   ball.transform.position = new Laya.Vector3((Math.random() - 0.5) * 2, 10, 17...

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

1697. dialog 里的数据已经获取到了,也赋值了但是页面没跟新,addChild好像无效果 [ 47%]

...X++) { var foodid = res.data[X]['n_food_id']; var foodtxt = res.data[X]['n_number']; fooddata[X] = { food: { skin: 'comp/food' + foodid + '.png' }, food_txt: { text: foodtxt } // console.log(); } } console.log('+++++++++++++++++++') console.log(_super); console.log(fooddata); self.foodList.dataSourc...

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

1698. 性能测试-卡通人物 [ 47%]

...} private createCharacters(): void { this.characterGroup = []; for (var i: number = 0; i = 0; --i) { this.animateCharactor(this.characterGroup[i]); } } private animateCharactor(charactor: Sprite): void { charactor.x += this.moveSpeed; charactor.rotation += this.rotateSpeed; if (charactor.x > Laya.st...

来源: Laya_示例 发布时间: 20260303

1699. Text.as中parseLines方法里的问题 [ 47%]

...| this.overflow == HIDDEN; if (needWordWrapOrTruncate) { var wordWrapWidth:Number = getWordWrapWidth(); } if (_currBitmapFont) { _charSize.width = _currBitmapFont.getMaxWidth(); _charSize.height = _currBitmapFont.getMaxHeight(); } else { var measureResult:* = Browser.context.measureText(_testWord); ...

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

1700. laya.ani.bone.canvasmesh.SkinMeshForGraphic_API3.0 [ 47%]

...h数据 Returns SkinMeshForGraphic Properties canvasPadding canvasPadding: number = 1 Inherited from MeshData.canvasPadding Defined in laya/ani/bone/canvasmesh/MeshData.ts:43 扩展像素,用来去除黑边 indexes indexes: Uint16Array = new Uint16Array([0, 1, 3, 3, 1, 2]) Inherited from MeshData.in...

来源: Laya3.0_api 发布时间: 20231115