@flighthq/scene2d 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 CHANGED
@@ -13,5 +13,5 @@ Import the supported application-facing API from `@flighthq/scene2d`. 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/scene2d@0.5.1-next.903.f434bc2](https://github.com/flighthq/flight/tree/f434bc233778d75aeea61995df3a8cfaec459a85/packages/scene2d)
17
- - [License](https://github.com/flighthq/flight/blob/f434bc233778d75aeea61995df3a8cfaec459a85/LICENSE.md)
16
+ - [Source for @flighthq/scene2d@0.5.1-next.905.5fbf787](https://github.com/flighthq/flight/tree/5fbf7874064c384307542d68b4dcb6a895ff0dcf/packages/scene2d)
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/scene2d",
3
- "version": "0.5.1-next.903.f434bc2",
3
+ "version": "0.5.1-next.905.5fbf787",
4
4
  "author": "Joshua Granick and other contributors",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -38,14 +38,14 @@
38
38
  "clean:dist": "tsx ../../scripts/clean-package-dist.ts"
39
39
  },
40
40
  "dependencies": {
41
- "@flighthq/adjustments": "0.5.1-next.903.f434bc2",
42
- "@flighthq/animation": "0.5.1-next.903.f434bc2",
43
- "@flighthq/entity": "0.5.1-next.903.f434bc2",
44
- "@flighthq/materials": "0.5.1-next.903.f434bc2",
45
- "@flighthq/node": "0.5.1-next.903.f434bc2",
46
- "@flighthq/signals": "0.5.1-next.903.f434bc2",
47
- "@flighthq/texture": "0.5.1-next.903.f434bc2",
48
- "@flighthq/types": "0.5.1-next.903.f434bc2"
41
+ "@flighthq/adjustments": "0.5.1-next.905.5fbf787",
42
+ "@flighthq/animation": "0.5.1-next.905.5fbf787",
43
+ "@flighthq/entity": "0.5.1-next.905.5fbf787",
44
+ "@flighthq/materials": "0.5.1-next.905.5fbf787",
45
+ "@flighthq/node": "0.5.1-next.905.5fbf787",
46
+ "@flighthq/signals": "0.5.1-next.905.5fbf787",
47
+ "@flighthq/texture": "0.5.1-next.905.5fbf787",
48
+ "@flighthq/types": "0.5.1-next.905.5fbf787"
49
49
  },
50
50
  "devDependencies": {
51
51
  "@flighthq/geometry": "*",
@@ -8,6 +8,7 @@ import {
8
8
  createHtmlViewData,
9
9
  createHtmlViewRuntime,
10
10
  getHtmlViewRuntime,
11
+ initializeHtmlViewData,
11
12
  setHtmlViewSize,
12
13
  } from './htmlView';
13
14
 
@@ -94,6 +95,11 @@ describe('getHtmlViewRuntime', () => {
94
95
  });
95
96
  });
96
97
 
98
+ describe('initializeHtmlViewData', () => {
99
+ it('is the construction initializer of createHtmlViewData', () => {
100
+ expect(typeof initializeHtmlViewData).toBe('function');
101
+ });
102
+ });
97
103
  describe('setHtmlViewSize', () => {
98
104
  it('updates width and height', () => {
99
105
  const htmlView = createHtmlView();
@@ -9,6 +9,7 @@ import {
9
9
  createScale9SpriteData,
10
10
  createScale9SpriteRuntime,
11
11
  getScale9SpriteRuntime,
12
+ initializeScale9SpriteData,
12
13
  } from './scale9Sprite';
13
14
  import { computeSpriteLocalBoundsRectangle } from './sprite';
14
15
 
@@ -85,6 +86,15 @@ describe('getScale9SpriteRuntime', () => {
85
86
  });
86
87
  });
87
88
 
89
+ describe('initializeScale9SpriteData', () => {
90
+ it('is the construction initializer of createScale9SpriteData', () => {
91
+ expect(typeof initializeScale9SpriteData).toBe('function');
92
+ });
93
+ });
94
+
95
+ function texture(width: number, height: number) {
96
+ return createTexture({ dimension: '2d', source: { height, width } as ImageResource });
97
+ }
88
98
  describe('Scale9Sprite local bounds', () => {
89
99
  it('derives bounds from the texture like a plain Sprite', () => {
90
100
  const sprite = createScale9Sprite(grid, { data: { texture: texture(100, 50) } });
@@ -103,7 +113,3 @@ describe('Scale9Sprite local bounds', () => {
103
113
  expect(runtime.localBoundsId).toBe(localBoundsId);
104
114
  });
105
115
  });
106
-
107
- function texture(width: number, height: number) {
108
- return createTexture({ dimension: '2d', source: { height, width } as ImageResource });
109
- }
@@ -11,6 +11,8 @@ import {
11
11
  getScene2DRoot,
12
12
  getScene2DRuntime,
13
13
  getScene2DSignals,
14
+ initializeScene2D,
15
+ initializeScene2DSignals,
14
16
  setScene2DSize,
15
17
  } from './scene2d';
16
18
 
@@ -130,6 +132,17 @@ describe('getScene2DSignals', () => {
130
132
  });
131
133
  });
132
134
 
135
+ describe('initializeScene2D', () => {
136
+ it('is the construction initializer of createScene2D', () => {
137
+ expect(typeof initializeScene2D).toBe('function');
138
+ });
139
+ });
140
+ describe('initializeScene2DSignals', () => {
141
+ it('is the construction initializer of createScene2DSignals', () => {
142
+ expect(typeof initializeScene2DSignals).toBe('function');
143
+ });
144
+ });
145
+
133
146
  describe('setScene2DSize', () => {
134
147
  it('updates scene2dWidth and scene2dHeight', () => {
135
148
  const scene2d = createScene2D();
@@ -7,7 +7,7 @@ import { describe, expect, it } from 'vitest';
7
7
  import { createDisplayObject } from './displayObject';
8
8
  import { createHtmlView } from './htmlView';
9
9
  import { createScene2D } from './scene2d';
10
- import { createScene2DKindUsage, getScene2DKindUsage } from './sceneKindUsage';
10
+ import { createScene2DKindUsage, getScene2DKindUsage, initializeScene2DKindUsage } from './sceneKindUsage';
11
11
 
12
12
  // The walk detects a command stream structurally — any node whose `data` carries `commands` — rather
13
13
  // than by node kind, so the tests record streams directly. That also keeps @flighthq/shape out of this
@@ -117,3 +117,8 @@ describe('getScene2DKindUsage', () => {
117
117
  expect(usage.nodeKinds).toEqual([DisplayObjectKind, HtmlViewKind]);
118
118
  });
119
119
  });
120
+ describe('initializeScene2DKindUsage', () => {
121
+ it('is the construction initializer of createScene2DKindUsage', () => {
122
+ expect(typeof initializeScene2DKindUsage).toBe('function');
123
+ });
124
+ });
@@ -13,6 +13,8 @@ import {
13
13
  createSpriteRendererData,
14
14
  createSpriteRuntime,
15
15
  getSpriteRuntime,
16
+ initializeSpriteData,
17
+ initializeSpriteRendererData,
16
18
  isSpriteRendererDirty,
17
19
  } from './sprite';
18
20
 
@@ -114,6 +116,21 @@ describe('getSpriteRuntime', () => {
114
116
  });
115
117
  });
116
118
 
119
+ describe('initializeSpriteData', () => {
120
+ it('is the construction initializer of createSpriteData', () => {
121
+ expect(typeof initializeSpriteData).toBe('function');
122
+ });
123
+ });
124
+
125
+ describe('initializeSpriteRendererData', () => {
126
+ it('is the construction initializer of createSpriteRendererData', () => {
127
+ expect(typeof initializeSpriteRendererData).toBe('function');
128
+ });
129
+ });
130
+
131
+ function texture(width: number, height: number) {
132
+ return createTexture({ dimension: '2d', source: { height, width } as ImageResource });
133
+ }
117
134
  describe('isSpriteRendererDirty', () => {
118
135
  it('detects same-size bare texture assignment once without node invalidation', () => {
119
136
  const sprite = createSprite({ data: { texture: texture(64, 64) } });
@@ -150,7 +167,3 @@ describe('Sprite local bounds validity', () => {
150
167
  expect(runtime.localBoundsId).toBe(localBoundsId);
151
168
  });
152
169
  });
153
-
154
- function texture(width: number, height: number) {
155
- return createTexture({ dimension: '2d', source: { height, width } as ImageResource });
156
- }