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

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

1. 2D物理-复合碰撞器 [ 100%]

...ya.Browser.width / 2, posy = Laya.Browser.height / 2; let box = this.box = new Laya.Sprite(); box.size(width + height * 2, width + height * 2); box.pivot(box.width / 2, box.height / 2); box.pos(posx, posy); Laya.Laya.stage.addChild(box); let boxBody = box.addComponent(Laya.RigidBody); let box1Shape ...

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

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

...sZ) { posX = posX || 0; posY = posY || 0; posZ = posZ || 0; var instance = new Laya.MeshSprite3D(new Laya.BoxMesh(x, y, z)); instance.transform.rotate(new Laya.Vector3(0, 0, 0), false, false); instance.transform.position = new Laya.Vector3(posX, posY, posZ); var material = new Laya.StandardMaterial(...

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

3. 3d下阴影渲染问题求解 [ 99%]

... 10; i++) { for (var j = 0; j < 10; j++) { // var box = parent.addChild(new Laya.MeshSprite3D(new Laya.PlaneMesh(boxSize,boxSize,2,2))); var box = parent.addChild(new Laya.MeshSprite3D(new Laya.BoxMesh(boxSize, boxSize, .5))); // var boxSys = new Zszen.BoxPlus(boxSize,boxSize,boxSize,"res/simbol/...

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

4. 飞机大战地图滚动报错,麻烦看下? [ 98%]

... null; var bg2 = null; var box = null; function bg_rolling() {     box = new laya.display.Sprite();     Laya.stage.addChild(box);     bg1 = new laya.display.Sprite();     bg1.loadImage("res/bg1.png");     box.addChild(bg1);     bg2 = new laya.display.Sprite();     bg2.loadImage("res/bg...

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

5. 3D阴影无法渲染出来 [ 96%]

...无法渲染出来 //添加方向光 var directionLight = scene.addChild(new Laya.DirectionLight()); directionLight.color = new Laya.Vector3(0.6, 0.6, 0.6); directionLight.direction = new Laya.Vector3(1, -1, 0); directionLight.shadow = true; directionLight.shadowDistance = 3; directionLight.shadowRe...

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

6. 如何获得box单独每个面的material [ 96%]

...处理, threejs做起来这个很简单, 这个就搞晕我了 var mesh = new Laya.BoxMesh(ConstValue.boxWidth, ConstValue.boxWidth, ConstValue.boxHeight); var box = this.parent.addChild(new Laya.MeshSprite3D(mesh)); box.transform.rotate(new Laya.Vector3(0, 45, 0), false, false); box.transform.posit...

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

7. LayaAir3D 坐标系统与矩阵变换 [ 96%]

...how(); //给舞台添加laya3d场景 var scene:Scene = Laya.stage.addChild(new Scene()) as Scene; //初始化照相机 var camera:Camera = scene.addChild(new Camera()) as Camera; camera.transform.position = new Vector3(0, 3, 3); camera.transform.rotate(new Vector3( -45, 0, 0), true, false); camera.a...

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

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

...pt //创建盒型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

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

...pt //创建盒型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

10. hitTestPrior点击穿透 [ 96%]

...() { Laya.init(800,600,WebGL); Laya.stage.bgColor="#EEFFCC"; var sp:Sprite=new Sprite(); sp.graphics.drawRect(0,0,300,300,"#FFFF00"); sp.size(100,100); sp.on(Event.CLICK,this,onClickSp); Laya.stage.addChild(sp); var spchild:Sprite=new Sprite(); spchild.graphics.drawRect(0,0,200,200,"#FF0000"); spchi...

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