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

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

1301. Layabox web 复制一段文字到剪贴板 [ 77%]

... function copyText(str) { new ShowDiv(str); }  function ShowDiv(str) {  var _this = this;  this.AppConfirm = document.getElementById("AppConfirm"); if (this.AppConfirm == null) { this.AppConfirm = document.createElement("div"); document.body.appendChild(this.AppConfirm); this.AppConfirm.id = "App...

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

1302. 字体切片组件 · LayaAir3.0文档 · LAYABOX [ 77%]

...]).then( ()=>{ this.ShowContent(); } ); } private ShowContent(): void { var clipnum: Laya.FontClip = new Laya.FontClip(this._ClipNum); var fontClip: Laya.FontClip = new Laya.FontClip(this._FontClip); var testFontClip: Laya.FontClip = new Laya.FontClip(this.TestFontClip); var testClipNum: Laya.Fon...

来源: Laya3.0_文档 发布时间: 20230901

1303. 微信小游戏 sharedCanvas 创建的Texture,能否再调用Texture.createFromTexture创建新纹理 [ 77%]

...分创建新的Texture, 基于这个Texture创建的image是不显示的 var texture:Texture = new Texture(Browser.window.sharedCanvas); var texture2:Texture = Texture.createFromTexture( texture, 0,0, 100, 100); //取前面100像素 var image:Image=new Image() image.texture=texture2 2018-05-31 添...

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

1304. 通过laya设计模式制作的,要怎么给按钮绑定事件呢? [ 77%]

...3 0 10 分享 微博 QZONE 微信 Laya_Aaron 赞同来自: 这个进度条 var 为pro 另外一张图的类继承了之前页面发布生成的类,直接用this.pro.value 就能修改进度条的值 如果不明白问我,我一定讲到你明白为止,不要急,我有充足的耐心直到你...

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

1305. 问下,3D模型导出有什么要求 [ 77%]

...则是场景中没有光照,物体的环境光颜色是不会显示的! var directionLight:DirectionLight = scene.addChild(new DirectionLight()) as DirectionLight; directionLight.ambientColor = new Vector3(0.6, 0.6, 0.6); directionLight.specularColor = new Vector3(0.6, 0.6, 0.6); directionLight.di...

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

1306. layaair1.7.9 beta版,给图片加上颜色滤镜,效果有问题 [ 77%]

...在1.7.6版本是可以的。附上代码,麻烦大神看看,谢谢了var spr:laya.display.Sprite = new laya.display.Sprite(); spr.texture = tx; Laya.stage.addChild(spr); spr.x = 300; spr.y = 100; var color:Array = ; color.push( 0, 0, 0, 0, 255, 0, 0, 0, 0, 255, 0, 0, 0, 0, 255, 0, 0, 0, 1, 0); ...

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

1307. Laya+Matter导出wx小程序碰到的问题 [ 77%]

...Matter到全局。具体做法,在matter.js最后面增加一行:   var Matter = window.Matter;   同理,使用LayaRender的时候,在pc上调试直接使用LayaRender没任何问题,但是导出到wx小程序/游戏上会存在问题,需要使用window.LayaRender,如果觉得麻烦...

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

1308. [0]2.13.3 drawToCanvas转出图片bug [ 77%]

...bin\libs里找到laya.core.js,找到static drawToCanvas方法 ....不变 var dt = ctx._targets.getData(0, 0, canvasWidth, canvasHeight); //增加开始,进行反预乘处理 for (var i= 0, len= dt.length; i < len; i += 4) { var alpha = dt[i + 3] / 255.0; if (alpha > 0) { dt /= alpha; dt[i ...

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

1309. Laya整合echarts示例(TypeScript) [ 77%]

...改后的onLoaded函数。 function onLoaded(): void { //laya相关代码 var div:any = Laya.Browser.document.createElement("div"); div.style.width = "600px"; div.style.height = "400px"; Laya.Browser.document.body.appendChild(div); var myChart = new Laya.Browser.window.echarts.init(div); var option ...

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

1310. 自己画的view不支持鼠标点击吗? [ 77%]

自己画的view不支持鼠标点击吗? var path:Array=[["moveTo", 68, 1080], //画笔移到A点 ["lineTo", 500, 1080], //画到B点 ["lineTo", 650, 700], //再画到C点 ["lineTo", 340, 700], //继续画到D点 ["closePath"] //闭合路径 ]; btn_1=new View(); btn_1.graphics.drawPath(0, 0, pat...

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