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

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

21. 类似抠图、挖空效果的实现 [ 89%]

...      blue.on("click", this, onClick);             Laya.stage.addChild(blue);                          //增加一个容器             box = new Sprite();             //设置容器为画布缓存             box.cacheAs = "bitmap";     ...

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

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

...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

23. 物理系统之FixedConstraint(JavaScript-3D基础(JS)-LayaAir3D之物理系统) [ 89%]

...`typescript //创建盒型MeshSprite3D var box: MeshSprite3D = (this.scene.addChild(new MeshSprite3D(PrimitiveMesh.createBox(1, 1, 1)))); //设置材质 var transform: Transform3D = box.transform; var pos: Vector3 = transform.position; pos.setValue(0, 5, 0); transform.position = pos; //创建刚体...

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

24. 物理系统之FixedConstraint(TypeScript-3D基础(TS)-LayaAir3D之物理系统) [ 89%]

...`typescript //创建盒型MeshSprite3D var box: MeshSprite3D = (this.scene.addChild(new MeshSprite3D(PrimitiveMesh.createBox(1, 1, 1)))); //设置材质 var transform: Transform3D = box.transform; var pos: Vector3 = transform.position; pos.setValue(0, 5, 0); transform.position = pos; //创建刚体...

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

25. 动态阴影被切割了?为啥没有显示完成的阴影 [ 88%]

....Event.CLICK, this, mouseHandler); //添加3D场景 var scene = Laya.stage.addChild(new Laya.Scene()); function LayaAir3D() { //添加照相机 var camera = (scene.addChild(new Laya.Camera()));//0, 0.3, 100 camera.transform.translate(new Laya.Vector3(3, 4, 3)); camera.transform.rotate(new Laya.Vecto...

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

26. 源码List的一次代码错误 [ 88%]

... * cellWidth, (this._isVertical ? startY : 0) * cellHeight); this._content.addChild(cacheBox); this._content.optimizeScrollRect = true; box = cacheBox; } else { [b] var arr = []; [/b] for (var i = this._cells.length - 1; i > -1; i--) { var item = this._cells[i]; item.removeSelf(); arr.push(item);...

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

27. [LayaAir 2.0] 如何用代码为Spirte添加2d物理特性 [ 88%]

...structor() { super(); //物理模块 this._boll1 = new Laya.Sprite(); this.addChild(this._boll1); this._boll1.x = 20; this._boll1.loadImage('comp/btn_close.png'); let box:laya.physics.BoxCollider = this._boll1.addComponent(laya.physics.BoxCollider); box.height = 60; box.width = 28; //添加刚体 th...

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

28. 物理系统之FixedConstraint(ActionScript-3D基础(AS3)-LayaAir3D之物理系统) [ 88%]

...``typescript //创建盒型MeshSprite3D var box: MeshSprite3D = this.scene.addChild(new MeshSprite3D(PrimitiveMesh.createBox(1, 1, 1))) as MeshSprite3D; //设置材质 var transform: Transform3D = box.transform; var pos: Vector3 = transform.position; pos.setValue(0, 5, 0); transform.position = pos; ...

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

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

.../001.png'; var label=new  Laya.label(); label.text=' I am a  Label!' box.addChild(image); box.addChild(label); Laya.stage.addChild(box); 2017-04-21 1 3 分享 微博 QZONE 微信 zhang92tong 赞同来自: 太感谢老师了! 2017-04-21 0 0 分享 微博 QZONE 微信 为什么被折叠? 0 个回...

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

30. [LayaAir 2.0] 如何用代码为Spirte添加2d物理特性 [ 88%]

...structor() { super(); //物理模块 this._boll1 = new Laya.Sprite(); this.addChild(this._boll1); this._boll1.x = 20; this._boll1.loadImage('comp/btn_close.png'); let box:laya.physics.BoxCollider = this._boll1.addComponent(laya.physics.BoxCollider); box.height = 60; box.width = 28; //添加刚体 th...

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