@@ -3,22 +3,68 @@ glTF Sample Viewer Web App
3
3
4
4
[ ![ ] ( ../assets/images/BoomBox.jpg )] ( https://github.khronos.org/glTF-Sample-Viewer-Release/ )
5
5
6
- This is the official [ Khronos glTF 2.0] ( https://www.khronos.org/gltf/ ) Sample Viewer using [ WebGL] ( https://www.khronos.org/webgl/ ) : [ glTF 2.0 Sample Viewer ] ( https://github .khronos.org/glTF-Sample-Viewer-Release/ )
6
+ This is the official [ Khronos glTF 2.0] ( https://www.khronos.org/gltf/ ) Sample Viewer using [ WebGL 2.0] ( https://www .khronos.org/webgl/ ) :
7
7
8
8
9
9
Viewer
10
10
======
11
11
12
12
Link to the live [ glTF 2.0 Sample Viewer] ( https://github.khronos.org/glTF-Sample-Viewer-Release/ ) .
13
13
14
+ Features
15
+ --------
16
+
17
+ ### glTF
18
+ - [x] glTF 2.0
19
+ - [x] [ KHR_animation_pointer] ( https://github.com/KhronosGroup/glTF/tree/main/extensions/2.0/Khronos/KHR_animation_pointer )
20
+ - [x] [ KHR_draco_mesh_compression] ( https://github.com/KhronosGroup/glTF/tree/main/extensions/2.0/Khronos/KHR_draco_mesh_compression )
21
+ - [x] [ KHR_lights_punctual] ( https://github.com/KhronosGroup/glTF/tree/main/extensions/2.0/Khronos/KHR_lights_punctual )
22
+ - [x] [ KHR_materials_anisotropy] ( https://github.com/KhronosGroup/glTF/tree/main/extensions/2.0/Khronos/KHR_materials_anisotropy )
23
+ - [x] [ KHR_materials_clearcoat] ( https://github.com/KhronosGroup/glTF/tree/main/extensions/2.0/Khronos/KHR_materials_clearcoat )
24
+ - [x] [ KHR_materials_diffuse_transmission] ( https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Khronos/KHR_materials_diffuse_transmission/README.md )
25
+ - [x] [ KHR_materials_dispersion] ( https://github.com/KhronosGroup/glTF/tree/main/extensions/2.0/Khronos/KHR_materials_dispersion )
26
+ - [x] [ KHR_materials_emissive_strength] ( https://github.com/KhronosGroup/glTF/tree/KHR_materials_emissive_strength/extensions/2.0/Khronos/KHR_materials_emissive_strength )
27
+ - [x] [ KHR_materials_ior] ( https://github.com/KhronosGroup/glTF/tree/main/extensions/2.0/Khronos/KHR_materials_ior )
28
+ - [x] [ KHR_materials_iridescence] ( https://github.com/KhronosGroup/glTF/tree/main/extensions/2.0/Khronos/KHR_materials_iridescence )
29
+ - [x] [ KHR_materials_pbrSpecularGlossiness] ( https://github.com/KhronosGroup/glTF/tree/main/extensions/2.0/Khronos/KHR_materials_pbrSpecularGlossiness )
30
+ - [x] [ KHR_materials_sheen] ( https://github.com/KhronosGroup/glTF/tree/main/extensions/2.0/Khronos/KHR_materials_sheen )
31
+ - [x] [ KHR_materials_specular] ( https://github.com/KhronosGroup/glTF/tree/main/extensions/2.0/Khronos/KHR_materials_specular )
32
+ - [x] [ KHR_materials_transmission] ( https://github.com/KhronosGroup/glTF/tree/main/extensions/2.0/Khronos/KHR_materials_transmission )
33
+ - [x] [ KHR_materials_unlit] ( https://github.com/KhronosGroup/glTF/tree/main/extensions/2.0/Khronos/KHR_materials_unlit )
34
+ - [x] [ KHR_materials_variants] ( https://github.com/KhronosGroup/glTF/tree/main/extensions/2.0/Khronos/KHR_materials_variants )
35
+ - [x] [ KHR_materials_volume] ( https://github.com/KhronosGroup/glTF/tree/main/extensions/2.0/Khronos/KHR_materials_volume )
36
+ - [x] [ KHR_mesh_quantization] ( https://github.com/KhronosGroup/glTF/tree/main/extensions/2.0/Khronos/KHR_mesh_quantization )
37
+ - [x] [ KHR_texture_basisu] ( https://github.com/KhronosGroup/glTF/tree/main/extensions/2.0/Khronos/KHR_texture_basisu )
38
+ - [x] [ KHR_texture_transform] ( https://github.com/KhronosGroup/glTF/tree/main/extensions/2.0/Khronos/KHR_texture_transform )
39
+ - [x] [ KHR_xmp_json_ld] ( https://github.com/KhronosGroup/glTF/tree/main/extensions/2.0/Khronos/KHR_xmp_json_ld )
40
+ - [x] [ EXT_mesh_gpu_instancing] ( https://github.com/KhronosGroup/glTF/tree/main/extensions/2.0/Vendor/EXT_mesh_gpu_instancing )
41
+ - [x] [ EXT_texture_webp] ( https://github.com/KhronosGroup/glTF/tree/main/extensions/2.0/Vendor/EXT_texture_webp )
42
+
43
+ ### UI
44
+ - Select all [ glTF-Sample-Assets] ( https://github.com/KhronosGroup/glTF-Sample-Assets ) directly via UI
45
+ - Load your own glTF/glb and HDR files via drag and drop
46
+ - Customize lighting and tone mapping
47
+ - Check validation errors with the integrated [ glTF-Validator] ( https://github.com/KhronosGroup/glTF-Validator )
48
+ - Select different material variants
49
+ - Enable/disable specific animations
50
+ - Enable/disable glTF features/extensions and view debug channels
51
+ - Download renderings and current camera properties
52
+ - Show statistics about the currently loaded file
53
+ - Specify URL parameters to modify behavior on load
54
+
55
+
14
56
Usage
15
57
-----
16
58
17
59
### Controls
18
60
19
61
` click + drag ` : Rotate model
20
62
21
- ` scroll ` : Zoom camera
63
+ ` shift + drag ` \
64
+ ` middle mouse button + drag ` : Pan camera
65
+
66
+ ` scroll ` \
67
+ ` right click + drag ` : Zoom camera
22
68
23
69
` GUI ` : Use to change models and settings
24
70
30
76
### Change the environment map
31
77
* Drag and drop a .hdr panorama file
32
78
79
+ ### URL parameters
80
+ URL parameters are added at the end of the sample viewer URL: \
81
+ ` ?key=value&another_key=another_value `
82
+
83
+ Possible parameters:
84
+ - ` model=URL_to_file ` : Load glTF/glb from specified URL
85
+ - ` noUI ` : Disable UI
86
+ - ` yaw=90 ` : Orbit the camera around the model along the Y-axis in degrees. With 90 degrees you look at the model from the left side.
87
+ - ` pitch=90 ` : Orbit the camera around the model along the X-axis in degrees. With 90 degrees you look at the model from the top. Value range: -90 to 90
88
+ - ` distance=5 ` : The models gets smaller with positive and bigger with negative numbers. Relative to the initial camera position.
89
+
33
90
Setup
34
91
-----
35
92
0 commit comments