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

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

161. 分享一个自己做的游戏公告功能,跑马灯效果 [ 82%]

...left" this.html.style.color = "#fff" this.html.innerHTML = "" this.hornBox.addChild(this.html) this.addChild(this.hornBox) } /** 滚动动画 */ private _animate(e: Event): void { const _w = this.html.width const _x = this.html.x if (_x < -_w) { this.stop(true) } else { this.html.x -= 2 } } /** ...

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

162. Bitmap引用计数的问题 [ 82%]

...uot;res/test.png"; image2.skin = "res/test.png"; Laya.stage.addChild(image1); Laya.stage.addChild(image2); 加载完了后再执行一次 Laya.loader.clearRes("res/test.png"); 这时候两张图片的纹理数据都被清除了,引用计数没有用啊,不应该是在执...

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

163. 3D灯光阴影无效 [ 82%]

3D灯光阴影无效 var directionLight:DirectionLight = scene.addChild(new DirectionLight()) as DirectionLight; directionLight.ambientColor = new Vector3(0.7, 0.6, 0.6); directionLight.specularColor = new Vector3(1.0, 1.0, 0.9); directionLight.diffuseColor = new Vector3(1, 1, 1); directionLight.tr...

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

164. 多重遮罩显示异常 [ 82%]

...bg = new Laya.Sprite(); bg.graphics.drawRect(0, 0, 500, 500, '#aaa'); this.addChild(bg); this.panel = new Laya.Panel(); this.panel.width = 500; this.panel.height = 500; this.panel.vScrollBarSkin = ''; this.panel.hScrollBarSkin = ''; this.addChild(this.panel); let line = new Laya.Sprite(); line.size(...

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

165. 照着官方文档写的 Dialog 报错? [ 81%]

....prototype.init = function () { this._container = new Sprite(); Laya.stage.addChild(this._container); Laya.loader.load(["../bin/res/ui/progressBar.png", "../bin/res/ui/progressBar$bar.png"], Handler.create(this, this.onPreloaded)); }; LoadResource.prototype.onPreloaded = function () { this.initLoadD...

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

166. 关于代码创建的遮罩会显示遮罩背景色的问题 [ 81%]

... onAwake(): void { let mask: Laya.Sprite = new Laya.Sprite(); Laya.stage.addChild(mask); mask.graphics.drawCircle(80,50,40,"#ffffff"); let sprite: Laya.Sprite = new Laya.Sprite(); Laya.stage.addChild(sprite); sprite.loadImage("myComp/loading_01.png"); //将遮罩设置给sprite sprite.mask = mask; }...

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

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

...境光颜色是不会显示的! 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.diffuseColor = new Vector3(0.6, 0.6, 0.6); d...

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

168. 我想用代码来绘制一个3D球如何弄呢?看我写的 [ 81%]

...eenMode = Laya.Stage.SCREEN_NONE; Laya.Stat.show(); var scene = Laya.stage.addChild(new Laya.Scene()); var camera = scene.addChild(new Laya.Camera(0, 0.1, 100)); // camera.transform.translate(new Laya.Vector3(0, 0.8, 1.0)); // camera.transform.rotate(new Laya.Vector3(-30, 0, 0), true, false); camera...

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

169. 没有人尝试使用3d物理引擎么 [ 81%]

...启统计信息 Stat.show(); //添加3D场景 var scene:Scene=Laya.stage.addChild(new Scene()) as Scene; //添加照相机 var camera:Camera=(scene.addChild(new Camera(0, 0.1, 100))) as Camera; camera.transform.translate(new Vector3(0, 3, 6)); camera.transform.rotate(new Vector3(-15, 0, 0), true, fa...

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

170. 3d显示对象克隆体超出舞台不再显示的bug2.1.0.btea1 [ 81%]

...tructor() { super(); //添加3D场景 var scene: Laya.Scene3D = Laya.stage.addChild(new Laya.Scene3D()) as Laya.Scene3D; this.scene3d = scene; //添加照相机 var camera: Laya.Camera = (scene.addChild(new Laya.Camera(0, 0.1, 100))) as Laya.Camera; camera.transform.translate(new Laya.Vector3(0, 3, ...

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