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

大约有 2,033 项符合查询结果, 库内数据总量为 31,624 项。 (搜索耗时: 0.0059 秒)

991. 在浏览器上,模拟并重现SimpleSingletonList的问题了 [ 73%]

...报错。(这就有点恐怖)   注:已经是 for (var i = 0, n = this.length; i < n; i++) 赋值了。   没时间去仔细改,现在用暴力方式改一下: if (index !== -1){     console.log("SimpleSingletonList:" + element + " has  in  SingletonList.");     this.clear(); ...

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

992. 老师,请问一下如何在js代码中,动态的创建一个按钮(或者图片、lable)并添加到一个box中? [ 73%]

...omp/btn_start.png","测试按钮"); bt.on(Laya.Event.CLICK, this, this.click); Laya.stage.addChild(bt); function click() { console.log("??????????"); } 点击之后没有翻译,按钮也没有点击的动画 cuixueying • 2017-04-24 11:07 我们测试是OK的,你的butt...

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

993. ProgressBar 代码问题 [ 73%]

...码为按钮点击后 出现popup并且模拟进度条加载 按钮代码: this.testLoadingBar_anim.on(Event.CLICK,this,()=>{     var loading : Onloading = new Onloading();     loading.popup(true);     Laya.timer.loop(100, this, loading.changeValue); }); 进度条代码: import Handler = La...

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

994. 微信小游戏开放域(JavaScript-小游戏适配文档-微信小游戏) [ 73%]

...der.load([ "res/atlas/test.atlas", "json/reward.json"],Laya.Handler.create(this,this.onComplete)); } }.bind(this)); ``` onComplete方法,注意与原版有部分修改。 ```typescript onComplete() { //获取资源 var testJosn = Laya.loader.getRes("json/reward.json"); //输出透传过来的json ...

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

995. this.bitmap.activeResource is not a function. [ 72%]

this.bitmap.activeResource is not a function. 排行榜主域绘制开放数据域sharedCanvas时候报错。代码如下:var rankTexture = new Laya.Texture(Laya.Browser.window.sharedCanvas); rankTexture.bitmap.alwaysChange = true;//小程序使用,非常费 let sprite = new Laya.Sprite(); spri...

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

996. 3d文字在浏览器能正常运行,打包后使用时会报错 [ 72%]

...ngContext":No function was found that matched the signature provided   在this.texture2D.loadImageSource(this.cav);报错   this.cav = Laya.Browser.createElement("canvas"); this.cav.width = 256; this.cav.height = 256;  var cxt = this.cav.getContext("2d"); cxt.fillStyle = 'rgb(' + '220' + ',' + '5...

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

997. sprite不能设置点击区域 [ 72%]

... sp.graphics.drawPie(0, 0, 300, 0, 90, "#00ffff"); sp.on(Laya.Event.CLICK, this, this.aa) sp.mouseEnabled = true; // 设置点击区域没有作用 var hitArea = new Laya.HitArea(); hitArea.unhit.drawPie(0, 0, 150, 0, 90, "#00ffff"); sp.hitArea = hitArea; 我想要实现的效果就是一个扇形...

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

998. Sprite-根据数据绘制路径 [ 72%]

...aya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; this.drawPentagram(); } drawPentagram() { let canvas = new Laya.Sprite(); Laya.stage.addChild(canvas); let path = []; path.push(0, -130); path.push(33, -33); path.push(137, -30); path.push(55, 32); path.push(85, 130); path.pu...

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

999. drawToTexture截大图有问题,会丢失 [ 72%]

...题,会丢失 private nsp:Laya.Sprite;     init(): void {         this.nsp=new Laya.Sprite();         this.nsp.graphics.drawRect(0,0,1600,1600,"#ff0000");         this.nsp.mouseThrough=true;         Laya.stage.addChild(this.nsp);         this.nsp.on(Laya.Event.CLICK,this,this...

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

1000. 3D灯光与阴影 · LayaAir3.3 · 引擎文档 · LAYABOX [ 72%]

...ya.Sprite3D(); let pointCom = pointLight.addComponent(Laya.PointLightCom); this.scene.addChild(pointLight); //点光源的颜色 pointCom.color = new Laya.Color(1.0, 0.5, 0.0, 1); //设置点光源的范围 pointCom.range = 3.0; pointLight.transform.position = new Laya.Vector3(0.0, 1, 0.0); 三、Di...

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