-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: implement skybox texture (#250)
- Loading branch information
1 parent
5c20b3d
commit f76b9d9
Showing
5 changed files
with
74 additions
and
4 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import * as React from 'react' | ||
|
||
import { StyleSheet } from 'react-native' | ||
import { FilamentView, Camera, FilamentScene, Model, Light, Skybox } from 'react-native-filament' | ||
|
||
function Renderer() { | ||
return ( | ||
<FilamentView style={styles.container}> | ||
<Camera /> | ||
<Light type="directional" intensity={10_00000} colorKelvin={6_500} /> | ||
<Model source={require('~/assets/buster_drone.glb')} transformToUnitCube /> | ||
|
||
<Skybox source={require('~/assets/default_env_ibl.ktx')} /> | ||
</FilamentView> | ||
) | ||
} | ||
|
||
export function SkyboxExample() { | ||
return ( | ||
<FilamentScene> | ||
<Renderer /> | ||
</FilamentScene> | ||
) | ||
} | ||
|
||
const styles = StyleSheet.create({ | ||
container: { | ||
flex: 1, | ||
}, | ||
}) |