forked from Orillusion/orillusion
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(culling): Camera frustum culling (Orillusion#198)
Fix rendering objects being incorrectly culled by the camera rename class fix error : init boundbox fix error : init boundbox
- Loading branch information
Showing
11 changed files
with
129 additions
and
163 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import { Engine3D, Object3D, Object3DUtil, Scene3D } from "@orillusion/core"; | ||
import { createExampleScene } from "@samples/utils/ExampleScene"; | ||
|
||
//Samples to show models, they are using PBR material | ||
class Sample_LoadGLTF2 { | ||
lightObj3D: Object3D; | ||
scene: Scene3D; | ||
async run() { | ||
//config settings | ||
Engine3D.setting.material.materialChannelDebug = true; | ||
Engine3D.setting.shadow.shadowBound = 80; | ||
Engine3D.setting.shadow.shadowBias = 0.0001; | ||
|
||
//init engine | ||
await Engine3D.init(); | ||
let exampleScene = createExampleScene(); | ||
this.scene = exampleScene.scene; | ||
Engine3D.startRenderView(exampleScene.view); | ||
await this.initScene(); | ||
} | ||
|
||
async initScene() { | ||
|
||
let floor = Object3DUtil.GetSingleCube(100, 4, 100, 0.5, 0.5, 0.5); | ||
floor.y = -10; | ||
this.scene.addChild(floor); | ||
|
||
let chair = await Engine3D.res.loadGltf('PBR/SheenChair/SheenChair.gltf') as Object3D; | ||
chair.scaleX = chair.scaleY = chair.scaleZ = 60; | ||
chair.rotationZ = chair.rotationX = 45; | ||
this.scene.addChild(chair); | ||
} | ||
} | ||
|
||
new Sample_LoadGLTF2().run(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.