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

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

751. 如何将一段文字放置到粘贴板 , 或者说点击一个按钮后复制copy一段文字? [ 85%]

...粘贴板功能,在安卓下,直接这样写: function copyToClip(){ var Context = plus.android.importClass("android.content.Context"); var main = plus.android.runtimeMainActivity(); var clip = main.getSystemService(Context.CLIPBOARD_SERVICE); plus.android.invoke(clip,"setText","I'm copy from ...

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

752. shader预编译的bug [ 85%]

shader预编译的bug private initShader()     {         var shaderObj:object = {"PBR":[{"defineNames":["RECEIVESHADOW","DIRECTIONLIGHT","UV","ALBEDOTEXTURE"],"passIndex":0,"subShaderIndex":0},{"defineNames":["RECEIVESHADOW","DIRECTIONLIGHT","UV","BONE","ALBEDOTEXTURE"],"passIndex":...

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

753. 鼠标交互-滑动 [ 85%]

...ion = this.beginPosition + this.TrackLength; } private drawTrack(): void { var graph: Sprite = new Sprite(); Laya.stage.graphics.drawLine( this.beginPosition, Laya.stage.height / 2, this.endPosition, Laya.stage.height / 2, "#FFFFFF", 20); Laya.stage.addChild(graph); } /**按下事件处理*/ private...

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

754. Laya.Byte的readUTFBytes问题 [ 85%]

...览器有时会崩溃,难道不能读太大的数据吗?代码如下:var inflate = new Zlib.Inflate(new Uint8Array(data)); var outbuffer = inflate.decompress(); var sourceBytes:Laya.Byte =new Laya.Byte(outbuffer.buffer); sourceBytes.endian = "BIG_ENDIAN"; var jsonstr:string = sourceBytes.readUTF...

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

755. Laya无法把截屏然后转Base64. [ 85%]

...作图片源,再次绘制到其他Sprite里面,示例:</p> * * var htmlCanvas:HTMLCanvas = sprite.drawToCanvas(100, 100, 0, 0);//把精灵绘制到canvas上面 * var texture:Texture = new Texture(htmlCanvas);//使用htmlCanvas创建Texture * var sp:Sprite = new Sprite().pos(0, 200);//创...

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

756. laya.physics.joint.RopeJoint [ 85%]

...le():void[override] JointBaseProperty DetailcollideConnectedpropertypublic var collideConnected:Boolean = false[首次设置有效]两个刚体是否可以发生碰撞,默认为falsemaxLengthproperty maxLength:NumberselfAnchor和otherAnchor之间的最大距离 Implementation     public funct...

来源: Laya2.0_api 发布时间: 20190513

757. 3d获取组件代码bug [ 85%]

...输出队列。 */ __proto.getComponentsByType=function(type,components){ var index=this._componentsMap.indexOf(type); if (index===-1) components.length=0; //这里应该返回了!!!!!!!!!! var typeComponents=this._typeComponentsIndices[index]; var count=typeComponents.length; components.length=coun...

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

758. 最新版本绘制100x100个sprite ios不能显示 [ 85%]

...this); this.init(); } Laya.class(GameMap, "GameMap", laya.display.Sprite); var _proto = GameMap.prototype; _proto.init = function(){ var boxSp = new laya.display.Sprite(); // boxSp.cacheAsBitmap = true; for(var i = 0; i < this.MapRowNum; i++){ for(var j = 0; j < this.MapColNum; j++){ var box =...

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

759. webgl模式下对Panel组件旋转时Panel子对象显示错误的BUG! [ 85%]

...题 Laya.init(1280,720,Laya.WebGL);//有问题 console.log(Laya.version); var testSpriteRotation:PanelRotationTest = new PanelRotationTest(Laya.Sprite); testSpriteRotation.pos(300,260); Laya.stage.addChild(testSpriteRotation); var testPanelRotation:PanelRotationTest = new PanelRotationTest(Laya.Pane...

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

760. 分享:为List组件下Item(Box)下的Button(或其他组件)进行监听! [ 85%]

...写法,AS/TS思路一样,请根据自己的需求进行修改即可!var Loader = laya.net.Loader; var Handler = laya.utils.Handler; var Event = laya.events.Event; // 创建TestPageUI的子类 function TestUI() { TestUI.super(this); //list赋值,先获得一个数据源数组 var arr = ; for ...

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