x3d-tidy 2.2.13 → 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 +2 -2
- package/src/main.js +35 -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": {
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"dependencies": {
|
|
56
56
|
"colors": "^1.4.0",
|
|
57
57
|
"x_ite": "^12.1.8",
|
|
58
|
-
"x_ite-node": "^1.1.
|
|
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
|
@@ -261,16 +261,38 @@ function getHTML (scene)
|
|
|
261
261
|
<meta charset="utf-8">
|
|
262
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
285
|
color-scheme: light dark;
|
|
286
|
+
box-sizing: border-box;
|
|
266
287
|
display: flex;
|
|
267
288
|
flex-direction: column;
|
|
268
289
|
margin: 0px;
|
|
269
290
|
padding: 0px;
|
|
270
291
|
height: 100vh;
|
|
271
|
-
background-color:
|
|
272
|
-
color:
|
|
273
|
-
font-family: sans-serif;
|
|
292
|
+
background-color: var(--background-color);
|
|
293
|
+
color: var(--text-color);
|
|
294
|
+
font-family: "Source Sans 3", sans-serif;
|
|
295
|
+
font-size: 1.08rem;
|
|
274
296
|
}
|
|
275
297
|
|
|
276
298
|
body > * {
|
|
@@ -278,21 +300,26 @@ body > * {
|
|
|
278
300
|
padding: 0px 1rem;
|
|
279
301
|
}
|
|
280
302
|
|
|
303
|
+
h1 {
|
|
304
|
+
font-family: Lato, sans-serif;
|
|
305
|
+
}
|
|
306
|
+
|
|
281
307
|
x3d-canvas {
|
|
282
308
|
flex: 1 1 auto;
|
|
283
|
-
|
|
284
|
-
border-
|
|
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%);
|
|
285
312
|
padding: 0px;
|
|
286
313
|
width: 100%;
|
|
287
314
|
height: 100%;
|
|
288
315
|
}
|
|
289
316
|
|
|
290
317
|
a {
|
|
291
|
-
color:
|
|
318
|
+
color: var(--link-color);
|
|
292
319
|
}
|
|
293
320
|
|
|
294
321
|
a:hover {
|
|
295
|
-
color:
|
|
322
|
+
color: var(--link-hover-color);
|
|
296
323
|
}
|
|
297
324
|
</style>
|
|
298
325
|
</head>
|
|
@@ -301,7 +328,7 @@ a:hover {
|
|
|
301
328
|
<x3d-canvas>
|
|
302
329
|
${scene .toXMLString ({ html: true, indent: " " .repeat (6) }) .trimEnd ()}
|
|
303
330
|
</x3d-canvas>
|
|
304
|
-
<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>
|
|
305
332
|
</body>
|
|
306
333
|
</html>`;
|
|
307
334
|
}
|