@flighthq/texture 0.5.1-next.903.f434bc2 → 0.5.1-next.905.5fbf787
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 +2 -2
- package/package.json +4 -4
- package/src/renderTexture.test.ts +6 -1
- package/src/sampler.test.ts +6 -0
- package/src/texture.test.ts +7 -1
- package/src/videoTexture.test.ts +7 -1
package/README.md
CHANGED
|
@@ -13,5 +13,5 @@ Import the supported application-facing API from `@flighthq/texture`. The `@flig
|
|
|
13
13
|
This package is part of the locked-version Flight SDK graph. Applications may instead install and import `@flighthq/sdk` when package-level tree shaking is sufficient.
|
|
14
14
|
|
|
15
15
|
- [Flight project](https://github.com/flighthq/flight)
|
|
16
|
-
- [Source for @flighthq/texture@0.5.1-next.
|
|
17
|
-
- [License](https://github.com/flighthq/flight/blob/
|
|
16
|
+
- [Source for @flighthq/texture@0.5.1-next.905.5fbf787](https://github.com/flighthq/flight/tree/5fbf7874064c384307542d68b4dcb6a895ff0dcf/packages/texture)
|
|
17
|
+
- [License](https://github.com/flighthq/flight/blob/5fbf7874064c384307542d68b4dcb6a895ff0dcf/LICENSE.md)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flighthq/texture",
|
|
3
|
-
"version": "0.5.1-next.
|
|
3
|
+
"version": "0.5.1-next.905.5fbf787",
|
|
4
4
|
"author": "Joshua Granick and other contributors",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -38,9 +38,9 @@
|
|
|
38
38
|
"clean:dist": "tsx ../../scripts/clean-package-dist.ts"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@flighthq/entity": "0.5.1-next.
|
|
42
|
-
"@flighthq/geometry": "0.5.1-next.
|
|
43
|
-
"@flighthq/types": "0.5.1-next.
|
|
41
|
+
"@flighthq/entity": "0.5.1-next.905.5fbf787",
|
|
42
|
+
"@flighthq/geometry": "0.5.1-next.905.5fbf787",
|
|
43
|
+
"@flighthq/types": "0.5.1-next.905.5fbf787"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@flighthq/video": "*",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { RenderTexture } from '@flighthq/types/contract';
|
|
2
2
|
|
|
3
|
-
import { createRenderTexture } from './renderTexture';
|
|
3
|
+
import { createRenderTexture, initializeRenderTextureTarget } from './renderTexture';
|
|
4
4
|
import { createSampler } from './sampler';
|
|
5
5
|
|
|
6
6
|
describe('createRenderTexture', () => {
|
|
@@ -43,3 +43,8 @@ describe('createRenderTexture', () => {
|
|
|
43
43
|
expect(texture.uvOffset).not.toBe(uvOffset);
|
|
44
44
|
});
|
|
45
45
|
});
|
|
46
|
+
describe('initializeRenderTextureTarget', () => {
|
|
47
|
+
it('is the construction initializer of createRenderTextureTarget', () => {
|
|
48
|
+
expect(typeof initializeRenderTextureTarget).toBe('function');
|
|
49
|
+
});
|
|
50
|
+
});
|
package/src/sampler.test.ts
CHANGED
|
@@ -7,6 +7,7 @@ import {
|
|
|
7
7
|
createSampler,
|
|
8
8
|
createTilingSampler,
|
|
9
9
|
equalsSampler,
|
|
10
|
+
initializeSampler,
|
|
10
11
|
} from './sampler';
|
|
11
12
|
|
|
12
13
|
describe('cloneSampler', () => {
|
|
@@ -142,3 +143,8 @@ describe('equalsSampler', () => {
|
|
|
142
143
|
expect(equalsSampler(undefined, undefined)).toBe(false);
|
|
143
144
|
});
|
|
144
145
|
});
|
|
146
|
+
describe('initializeSampler', () => {
|
|
147
|
+
it('is the construction initializer of createSampler', () => {
|
|
148
|
+
expect(typeof initializeSampler).toBe('function');
|
|
149
|
+
});
|
|
150
|
+
});
|
package/src/texture.test.ts
CHANGED
|
@@ -18,6 +18,7 @@ import {
|
|
|
18
18
|
getTextureWidth,
|
|
19
19
|
hasTextureSource,
|
|
20
20
|
hasTextureUvTransform,
|
|
21
|
+
initializeTexture2D,
|
|
21
22
|
isTextureReady,
|
|
22
23
|
resetTextureUvTransform,
|
|
23
24
|
setTextureFlip,
|
|
@@ -540,6 +541,12 @@ describe('hasTextureUvTransform', () => {
|
|
|
540
541
|
});
|
|
541
542
|
});
|
|
542
543
|
|
|
544
|
+
describe('initializeTexture2D', () => {
|
|
545
|
+
it('is the construction initializer of createTexture2D', () => {
|
|
546
|
+
expect(typeof initializeTexture2D).toBe('function');
|
|
547
|
+
});
|
|
548
|
+
});
|
|
549
|
+
|
|
543
550
|
describe('isTextureReady', () => {
|
|
544
551
|
it('is false with a null image and true once bound', () => {
|
|
545
552
|
const texture = createTexture();
|
|
@@ -654,7 +661,6 @@ describe('setTextureUvScale', () => {
|
|
|
654
661
|
expect(texture.uvScale.y).toBeCloseTo(8);
|
|
655
662
|
});
|
|
656
663
|
});
|
|
657
|
-
|
|
658
664
|
describe('transformTextureUv', () => {
|
|
659
665
|
it('leaves a coordinate unchanged under the identity transform', () => {
|
|
660
666
|
const texture = createTexture();
|
package/src/videoTexture.test.ts
CHANGED
|
@@ -13,6 +13,7 @@ import {
|
|
|
13
13
|
getVideoTextureInverseUvMatrix,
|
|
14
14
|
getVideoTextureUvMatrix,
|
|
15
15
|
getVideoTextureWidth,
|
|
16
|
+
initializeVideoImageResource,
|
|
16
17
|
isVideoTextureFrameReady,
|
|
17
18
|
resetVideoTextureFrame,
|
|
18
19
|
setVideoTextureSource,
|
|
@@ -161,6 +162,12 @@ describe('getVideoTextureWidth', () => {
|
|
|
161
162
|
});
|
|
162
163
|
});
|
|
163
164
|
|
|
165
|
+
describe('initializeVideoImageResource', () => {
|
|
166
|
+
it('is the construction initializer of createVideoImageResource', () => {
|
|
167
|
+
expect(typeof initializeVideoImageResource).toBe('function');
|
|
168
|
+
});
|
|
169
|
+
});
|
|
170
|
+
|
|
164
171
|
describe('isVideoTextureFrameReady', () => {
|
|
165
172
|
it('is true only when the element has a decoded frame with known dimensions', () => {
|
|
166
173
|
expect(isVideoTextureFrameReady(createVideoTexture(makeVideoResource(4, 320, 240)))).toBe(true);
|
|
@@ -180,7 +187,6 @@ describe('resetVideoTextureFrame', () => {
|
|
|
180
187
|
expect(getTextureSource(vt)?.version).toBe(0xffffffff);
|
|
181
188
|
});
|
|
182
189
|
});
|
|
183
|
-
|
|
184
190
|
describe('setVideoTextureSource', () => {
|
|
185
191
|
it('swaps the borrowed host handle and resets the version', () => {
|
|
186
192
|
const vt = createVideoTexture(makeVideoResource());
|