大约有 9 项符合查询结果, 库内数据总量为 31,722 项。 (搜索耗时: 0.0054 秒)
...法?如果是,有没有办法实现旋转之后回调? var cube:MeshSprite3D; // 省略了添加到场景中的代码 // 先移动锚点 cube.transform.pivot = new Vector3( cube.transform.pivot.x + 0, cube.transform.pivot.y - height/2,...
来源: Laya_社区 发布时间: 20190427
... //平面 var plane = this.newScene.addChild(new Laya.MeshSprite3D(Laya.PrimitiveMesh.createPlane(10, 10, 10, 10))) as Laya.MeshSprite3D; var planeMat = new Laya.BlinnPhongMaterial(); Laya.Texture2D.load("res/grass.png", Laya.Handler.cre...
来源: Laya_社区 发布时间: 20201120
...sprite3D = scene.addChild(new Sprite3D()) as Sprite3D; //正方体 var box:MeshSprite3D = sprite3D.addChild(new MeshSprite3D(PrimitiveMesh.createBox(0.5, 0.5, 0.5))) as MeshSprite3D; box.transform.position = new Vector3(2.0, 0.25, 0.6); box.transform.rotate(new Vector3(0, 45, 0), false, false); //...
来源: Laya2.0_文档 发布时间: 20210715
Laya.MeshSprite3D 可否对其中的renderElements 执行 transform 就是说, 比如一个网格中有5个材质的话, 渲染器就会产生5个的渲染元素, 如果我想对其中的一个材质对应的面片, 进行单独旋转等操作, 可不可以对他的渲染进行控制 或 用其它...
来源: Laya_社区 发布时间: 20180212
Sprite3D 不旋转 我在场景里面加载了一个meshsprite3d和一个自己从unity里面导出的sprite3d,都用 Laya.timer.loop(10,null,function():void{ layaMonkey.transform.rotate(vect,true,false) }) 让他自...
来源: Laya_社区 发布时间: 20180302
...ild(new Laya.Sprite3D()); //正方体 var box = sprite3D.addChild(new Laya.MeshSprite3D(Laya.PrimitiveMesh.createBox(0.5, 0.5, 0.5))); box.transform.position = new Laya.Vector3(2.0, 0.25, 0.6); box.transform.rotate(new Laya.Vector3(0, 45, 0), false, false); //球体 var sphere = sprite3D.addChild(ne...
来源: Laya2.0_文档 发布时间: 20210715
...ild(new Laya.Sprite3D()); //正方体 var box = sprite3D.addChild(new Laya.MeshSprite3D(Laya.PrimitiveMesh.createBox(0.5, 0.5, 0.5))); box.transform.position = new Laya.Vector3(2.0, 0.25, 0.6); box.transform.rotate(new Laya.Vector3(0, 45, 0), false, false); //球体 var sphere = sprite3D.addChild(ne...
来源: Laya2.0_文档 发布时间: 20210714
...器的方式: ```typescript /* ……省略若干代码 */ //创建盒型MeshSprite3D let box = scene.addChild(new Laya.MeshSprite3D(Laya.PrimitiveMesh.createBox(sX, sY, sZ))) as Laya.MeshSprite3D; //创建静态碰撞器 let staticCollider:Laya.PhysicsCollider = box.addComponent(Laya.PhysicsColli...
来源: Laya2.0_文档 发布时间: 20210715
...dler.create(null,function(mesh) { var layaMonkey = scene.addChild(new Laya.MeshSprite3D(mesh)); /** ** 省略其它代码若干,可前往Layabox官网示例或相关文档中查看 */ })); ``` ##### 材质Material加载 单个材质加载使用`BaseMaterial.load()`方法,示例代码如下: ``...
来源: Laya2.0_文档 发布时间: 20210714