@lightningjs/renderer 0.7.2 → 0.7.4
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/COPYING +1 -0
- package/LICENSE +202 -202
- package/NOTICE +3 -3
- package/README.md +221 -221
- package/dist/src/common/CommonTypes.d.ts +7 -0
- package/dist/src/core/Stage.d.ts +2 -1
- package/dist/src/core/Stage.js +4 -0
- package/dist/src/core/Stage.js.map +1 -1
- package/dist/src/core/animations/CoreAnimation.js +3 -0
- package/dist/src/core/animations/CoreAnimation.js.map +1 -1
- package/dist/src/core/animations/CoreAnimationController.d.ts +8 -0
- package/dist/src/core/animations/CoreAnimationController.js +26 -0
- package/dist/src/core/animations/CoreAnimationController.js.map +1 -1
- package/dist/src/core/lib/ImageWorker.d.ts +1 -1
- package/dist/src/core/lib/ImageWorker.js +30 -22
- package/dist/src/core/lib/ImageWorker.js.map +1 -1
- package/dist/src/core/renderers/webgl/WebGlCoreCtxTexture.js.map +1 -1
- package/dist/src/core/renderers/webgl/shaders/DefaultShader.js +47 -47
- package/dist/src/core/renderers/webgl/shaders/DefaultShaderBatched.js +61 -61
- package/dist/src/core/renderers/webgl/shaders/DynamicShader.js +93 -93
- package/dist/src/core/renderers/webgl/shaders/RoundedRectangle.js +63 -63
- package/dist/src/core/renderers/webgl/shaders/SdfShader.js +49 -49
- package/dist/src/core/renderers/webgl/shaders/effects/BorderBottomEffect.js +15 -15
- package/dist/src/core/renderers/webgl/shaders/effects/BorderEffect.js +5 -5
- package/dist/src/core/renderers/webgl/shaders/effects/BorderLeftEffect.js +15 -15
- package/dist/src/core/renderers/webgl/shaders/effects/BorderRightEffect.js +15 -15
- package/dist/src/core/renderers/webgl/shaders/effects/BorderTopEffect.js +15 -15
- package/dist/src/core/renderers/webgl/shaders/effects/FadeOutEffect.js +42 -42
- package/dist/src/core/renderers/webgl/shaders/effects/GlitchEffect.js +44 -44
- package/dist/src/core/renderers/webgl/shaders/effects/GrayscaleEffect.js +3 -3
- package/dist/src/core/renderers/webgl/shaders/effects/LinearGradientEffect.js +31 -31
- package/dist/src/core/renderers/webgl/shaders/effects/RadialGradientEffect.js +13 -13
- package/dist/src/core/renderers/webgl/shaders/effects/RadialProgressEffect.js +37 -37
- package/dist/src/core/renderers/webgl/shaders/effects/RadiusEffect.js +19 -19
- package/dist/src/core/textures/ImageTexture.d.ts +2 -1
- package/dist/src/core/textures/ImageTexture.js +7 -2
- package/dist/src/core/textures/ImageTexture.js.map +1 -1
- package/dist/src/core/textures/Texture.d.ts +1 -1
- package/dist/src/main-api/ICoreDriver.d.ts +2 -1
- package/dist/src/main-api/Inspector.d.ts +6 -0
- package/dist/src/main-api/Inspector.js +105 -19
- package/dist/src/main-api/Inspector.js.map +1 -1
- package/dist/src/main-api/RendererMain.d.ts +12 -0
- package/dist/src/main-api/RendererMain.js +19 -1
- package/dist/src/main-api/RendererMain.js.map +1 -1
- package/dist/src/render-drivers/main/MainCoreDriver.d.ts +2 -1
- package/dist/src/render-drivers/main/MainCoreDriver.js +7 -1
- package/dist/src/render-drivers/main/MainCoreDriver.js.map +1 -1
- package/dist/src/render-drivers/threadx/ThreadXCoreDriver.d.ts +2 -1
- package/dist/src/render-drivers/threadx/ThreadXCoreDriver.js +7 -0
- package/dist/src/render-drivers/threadx/ThreadXCoreDriver.js.map +1 -1
- package/dist/src/render-drivers/threadx/ThreadXRendererMessage.d.ts +9 -1
- package/dist/src/render-drivers/threadx/ThreadXRendererMessage.js.map +1 -1
- package/dist/tsconfig.dist.tsbuildinfo +1 -1
- package/exports/core-api.ts +102 -102
- package/exports/main-api.ts +60 -60
- package/exports/utils.ts +41 -41
- package/package.json +5 -3
- package/scripts/please-use-pnpm.js +13 -0
- package/src/common/CommonTypes.ts +113 -105
- package/src/common/EventEmitter.ts +77 -77
- package/src/common/IAnimationController.ts +29 -29
- package/src/core/CoreExtension.ts +32 -32
- package/src/core/CoreNode.ts +926 -926
- package/src/core/CoreShaderManager.ts +243 -243
- package/src/core/CoreTextNode.ts +391 -391
- package/src/core/CoreTextureManager.ts +326 -326
- package/src/core/Stage.ts +354 -342
- package/src/core/animations/AnimationManager.ts +38 -38
- package/src/core/animations/CoreAnimation.ts +181 -177
- package/src/core/animations/CoreAnimationController.ts +148 -117
- package/src/core/lib/ContextSpy.ts +41 -41
- package/src/core/lib/ImageWorker.ts +135 -124
- package/src/core/lib/Matrix3d.ts +290 -290
- package/src/core/lib/WebGlContextWrapper.ts +992 -992
- package/src/core/lib/textureCompression.ts +152 -152
- package/src/core/lib/utils.ts +241 -241
- package/src/core/platform.ts +46 -46
- package/src/core/renderers/CoreContextTexture.ts +30 -30
- package/src/core/renderers/CoreRenderOp.ts +22 -22
- package/src/core/renderers/CoreRenderer.ts +63 -63
- package/src/core/renderers/CoreShader.ts +41 -41
- package/src/core/renderers/webgl/WebGlCoreCtxSubTexture.ts +37 -37
- package/src/core/renderers/webgl/WebGlCoreCtxTexture.ts +230 -231
- package/src/core/renderers/webgl/WebGlCoreRenderOp.ts +107 -107
- package/src/core/renderers/webgl/WebGlCoreRenderer.ts +520 -520
- package/src/core/renderers/webgl/WebGlCoreShader.ts +337 -337
- package/src/core/renderers/webgl/internal/BufferCollection.ts +54 -54
- package/src/core/renderers/webgl/internal/RendererUtils.ts +131 -131
- package/src/core/renderers/webgl/internal/ShaderUtils.ts +136 -136
- package/src/core/renderers/webgl/internal/WebGlUtils.ts +35 -35
- package/src/core/renderers/webgl/shaders/DefaultShader.ts +95 -95
- package/src/core/renderers/webgl/shaders/DefaultShaderBatched.ts +132 -132
- package/src/core/renderers/webgl/shaders/DynamicShader.ts +474 -474
- package/src/core/renderers/webgl/shaders/RoundedRectangle.ts +161 -161
- package/src/core/renderers/webgl/shaders/SdfShader.ts +174 -174
- package/src/core/renderers/webgl/shaders/effects/BorderBottomEffect.ts +101 -101
- package/src/core/renderers/webgl/shaders/effects/BorderEffect.ts +86 -86
- package/src/core/renderers/webgl/shaders/effects/BorderLeftEffect.ts +101 -101
- package/src/core/renderers/webgl/shaders/effects/BorderRightEffect.ts +101 -101
- package/src/core/renderers/webgl/shaders/effects/BorderTopEffect.ts +101 -101
- package/src/core/renderers/webgl/shaders/effects/EffectUtils.ts +33 -33
- package/src/core/renderers/webgl/shaders/effects/FadeOutEffect.ts +135 -135
- package/src/core/renderers/webgl/shaders/effects/GlitchEffect.ts +145 -145
- package/src/core/renderers/webgl/shaders/effects/GrayscaleEffect.ts +67 -67
- package/src/core/renderers/webgl/shaders/effects/LinearGradientEffect.ts +176 -176
- package/src/core/renderers/webgl/shaders/effects/RadialGradientEffect.ts +159 -159
- package/src/core/renderers/webgl/shaders/effects/RadialProgressEffect.ts +186 -186
- package/src/core/renderers/webgl/shaders/effects/RadiusEffect.ts +121 -121
- package/src/core/renderers/webgl/shaders/effects/ShaderEffect.ts +114 -114
- package/src/core/text-rendering/TextTextureRendererUtils.ts +189 -189
- package/src/core/text-rendering/TrFontManager.ts +96 -96
- package/src/core/text-rendering/font-face-types/SdfTrFontFace/SdfTrFontFace.ts +141 -141
- package/src/core/text-rendering/font-face-types/SdfTrFontFace/internal/FontShaper.ts +139 -139
- package/src/core/text-rendering/font-face-types/SdfTrFontFace/internal/SdfFontShaper.test.ts +173 -173
- package/src/core/text-rendering/font-face-types/SdfTrFontFace/internal/SdfFontShaper.ts +169 -169
- package/src/core/text-rendering/font-face-types/TrFontFace.ts +105 -105
- package/src/core/text-rendering/font-face-types/WebTrFontFace.ts +77 -77
- package/src/core/text-rendering/renderers/CanvasTextRenderer.ts +751 -751
- package/src/core/text-rendering/renderers/LightningTextTextureRenderer.ts +741 -741
- package/src/core/text-rendering/renderers/SdfTextRenderer/SdfTextRenderer.ts +775 -775
- package/src/core/text-rendering/renderers/SdfTextRenderer/internal/PeekableGenerator.test.ts +48 -48
- package/src/core/text-rendering/renderers/SdfTextRenderer/internal/PeekableGenerator.ts +66 -66
- package/src/core/text-rendering/renderers/SdfTextRenderer/internal/SpecialCodepoints.ts +52 -52
- package/src/core/text-rendering/renderers/SdfTextRenderer/internal/constants.ts +32 -32
- package/src/core/text-rendering/renderers/SdfTextRenderer/internal/getStartConditions.ts +84 -84
- package/src/core/text-rendering/renderers/SdfTextRenderer/internal/getUnicodeCodepoints.test.ts +133 -133
- package/src/core/text-rendering/renderers/SdfTextRenderer/internal/getUnicodeCodepoints.ts +38 -38
- package/src/core/text-rendering/renderers/SdfTextRenderer/internal/layoutText.ts +393 -393
- package/src/core/text-rendering/renderers/SdfTextRenderer/internal/measureText.test.ts +49 -49
- package/src/core/text-rendering/renderers/SdfTextRenderer/internal/measureText.ts +51 -51
- package/src/core/text-rendering/renderers/SdfTextRenderer/internal/setRenderWindow.test.ts +205 -205
- package/src/core/text-rendering/renderers/SdfTextRenderer/internal/setRenderWindow.ts +93 -93
- package/src/core/text-rendering/renderers/SdfTextRenderer/internal/util.ts +40 -40
- package/src/core/text-rendering/renderers/TextRenderer.ts +504 -504
- package/src/core/textures/ColorTexture.ts +86 -86
- package/src/core/textures/ImageTexture.ts +140 -133
- package/src/core/textures/NoiseTexture.ts +96 -96
- package/src/core/textures/SubTexture.ts +143 -143
- package/src/core/textures/Texture.ts +218 -218
- package/src/core/utils.ts +224 -224
- package/src/env.d.ts +7 -7
- package/src/main-api/ICoreDriver.ts +66 -61
- package/src/main-api/INode.ts +470 -470
- package/src/main-api/Inspector.ts +432 -0
- package/src/main-api/RendererMain.ts +649 -610
- package/src/main-api/texture-usage-trackers/FinalizationRegistryTextureUsageTracker.ts +45 -45
- package/src/main-api/texture-usage-trackers/ManualCountTextureUsageTracker.ts +154 -154
- package/src/main-api/texture-usage-trackers/TextureUsageTracker.ts +54 -54
- package/src/render-drivers/main/MainCoreDriver.ts +148 -133
- package/src/render-drivers/main/MainOnlyNode.ts +453 -453
- package/src/render-drivers/main/MainOnlyTextNode.ts +261 -261
- package/src/render-drivers/threadx/NodeStruct.ts +300 -300
- package/src/render-drivers/threadx/SharedNode.ts +97 -97
- package/src/render-drivers/threadx/TextNodeStruct.ts +211 -211
- package/src/render-drivers/threadx/ThreadXCoreDriver.ts +285 -273
- package/src/render-drivers/threadx/ThreadXMainAnimationController.ts +99 -99
- package/src/render-drivers/threadx/ThreadXMainNode.ts +178 -178
- package/src/render-drivers/threadx/ThreadXMainTextNode.ts +85 -85
- package/src/render-drivers/threadx/ThreadXRendererMessage.ts +110 -97
- package/src/render-drivers/threadx/worker/ThreadXRendererNode.ts +238 -238
- package/src/render-drivers/threadx/worker/ThreadXRendererTextNode.ts +149 -149
- package/src/render-drivers/threadx/worker/renderer.ts +151 -151
- package/src/render-drivers/utils.ts +57 -57
- package/src/utils.ts +207 -207
- package/dist/src/core/lib/WebGlContext.d.ts +0 -414
- package/dist/src/core/lib/WebGlContext.js +0 -640
- package/dist/src/core/lib/WebGlContext.js.map +0 -1
- package/dist/src/core/scene/Scene.d.ts +0 -59
- package/dist/src/core/scene/Scene.js +0 -106
- package/dist/src/core/scene/Scene.js.map +0 -1
- package/dist/src/core/text-rendering/renderers/SdfTextRenderer/internal/findNearestMultiple.d.ts +0 -8
- package/dist/src/core/text-rendering/renderers/SdfTextRenderer/internal/findNearestMultiple.js +0 -29
- package/dist/src/core/text-rendering/renderers/SdfTextRenderer/internal/findNearestMultiple.js.map +0 -1
- package/dist/src/core/text-rendering/renderers/SdfTextRenderer/internal/layoutText2/SdfBufferHelper.d.ts +0 -19
- package/dist/src/core/text-rendering/renderers/SdfTextRenderer/internal/layoutText2/SdfBufferHelper.js +0 -84
- package/dist/src/core/text-rendering/renderers/SdfTextRenderer/internal/layoutText2/SdfBufferHelper.js.map +0 -1
- package/dist/src/core/text-rendering/renderers/SdfTextRenderer/internal/layoutText2/layoutLine.d.ts +0 -8
- package/dist/src/core/text-rendering/renderers/SdfTextRenderer/internal/layoutText2/layoutLine.js +0 -40
- package/dist/src/core/text-rendering/renderers/SdfTextRenderer/internal/layoutText2/layoutLine.js.map +0 -1
- package/dist/src/core/text-rendering/renderers/SdfTextRenderer/internal/layoutText2/layoutText2.d.ts +0 -2
- package/dist/src/core/text-rendering/renderers/SdfTextRenderer/internal/layoutText2/layoutText2.js +0 -41
- package/dist/src/core/text-rendering/renderers/SdfTextRenderer/internal/layoutText2/layoutText2.js.map +0 -1
- package/dist/src/core/text-rendering/renderers/SdfTextRenderer/internal/layoutText2/utils.d.ts +0 -1
- package/dist/src/core/text-rendering/renderers/SdfTextRenderer/internal/layoutText2/utils.js +0 -4
- package/dist/src/core/text-rendering/renderers/SdfTextRenderer/internal/layoutText2/utils.js.map +0 -1
- package/dist/src/core/text-rendering/renderers/SdfTextRenderer/internal/layoutText2.d.ts +0 -1
- package/dist/src/core/text-rendering/renderers/SdfTextRenderer/internal/layoutText2.js +0 -2
- package/dist/src/core/text-rendering/renderers/SdfTextRenderer/internal/layoutText2.js.map +0 -1
- package/dist/src/core/text-rendering/renderers/SdfTextRenderer/internal/makeRenderWindow.d.ts +0 -20
- package/dist/src/core/text-rendering/renderers/SdfTextRenderer/internal/makeRenderWindow.js +0 -55
- package/dist/src/core/text-rendering/renderers/SdfTextRenderer/internal/makeRenderWindow.js.map +0 -1
- package/dist/src/core/text-rendering/renderers/SdfTextRenderer/internal/roundUpToMultiple.d.ts +0 -9
- package/dist/src/core/text-rendering/renderers/SdfTextRenderer/internal/roundUpToMultiple.js +0 -32
- package/dist/src/core/text-rendering/renderers/SdfTextRenderer/internal/roundUpToMultiple.js.map +0 -1
package/src/core/lib/utils.ts
CHANGED
|
@@ -1,241 +1,241 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* If not stated otherwise in this file or this component's LICENSE file the
|
|
3
|
-
* following copyright and licenses apply:
|
|
4
|
-
*
|
|
5
|
-
* Copyright 2023 Comcast Cable Communications Management, LLC.
|
|
6
|
-
*
|
|
7
|
-
* Licensed under the Apache License, Version 2.0 (the License);
|
|
8
|
-
* you may not use this file except in compliance with the License.
|
|
9
|
-
* You may obtain a copy of the License at
|
|
10
|
-
*
|
|
11
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
12
|
-
*
|
|
13
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
14
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
15
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16
|
-
* See the License for the specific language governing permissions and
|
|
17
|
-
* limitations under the License.
|
|
18
|
-
*/
|
|
19
|
-
|
|
20
|
-
export type RGBA = [r: number, g: number, b: number, a: number];
|
|
21
|
-
export const getNormalizedRgbaComponents = (rgba: number): RGBA => {
|
|
22
|
-
const r = rgba >>> 24;
|
|
23
|
-
const g = (rgba >>> 16) & 0xff;
|
|
24
|
-
const b = (rgba >>> 8) & 0xff;
|
|
25
|
-
const a = rgba & 0xff;
|
|
26
|
-
return [r / 255, g / 255, b / 255, a / 255];
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
export const getRgbaComponents = (rgba: number): RGBA => {
|
|
30
|
-
const r = rgba >>> 24;
|
|
31
|
-
const g = (rgba >>> 16) & 0xff;
|
|
32
|
-
const b = (rgba >>> 8) & 0xff;
|
|
33
|
-
const a = rgba & 0xff;
|
|
34
|
-
return [r, g, b, a];
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
export const norm = (rgba: number): number => {
|
|
38
|
-
const r = rgba >>> 24;
|
|
39
|
-
const g = (rgba >>> 16) & 0xff;
|
|
40
|
-
const b = (rgba >>> 8) & 0xff;
|
|
41
|
-
const a = rgba & 0xff;
|
|
42
|
-
const rgbaArr: RGBA = [r / 255, g / 255, b / 255, a / 255];
|
|
43
|
-
|
|
44
|
-
rgbaArr[0] = Math.max(0, Math.min(255, rgbaArr[0]));
|
|
45
|
-
rgbaArr[1] = Math.max(0, Math.min(255, rgbaArr[1]));
|
|
46
|
-
rgbaArr[2] = Math.max(0, Math.min(255, rgbaArr[2]));
|
|
47
|
-
rgbaArr[3] = Math.max(0, Math.min(255, rgbaArr[3]));
|
|
48
|
-
let v =
|
|
49
|
-
((rgbaArr[3] | 0) << 24) +
|
|
50
|
-
((rgbaArr[0] | 0) << 16) +
|
|
51
|
-
((rgbaArr[1] | 0) << 8) +
|
|
52
|
-
(rgbaArr[2] | 0);
|
|
53
|
-
if (v < 0) {
|
|
54
|
-
v = 0xffffffff + v + 1;
|
|
55
|
-
}
|
|
56
|
-
return v;
|
|
57
|
-
};
|
|
58
|
-
|
|
59
|
-
export function getNormalizedAlphaComponent(rgba: number): number {
|
|
60
|
-
return (rgba & 0xff) / 255.0;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
/**
|
|
64
|
-
* Get a CSS color string from a RGBA color
|
|
65
|
-
*
|
|
66
|
-
* @param color
|
|
67
|
-
* @returns
|
|
68
|
-
*/
|
|
69
|
-
export function getRgbaString(color: RGBA) {
|
|
70
|
-
const r = Math.floor(color[0] * 255.0);
|
|
71
|
-
const g = Math.floor(color[1] * 255.0);
|
|
72
|
-
const b = Math.floor(color[2] * 255.0);
|
|
73
|
-
const a = Math.floor(color[3] * 255.0);
|
|
74
|
-
return `rgba(${r},${g},${b},${a.toFixed(4)})`;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
export interface Rect {
|
|
78
|
-
x: number;
|
|
79
|
-
y: number;
|
|
80
|
-
width: number;
|
|
81
|
-
height: number;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
export interface RectWithValid extends Rect {
|
|
85
|
-
valid: boolean;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
export interface Bound {
|
|
89
|
-
x1: number;
|
|
90
|
-
y1: number;
|
|
91
|
-
x2: number;
|
|
92
|
-
y2: number;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
export interface BoundWithValid extends Bound {
|
|
96
|
-
valid: boolean;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
export function createBound<T extends Bound = Bound>(
|
|
100
|
-
x1: number,
|
|
101
|
-
y1: number,
|
|
102
|
-
x2: number,
|
|
103
|
-
y2: number,
|
|
104
|
-
out?: T,
|
|
105
|
-
): T {
|
|
106
|
-
if (out) {
|
|
107
|
-
out.x1 = x1;
|
|
108
|
-
out.y1 = y1;
|
|
109
|
-
out.x2 = x2;
|
|
110
|
-
out.y2 = y2;
|
|
111
|
-
return out;
|
|
112
|
-
}
|
|
113
|
-
return {
|
|
114
|
-
x1,
|
|
115
|
-
y1,
|
|
116
|
-
x2,
|
|
117
|
-
y2,
|
|
118
|
-
} as T;
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
export function intersectBound<T extends Bound = Bound>(
|
|
122
|
-
a: Bound,
|
|
123
|
-
b: Bound,
|
|
124
|
-
out?: T,
|
|
125
|
-
): T {
|
|
126
|
-
const intersection = createBound(
|
|
127
|
-
Math.max(a.x1, b.x1),
|
|
128
|
-
Math.max(a.y1, b.y1),
|
|
129
|
-
Math.min(a.x2, b.x2),
|
|
130
|
-
Math.min(a.y2, b.y2),
|
|
131
|
-
out,
|
|
132
|
-
);
|
|
133
|
-
if (intersection.x1 < intersection.x2 && intersection.y1 < intersection.y2) {
|
|
134
|
-
return intersection;
|
|
135
|
-
}
|
|
136
|
-
return createBound(0, 0, 0, 0, intersection);
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
export function boundsOverlap(a: Bound, b: Bound): boolean {
|
|
140
|
-
return a.x1 < b.x2 && a.x2 > b.x1 && a.y1 < b.y2 && a.y2 > b.y1;
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
export function convertBoundToRect(bound: Bound): Rect;
|
|
144
|
-
export function convertBoundToRect<T extends Rect = Rect>(
|
|
145
|
-
bound: Bound,
|
|
146
|
-
out: T,
|
|
147
|
-
): T;
|
|
148
|
-
export function convertBoundToRect(bound: Bound, out?: Rect): Rect {
|
|
149
|
-
if (out) {
|
|
150
|
-
out.x = bound.x1;
|
|
151
|
-
out.y = bound.y1;
|
|
152
|
-
out.width = bound.x2 - bound.x1;
|
|
153
|
-
out.height = bound.y2 - bound.y1;
|
|
154
|
-
return out;
|
|
155
|
-
}
|
|
156
|
-
return {
|
|
157
|
-
x: bound.x1,
|
|
158
|
-
y: bound.y1,
|
|
159
|
-
width: bound.x2 - bound.x1,
|
|
160
|
-
height: bound.y2 - bound.y1,
|
|
161
|
-
};
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
export function intersectRect(a: Rect, b: Rect): Rect;
|
|
165
|
-
export function intersectRect<T extends Rect = Rect>(
|
|
166
|
-
a: Rect,
|
|
167
|
-
b: Rect,
|
|
168
|
-
out: T,
|
|
169
|
-
): T;
|
|
170
|
-
export function intersectRect(a: Rect, b: Rect, out?: Rect): Rect {
|
|
171
|
-
const x = Math.max(a.x, b.x);
|
|
172
|
-
const y = Math.max(a.y, b.y);
|
|
173
|
-
const width = Math.min(a.x + a.width, b.x + b.width) - x;
|
|
174
|
-
const height = Math.min(a.y + a.height, b.y + b.height) - y;
|
|
175
|
-
if (width > 0 && height > 0) {
|
|
176
|
-
if (out) {
|
|
177
|
-
out.x = x;
|
|
178
|
-
out.y = y;
|
|
179
|
-
out.width = width;
|
|
180
|
-
out.height = height;
|
|
181
|
-
return out;
|
|
182
|
-
}
|
|
183
|
-
return {
|
|
184
|
-
x,
|
|
185
|
-
y,
|
|
186
|
-
width,
|
|
187
|
-
height,
|
|
188
|
-
};
|
|
189
|
-
}
|
|
190
|
-
if (out) {
|
|
191
|
-
out.x = 0;
|
|
192
|
-
out.y = 0;
|
|
193
|
-
out.width = 0;
|
|
194
|
-
out.height = 0;
|
|
195
|
-
return out;
|
|
196
|
-
}
|
|
197
|
-
return {
|
|
198
|
-
x: 0,
|
|
199
|
-
y: 0,
|
|
200
|
-
width: 0,
|
|
201
|
-
height: 0,
|
|
202
|
-
};
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
export function copyRect(a: Rect): Rect;
|
|
206
|
-
export function copyRect<T extends Rect = Rect>(a: Rect, out: T): T;
|
|
207
|
-
export function copyRect(a: Rect, out?: Rect): Rect {
|
|
208
|
-
if (out) {
|
|
209
|
-
out.x = a.x;
|
|
210
|
-
out.y = a.y;
|
|
211
|
-
out.width = a.width;
|
|
212
|
-
out.height = a.height;
|
|
213
|
-
return out;
|
|
214
|
-
}
|
|
215
|
-
return {
|
|
216
|
-
x: a.x,
|
|
217
|
-
y: a.y,
|
|
218
|
-
width: a.width,
|
|
219
|
-
height: a.height,
|
|
220
|
-
};
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
export function compareRect(a: Rect | null, b: Rect | null): boolean {
|
|
224
|
-
if (a === b) {
|
|
225
|
-
return true;
|
|
226
|
-
}
|
|
227
|
-
if (a === null || b === null) {
|
|
228
|
-
return false;
|
|
229
|
-
}
|
|
230
|
-
return (
|
|
231
|
-
a.x === b.x && a.y === b.y && a.width === b.width && a.height === b.height
|
|
232
|
-
);
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
export function isBoundPositive(bound: Bound): boolean {
|
|
236
|
-
return bound.x1 < bound.x2 && bound.y1 < bound.y2;
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
export function isRectPositive(rect: Rect): boolean {
|
|
240
|
-
return rect.width > 0 && rect.height > 0;
|
|
241
|
-
}
|
|
1
|
+
/*
|
|
2
|
+
* If not stated otherwise in this file or this component's LICENSE file the
|
|
3
|
+
* following copyright and licenses apply:
|
|
4
|
+
*
|
|
5
|
+
* Copyright 2023 Comcast Cable Communications Management, LLC.
|
|
6
|
+
*
|
|
7
|
+
* Licensed under the Apache License, Version 2.0 (the License);
|
|
8
|
+
* you may not use this file except in compliance with the License.
|
|
9
|
+
* You may obtain a copy of the License at
|
|
10
|
+
*
|
|
11
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
12
|
+
*
|
|
13
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
14
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
15
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16
|
+
* See the License for the specific language governing permissions and
|
|
17
|
+
* limitations under the License.
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
export type RGBA = [r: number, g: number, b: number, a: number];
|
|
21
|
+
export const getNormalizedRgbaComponents = (rgba: number): RGBA => {
|
|
22
|
+
const r = rgba >>> 24;
|
|
23
|
+
const g = (rgba >>> 16) & 0xff;
|
|
24
|
+
const b = (rgba >>> 8) & 0xff;
|
|
25
|
+
const a = rgba & 0xff;
|
|
26
|
+
return [r / 255, g / 255, b / 255, a / 255];
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
export const getRgbaComponents = (rgba: number): RGBA => {
|
|
30
|
+
const r = rgba >>> 24;
|
|
31
|
+
const g = (rgba >>> 16) & 0xff;
|
|
32
|
+
const b = (rgba >>> 8) & 0xff;
|
|
33
|
+
const a = rgba & 0xff;
|
|
34
|
+
return [r, g, b, a];
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
export const norm = (rgba: number): number => {
|
|
38
|
+
const r = rgba >>> 24;
|
|
39
|
+
const g = (rgba >>> 16) & 0xff;
|
|
40
|
+
const b = (rgba >>> 8) & 0xff;
|
|
41
|
+
const a = rgba & 0xff;
|
|
42
|
+
const rgbaArr: RGBA = [r / 255, g / 255, b / 255, a / 255];
|
|
43
|
+
|
|
44
|
+
rgbaArr[0] = Math.max(0, Math.min(255, rgbaArr[0]));
|
|
45
|
+
rgbaArr[1] = Math.max(0, Math.min(255, rgbaArr[1]));
|
|
46
|
+
rgbaArr[2] = Math.max(0, Math.min(255, rgbaArr[2]));
|
|
47
|
+
rgbaArr[3] = Math.max(0, Math.min(255, rgbaArr[3]));
|
|
48
|
+
let v =
|
|
49
|
+
((rgbaArr[3] | 0) << 24) +
|
|
50
|
+
((rgbaArr[0] | 0) << 16) +
|
|
51
|
+
((rgbaArr[1] | 0) << 8) +
|
|
52
|
+
(rgbaArr[2] | 0);
|
|
53
|
+
if (v < 0) {
|
|
54
|
+
v = 0xffffffff + v + 1;
|
|
55
|
+
}
|
|
56
|
+
return v;
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
export function getNormalizedAlphaComponent(rgba: number): number {
|
|
60
|
+
return (rgba & 0xff) / 255.0;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Get a CSS color string from a RGBA color
|
|
65
|
+
*
|
|
66
|
+
* @param color
|
|
67
|
+
* @returns
|
|
68
|
+
*/
|
|
69
|
+
export function getRgbaString(color: RGBA) {
|
|
70
|
+
const r = Math.floor(color[0] * 255.0);
|
|
71
|
+
const g = Math.floor(color[1] * 255.0);
|
|
72
|
+
const b = Math.floor(color[2] * 255.0);
|
|
73
|
+
const a = Math.floor(color[3] * 255.0);
|
|
74
|
+
return `rgba(${r},${g},${b},${a.toFixed(4)})`;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export interface Rect {
|
|
78
|
+
x: number;
|
|
79
|
+
y: number;
|
|
80
|
+
width: number;
|
|
81
|
+
height: number;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export interface RectWithValid extends Rect {
|
|
85
|
+
valid: boolean;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export interface Bound {
|
|
89
|
+
x1: number;
|
|
90
|
+
y1: number;
|
|
91
|
+
x2: number;
|
|
92
|
+
y2: number;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
export interface BoundWithValid extends Bound {
|
|
96
|
+
valid: boolean;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
export function createBound<T extends Bound = Bound>(
|
|
100
|
+
x1: number,
|
|
101
|
+
y1: number,
|
|
102
|
+
x2: number,
|
|
103
|
+
y2: number,
|
|
104
|
+
out?: T,
|
|
105
|
+
): T {
|
|
106
|
+
if (out) {
|
|
107
|
+
out.x1 = x1;
|
|
108
|
+
out.y1 = y1;
|
|
109
|
+
out.x2 = x2;
|
|
110
|
+
out.y2 = y2;
|
|
111
|
+
return out;
|
|
112
|
+
}
|
|
113
|
+
return {
|
|
114
|
+
x1,
|
|
115
|
+
y1,
|
|
116
|
+
x2,
|
|
117
|
+
y2,
|
|
118
|
+
} as T;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
export function intersectBound<T extends Bound = Bound>(
|
|
122
|
+
a: Bound,
|
|
123
|
+
b: Bound,
|
|
124
|
+
out?: T,
|
|
125
|
+
): T {
|
|
126
|
+
const intersection = createBound(
|
|
127
|
+
Math.max(a.x1, b.x1),
|
|
128
|
+
Math.max(a.y1, b.y1),
|
|
129
|
+
Math.min(a.x2, b.x2),
|
|
130
|
+
Math.min(a.y2, b.y2),
|
|
131
|
+
out,
|
|
132
|
+
);
|
|
133
|
+
if (intersection.x1 < intersection.x2 && intersection.y1 < intersection.y2) {
|
|
134
|
+
return intersection;
|
|
135
|
+
}
|
|
136
|
+
return createBound(0, 0, 0, 0, intersection);
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
export function boundsOverlap(a: Bound, b: Bound): boolean {
|
|
140
|
+
return a.x1 < b.x2 && a.x2 > b.x1 && a.y1 < b.y2 && a.y2 > b.y1;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
export function convertBoundToRect(bound: Bound): Rect;
|
|
144
|
+
export function convertBoundToRect<T extends Rect = Rect>(
|
|
145
|
+
bound: Bound,
|
|
146
|
+
out: T,
|
|
147
|
+
): T;
|
|
148
|
+
export function convertBoundToRect(bound: Bound, out?: Rect): Rect {
|
|
149
|
+
if (out) {
|
|
150
|
+
out.x = bound.x1;
|
|
151
|
+
out.y = bound.y1;
|
|
152
|
+
out.width = bound.x2 - bound.x1;
|
|
153
|
+
out.height = bound.y2 - bound.y1;
|
|
154
|
+
return out;
|
|
155
|
+
}
|
|
156
|
+
return {
|
|
157
|
+
x: bound.x1,
|
|
158
|
+
y: bound.y1,
|
|
159
|
+
width: bound.x2 - bound.x1,
|
|
160
|
+
height: bound.y2 - bound.y1,
|
|
161
|
+
};
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
export function intersectRect(a: Rect, b: Rect): Rect;
|
|
165
|
+
export function intersectRect<T extends Rect = Rect>(
|
|
166
|
+
a: Rect,
|
|
167
|
+
b: Rect,
|
|
168
|
+
out: T,
|
|
169
|
+
): T;
|
|
170
|
+
export function intersectRect(a: Rect, b: Rect, out?: Rect): Rect {
|
|
171
|
+
const x = Math.max(a.x, b.x);
|
|
172
|
+
const y = Math.max(a.y, b.y);
|
|
173
|
+
const width = Math.min(a.x + a.width, b.x + b.width) - x;
|
|
174
|
+
const height = Math.min(a.y + a.height, b.y + b.height) - y;
|
|
175
|
+
if (width > 0 && height > 0) {
|
|
176
|
+
if (out) {
|
|
177
|
+
out.x = x;
|
|
178
|
+
out.y = y;
|
|
179
|
+
out.width = width;
|
|
180
|
+
out.height = height;
|
|
181
|
+
return out;
|
|
182
|
+
}
|
|
183
|
+
return {
|
|
184
|
+
x,
|
|
185
|
+
y,
|
|
186
|
+
width,
|
|
187
|
+
height,
|
|
188
|
+
};
|
|
189
|
+
}
|
|
190
|
+
if (out) {
|
|
191
|
+
out.x = 0;
|
|
192
|
+
out.y = 0;
|
|
193
|
+
out.width = 0;
|
|
194
|
+
out.height = 0;
|
|
195
|
+
return out;
|
|
196
|
+
}
|
|
197
|
+
return {
|
|
198
|
+
x: 0,
|
|
199
|
+
y: 0,
|
|
200
|
+
width: 0,
|
|
201
|
+
height: 0,
|
|
202
|
+
};
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
export function copyRect(a: Rect): Rect;
|
|
206
|
+
export function copyRect<T extends Rect = Rect>(a: Rect, out: T): T;
|
|
207
|
+
export function copyRect(a: Rect, out?: Rect): Rect {
|
|
208
|
+
if (out) {
|
|
209
|
+
out.x = a.x;
|
|
210
|
+
out.y = a.y;
|
|
211
|
+
out.width = a.width;
|
|
212
|
+
out.height = a.height;
|
|
213
|
+
return out;
|
|
214
|
+
}
|
|
215
|
+
return {
|
|
216
|
+
x: a.x,
|
|
217
|
+
y: a.y,
|
|
218
|
+
width: a.width,
|
|
219
|
+
height: a.height,
|
|
220
|
+
};
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
export function compareRect(a: Rect | null, b: Rect | null): boolean {
|
|
224
|
+
if (a === b) {
|
|
225
|
+
return true;
|
|
226
|
+
}
|
|
227
|
+
if (a === null || b === null) {
|
|
228
|
+
return false;
|
|
229
|
+
}
|
|
230
|
+
return (
|
|
231
|
+
a.x === b.x && a.y === b.y && a.width === b.width && a.height === b.height
|
|
232
|
+
);
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
export function isBoundPositive(bound: Bound): boolean {
|
|
236
|
+
return bound.x1 < bound.x2 && bound.y1 < bound.y2;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
export function isRectPositive(rect: Rect): boolean {
|
|
240
|
+
return rect.width > 0 && rect.height > 0;
|
|
241
|
+
}
|
package/src/core/platform.ts
CHANGED
|
@@ -1,46 +1,46 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* If not stated otherwise in this file or this component's LICENSE file the
|
|
3
|
-
* following copyright and licenses apply:
|
|
4
|
-
*
|
|
5
|
-
* Copyright 2023 Comcast Cable Communications Management, LLC.
|
|
6
|
-
*
|
|
7
|
-
* Licensed under the Apache License, Version 2.0 (the License);
|
|
8
|
-
* you may not use this file except in compliance with the License.
|
|
9
|
-
* You may obtain a copy of the License at
|
|
10
|
-
*
|
|
11
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
12
|
-
*
|
|
13
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
14
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
15
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16
|
-
* See the License for the specific language governing permissions and
|
|
17
|
-
* limitations under the License.
|
|
18
|
-
*/
|
|
19
|
-
|
|
20
|
-
import type { Stage } from './Stage.js';
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* Platform render loop initiator
|
|
24
|
-
*/
|
|
25
|
-
export const startLoop = (stage: Stage) => {
|
|
26
|
-
const runLoop = () => {
|
|
27
|
-
stage.updateAnimations();
|
|
28
|
-
|
|
29
|
-
if (!stage.hasSceneUpdates()) {
|
|
30
|
-
setTimeout(runLoop, 16.666666666666668);
|
|
31
|
-
return;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
stage.drawFrame();
|
|
35
|
-
requestAnimationFrame(runLoop);
|
|
36
|
-
};
|
|
37
|
-
requestAnimationFrame(runLoop);
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
/**
|
|
41
|
-
* Return unix timestamp
|
|
42
|
-
* @return {number}
|
|
43
|
-
*/
|
|
44
|
-
export const getTimeStamp = () => {
|
|
45
|
-
return performance ? performance.now() : Date.now();
|
|
46
|
-
};
|
|
1
|
+
/*
|
|
2
|
+
* If not stated otherwise in this file or this component's LICENSE file the
|
|
3
|
+
* following copyright and licenses apply:
|
|
4
|
+
*
|
|
5
|
+
* Copyright 2023 Comcast Cable Communications Management, LLC.
|
|
6
|
+
*
|
|
7
|
+
* Licensed under the Apache License, Version 2.0 (the License);
|
|
8
|
+
* you may not use this file except in compliance with the License.
|
|
9
|
+
* You may obtain a copy of the License at
|
|
10
|
+
*
|
|
11
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
12
|
+
*
|
|
13
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
14
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
15
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16
|
+
* See the License for the specific language governing permissions and
|
|
17
|
+
* limitations under the License.
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
import type { Stage } from './Stage.js';
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Platform render loop initiator
|
|
24
|
+
*/
|
|
25
|
+
export const startLoop = (stage: Stage) => {
|
|
26
|
+
const runLoop = () => {
|
|
27
|
+
stage.updateAnimations();
|
|
28
|
+
|
|
29
|
+
if (!stage.hasSceneUpdates()) {
|
|
30
|
+
setTimeout(runLoop, 16.666666666666668);
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
stage.drawFrame();
|
|
35
|
+
requestAnimationFrame(runLoop);
|
|
36
|
+
};
|
|
37
|
+
requestAnimationFrame(runLoop);
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Return unix timestamp
|
|
42
|
+
* @return {number}
|
|
43
|
+
*/
|
|
44
|
+
export const getTimeStamp = () => {
|
|
45
|
+
return performance ? performance.now() : Date.now();
|
|
46
|
+
};
|
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* If not stated otherwise in this file or this component's LICENSE file the
|
|
3
|
-
* following copyright and licenses apply:
|
|
4
|
-
*
|
|
5
|
-
* Copyright 2023 Comcast Cable Communications Management, LLC.
|
|
6
|
-
*
|
|
7
|
-
* Licensed under the Apache License, Version 2.0 (the License);
|
|
8
|
-
* you may not use this file except in compliance with the License.
|
|
9
|
-
* You may obtain a copy of the License at
|
|
10
|
-
*
|
|
11
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
12
|
-
*
|
|
13
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
14
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
15
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16
|
-
* See the License for the specific language governing permissions and
|
|
17
|
-
* limitations under the License.
|
|
18
|
-
*/
|
|
19
|
-
|
|
20
|
-
import type { Texture } from '../textures/Texture.js';
|
|
21
|
-
|
|
22
|
-
export abstract class CoreContextTexture {
|
|
23
|
-
readonly textureSource: Texture;
|
|
24
|
-
|
|
25
|
-
constructor(textureSource: Texture) {
|
|
26
|
-
this.textureSource = textureSource;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
abstract load(): void;
|
|
30
|
-
}
|
|
1
|
+
/*
|
|
2
|
+
* If not stated otherwise in this file or this component's LICENSE file the
|
|
3
|
+
* following copyright and licenses apply:
|
|
4
|
+
*
|
|
5
|
+
* Copyright 2023 Comcast Cable Communications Management, LLC.
|
|
6
|
+
*
|
|
7
|
+
* Licensed under the Apache License, Version 2.0 (the License);
|
|
8
|
+
* you may not use this file except in compliance with the License.
|
|
9
|
+
* You may obtain a copy of the License at
|
|
10
|
+
*
|
|
11
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
12
|
+
*
|
|
13
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
14
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
15
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16
|
+
* See the License for the specific language governing permissions and
|
|
17
|
+
* limitations under the License.
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
import type { Texture } from '../textures/Texture.js';
|
|
21
|
+
|
|
22
|
+
export abstract class CoreContextTexture {
|
|
23
|
+
readonly textureSource: Texture;
|
|
24
|
+
|
|
25
|
+
constructor(textureSource: Texture) {
|
|
26
|
+
this.textureSource = textureSource;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
abstract load(): void;
|
|
30
|
+
}
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* If not stated otherwise in this file or this component's LICENSE file the
|
|
3
|
-
* following copyright and licenses apply:
|
|
4
|
-
*
|
|
5
|
-
* Copyright 2023 Comcast Cable Communications Management, LLC.
|
|
6
|
-
*
|
|
7
|
-
* Licensed under the Apache License, Version 2.0 (the License);
|
|
8
|
-
* you may not use this file except in compliance with the License.
|
|
9
|
-
* You may obtain a copy of the License at
|
|
10
|
-
*
|
|
11
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
12
|
-
*
|
|
13
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
14
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
15
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16
|
-
* See the License for the specific language governing permissions and
|
|
17
|
-
* limitations under the License.
|
|
18
|
-
*/
|
|
19
|
-
|
|
20
|
-
export abstract class CoreRenderOp {
|
|
21
|
-
abstract draw(): void;
|
|
22
|
-
}
|
|
1
|
+
/*
|
|
2
|
+
* If not stated otherwise in this file or this component's LICENSE file the
|
|
3
|
+
* following copyright and licenses apply:
|
|
4
|
+
*
|
|
5
|
+
* Copyright 2023 Comcast Cable Communications Management, LLC.
|
|
6
|
+
*
|
|
7
|
+
* Licensed under the Apache License, Version 2.0 (the License);
|
|
8
|
+
* you may not use this file except in compliance with the License.
|
|
9
|
+
* You may obtain a copy of the License at
|
|
10
|
+
*
|
|
11
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
12
|
+
*
|
|
13
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
14
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
15
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16
|
+
* See the License for the specific language governing permissions and
|
|
17
|
+
* limitations under the License.
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
export abstract class CoreRenderOp {
|
|
21
|
+
abstract draw(): void;
|
|
22
|
+
}
|