@flighthq/displayobject 0.2.1-next.423.3350e53 → 0.2.1-next.444.a313478
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/stage.d.ts.map +1 -1
- package/dist/stage.js +14 -9
- package/dist/stage.js.map +1 -1
- package/package.json +8 -8
package/dist/stage.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stage.d.ts","sourceRoot":"","sources":["../src/stage.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"stage.d.ts","sourceRoot":"","sources":["../src/stage.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAwB,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAU9G,wBAAgB,WAAW,CACzB,GAAG,CAAC,EAAE,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,GAAG,WAAW,GAAG,aAAa,GAAG,YAAY,CAAC,CAAC,CAAC,GACnG,KAAK,CAYP;AAED,wBAAgB,kBAAkB,IAAI,YAAY,CAKjD;AAED,wBAAgB,kBAAkB,IAAI,YAAY,CAMjD;AAED,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,KAAK,GAAG,YAAY,CAG9D;AAID,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,QAAQ,CAAC,aAAa,CAAC,GAAG,KAAK,GAAG,IAAI,CAGnF;AAID,wBAAgB,eAAe,CAAC,MAAM,EAAE,QAAQ,CAAC,KAAK,CAAC,GAAG,QAAQ,CAAC,YAAY,CAAC,CAE/E;AAED,wBAAgB,eAAe,CAAC,MAAM,EAAE,QAAQ,CAAC,KAAK,CAAC,GAAG,YAAY,GAAG,IAAI,CAG5E;AAED,wBAAgB,YAAY,CAAC,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI,CAM/E"}
|
package/dist/stage.js
CHANGED
|
@@ -1,18 +1,23 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { createEntity } from '@flighthq/entity';
|
|
2
|
+
import { getNodeRoot, getNodeRuntime } from '@flighthq/node';
|
|
2
3
|
import { createSignal, emitSignal } from '@flighthq/signals';
|
|
3
4
|
import { EntityRuntimeKey } from '@flighthq/types';
|
|
4
5
|
import { createDisplayObject } from './displayObject';
|
|
5
6
|
// Allocates a Stage: a presentation-context Entity that owns a display-object `root` (allocated here), not a
|
|
6
|
-
// node in the tree.
|
|
7
|
-
//
|
|
8
|
-
//
|
|
9
|
-
// lazy walk to the root.
|
|
7
|
+
// node in the tree. Carries the fit context (`align`/`scaleMode`) directly — fit is the Stage's concern, and
|
|
8
|
+
// the bedrock `Viewport` is a drawable rect, not a base of Stage — plus the view dimensions and background
|
|
9
|
+
// color. The entity runtime stays unbound; the root's runtime carries a back-pointer so getDisplayObjectStage
|
|
10
|
+
// resolves membership by a lazy walk to the root.
|
|
10
11
|
export function createStage(obj) {
|
|
11
12
|
const root = createDisplayObject();
|
|
12
|
-
const stage =
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
const stage = createEntity({
|
|
14
|
+
align: obj?.align ?? 'topleft',
|
|
15
|
+
color: obj?.color ?? null,
|
|
16
|
+
root,
|
|
17
|
+
scaleMode: obj?.scaleMode ?? 'noscale',
|
|
18
|
+
stageHeight: obj?.stageHeight ?? 550,
|
|
19
|
+
stageWidth: obj?.stageWidth ?? 400,
|
|
20
|
+
});
|
|
16
21
|
getNodeRuntime(root).stage = stage;
|
|
17
22
|
return stage;
|
|
18
23
|
}
|
package/dist/stage.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stage.js","sourceRoot":"","sources":["../src/stage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"stage.js","sourceRoot":"","sources":["../src/stage.ts"],"names":[],"mappings":"AA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 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flighthq/displayobject",
|
|
3
|
-
"version": "0.2.1-next.
|
|
3
|
+
"version": "0.2.1-next.444.a313478",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/flighthq/flight.git",
|
|
@@ -32,15 +32,15 @@
|
|
|
32
32
|
"clean:dist": "tsx ../../scripts/clean-package-dist.ts"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@flighthq/adjustments": "0.2.1-next.
|
|
36
|
-
"@flighthq/
|
|
37
|
-
"@flighthq/
|
|
38
|
-
"@flighthq/
|
|
39
|
-
"@flighthq/
|
|
40
|
-
"@flighthq/
|
|
35
|
+
"@flighthq/adjustments": "0.2.1-next.444.a313478",
|
|
36
|
+
"@flighthq/entity": "0.2.1-next.444.a313478",
|
|
37
|
+
"@flighthq/geometry": "0.2.1-next.444.a313478",
|
|
38
|
+
"@flighthq/materials": "0.2.1-next.444.a313478",
|
|
39
|
+
"@flighthq/node": "0.2.1-next.444.a313478",
|
|
40
|
+
"@flighthq/signals": "0.2.1-next.444.a313478",
|
|
41
|
+
"@flighthq/types": "0.2.1-next.444.a313478"
|
|
41
42
|
},
|
|
42
43
|
"devDependencies": {
|
|
43
|
-
"@flighthq/entity": "*",
|
|
44
44
|
"typescript": "^5.3.0"
|
|
45
45
|
},
|
|
46
46
|
"description": "Display object tree for composited 2D rendering: bitmaps, shapes, text, masks, blend modes",
|