-
Notifications
You must be signed in to change notification settings - Fork 218
website: Fix sidebar in examples #1874
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
3303353
website: Fix sidebar in examples
zbigg e04aa41
removed invalid images
zbigg d4faa28
fixed luma-example switching tabs
zbigg b9a69d4
Update website/src/react-luma/components/luma-example.tsx
zbigg 673f703
Device: expose destroy method
zbigg f425a73
typing improvements / cr
zbigg 719acd0
remove excessive logs
zbigg db09110
animationLoop is and should be internal detail to effect
zbigg File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
import {DeviceTabs} from '@site/src/react-luma'; | ||
import {AnimationExample} from '@site'; | ||
|
||
# Hello Cube | ||
# Animation | ||
|
||
<DeviceTabs /> | ||
<AnimationExample /> |
This file contains hidden or 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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
import {DeviceTabs} from '@site/src/react-luma'; | ||
import {CubemapExample} from '@site'; | ||
|
||
# Hello Cube | ||
# Cubemap | ||
|
||
<DeviceTabs /> | ||
<CubemapExample /> |
This file contains hidden or 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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
import {DeviceTabs} from '@site/src/react-luma'; | ||
import {Texture3DExample} from '@site'; | ||
|
||
# Hello Cube | ||
# Texture 3D | ||
|
||
<DeviceTabs /> | ||
<Texture3DExample /> |
This file contains hidden or 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 |
---|---|---|
@@ -1,12 +1,10 @@ | ||
# Examples | ||
|
||
import {ExamplesIndex} from '@site/src/examples/components'; | ||
import examplesSidebar from '@site/content/sidebar-examples.json'; | ||
|
||
<ExamplesIndex | ||
sidebar={examplesSidebar} | ||
<ExamplesIndex | ||
getThumbnail={item => { | ||
const exampleName = typeof item === 'string' ? item : item.docId || item.label.toLowerCase(); | ||
return `/images/examples/${exampleName}.jpg` | ||
}} | ||
}} | ||
/> |
This file contains hidden or 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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
import {DeviceTabs} from '@site/src/react-luma'; | ||
import {InstancingExample} from '@site'; | ||
|
||
# Hello Cube | ||
# Instancing | ||
|
||
<DeviceTabs /> | ||
<InstancingExample /> |
This file contains hidden or 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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
import {DeviceTabs} from '@site/src/react-luma'; | ||
import {PersistenceExample} from '@site'; | ||
|
||
# Hello Cube | ||
# Persistence | ||
|
||
<DeviceTabs /> | ||
<PersistenceExample /> |
This file contains hidden or 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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
import {DeviceTabs} from '@site/src/react-luma'; | ||
import {HelloInstancingExample} from '@site'; | ||
|
||
# Hello Cube | ||
# Hello Instancing | ||
|
||
<DeviceTabs /> | ||
<HelloInstancingExample /> |
This file contains hidden or 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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
import {DeviceTabs} from '@site/src/react-luma'; | ||
import {HelloTriangleExample} from '@site'; | ||
|
||
# Hello Cube | ||
# Hello Triangle | ||
|
||
<DeviceTabs /> | ||
<HelloTriangleExample /> |
This file contains hidden or 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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
import {DeviceTabs} from '@site/src/react-luma'; | ||
import {LightingExample} from '@site'; | ||
|
||
# Hello Cube | ||
# Lighting | ||
|
||
<DeviceTabs /> | ||
<LightingExample /> |
This file contains hidden or 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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
import {DeviceTabs} from '@site/src/react-luma'; | ||
import {ShaderHooksExample} from '@site'; | ||
|
||
# Hello Cube | ||
# Shader Hooks | ||
|
||
<DeviceTabs /> | ||
<ShaderHooksExample /> |
This file contains hidden or 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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
import {DeviceTabs} from '@site/src/react-luma'; | ||
import {ShaderModulesExample} from '@site'; | ||
|
||
# Hello Cube | ||
# Shader Modules | ||
|
||
<DeviceTabs /> | ||
<ShaderModulesExample /> |
This file contains hidden or 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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
import {DeviceTabs} from '@site/src/react-luma'; | ||
import {InstancedCubesWebGPUExample} from '@site'; | ||
|
||
# Hello Cube | ||
# Instanced Cubes | ||
|
||
<DeviceTabs /> | ||
<InstancedCubesWebGPUExample /> |
This file contains hidden or 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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
import {DeviceTabs} from '@site/src/react-luma'; | ||
import {RotatingCubeWebGPUExample} from '@site'; | ||
|
||
# Hello Cube | ||
# Rotating Cube | ||
|
||
<DeviceTabs /> | ||
<RotatingCubeWebGPUExample /> |
This file contains hidden or 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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
import {DeviceTabs} from '@site/src/react-luma'; | ||
import {TexturedCubeWebGPUExample} from '@site'; | ||
|
||
# Hello Cube | ||
# Textured Cube | ||
|
||
<DeviceTabs /> | ||
<TexturedCubeWebGPUExample /> |
This file contains hidden or 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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
import {DeviceTabs} from '@site/src/react-luma'; | ||
import {HelloTriangleWebGPUExample} from '@site'; | ||
|
||
# Hello Cube | ||
# Triangle | ||
|
||
<DeviceTabs /> | ||
<HelloTriangleWebGPUExample /> |
This file contains hidden or 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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
import {DeviceTabs} from '@site/src/react-luma'; | ||
import {TwoCubesWebGPUExample} from '@site'; | ||
|
||
# Hello Cube | ||
# Two Cubes | ||
|
||
<DeviceTabs /> | ||
<TwoCubesWebGPUExample /> |
This file contains hidden or 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 |
---|---|---|
@@ -1,2 +1,45 @@ | ||
module.exports = [ | ||
]; | ||
const sidebars = { | ||
examplesSidebar: [ | ||
{ | ||
type: 'doc', | ||
label: 'Overview', | ||
id: 'index' | ||
}, | ||
{ | ||
type: 'category', | ||
label: 'Showcase', | ||
items: [ | ||
'showcase/instancing', | ||
'showcase/persistence', | ||
'api/animation', | ||
'api/cubemap', | ||
'api/texture-3d' | ||
] | ||
}, | ||
{ | ||
type: 'category', | ||
label: 'Tutorials', | ||
items: [ | ||
'tutorials/hello-triangle', | ||
'tutorials/hello-cube', | ||
'tutorials/lighting', | ||
'tutorials/hello-instancing', | ||
'tutorials/shader-modules', | ||
'tutorials/shader-hooks' | ||
] | ||
}, | ||
{ | ||
type: 'category', | ||
label: 'WebGPU', | ||
items: [ | ||
'webgpu/triangle', | ||
'webgpu/rotating-cube', | ||
'webgpu/textured-cube', | ||
'webgpu/two-cubes', | ||
'webgpu/instanced-cubes' | ||
] | ||
} | ||
] | ||
}; | ||
|
||
module.exports = sidebars; |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File renamed without changes
Binary file not shown.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: put such a nasty cast on its own line?