forked from fxia22/three-gltf-viewer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
validation.html
145 lines (143 loc) · 5.36 KB
/
validation.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
<!DOCTYPE html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>glTF Viewer</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<meta name="author" content="Don McCurdy">
<meta name="description" content="Drag-and-drop preview tool for glTF 2.0 3D models.">
<link rel="canonical" href="https://gltf-viewer.donmccurdy.com/">
<link rel="shortcut icon" href="assets/favicon.ico">
<link rel="stylesheet" href="style.css">
<link href="https://fonts.googleapis.com/css?family=Raleway:300,400" rel="stylesheet">
<script src="src/app_validation.js"></script>
</head>
<body>
<main class="wrap">
<div class="dropzone">
</div>
<div class="spinner"></div>
</main>
<script type="text/x-handlebars-template" id="report-toggle-template">
<!-- <div class="report-toggle level-{{issues.maxSeverity}}">
<div class="report-toggle-text">
{{#if issues}}
{{#if issues.numErrors }}
{{issues.numErrors}} errors.
{{else if issues.numWarnings}}
{{issues.numWarnings}} warnings.
{{else if issues.numHints}}
{{issues.numHints}} hints.
{{else if issues.numInfos}}
{{issues.numInfos}} notes.
{{else}}
Model details
{{/if}}
{{else if reportError}}
Validation could not run: {{reportError}}.
{{else}}
Validation could not run.
{{/if}}
</div>
<div class="report-toggle-close" aria-label="Hide">×</div>
</div> -->
</script>
<script type="text/x-handlebars-template" id="report-template">
<!DOCTYPE html>
<title>glTF 2.0 validation report</title>
<link href="https://fonts.googleapis.com/css?family=Raleway:300,400" rel="stylesheet">
<link rel="stylesheet" href="{{location.protocol}}//{{location.host}}/style.css">
<style>
body { overflow-y: auto; }
</style>
<div class="report">
<h1>Validation report</h1>
<ul>
<li><b>Format:</b> glTF {{info.version}}</li>
{{#if generator}}
<li>
<b>Generator:</b> {{generator.name}}
{{#if generator.docsURL}}(<a href="{{generator.docsURL}}" target="_blank">docs</a>){{/if}}
{{#if generator.bugsURL}}(<a href="{{generator.bugsURL}}" target="_blank">bugs</a>){{/if}}
</li>
{{else}}
<li><b>Generator:</b> {{info.generator}}</li>
{{/if}}
{{#if info.extras}}
{{#if info.extras.title}}<li><b>Title:</b> {{info.extras.title}}</li>{{/if}}
{{#if info.extras.author}}<li><b>Author:</b> {{{info.extras.author}}}</li>{{/if}}
{{#if info.extras.license}}<li><b>License:</b> {{{info.extras.license}}}</li>{{/if}}
{{#if info.extras.source}}<li><b>Source:</b> {{{info.extras.source}}}</li>{{/if}}
{{/if}}
<li>
<b>Stats:</b>
<ul>
<li>{{info.animationsCount}} animations</li>
<li>{{info.materialsCount}} materials</li>
<li>{{info.meshesCount}} meshes</li>
<li>{{info.nodesCount}} nodes</li>
<li>{{info.primitivesCount}} primitives</li>
<li>{{info.texturesCount}} textures</li>
</ul>
</li>
<li>
<b>Extensions:</b> {{#unless info.extensionsUsed}}None{{/unless}}
{{#if info.extensionsUsed}}
<ul>
{{#each info.extensionsUsed}}
<li>{{this}}</li>
{{/each}}
</ul>
<p><i>
NOTE: Extensions above are present in the model, but may or may not be recognized by this
viewer. Any "UNSUPPORTED_EXTENSION" warnings below refer only to extensions that could not
be scanned by the validation suite, and may still have rendered correctly. See:
<a href="https://github.com/donmccurdy/three-gltf-viewer/issues/122" target="_blank">three-gltf-viewer#122</a>
{{/if}}
</li>
</ul>
<hr/>
<p>
Report generated by
<a href="https://github.com/KhronosGroup/glTF-Validator/">KhronosGroup/glTF-Validator</a>
{{validatorVersion}}.
</p>
{{#if issues.numErrors}}
{{> issuesTable messages=errors color="#f44336" title="Error"}}
{{/if}}
{{#if issues.numWarnings}}
{{> issuesTable messages=warnings color="#f9a825" title="Warning"}}
{{/if}}
{{#if issues.numHints}}
{{> issuesTable messages=hints color="#8bc34a" title="Hint"}}
{{/if}}
{{#if issues.numInfos}}
{{> issuesTable messages=infos color="#2196f3" title="Info"}}
{{/if}}
</div>
</script>
<script type="text/x-handlebars-template" id="report-table-partial">
<table class="report-table">
<thead>
<tr style="background: {{color}};">
<th>{{title}}</th>
<th>Message</th>
<th>Pointer</th>
</tr>
</thead>
<tbody>
{{#each messages}}
<tr>
<td><code>{{code}}</code></td>
<td>{{message}}</td>
<td><code>{{pointer}}</code></td>
</tr>
{{/each}}
{{#unless issues.messages}}
<tr><td colspan="3">No issues found.</td></tr>
{{/unless}}
</tbody>
</table>
</script>
<script src="https://analytics.donmccurdy.com/client.js"></script>
</body>