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

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

1961. 请大家帮助优化一下这个抛物线的代码 [ 69%]

...tance; // this.centerY = this.ball.y + Math.sin(this.angle2)*distance; } } function CreateBezierPoints(anchorpoints, pointsAmount) { var points = ; for (var i = 0; i < pointsAmount; i++) { var point = MultiPointBezier(anchorpoints, i / pointsAmount); points.push(point); } return points; } functio...

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

1962. clip清除一遍资源后再加载就无法显示了!有demo! [ 69%]

...源后再加载就无法显示了!有demo! private var clip:Clip; public function LayaSample() { Laya.init(1920,1080,WebGL); Laya.stage.scaleMode = Stage.SCALE_FULL; Stat.show(); Laya.stage.on(Event.CLICK,this,clickFun); } private function clickFun():void { if( clip == null ){ clip = new Clip("1.p...

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

1963. 用谷歌获取经纬度报错? [ 69%]

...nSuccess), Handler.create(this, onError) ); // 成功获取位置后触发 function onSuccess(info:GeolocationInfo):void { trace('经纬度: (' + info.longitude + '°, ' + info.latitude + '°),精确度:' + info.accuracy + 'm'); if(info.altitude != null) trace('海拔:' + info.altitude + 'm' +...

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

1964. 如何为list内部的button添加事件 [ 69%]

...• 2017-01-06 11:21 "this.sList.getItem(...).getChildByName is not a function" weiyongwill • 2017-01-06 14:39 经过测试在List.mouseHandler中点其他的元素都能通过e.target.name获取到名字,唯独textinput通过e.target.name获取到名字为空,而且e.type为mousedow...

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

1965. Byte writeArrayBuffer的Bug [ 69%]

...LayaAir引擎 Byte writeArrayBuffer的Bug     __proto.writeArrayBuffer=function(arraybuffer,offset,length){         (offset===void 0)&& (offset=0);         (length===void 0)&& (length=0);         if (offset < 0 || length < 0)throw "writeArrayBuffer e...

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

1966. clip里的WeakObject.I缓存的数据有问题 [ 69%]

...: 这是demo 请官方一定要重视!! private var clip:Clip; public function LayaSample() { Laya.init(1920,1080,WebGL); Laya.stage.scaleMode = Stage.SCALE_FULL; Stat.show(); Laya.stage.on(Event.CLICK,this,clickFun); } private function clickFun():void { if( clip == null ){ clip = new Clip("1.pn...

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

1967. 加上size设置后,精灵不能点击. [ 69%]

...可以点击,f不能点击.但是吧size那行代码注释掉就正常了. function createImg(){ var img = new Laya.Sprite(); var r = Math.random(); var s = r > 0.66 ? "img/flower1.jpg" : r > 0.33 ? "img/flower2.png" : "img/flower3.jpg" img.loadImage(s); img.on(Laya.Event.CLICK, this, () =>...

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

1968. 请问在2.0版本的js中,如何获取mouse_move的鼠标坐标 [ 69%]

...arget=[object Object] game.js:116 target=[object Object] game.js:116 setTo=function (type,currentTarget,target){ this.type=type; this.currentTarget=currentTarget; this.target=target; return this; } game.js:116 stopPropagation=function (){ this._stoped=true; } */ } 2018-10-31 添加评论 免费帖 -...

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

1969. 关于removeChildren、 destroy和destroyChildren的疑惑 [ 69%]

...清除? 2、我把下面的对象添加到stage中   var SightBead = (function () { function sightBeadSprite() { SightBead.super(this); this.name = 'sightBead'; this.graphics.drawCircle(0,0,40,null,'#ff0000',1); this.graphics.drawLine(-45,0,45,0,'#ff0000',1); this.graphics.drawLine(0,45,0,-45,'#f...

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

1970. startDrag的使用问题 [ 69%]

...,影响惯性力度和时长。          */         public function startDrag(area:Rectangle = null, hasInertia:Boolean = false, elasticDistance:Number = 0, elasticBackTime:int = 300, data:* = null, disableMouseEvent:Boolean = false, ratio:Number = 0.92):void {          2018-05-0...

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