大约有 3,861 项符合查询结果, 库内数据总量为 31,580 项。 (搜索耗时: 0.0080 秒)
Laya_社区(3313) Laya2.0_文档(198) Laya3.0_api(102) Laya3.0_文档(97) Laya2.0_api(82) Laya_示例(44) laya_api(25)
...行左右视口分离,代码如下: ```typescript //创建场景 var scene = Laya.stage.addChild(new Laya.Scene3D()); //创建相机1 var camera1 = scene.addChild(new Laya.Camera(0, 0.1, 100)); //设置相机1清除颜色 camera1.clearColor = new Laya.Vector4(0.3, 0.3, 0.3, 1.0); camera1.transfo...
来源: Laya2.0_文档 发布时间: 20210715
...if)(图3) #### 使用代码设置环境雾化 ```typescript //雾化代码 scene.enableFog = true; //设置雾化的颜色 scene.fogColor = new Laya.Vector3(0,0,0.6); //设置雾化的起始位置,相对于相机的距离 scene.fogStart = 10; //设置雾化最浓处的距离。 scene.fogRange = 40...
来源: Laya2.0_文档 发布时间: 20210714
...if)(图3) #### 使用代码设置环境雾化 ```typescript //雾化代码 scene.enableFog = true; //设置雾化的颜色 scene.fogColor = new Laya.Vector3(0,0,0.6); //设置雾化的起始位置,相对于相机的距离 scene.fogStart = 10; //设置雾化最浓处的距离。 scene.fogRange = 40...
来源: Laya2.0_文档 发布时间: 20210715
...,不要用默认的模型名称。 ```typescript //初始化3D场景 var scene:Scene3D = Laya.stage.addChild(Loader.getRes("res/threeDimen/scene/ChangeMaterialDemo/Conventional/scene.ls")) as Scene3D; //获取球型精灵 var sphere:MeshSprite3D = scene.getChildByName("Sphere") as MeshSprite3D; //...
来源: Laya2.0_文档 发布时间: 20210714
...s.lights.length; i 加载场景,并且添加多光源 ```typescript Laya.Scene3D.load("res/threeDimen/scene/MultiLightScene/InventoryScene_Forest.ls", Laya.Handler.create(this, function (scene) { //添加到场景 Laya.stage.addChild(scene); var camera = scene.getChildByName("Main Camera"); camera...
来源: Laya2.0_文档 发布时间: 20210715
...s.lights.length; i 加载场景,并且添加多光源 ```typescript Laya.Scene3D.load("res/threeDimen/scene/MultiLightScene/InventoryScene_Forest.ls", Laya.Handler.create(this, function (scene) { //添加到场景 Laya.stage.addChild(scene); var camera = scene.getChildByName("Main Camera"); camera...
来源: Laya2.0_文档 发布时间: 20210715
...后的代码: import View=Laya.View; import Dialog=Laya.Dialog; import Scene=Laya.Scene; export module ui { export class AttackUI extends View { public btn_attack:Laya.Button; constructor(){ super()} createChildren():void { super.createChildren(); this.loadScene("Attack"); } } } 扩展UI代码: ...
来源: Laya_社区 发布时间: 20180926
...; var resUrl = "../bin/res/modles/role_48_lurenyi/role_48_lurenyi.lh"; var scene = Laya.stage.addChild(new Laya.Scene()); var camera = scene.addChild(new Laya.Camera(0, 0.1, 100)); camera.transform.position = new Laya.Vector3(0, 0, 10); camera.transform.rotate(new Laya.Vector3(0, 180, 0), true, fals...
来源: Laya_社区 发布时间: 20180503
...if)(图3) #### 使用代码设置环境雾化 ```typescript //雾化代码 scene.enableFog = true; //设置雾化的颜色 scene.fogColor = new Vector3(0,0,0.6); //设置雾化的起始位置,相对于相机的距离 scene.fogStart = 10; //设置雾化最浓处的距离。 scene.fogRange = 40; ```...
来源: Laya2.0_文档 发布时间: 20210715
...配置好输出场景设置后。 点击Laya Export 按钮,导出一个Scene3D与Sprite3D各一个,合并的一个文件夹目录结构如下(图1)。 (图1) 见上图文件资源,导出后生成了.ls、.lm、.lmat数据资源,及贴图jpg、png资源。 它们的具体用...
来源: Laya2.0_文档 发布时间: 20210714