@windborne/grapher 1.0.14 → 1.0.15
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/bundle.js +1 -1
- package/bundle.js.map +1 -1
- package/package.json +1 -1
- package/src/renderer/extract_vertices.js +4 -7
- package/webpack.dev.config.js +1 -0
- package/webpack.prod.config.js +1 -0
package/package.json
CHANGED
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import pathsFrom from './paths_from';
|
|
2
2
|
import {DPI_INCREASE} from './size_canvas';
|
|
3
|
-
|
|
4
|
-
import('../rust/pkg/index.js').then((module) => {
|
|
5
|
-
RustAPI = module;
|
|
6
|
-
});
|
|
3
|
+
import RustAPI from '../state/rust_api';
|
|
7
4
|
|
|
8
5
|
/**
|
|
9
6
|
*
|
|
@@ -106,12 +103,12 @@ export default function extractVertices(dataInRenderSpace, { dashed, dashPattern
|
|
|
106
103
|
return extractVerticesFromPaths(dataInRenderSpace.paths, { dashed, dashPattern});
|
|
107
104
|
}
|
|
108
105
|
|
|
109
|
-
if (!RustAPI) {
|
|
106
|
+
if (!RustAPI()) {
|
|
110
107
|
const paths = pathsFrom(dataInRenderSpace);
|
|
111
108
|
return extractVerticesFromPaths(paths, { dashed, dashPattern});
|
|
112
109
|
}
|
|
113
110
|
|
|
114
|
-
const pointNumber = RustAPI.get_point_number(
|
|
111
|
+
const pointNumber = RustAPI().get_point_number(
|
|
115
112
|
dataInRenderSpace.nullMask, dataInRenderSpace.yValues, dataInRenderSpace.minYValues, dataInRenderSpace.maxYValues,
|
|
116
113
|
dashed, dashPattern[0], dashPattern[1]
|
|
117
114
|
);
|
|
@@ -121,7 +118,7 @@ export default function extractVertices(dataInRenderSpace, { dashed, dashPattern
|
|
|
121
118
|
let vertices = new Float32Array(pointNumber*4);
|
|
122
119
|
let indices = new Uint32Array(pointNumber*6);
|
|
123
120
|
|
|
124
|
-
RustAPI.extract_vertices(
|
|
121
|
+
RustAPI().extract_vertices(
|
|
125
122
|
DPI_INCREASE,
|
|
126
123
|
dataInRenderSpace.nullMask, dataInRenderSpace.yValues, dataInRenderSpace.minYValues, dataInRenderSpace.maxYValues,
|
|
127
124
|
positions, prevPositions, vertices, indices,
|
package/webpack.dev.config.js
CHANGED