x3d-tidy 2.2.12 → 2.2.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +3 -3
- package/src/main.js +55 -8
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "x3d-tidy",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.14",
|
|
4
4
|
"description": "X3D Converter, Beautifier and Minimizer",
|
|
5
5
|
"main": "src/main.js",
|
|
6
6
|
"bin": {
|
|
@@ -54,8 +54,8 @@
|
|
|
54
54
|
],
|
|
55
55
|
"dependencies": {
|
|
56
56
|
"colors": "^1.4.0",
|
|
57
|
-
"x_ite": "^12.1.
|
|
58
|
-
"x_ite-node": "^1.1.
|
|
57
|
+
"x_ite": "^12.1.8",
|
|
58
|
+
"x_ite-node": "^1.1.13",
|
|
59
59
|
"x3d-traverse": "^1.0.22",
|
|
60
60
|
"yargs": "^18.0.0"
|
|
61
61
|
},
|
package/src/main.js
CHANGED
|
@@ -259,20 +259,67 @@ function getHTML (scene)
|
|
|
259
259
|
<html>
|
|
260
260
|
<head>
|
|
261
261
|
<meta charset="utf-8">
|
|
262
|
-
<script src="https://cdn.jsdelivr.net/npm/x_ite@latest/dist/x_ite.min.js"></script>
|
|
262
|
+
<script defer src="https://cdn.jsdelivr.net/npm/x_ite@latest/dist/x_ite.min.js"></script>
|
|
263
263
|
<style>
|
|
264
|
+
@import url("https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,400&family=Source+Sans+3:ital,wght@0,400&display=swap");
|
|
265
|
+
|
|
266
|
+
@media (prefers-color-scheme: light) {
|
|
267
|
+
:root {
|
|
268
|
+
--text-color: rgb(42, 42, 42);
|
|
269
|
+
--background-color: white;
|
|
270
|
+
--link-color: rgb(0, 86, 178);
|
|
271
|
+
--link-hover-color: rgb(210, 96, 58);
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
@media (prefers-color-scheme: dark) {
|
|
276
|
+
:root {
|
|
277
|
+
--text-color: rgb(175, 176, 177);
|
|
278
|
+
--background-color: rgb(27, 27, 30);
|
|
279
|
+
--link-color: rgb(82, 108, 150);
|
|
280
|
+
--link-hover-color: rgb(210, 96, 58);
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
|
|
264
284
|
body {
|
|
265
|
-
|
|
266
|
-
|
|
285
|
+
color-scheme: light dark;
|
|
286
|
+
box-sizing: border-box;
|
|
287
|
+
display: flex;
|
|
288
|
+
flex-direction: column;
|
|
289
|
+
margin: 0px;
|
|
290
|
+
padding: 0px;
|
|
291
|
+
height: 100vh;
|
|
292
|
+
background-color: var(--background-color);
|
|
293
|
+
color: var(--text-color);
|
|
294
|
+
font-family: "Source Sans 3", sans-serif;
|
|
295
|
+
font-size: 1.08rem;
|
|
267
296
|
}
|
|
268
297
|
|
|
269
|
-
|
|
270
|
-
|
|
298
|
+
body > * {
|
|
299
|
+
flex: 0 0 auto;
|
|
300
|
+
padding: 0px 1rem;
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
h1 {
|
|
304
|
+
font-family: Lato, sans-serif;
|
|
271
305
|
}
|
|
272
306
|
|
|
273
307
|
x3d-canvas {
|
|
274
|
-
|
|
275
|
-
|
|
308
|
+
flex: 1 1 auto;
|
|
309
|
+
box-sizing: border-box;
|
|
310
|
+
border-top: 1px solid color-mix(in srgb, var(--text-color), transparent 90%);
|
|
311
|
+
border-bottom: 1px solid color-mix(in srgb, var(--text-color), transparent 90%);
|
|
312
|
+
padding: 0px;
|
|
313
|
+
width: 100%;
|
|
314
|
+
height: 100%;
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
a {
|
|
318
|
+
color: var(--link-color);
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
a:hover {
|
|
322
|
+
color: var(--link-hover-color);
|
|
276
323
|
}
|
|
277
324
|
</style>
|
|
278
325
|
</head>
|
|
@@ -281,7 +328,7 @@ x3d-canvas {
|
|
|
281
328
|
<x3d-canvas>
|
|
282
329
|
${scene .toXMLString ({ html: true, indent: " " .repeat (6) }) .trimEnd ()}
|
|
283
330
|
</x3d-canvas>
|
|
284
|
-
<p>Made with <a href="https://www.npmjs.com/package/x3d-tidy" target="_blank">x3d-tidy
|
|
331
|
+
<p>Made with <a href="https://www.npmjs.com/package/x3d-tidy" target="_blank">x3d-tidy</a>. If local files are not loaded <a href="https://create3000.github.io/x_ite/setup-a-localhost-server">consider setup a localhost server</a> or use <a href="https://create3000.github.io/x_ite/dom-integration">DOM integration methods</a>.</p>
|
|
285
332
|
</body>
|
|
286
333
|
</html>`;
|
|
287
334
|
}
|