x_ite-node 1.0.1 → 1.0.2
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/README.md +1 -1
- package/package.json +2 -2
- package/src/index.js +2 -2
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
This is a wrapper for [X_ITE](https://create3000.github.io/x_ite/) for use in a plain Node.js environment. The purpose of this module is to provide a version of X_ITE that can load X3D files, modify or process them, and generate X3D files.
|
|
4
4
|
|
|
5
|
-
There is no way to render images or anything like that, use X_ITE in an Electron environment for that.
|
|
5
|
+
There is no way to render images or anything like that, use [X_ITE in an Electron environment](https://create3000.github.io/x_ite/how-to-use-x-ite-with-electron/) for that.
|
|
6
6
|
|
|
7
7
|
## Installation
|
|
8
8
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "x_ite-node",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "Pure Node.js wrapper of X_ITE",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"engines": {
|
|
@@ -54,13 +54,13 @@
|
|
|
54
54
|
],
|
|
55
55
|
"dependencies": {
|
|
56
56
|
"atob": "^2.1.2",
|
|
57
|
-
"canvas": "^2.11.2",
|
|
58
57
|
"filereader": "^0.10.3",
|
|
59
58
|
"jsdom": "^25.0.1",
|
|
60
59
|
"jsdom-global": "^3.0.2",
|
|
61
60
|
"node-fetch": "^2.7.0",
|
|
62
61
|
"node-localstorage": "^3.0.5",
|
|
63
62
|
"nogl": "^1.1.0",
|
|
63
|
+
"skia-canvas": "^1.0.2",
|
|
64
64
|
"x_ite": "^10.5.10"
|
|
65
65
|
},
|
|
66
66
|
"devDependencies": {
|
package/src/index.js
CHANGED
|
@@ -287,7 +287,7 @@ global .XMLDocument = window .Document;
|
|
|
287
287
|
|
|
288
288
|
// 2D Context
|
|
289
289
|
|
|
290
|
-
const {
|
|
290
|
+
const { Canvas } = require ("skia-canvas");
|
|
291
291
|
|
|
292
292
|
const getContext = HTMLCanvasElement .prototype .getContext;
|
|
293
293
|
|
|
@@ -295,7 +295,7 @@ HTMLCanvasElement .prototype .getContext = function (... args)
|
|
|
295
295
|
{
|
|
296
296
|
if (args [0] === "2d")
|
|
297
297
|
{
|
|
298
|
-
const canvas =
|
|
298
|
+
const canvas = new Canvas (200, 200);
|
|
299
299
|
|
|
300
300
|
return Object .assign (canvas .getContext ("2d"),
|
|
301
301
|
{
|