@solidtv/solid 1.1.1 → 1.1.3
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/dist/src/core/clickInspector.d.ts +1 -0
- package/dist/src/core/clickInspector.js +69 -0
- package/dist/src/core/clickInspector.js.map +1 -0
- package/dist/src/core/config.d.ts +1 -13
- package/dist/src/core/config.js +10 -2
- package/dist/src/core/config.js.map +1 -1
- package/dist/src/core/dom-renderer/domRenderer.d.ts +6 -1
- package/dist/src/core/dom-renderer/domRenderer.js +254 -67
- package/dist/src/core/dom-renderer/domRenderer.js.map +1 -1
- package/dist/src/core/elementNode.d.ts +20 -7
- package/dist/src/core/elementNode.js +54 -14
- package/dist/src/core/elementNode.js.map +1 -1
- package/dist/src/core/focusManager.js +5 -3
- package/dist/src/core/focusManager.js.map +1 -1
- package/dist/src/core/intrinsicTypes.d.ts +2 -0
- package/dist/src/core/lightningInit.d.ts +1 -1
- package/dist/src/core/lightningInit.js +6 -6
- package/dist/src/core/lightningInit.js.map +1 -1
- package/dist/src/core/utils.js +4 -4
- package/dist/src/core/utils.js.map +1 -1
- package/dist/src/primitives/Column.jsx +1 -1
- package/dist/src/primitives/Column.jsx.map +1 -1
- package/dist/src/primitives/FPSCounter.jsx +5 -5
- package/dist/src/primitives/FPSCounter.jsx.map +1 -1
- package/dist/src/primitives/Image.jsx +6 -1
- package/dist/src/primitives/Image.jsx.map +1 -1
- package/dist/src/primitives/KeepAlive.d.ts +4 -3
- package/dist/src/primitives/KeepAlive.jsx +60 -23
- package/dist/src/primitives/KeepAlive.jsx.map +1 -1
- package/dist/src/primitives/LazyImport.js +4 -2
- package/dist/src/primitives/LazyImport.js.map +1 -1
- package/dist/src/primitives/Preserve.jsx +10 -4
- package/dist/src/primitives/Preserve.jsx.map +1 -1
- package/dist/src/primitives/Row.jsx +1 -1
- package/dist/src/primitives/Row.jsx.map +1 -1
- package/dist/src/primitives/Suspense.jsx +7 -7
- package/dist/src/primitives/Suspense.jsx.map +1 -1
- package/dist/src/primitives/Virtual.jsx +1 -1
- package/dist/src/primitives/Virtual.jsx.map +1 -1
- package/dist/src/primitives/announcer/announcer.js +3 -2
- package/dist/src/primitives/announcer/announcer.js.map +1 -1
- package/dist/src/primitives/announcer/speech.js +2 -2
- package/dist/src/primitives/announcer/speech.js.map +1 -1
- package/dist/src/primitives/borderBox.jsx +2 -1
- package/dist/src/primitives/borderBox.jsx.map +1 -1
- package/dist/src/primitives/createTag.jsx +3 -3
- package/dist/src/primitives/createTag.jsx.map +1 -1
- package/dist/src/primitives/portal.jsx +4 -3
- package/dist/src/primitives/portal.jsx.map +1 -1
- package/dist/src/primitives/utils/chainFunctions.js +35 -9
- package/dist/src/primitives/utils/chainFunctions.js.map +1 -1
- package/dist/src/primitives/utils/createBlurredImage.js +57 -37
- package/dist/src/primitives/utils/createBlurredImage.js.map +1 -1
- package/dist/src/primitives/utils/handleNavigation.js +21 -16
- package/dist/src/primitives/utils/handleNavigation.js.map +1 -1
- package/dist/src/primitives/utils/withScrolling.js +1 -3
- package/dist/src/primitives/utils/withScrolling.js.map +1 -1
- package/dist/src/render.d.ts +1 -1
- package/dist/src/render.js +2 -1
- package/dist/src/render.js.map +1 -1
- package/dist/src/solidOpts.d.ts +1 -1
- package/dist/src/solidOpts.js +4 -2
- package/dist/src/solidOpts.js.map +1 -1
- package/dist/src/utils.js +10 -5
- package/dist/src/utils.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/docs/README.md +2 -2
- package/package.json +28 -29
- package/src/core/clickInspector.ts +77 -0
- package/src/core/config.ts +6 -20
- package/src/core/dom-renderer/domRenderer.ts +307 -89
- package/src/core/dom-renderer/domRendererTypes.ts +9 -6
- package/src/core/elementNode.ts +80 -26
- package/src/core/focusManager.ts +16 -8
- package/src/core/intrinsicTypes.ts +19 -7
- package/src/core/lightningInit.ts +20 -18
- package/src/core/utils.ts +4 -4
- package/src/primitives/Column.tsx +0 -1
- package/src/primitives/FPSCounter.tsx +14 -10
- package/src/primitives/Image.tsx +18 -9
- package/src/primitives/KeepAlive.tsx +88 -44
- package/src/primitives/LazyImport.ts +8 -6
- package/src/primitives/Preserve.tsx +13 -8
- package/src/primitives/Row.tsx +0 -1
- package/src/primitives/Suspense.tsx +10 -9
- package/src/primitives/Virtual.tsx +1 -9
- package/src/primitives/announcer/announcer.ts +3 -2
- package/src/primitives/announcer/speech.ts +2 -2
- package/src/primitives/borderBox.tsx +7 -3
- package/src/primitives/createTag.tsx +23 -17
- package/src/primitives/portal.tsx +20 -10
- package/src/primitives/utils/chainFunctions.ts +31 -11
- package/src/primitives/utils/createBlurredImage.ts +58 -40
- package/src/primitives/utils/handleNavigation.ts +29 -18
- package/src/primitives/utils/withScrolling.ts +3 -5
- package/src/render.ts +4 -4
- package/src/solidOpts.ts +9 -7
- package/src/types.ts +0 -1
- package/src/utils.ts +12 -10
|
@@ -100,32 +100,38 @@ function applyVerticalBlur(
|
|
|
100
100
|
half: number,
|
|
101
101
|
): void {
|
|
102
102
|
for (let y = 0; y < height; y++) {
|
|
103
|
+
const kStart = -y < -half ? -half : -y;
|
|
104
|
+
const kEnd = height - 1 - y < half ? height - 1 - y : half;
|
|
105
|
+
|
|
106
|
+
// Kernel sums to 1; only edge rows need a renormalization factor.
|
|
107
|
+
let invWeight = 1;
|
|
108
|
+
if (kStart !== -half || kEnd !== half) {
|
|
109
|
+
let weightSum = 0;
|
|
110
|
+
for (let k = kStart; k <= kEnd; k++) weightSum += kernel[k + half]!;
|
|
111
|
+
invWeight = 1 / weightSum;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
const rowBase = y * width;
|
|
103
115
|
for (let x = 0; x < width; x++) {
|
|
104
116
|
let r = 0,
|
|
105
117
|
g = 0,
|
|
106
118
|
b = 0,
|
|
107
119
|
a = 0;
|
|
108
|
-
let weightSum = 0;
|
|
109
120
|
|
|
110
|
-
for (let ky =
|
|
111
|
-
const
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
g += input[pixelIndex + 1]! * weight;
|
|
118
|
-
b += input[pixelIndex + 2]! * weight;
|
|
119
|
-
a += input[pixelIndex + 3]! * weight;
|
|
120
|
-
weightSum += weight;
|
|
121
|
-
}
|
|
121
|
+
for (let ky = kStart; ky <= kEnd; ky++) {
|
|
122
|
+
const pixelIndex = ((y + ky) * width + x) * 4;
|
|
123
|
+
const weight = kernel[ky + half]!;
|
|
124
|
+
r += input[pixelIndex]! * weight;
|
|
125
|
+
g += input[pixelIndex + 1]! * weight;
|
|
126
|
+
b += input[pixelIndex + 2]! * weight;
|
|
127
|
+
a += input[pixelIndex + 3]! * weight;
|
|
122
128
|
}
|
|
123
129
|
|
|
124
|
-
const outputIndex = (
|
|
125
|
-
output[outputIndex] = r
|
|
126
|
-
output[outputIndex + 1] = g
|
|
127
|
-
output[outputIndex + 2] = b
|
|
128
|
-
output[outputIndex + 3] = a
|
|
130
|
+
const outputIndex = (rowBase + x) * 4;
|
|
131
|
+
output[outputIndex] = r * invWeight;
|
|
132
|
+
output[outputIndex + 1] = g * invWeight;
|
|
133
|
+
output[outputIndex + 2] = b * invWeight;
|
|
134
|
+
output[outputIndex + 3] = a * invWeight;
|
|
129
135
|
}
|
|
130
136
|
}
|
|
131
137
|
}
|
|
@@ -147,33 +153,46 @@ function applyHorizontalBlur(
|
|
|
147
153
|
kernel: Readonly<GaussianKernel>,
|
|
148
154
|
half: number,
|
|
149
155
|
): void {
|
|
156
|
+
// Precompute per-column inverse weight sums; kernel sums to 1 in the interior.
|
|
157
|
+
const invWeights = new Float64Array(width);
|
|
158
|
+
for (let x = 0; x < width; x++) {
|
|
159
|
+
const kStart = -x < -half ? -half : -x;
|
|
160
|
+
const kEnd = width - 1 - x < half ? width - 1 - x : half;
|
|
161
|
+
if (kStart === -half && kEnd === half) {
|
|
162
|
+
invWeights[x] = 1;
|
|
163
|
+
} else {
|
|
164
|
+
let weightSum = 0;
|
|
165
|
+
for (let k = kStart; k <= kEnd; k++) weightSum += kernel[k + half]!;
|
|
166
|
+
invWeights[x] = 1 / weightSum;
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
|
|
150
170
|
for (let y = 0; y < height; y++) {
|
|
171
|
+
const rowBase = y * width;
|
|
151
172
|
for (let x = 0; x < width; x++) {
|
|
173
|
+
const kStart = -x < -half ? -half : -x;
|
|
174
|
+
const kEnd = width - 1 - x < half ? width - 1 - x : half;
|
|
175
|
+
|
|
152
176
|
let r = 0,
|
|
153
177
|
g = 0,
|
|
154
178
|
b = 0,
|
|
155
179
|
a = 0;
|
|
156
|
-
let weightSum = 0;
|
|
157
180
|
|
|
158
|
-
for (let kx =
|
|
159
|
-
const
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
g += input[pixelIndex + 1]! * weight;
|
|
166
|
-
b += input[pixelIndex + 2]! * weight;
|
|
167
|
-
a += input[pixelIndex + 3]! * weight;
|
|
168
|
-
weightSum += weight;
|
|
169
|
-
}
|
|
181
|
+
for (let kx = kStart; kx <= kEnd; kx++) {
|
|
182
|
+
const pixelIndex = (rowBase + x + kx) * 4;
|
|
183
|
+
const weight = kernel[kx + half]!;
|
|
184
|
+
r += input[pixelIndex]! * weight;
|
|
185
|
+
g += input[pixelIndex + 1]! * weight;
|
|
186
|
+
b += input[pixelIndex + 2]! * weight;
|
|
187
|
+
a += input[pixelIndex + 3]! * weight;
|
|
170
188
|
}
|
|
171
189
|
|
|
172
|
-
const
|
|
173
|
-
|
|
174
|
-
output[outputIndex
|
|
175
|
-
output[outputIndex +
|
|
176
|
-
output[outputIndex +
|
|
190
|
+
const invWeight = invWeights[x]!;
|
|
191
|
+
const outputIndex = (rowBase + x) * 4;
|
|
192
|
+
output[outputIndex] = r * invWeight;
|
|
193
|
+
output[outputIndex + 1] = g * invWeight;
|
|
194
|
+
output[outputIndex + 2] = b * invWeight;
|
|
195
|
+
output[outputIndex + 3] = a * invWeight;
|
|
177
196
|
}
|
|
178
197
|
}
|
|
179
198
|
}
|
|
@@ -215,15 +234,14 @@ function gaussianBlurConvolution(
|
|
|
215
234
|
): ImageData {
|
|
216
235
|
const { data } = imageData;
|
|
217
236
|
const { width, height } = dimensions;
|
|
237
|
+
const tempData = new Uint8ClampedArray(data.length);
|
|
218
238
|
const output = new Uint8ClampedArray(data.length);
|
|
219
239
|
|
|
220
240
|
const kernelSize = Math.ceil(radius * 2) * 2 + 1;
|
|
221
241
|
const kernel = generateGaussianKernel(kernelSize, radius);
|
|
222
|
-
const half =
|
|
223
|
-
|
|
224
|
-
applyHorizontalBlur(data, output, width, height, kernel, half);
|
|
242
|
+
const half = (kernelSize - 1) >> 1;
|
|
225
243
|
|
|
226
|
-
|
|
244
|
+
applyHorizontalBlur(data, tempData, width, height, kernel, half);
|
|
227
245
|
applyVerticalBlur(tempData, output, width, height, kernel, half);
|
|
228
246
|
|
|
229
247
|
return new ImageData(output, width, height);
|
|
@@ -30,7 +30,7 @@ export const defaultTransitionUp = {
|
|
|
30
30
|
},
|
|
31
31
|
};
|
|
32
32
|
|
|
33
|
-
function idxInArray(idx: number, arr: readonly
|
|
33
|
+
function idxInArray(idx: number, arr: readonly unknown[]): boolean {
|
|
34
34
|
return idx >= 0 && idx < arr.length;
|
|
35
35
|
}
|
|
36
36
|
|
|
@@ -117,32 +117,41 @@ export const navigableForwardFocus: lng.ForwardFocusHandler = function () {
|
|
|
117
117
|
return selectChild(navigable, selected);
|
|
118
118
|
};
|
|
119
119
|
|
|
120
|
+
type NavWithTransitionCache = lngp.NavigableElement & {
|
|
121
|
+
_navBaseTransition?: object;
|
|
122
|
+
_navLastMerged?: object;
|
|
123
|
+
};
|
|
124
|
+
|
|
120
125
|
export function handleNavigation(
|
|
121
126
|
direction: 'up' | 'right' | 'down' | 'left',
|
|
122
127
|
): lng.KeyHandler {
|
|
123
128
|
return function () {
|
|
124
|
-
const el = this as
|
|
125
|
-
const
|
|
129
|
+
const el = this as NavWithTransitionCache;
|
|
130
|
+
const directional =
|
|
126
131
|
direction === 'up'
|
|
127
132
|
? el.transitionUp
|
|
128
133
|
: direction === 'down'
|
|
129
134
|
? el.transitionDown
|
|
130
135
|
: direction === 'left'
|
|
131
136
|
? el.transitionLeft
|
|
132
|
-
:
|
|
133
|
-
? el.transitionRight
|
|
134
|
-
: undefined;
|
|
137
|
+
: el.transitionRight;
|
|
135
138
|
|
|
136
|
-
if (
|
|
137
|
-
const
|
|
139
|
+
if (directional) {
|
|
140
|
+
const current =
|
|
138
141
|
typeof el.transition === 'object' && el.transition !== null
|
|
139
142
|
? el.transition
|
|
140
143
|
: {};
|
|
141
144
|
|
|
142
|
-
el.transition
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
145
|
+
// Re-snapshot the developer-supplied transition whenever el.transition
|
|
146
|
+
// doesn't match our last merge — that means it was set externally
|
|
147
|
+
// (initial render or a reactive update), not by this handler.
|
|
148
|
+
if (current !== el._navLastMerged) {
|
|
149
|
+
el._navBaseTransition = current;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
const merged = { ...(directional as object), ...el._navBaseTransition };
|
|
153
|
+
el.transition = merged;
|
|
154
|
+
el._navLastMerged = merged;
|
|
146
155
|
}
|
|
147
156
|
|
|
148
157
|
return moveSelection(
|
|
@@ -211,10 +220,10 @@ export function moveSelection(
|
|
|
211
220
|
return selectChild(el, selected);
|
|
212
221
|
}
|
|
213
222
|
|
|
214
|
-
function
|
|
215
|
-
const dx =
|
|
216
|
-
const dy =
|
|
217
|
-
return
|
|
223
|
+
function squaredDistanceBetweenRectCenters(a: lng.Rect, b: lng.Rect): number {
|
|
224
|
+
const dx = a.x + a.width / 2 - (b.x + b.width / 2);
|
|
225
|
+
const dy = a.y + a.height / 2 - (b.y + b.height / 2);
|
|
226
|
+
return dx * dx + dy * dy;
|
|
218
227
|
}
|
|
219
228
|
|
|
220
229
|
function findClosestFocusableChildIdx(
|
|
@@ -229,12 +238,14 @@ function findClosestFocusableChildIdx(
|
|
|
229
238
|
let closestIdx = -1;
|
|
230
239
|
let closestDist = Infinity;
|
|
231
240
|
|
|
232
|
-
|
|
241
|
+
const children = el.children;
|
|
242
|
+
for (let idx = 0; idx < children.length; idx++) {
|
|
243
|
+
const child = children[idx]!;
|
|
233
244
|
if (!child.skipFocus) {
|
|
234
245
|
lng.getElementScreenRect(child, el, childRect);
|
|
235
246
|
childRect.x += elRect.x;
|
|
236
247
|
childRect.y += elRect.y;
|
|
237
|
-
const distance =
|
|
248
|
+
const distance = squaredDistanceBetweenRectCenters(prevRect, childRect);
|
|
238
249
|
if (distance < closestDist) {
|
|
239
250
|
closestDist = distance;
|
|
240
251
|
closestIdx = idx;
|
|
@@ -31,9 +31,9 @@ export interface ScrollableElement extends ElementNode {
|
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
// From the renderer, not exported
|
|
34
|
-
const InViewPort = 8;
|
|
34
|
+
const InViewPort = 8 as const;
|
|
35
35
|
const isNotShown = (node: ElementNode | ElementText) => {
|
|
36
|
-
return node.lng.renderState !== InViewPort;
|
|
36
|
+
return (node.lng.renderState as number) !== InViewPort;
|
|
37
37
|
};
|
|
38
38
|
/*
|
|
39
39
|
Auto Scrolling starts scrolling right away until the last item is shown. Keeping a full view of the list.
|
|
@@ -114,9 +114,7 @@ export function withScrolling(isRow: boolean): Scroller {
|
|
|
114
114
|
: Math.max(targetPosition, componentRef[axis]);
|
|
115
115
|
componentRef.offset = componentRef.offset ?? rootPosition;
|
|
116
116
|
const offset = componentRef.offset;
|
|
117
|
-
selectedElement =
|
|
118
|
-
selectedElement ||
|
|
119
|
-
(componentRef.children[selected] as ElementNode | undefined);
|
|
117
|
+
selectedElement = selectedElement || componentRef.children[selected];
|
|
120
118
|
|
|
121
119
|
if (!selectedElement) {
|
|
122
120
|
return;
|
package/src/render.ts
CHANGED
|
@@ -34,10 +34,9 @@ export function createRenderer(
|
|
|
34
34
|
rendererOptions?: RendererMainSettings | DomRendererMainSettings,
|
|
35
35
|
node?: HTMLElement | string,
|
|
36
36
|
) {
|
|
37
|
-
const options =
|
|
38
|
-
rendererOptions || (Config.rendererOptions as RendererMainSettings);
|
|
37
|
+
const options = rendererOptions || Config.rendererOptions;
|
|
39
38
|
|
|
40
|
-
renderer = startLightningRenderer(options
|
|
39
|
+
renderer = startLightningRenderer(options!, node || 'app');
|
|
41
40
|
//Prevent this from happening automatically
|
|
42
41
|
Config.setActiveElement = setActiveElement;
|
|
43
42
|
rootNode.lng = renderer.root!;
|
|
@@ -135,6 +134,7 @@ export function Dynamic<T extends Record<string, any>>(
|
|
|
135
134
|
|
|
136
135
|
case 'string': {
|
|
137
136
|
const el = createElement(component);
|
|
137
|
+
(el as { componentName?: string }).componentName = component;
|
|
138
138
|
spread(el, others);
|
|
139
139
|
return el;
|
|
140
140
|
}
|
|
@@ -158,7 +158,7 @@ export const Text = (props: TextProps) => {
|
|
|
158
158
|
return el as unknown as JSXElement;
|
|
159
159
|
};
|
|
160
160
|
|
|
161
|
-
export function registerDefaultShader(
|
|
161
|
+
export function registerDefaultShader(_name: string, _shader: any) {
|
|
162
162
|
// noop for v2
|
|
163
163
|
// renderer.stage.shManager.registerShaderType('rounded', Rounded);
|
|
164
164
|
}
|
package/src/solidOpts.ts
CHANGED
|
@@ -11,10 +11,10 @@ import {
|
|
|
11
11
|
import type { SolidNode, SolidRendererOptions } from './types.js';
|
|
12
12
|
|
|
13
13
|
Object.defineProperty(ElementNode.prototype, 'preserve', {
|
|
14
|
-
get(): boolean | undefined {
|
|
14
|
+
get(this: ElementNode): boolean | undefined {
|
|
15
15
|
return this._queueDelete === 0;
|
|
16
16
|
},
|
|
17
|
-
set(v: boolean) {
|
|
17
|
+
set(this: ElementNode, v: boolean) {
|
|
18
18
|
this._queueDelete = v ? 0 : undefined;
|
|
19
19
|
},
|
|
20
20
|
});
|
|
@@ -55,7 +55,9 @@ export default {
|
|
|
55
55
|
parent.insertChild(node, anchor);
|
|
56
56
|
|
|
57
57
|
if (node instanceof ElementNode) {
|
|
58
|
-
node.parent!.rendered
|
|
58
|
+
if (node.parent!.rendered) {
|
|
59
|
+
node.render(true);
|
|
60
|
+
}
|
|
59
61
|
if (prevParent !== undefined) {
|
|
60
62
|
pushDeleteQueue(node, 1);
|
|
61
63
|
}
|
|
@@ -83,13 +85,13 @@ export default {
|
|
|
83
85
|
return node.parent;
|
|
84
86
|
},
|
|
85
87
|
getFirstChild(node: ElementNode): SolidNode | undefined {
|
|
86
|
-
return node.children[0]
|
|
88
|
+
return node.children[0];
|
|
87
89
|
},
|
|
88
90
|
getNextSibling(node: SolidNode): SolidNode | undefined {
|
|
89
|
-
const children = node.parent!.children || [];
|
|
90
|
-
const index = children.indexOf(node
|
|
91
|
+
const children = (node.parent!.children || []) as SolidNode[];
|
|
92
|
+
const index = children.indexOf(node) + 1;
|
|
91
93
|
if (index < children.length) {
|
|
92
|
-
return children[index]
|
|
94
|
+
return children[index];
|
|
93
95
|
}
|
|
94
96
|
return undefined;
|
|
95
97
|
},
|
package/src/types.ts
CHANGED
package/src/utils.ts
CHANGED
|
@@ -19,16 +19,18 @@ export function hexColor(color: string | number = ''): number {
|
|
|
19
19
|
|
|
20
20
|
if (typeof color === 'string') {
|
|
21
21
|
// Renderer expects RGBA values
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
22
|
+
let hex: string;
|
|
23
|
+
if (color.charCodeAt(0) === 35 /* '#' */) {
|
|
24
|
+
hex = color.length === 7 ? color.slice(1) + 'ff' : color.slice(1);
|
|
25
|
+
} else if (
|
|
26
|
+
color.charCodeAt(0) === 48 &&
|
|
27
|
+
color.charCodeAt(1) === 120 /* '0x' */
|
|
28
|
+
) {
|
|
29
|
+
hex = color.slice(2);
|
|
30
|
+
} else {
|
|
31
|
+
hex = color.length === 6 ? color + 'ff' : color;
|
|
30
32
|
}
|
|
31
|
-
return
|
|
33
|
+
return parseInt(hex, 16);
|
|
32
34
|
}
|
|
33
35
|
|
|
34
36
|
return 0x00000000;
|
|
@@ -101,7 +103,7 @@ export function getWebglSupportedVersions(
|
|
|
101
103
|
(context instanceof WebGLRenderingContext ||
|
|
102
104
|
context instanceof WebGL2RenderingContext ||
|
|
103
105
|
('getParameter' in context &&
|
|
104
|
-
typeof
|
|
106
|
+
typeof context.getParameter === 'function'))
|
|
105
107
|
);
|
|
106
108
|
} catch {
|
|
107
109
|
return false;
|