@flighthq/render 0.3.0-next.1463.b454aa8 → 0.3.0-next.1473.098a860

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.
@@ -17,4 +17,5 @@ export * from './renderTarget';
17
17
  export * from './renderTransform2d';
18
18
  export * from './renderViewport';
19
19
  export * from './sceneRender';
20
+ export { SCENE2D_WORKING_COLOR_SPACE } from './scene2dWorkingColorSpace';
20
21
  //# sourceMappingURL=contract.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"contract.d.ts","sourceRoot":"","sources":["../src/contract.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAC;AAC1C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,wBAAwB,CAAC;AACvC,cAAc,oBAAoB,CAAC;AACnC,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,wBAAwB,CAAC;AACvC,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,sBAAsB,CAAC;AACrC,cAAc,eAAe,CAAC;AAC9B,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC"}
1
+ {"version":3,"file":"contract.d.ts","sourceRoot":"","sources":["../src/contract.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAC;AAC1C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,wBAAwB,CAAC;AACvC,cAAc,oBAAoB,CAAC;AACnC,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,wBAAwB,CAAC;AACvC,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,sBAAsB,CAAC;AACrC,cAAc,eAAe,CAAC;AAC9B,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,OAAO,EAAE,2BAA2B,EAAE,MAAM,4BAA4B,CAAC"}
package/dist/contract.js CHANGED
@@ -17,4 +17,5 @@ export * from './renderTarget';
17
17
  export * from './renderTransform2d';
18
18
  export * from './renderViewport';
19
19
  export * from './sceneRender';
20
+ export { SCENE2D_WORKING_COLOR_SPACE } from './scene2dWorkingColorSpace';
20
21
  //# sourceMappingURL=contract.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"contract.js","sourceRoot":"","sources":["../src/contract.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAC;AAC1C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,wBAAwB,CAAC;AACvC,cAAc,oBAAoB,CAAC;AACnC,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,wBAAwB,CAAC;AACvC,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,sBAAsB,CAAC;AACrC,cAAc,eAAe,CAAC;AAC9B,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC"}
1
+ {"version":3,"file":"contract.js","sourceRoot":"","sources":["../src/contract.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAC;AAC1C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,wBAAwB,CAAC;AACvC,cAAc,oBAAoB,CAAC;AACnC,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,wBAAwB,CAAC;AACvC,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,sBAAsB,CAAC;AACrC,cAAc,eAAe,CAAC;AAC9B,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,OAAO,EAAE,2BAA2B,EAAE,MAAM,4BAA4B,CAAC"}
package/dist/index.d.ts CHANGED
@@ -1,2 +1,3 @@
1
1
  export { disableSceneRenderGuards, enableSceneRenderGuards, createRenderCache, destroyRenderState, disposeScene2DRender, enableRenderRegistryGuards, enableRenderRegistrySignals, explainRenderRegistryMisses, packScene3DLightBlock, prepareScene2DRender, prepareScene3DRender, registerRenderer, useRenderCache, } from './contract';
2
+ export { SCENE2D_WORKING_COLOR_SPACE } from './scene2dWorkingColorSpace';
2
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,wBAAwB,EACxB,uBAAuB,EACvB,iBAAiB,EACjB,kBAAkB,EAClB,oBAAoB,EACpB,0BAA0B,EAC1B,2BAA2B,EAC3B,2BAA2B,EAC3B,qBAAqB,EACrB,oBAAoB,EACpB,oBAAoB,EACpB,gBAAgB,EAChB,cAAc,GACf,MAAM,YAAY,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,wBAAwB,EACxB,uBAAuB,EACvB,iBAAiB,EACjB,kBAAkB,EAClB,oBAAoB,EACpB,0BAA0B,EAC1B,2BAA2B,EAC3B,2BAA2B,EAC3B,qBAAqB,EACrB,oBAAoB,EACpB,oBAAoB,EACpB,gBAAgB,EAChB,cAAc,GACf,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,2BAA2B,EAAE,MAAM,4BAA4B,CAAC"}
package/dist/index.js CHANGED
@@ -1,2 +1,3 @@
1
1
  export { disableSceneRenderGuards, enableSceneRenderGuards, createRenderCache, destroyRenderState, disposeScene2DRender, enableRenderRegistryGuards, enableRenderRegistrySignals, explainRenderRegistryMisses, packScene3DLightBlock, prepareScene2DRender, prepareScene3DRender, registerRenderer, useRenderCache, } from './contract';
2
+ export { SCENE2D_WORKING_COLOR_SPACE } from './scene2dWorkingColorSpace';
2
3
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,wBAAwB,EACxB,uBAAuB,EACvB,iBAAiB,EACjB,kBAAkB,EAClB,oBAAoB,EACpB,0BAA0B,EAC1B,2BAA2B,EAC3B,2BAA2B,EAC3B,qBAAqB,EACrB,oBAAoB,EACpB,oBAAoB,EACpB,gBAAgB,EAChB,cAAc,GACf,MAAM,YAAY,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,wBAAwB,EACxB,uBAAuB,EACvB,iBAAiB,EACjB,kBAAkB,EAClB,oBAAoB,EACpB,0BAA0B,EAC1B,2BAA2B,EAC3B,2BAA2B,EAC3B,qBAAqB,EACrB,oBAAoB,EACpB,oBAAoB,EACpB,gBAAgB,EAChB,cAAc,GACf,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,2BAA2B,EAAE,MAAM,4BAA4B,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { RenderTargetColorSpace } from '@flighthq/types/contract';
2
+ export declare const SCENE2D_WORKING_COLOR_SPACE: RenderTargetColorSpace;
3
+ //# sourceMappingURL=scene2dWorkingColorSpace.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scene2dWorkingColorSpace.d.ts","sourceRoot":"","sources":["../src/scene2dWorkingColorSpace.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAmBvE,eAAO,MAAM,2BAA2B,EAAE,sBAA+B,CAAC"}
@@ -0,0 +1,19 @@
1
+ // The colour space the 2D tower composites in, declared once for both backend leaf renderers.
2
+ //
3
+ // 2D works in the ENCODED domain: sprites are sRGB, they are sampled without a transfer function, they
4
+ // blend as sRGB values, and they reach an sRGB canvas unchanged. Byte-through end to end, which is both
5
+ // the fastest path (no decode, no encode, no offscreen) and the convention every 2D authoring tool the
6
+ // content came from — Flash, canvas 2D, Photoshop — composites in.
7
+ //
8
+ // This is a POLICY of the path, not a claim about any texture. It pairs with each texture's own
9
+ // `Texture.colorSpace` (what the content is) to decide whether a sample decodes; see
10
+ // shouldDecodeTextureOnSample. Declaring it here is what lets a 2D sprite honestly say it is sRGB while
11
+ // still being sampled raw — previously the renderers passed 'linear' as the texture's space to force the
12
+ // no-decode format, which was false about the data and made a genuinely-linear source indistinguishable
13
+ // from a byte-through one.
14
+ //
15
+ // Flipping this to 'linear' does NOT by itself give correct linear 2D: the premultiply would also have to
16
+ // move off the upload (see shouldPremultiplyTextureOnUpload) and the result would need an encode before
17
+ // present. It is a single seam rather than a scatter of callsites, which is the point.
18
+ export const SCENE2D_WORKING_COLOR_SPACE = 'srgb';
19
+ //# sourceMappingURL=scene2dWorkingColorSpace.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scene2dWorkingColorSpace.js","sourceRoot":"","sources":["../src/scene2dWorkingColorSpace.ts"],"names":[],"mappings":"AAEA,8FAA8F;AAC9F,EAAE;AACF,uGAAuG;AACvG,wGAAwG;AACxG,uGAAuG;AACvG,mEAAmE;AACnE,EAAE;AACF,gGAAgG;AAChG,qFAAqF;AACrF,wGAAwG;AACxG,yGAAyG;AACzG,wGAAwG;AACxG,2BAA2B;AAC3B,EAAE;AACF,0GAA0G;AAC1G,wGAAwG;AACxG,uFAAuF;AACvF,MAAM,CAAC,MAAM,2BAA2B,GAA2B,MAAM,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flighthq/render",
3
- "version": "0.3.0-next.1463.b454aa8",
3
+ "version": "0.3.0-next.1473.098a860",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/flighthq/flight.git",
@@ -36,15 +36,15 @@
36
36
  "clean:dist": "tsx ../../scripts/clean-package-dist.ts"
37
37
  },
38
38
  "dependencies": {
39
- "@flighthq/color": "0.3.0-next.1463.b454aa8",
40
- "@flighthq/entity": "0.3.0-next.1463.b454aa8",
41
- "@flighthq/geometry": "0.3.0-next.1463.b454aa8",
42
- "@flighthq/log": "0.3.0-next.1463.b454aa8",
43
- "@flighthq/materials": "0.3.0-next.1463.b454aa8",
44
- "@flighthq/mesh": "0.3.0-next.1463.b454aa8",
45
- "@flighthq/node": "0.3.0-next.1463.b454aa8",
46
- "@flighthq/signals": "0.3.0-next.1463.b454aa8",
47
- "@flighthq/types": "0.3.0-next.1463.b454aa8"
39
+ "@flighthq/color": "0.3.0-next.1473.098a860",
40
+ "@flighthq/entity": "0.3.0-next.1473.098a860",
41
+ "@flighthq/geometry": "0.3.0-next.1473.098a860",
42
+ "@flighthq/log": "0.3.0-next.1473.098a860",
43
+ "@flighthq/materials": "0.3.0-next.1473.098a860",
44
+ "@flighthq/mesh": "0.3.0-next.1473.098a860",
45
+ "@flighthq/node": "0.3.0-next.1473.098a860",
46
+ "@flighthq/signals": "0.3.0-next.1473.098a860",
47
+ "@flighthq/types": "0.3.0-next.1473.098a860"
48
48
  },
49
49
  "devDependencies": {
50
50
  "@flighthq/adjustments": "*",
@@ -0,0 +1,11 @@
1
+ import { describe, expect, it } from 'vitest';
2
+
3
+ import { SCENE2D_WORKING_COLOR_SPACE } from './scene2dWorkingColorSpace';
4
+
5
+ describe('SCENE2D_WORKING_COLOR_SPACE', () => {
6
+ // The 2D tower composites in the encoded domain — byte-through, no decode, no encode. Changing this
7
+ // is a rendered-output change for every 2D scene, not a refactor.
8
+ it('declares the 2D tower encoded, matching its byte-through pipeline', () => {
9
+ expect(SCENE2D_WORKING_COLOR_SPACE).toBe('srgb');
10
+ });
11
+ });