Skip to content

Commit

Permalink
Website updates
Browse files Browse the repository at this point in the history
  • Loading branch information
tschaub committed Dec 15, 2024
1 parent d8c2cc7 commit 945e497
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 6 deletions.
2 changes: 1 addition & 1 deletion dist/en/main/examples/common.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/en/main/examples/common.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/en/main/ol/dist/ol.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/en/main/ol/dist/ol.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/en/main/ol/render/webgl/VectorStyleRenderer.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 9 additions & 1 deletion dist/en/main/ol/render/webgl/VectorStyleRenderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,14 @@ import {
import {colorEncodeId} from './utils.js';

const tmpColor = [];
const WEBGL_WORKER = createWebGLWorker();
/** @type {Worker|undefined} */
let WEBGL_WORKER;
function getWebGLWorker() {
if (!WEBGL_WORKER) {
WEBGL_WORKER = createWebGLWorker();
}
return WEBGL_WORKER;
}
let workerMessageCounter = 0;

/**
Expand Down Expand Up @@ -424,6 +431,7 @@ class VectorStyleRenderer {
renderInstructionsTransform: transform,
customAttributesSize: getCustomAttributesSize(this.customAttributes_),
};
const WEBGL_WORKER = getWebGLWorker();
WEBGL_WORKER.postMessage(message, [renderInstructions.buffer]);

// leave ownership of render instructions
Expand Down

0 comments on commit 945e497

Please sign in to comment.