@flighthq/shading 0.5.1-next.920.da8f530 → 0.6.0
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/dist/.tsbuildinfo.contract +1 -0
- package/dist/.tsbuildinfo.runtime +1 -0
- package/dist/contract.d.ts +27 -27
- package/dist/contract.d.ts.map +1 -1
- package/dist/contract.js +27 -27
- package/dist/contract.js.map +1 -1
- package/dist/contract.shading-types.d.ts +24 -0
- package/dist/contract.shading-types.d.ts.map +1 -0
- package/dist/contract.shading-types.js +26 -0
- package/dist/contract.shading-types.js.map +1 -0
- package/dist/createAnimatedNormalModifier.d.ts +2 -1
- package/dist/createAnimatedNormalModifier.d.ts.map +1 -1
- package/dist/createAnimatedNormalModifier.js +4 -4
- package/dist/createAnimatedNormalModifier.js.map +1 -1
- package/dist/createDissolveModifier.d.ts +2 -1
- package/dist/createDissolveModifier.d.ts.map +1 -1
- package/dist/createDissolveModifier.js +4 -4
- package/dist/createDissolveModifier.js.map +1 -1
- package/dist/createEmissiveModifier.d.ts +2 -1
- package/dist/createEmissiveModifier.d.ts.map +1 -1
- package/dist/createEmissiveModifier.js +4 -4
- package/dist/createEmissiveModifier.js.map +1 -1
- package/dist/createEnvReflectModifier.d.ts +2 -1
- package/dist/createEnvReflectModifier.d.ts.map +1 -1
- package/dist/createEnvReflectModifier.js +4 -4
- package/dist/createEnvReflectModifier.js.map +1 -1
- package/dist/createFogModifier.d.ts +2 -1
- package/dist/createFogModifier.d.ts.map +1 -1
- package/dist/createFogModifier.js +4 -4
- package/dist/createFogModifier.js.map +1 -1
- package/dist/createRimModifier.d.ts +2 -1
- package/dist/createRimModifier.d.ts.map +1 -1
- package/dist/createRimModifier.js +4 -4
- package/dist/createRimModifier.js.map +1 -1
- package/dist/createShadedMaterial.d.ts +2 -1
- package/dist/createShadedMaterial.d.ts.map +1 -1
- package/dist/createShadedMaterial.js +6 -5
- package/dist/createShadedMaterial.js.map +1 -1
- package/dist/createToonModifier.d.ts +2 -1
- package/dist/createToonModifier.d.ts.map +1 -1
- package/dist/createToonModifier.js +4 -4
- package/dist/createToonModifier.js.map +1 -1
- package/dist/createVertexDisplaceModifier.d.ts +2 -1
- package/dist/createVertexDisplaceModifier.d.ts.map +1 -1
- package/dist/createVertexDisplaceModifier.js +4 -4
- package/dist/createVertexDisplaceModifier.js.map +1 -1
- package/dist/getModifierDefineKey.d.ts +2 -2
- package/dist/getModifierDefineKey.d.ts.map +1 -1
- package/dist/getModifierDefineKey.js +2 -2
- package/dist/getModifierDefineKey.js.map +1 -1
- package/dist/getUnregisteredModifierKinds.d.ts +2 -2
- package/dist/getUnregisteredModifierKinds.d.ts.map +1 -1
- package/dist/getUnregisteredModifierKinds.js +1 -1
- package/dist/getUnregisteredModifierKinds.js.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/isBuiltInModifierSlot.js +1 -1
- package/dist/isBuiltInModifierSlot.js.map +1 -1
- package/dist/isModifierStackValid.d.ts +2 -2
- package/dist/isModifierStackValid.d.ts.map +1 -1
- package/dist/isModifierStackValid.js +1 -1
- package/dist/isModifierStackValid.js.map +1 -1
- package/dist/modifier.d.ts +2 -1
- package/dist/modifier.d.ts.map +1 -1
- package/dist/modifier.js.map +1 -1
- package/dist/modifierRegistry.d.ts +3 -3
- package/dist/modifierRegistry.d.ts.map +1 -1
- package/dist/modifierRegistry.js +1 -7
- package/dist/modifierRegistry.js.map +1 -1
- package/dist/orderModifierStack.d.ts +1 -1
- package/dist/orderModifierStack.d.ts.map +1 -1
- package/dist/orderModifierStack.js +1 -1
- package/dist/orderModifierStack.js.map +1 -1
- package/dist/registerBuiltInModifiers.d.ts +1 -1
- package/dist/registerBuiltInModifiers.d.ts.map +1 -1
- package/dist/registerBuiltInModifiers.js +2 -2
- package/dist/registerBuiltInModifiers.js.map +1 -1
- package/dist/types/AnimatedNormalModifier.d.ts +14 -0
- package/dist/types/AnimatedNormalModifier.d.ts.map +1 -0
- package/dist/types/AnimatedNormalModifier.js +2 -0
- package/dist/types/AnimatedNormalModifier.js.map +1 -0
- package/dist/types/AnimatedNormalModifierOptions.d.ts +10 -0
- package/dist/types/AnimatedNormalModifierOptions.d.ts.map +1 -0
- package/dist/types/AnimatedNormalModifierOptions.js +2 -0
- package/dist/types/AnimatedNormalModifierOptions.js.map +1 -0
- package/dist/types/DissolveModifier.d.ts +13 -0
- package/dist/types/DissolveModifier.d.ts.map +1 -0
- package/dist/types/DissolveModifier.js +2 -0
- package/dist/types/DissolveModifier.js.map +1 -0
- package/dist/types/DissolveModifierOptions.d.ts +9 -0
- package/dist/types/DissolveModifierOptions.d.ts.map +1 -0
- package/dist/types/DissolveModifierOptions.js +2 -0
- package/dist/types/DissolveModifierOptions.js.map +1 -0
- package/dist/types/EmissiveModifier.d.ts +19 -0
- package/dist/types/EmissiveModifier.d.ts.map +1 -0
- package/dist/types/EmissiveModifier.js +13 -0
- package/dist/types/EmissiveModifier.js.map +1 -0
- package/dist/types/EmissiveModifierOptions.d.ts +10 -0
- package/dist/types/EmissiveModifierOptions.d.ts.map +1 -0
- package/dist/types/EmissiveModifierOptions.js +2 -0
- package/dist/types/EmissiveModifierOptions.js.map +1 -0
- package/dist/types/EnvReflectModifier.d.ts +11 -0
- package/dist/types/EnvReflectModifier.d.ts.map +1 -0
- package/dist/types/EnvReflectModifier.js +2 -0
- package/dist/types/EnvReflectModifier.js.map +1 -0
- package/dist/types/EnvReflectModifierOptions.d.ts +7 -0
- package/dist/types/EnvReflectModifierOptions.d.ts.map +1 -0
- package/dist/types/EnvReflectModifierOptions.js +2 -0
- package/dist/types/EnvReflectModifierOptions.js.map +1 -0
- package/dist/types/FogModifier.d.ts +18 -0
- package/dist/types/FogModifier.d.ts.map +1 -0
- package/dist/types/FogModifier.js +12 -0
- package/dist/types/FogModifier.js.map +1 -0
- package/dist/types/FogModifierOptions.d.ts +9 -0
- package/dist/types/FogModifierOptions.d.ts.map +1 -0
- package/dist/types/FogModifierOptions.js +2 -0
- package/dist/types/FogModifierOptions.js.map +1 -0
- package/dist/types/Modifier.d.ts +9 -0
- package/dist/types/Modifier.d.ts.map +1 -0
- package/dist/types/Modifier.js +2 -0
- package/dist/types/Modifier.js.map +1 -0
- package/dist/types/ModifierDefinition.d.ts +9 -0
- package/dist/types/ModifierDefinition.d.ts.map +1 -0
- package/dist/types/ModifierDefinition.js +2 -0
- package/dist/types/ModifierDefinition.js.map +1 -0
- package/dist/types/ModifierKind.d.ts +9 -0
- package/dist/types/ModifierKind.d.ts.map +1 -0
- package/dist/types/ModifierKind.js +2 -0
- package/dist/types/ModifierKind.js.map +1 -0
- package/dist/types/ModifierRegistry.d.ts +6 -0
- package/dist/types/ModifierRegistry.d.ts.map +1 -0
- package/dist/types/ModifierRegistry.js +2 -0
- package/dist/types/ModifierRegistry.js.map +1 -0
- package/dist/types/ModifierSlot.d.ts +10 -0
- package/dist/types/ModifierSlot.d.ts.map +1 -0
- package/dist/types/ModifierSlot.js +26 -0
- package/dist/types/ModifierSlot.js.map +1 -0
- package/dist/types/RimModifier.d.ts +11 -0
- package/dist/types/RimModifier.d.ts.map +1 -0
- package/dist/types/RimModifier.js +2 -0
- package/dist/types/RimModifier.js.map +1 -0
- package/dist/types/RimModifierOptions.d.ts +7 -0
- package/dist/types/RimModifierOptions.d.ts.map +1 -0
- package/dist/types/RimModifierOptions.js +2 -0
- package/dist/types/RimModifierOptions.js.map +1 -0
- package/dist/types/ShadedMaterial.d.ts +16 -0
- package/dist/types/ShadedMaterial.d.ts.map +1 -0
- package/dist/types/ShadedMaterial.js +2 -0
- package/dist/types/ShadedMaterial.js.map +1 -0
- package/dist/types/ShadedMaterialOptions.d.ts +14 -0
- package/dist/types/ShadedMaterialOptions.d.ts.map +1 -0
- package/dist/types/ShadedMaterialOptions.js +2 -0
- package/dist/types/ShadedMaterialOptions.js.map +1 -0
- package/dist/types/ToonModifier.d.ts +9 -0
- package/dist/types/ToonModifier.d.ts.map +1 -0
- package/dist/types/ToonModifier.js +2 -0
- package/dist/types/ToonModifier.js.map +1 -0
- package/dist/types/ToonModifierOptions.d.ts +5 -0
- package/dist/types/ToonModifierOptions.d.ts.map +1 -0
- package/dist/types/ToonModifierOptions.js +2 -0
- package/dist/types/ToonModifierOptions.js.map +1 -0
- package/dist/types/VertexDisplaceModifier.d.ts +21 -0
- package/dist/types/VertexDisplaceModifier.d.ts.map +1 -0
- package/dist/types/VertexDisplaceModifier.js +11 -0
- package/dist/types/VertexDisplaceModifier.js.map +1 -0
- package/dist/types/VertexDisplaceModifierOptions.d.ts +13 -0
- package/dist/types/VertexDisplaceModifierOptions.d.ts.map +1 -0
- package/dist/types/VertexDisplaceModifierOptions.js +2 -0
- package/dist/types/VertexDisplaceModifierOptions.js.map +1 -0
- package/package.json +8 -4
- package/src/createAnimatedNormalModifier.test.ts +4 -3
- package/src/createDissolveModifier.test.ts +3 -3
- package/src/createEmissiveModifier.test.ts +3 -3
- package/src/createEnvReflectModifier.test.ts +2 -2
- package/src/createFogModifier.test.ts +2 -2
- package/src/createRimModifier.test.ts +2 -2
- package/src/createShadedMaterial.test.ts +6 -5
- package/src/createToonModifier.test.ts +2 -2
- package/src/createVertexDisplaceModifier.test.ts +4 -3
- package/src/getModifierDefineKey.test.ts +8 -8
- package/src/getUnregisteredModifierKinds.test.ts +13 -13
- package/src/isBuiltInModifierSlot.test.ts +2 -2
- package/src/isModifierStackValid.test.ts +8 -8
- package/src/modifier.test.ts +1 -1
- package/src/modifierRegistry.test.ts +5 -16
- package/src/orderModifierStack.test.ts +6 -6
- package/src/registerBuiltInModifiers.test.ts +11 -11
- package/src/types/AnimatedNormalModifier.test.ts +41 -0
- package/src/types/DissolveModifier.test.ts +30 -0
- package/src/types/EmissiveModifier.test.ts +37 -0
- package/src/types/EnvReflectModifier.test.ts +30 -0
- package/src/types/FogModifier.test.ts +37 -0
- package/src/types/Modifier.test.ts +52 -0
- package/src/types/ModifierSlot.test.ts +22 -0
- package/src/types/RimModifier.test.ts +39 -0
- package/src/types/ShadedMaterial.test.ts +75 -0
- package/src/types/ToonModifier.test.ts +28 -0
- package/src/types/VertexDisplaceModifier.test.ts +38 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flighthq/shading",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"author": "Joshua Granick and other contributors",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -32,17 +32,21 @@
|
|
|
32
32
|
"scripts": {
|
|
33
33
|
"build": "tsc -b",
|
|
34
34
|
"clean": "tsc -b --clean",
|
|
35
|
+
"generate": "tsx ../../scripts/generate-rust-package.ts --crate flight-shading --package shading",
|
|
36
|
+
"generate:check": "tsx ../../scripts/generate-rust-package.ts --crate flight-shading --package shading --check",
|
|
35
37
|
"test": "vitest run --config vitest.config.ts",
|
|
36
38
|
"test:watch": "vitest --watch --config vitest.config.ts",
|
|
37
39
|
"prepack": "npm run clean && npm run clean:dist && npm run build",
|
|
38
40
|
"clean:dist": "tsx ../../scripts/clean-package-dist.ts"
|
|
39
41
|
},
|
|
40
42
|
"dependencies": {
|
|
41
|
-
"@flighthq/entity": "0.
|
|
42
|
-
"@flighthq/
|
|
43
|
+
"@flighthq/entity": "0.6.0",
|
|
44
|
+
"@flighthq/geometry": "0.6.0",
|
|
45
|
+
"@flighthq/materials": "0.6.0",
|
|
46
|
+
"@flighthq/texture": "0.6.0"
|
|
43
47
|
},
|
|
44
48
|
"devDependencies": {
|
|
45
|
-
"typescript": "^
|
|
49
|
+
"typescript": "^7.0.2"
|
|
46
50
|
},
|
|
47
51
|
"description": "Material Feature / Modifier tier — compiled shader augmentations that inject into a ShadedMaterial's shading and produce batchable variants. A composable base lit material carrying an ordered Modifier stack, an open registry keyed by feature kind over the diffuse/specular/normal/emissive/effect slot taxonomy, the composition/ordering contract that turns a stack into a deterministic ordered feature-set plus a stable define-key, seed emissive/rim/animated-normal modifier constructors, and sentinel-returning validation; substrate-agnostic and tree-shakable, the tier between complete materials and post-output adjustments",
|
|
48
52
|
"sideEffects": false
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import {
|
|
1
|
+
import type { Vector2Like } from '@flighthq/geometry/contract';
|
|
2
|
+
import type { Texture } from '@flighthq/texture/contract';
|
|
3
3
|
import { describe, expect, it } from 'vitest';
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import { AnimatedNormalModifierKind, ModifierSlot } from './contract.shading-types.ts';
|
|
6
|
+
import { createAnimatedNormalModifier, initializeAnimatedNormalModifier } from './createAnimatedNormalModifier.ts';
|
|
6
7
|
|
|
7
8
|
describe('createAnimatedNormalModifier', () => {
|
|
8
9
|
const scroll: Vector2Like = { x: 0.1, y: 0 };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { Texture } from '@flighthq/
|
|
2
|
-
import { DissolveModifierKind, ModifierSlot } from '@flighthq/types/contract';
|
|
1
|
+
import type { Texture } from '@flighthq/texture/contract';
|
|
3
2
|
import { describe, expect, it } from 'vitest';
|
|
4
3
|
|
|
5
|
-
import {
|
|
4
|
+
import { DissolveModifierKind, ModifierSlot } from './contract.shading-types.ts';
|
|
5
|
+
import { createDissolveModifier, initializeDissolveModifier } from './createDissolveModifier.ts';
|
|
6
6
|
|
|
7
7
|
describe('createDissolveModifier', () => {
|
|
8
8
|
it('sets the kind and Effect slot', () => {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { Texture } from '@flighthq/
|
|
2
|
-
import { EmissiveModifierFacing, EmissiveModifierKind, ModifierSlot } from '@flighthq/types/contract';
|
|
1
|
+
import type { Texture } from '@flighthq/texture/contract';
|
|
3
2
|
import { describe, expect, it } from 'vitest';
|
|
4
3
|
|
|
5
|
-
import {
|
|
4
|
+
import { EmissiveModifierFacing, EmissiveModifierKind, ModifierSlot } from './contract.shading-types.ts';
|
|
5
|
+
import { createEmissiveModifier, initializeEmissiveModifier } from './createEmissiveModifier.ts';
|
|
6
6
|
|
|
7
7
|
describe('createEmissiveModifier', () => {
|
|
8
8
|
it('sets the kind and Emissive slot', () => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { EnvReflectModifierKind, ModifierSlot } from '@flighthq/types/contract';
|
|
2
1
|
import { describe, expect, it } from 'vitest';
|
|
3
2
|
|
|
4
|
-
import {
|
|
3
|
+
import { EnvReflectModifierKind, ModifierSlot } from './contract.shading-types.ts';
|
|
4
|
+
import { createEnvReflectModifier, initializeEnvReflectModifier } from './createEnvReflectModifier.ts';
|
|
5
5
|
|
|
6
6
|
describe('createEnvReflectModifier', () => {
|
|
7
7
|
it('sets the kind and Effect slot', () => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { FogModifierKind, FogModifierMode, ModifierSlot } from '@flighthq/types/contract';
|
|
2
1
|
import { describe, expect, it } from 'vitest';
|
|
3
2
|
|
|
4
|
-
import {
|
|
3
|
+
import { FogModifierKind, FogModifierMode, ModifierSlot } from './contract.shading-types.ts';
|
|
4
|
+
import { createFogModifier, initializeFogModifier } from './createFogModifier.ts';
|
|
5
5
|
|
|
6
6
|
describe('createFogModifier', () => {
|
|
7
7
|
it('sets the kind and Effect slot', () => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ModifierSlot, RimModifierKind } from '@flighthq/types/contract';
|
|
2
1
|
import { describe, expect, it } from 'vitest';
|
|
3
2
|
|
|
4
|
-
import {
|
|
3
|
+
import { ModifierSlot, RimModifierKind } from './contract.shading-types.ts';
|
|
4
|
+
import { createRimModifier, initializeRimModifier } from './createRimModifier.ts';
|
|
5
5
|
|
|
6
6
|
describe('createRimModifier', () => {
|
|
7
7
|
it('sets the kind and Effect slot', () => {
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { EntityRuntimeKey
|
|
1
|
+
import { EntityRuntimeKey } from '@flighthq/entity/contract';
|
|
2
2
|
import { describe, expect, it } from 'vitest';
|
|
3
3
|
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { ShadedMaterialKind } from './contract.shading-types.ts';
|
|
5
|
+
import { createEmissiveModifier } from './createEmissiveModifier.ts';
|
|
6
|
+
import { createShadedMaterial, initializeShadedMaterial } from './createShadedMaterial.ts';
|
|
6
7
|
|
|
7
8
|
describe('createShadedMaterial', () => {
|
|
8
9
|
it('builds an entity with the ShadedMaterial kind', () => {
|
|
@@ -22,14 +23,14 @@ describe('createShadedMaterial', () => {
|
|
|
22
23
|
expect(material.normalMap).toBeNull();
|
|
23
24
|
});
|
|
24
25
|
|
|
25
|
-
it('defaults the
|
|
26
|
+
it('defaults the Material3D trailer to opaque single-sided straight-alpha', () => {
|
|
26
27
|
const material = createShadedMaterial();
|
|
27
28
|
expect(material.alphaMode).toBe('opaque');
|
|
28
29
|
expect(material.alphaCutoff).toBe(0.5);
|
|
29
30
|
expect(material.doubleSided).toBe(false);
|
|
30
31
|
});
|
|
31
32
|
|
|
32
|
-
it('forwards the
|
|
33
|
+
it('forwards the Material3D trailer from options (mask/blend expressible at construction)', () => {
|
|
33
34
|
const material = createShadedMaterial({ alphaCutoff: 0.25, alphaMode: 'mask', doubleSided: true });
|
|
34
35
|
expect(material.alphaMode).toBe('mask');
|
|
35
36
|
expect(material.alphaCutoff).toBe(0.25);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ModifierSlot, ToonModifierKind } from '@flighthq/types/contract';
|
|
2
1
|
import { describe, expect, it } from 'vitest';
|
|
3
2
|
|
|
4
|
-
import {
|
|
3
|
+
import { ModifierSlot, ToonModifierKind } from './contract.shading-types.ts';
|
|
4
|
+
import { createToonModifier, initializeToonModifier } from './createToonModifier.ts';
|
|
5
5
|
|
|
6
6
|
describe('createToonModifier', () => {
|
|
7
7
|
it('sets the kind and Effect slot', () => {
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import {
|
|
1
|
+
import type { Vector3Like } from '@flighthq/geometry/contract';
|
|
2
|
+
import type { Texture } from '@flighthq/texture/contract';
|
|
3
3
|
import { describe, expect, it } from 'vitest';
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import { ModifierSlot, VertexDisplaceModifierKind, VertexDisplaceModifierSource } from './contract.shading-types.ts';
|
|
6
|
+
import { createVertexDisplaceModifier, initializeVertexDisplaceModifier } from './createVertexDisplaceModifier.ts';
|
|
6
7
|
|
|
7
8
|
describe('createVertexDisplaceModifier', () => {
|
|
8
9
|
it('sets the kind and the Vertex slot', () => {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import type { Texture } from '@flighthq/
|
|
2
|
-
import { EmissiveModifierFacing } from '@flighthq/types/contract';
|
|
1
|
+
import type { Texture } from '@flighthq/texture/contract';
|
|
3
2
|
import { describe, expect, it } from 'vitest';
|
|
4
3
|
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
4
|
+
import { EmissiveModifierFacing } from './contract.shading-types.ts';
|
|
5
|
+
import { createAnimatedNormalModifier } from './createAnimatedNormalModifier.ts';
|
|
6
|
+
import { createEmissiveModifier } from './createEmissiveModifier.ts';
|
|
7
|
+
import { createRimModifier } from './createRimModifier.ts';
|
|
8
|
+
import { getModifierDefineKey } from './getModifierDefineKey.ts';
|
|
9
|
+
import { createModifierRegistry } from './modifierRegistry.ts';
|
|
10
|
+
import { registerBuiltInModifiers } from './registerBuiltInModifiers.ts';
|
|
11
11
|
|
|
12
12
|
describe('getModifierDefineKey', () => {
|
|
13
13
|
const registry = createModifierRegistry();
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { allocateEntity
|
|
2
|
-
import type { Modifier } from '@flighthq/types/contract';
|
|
3
|
-
import { EmissiveModifierKind } from '@flighthq/types/contract';
|
|
1
|
+
import { allocateEntity } from '@flighthq/entity/contract';
|
|
4
2
|
import { describe, expect, it } from 'vitest';
|
|
5
3
|
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
4
|
+
import type { Modifier } from './contract.shading-types.ts';
|
|
5
|
+
import { EmissiveModifierKind } from './contract.shading-types.ts';
|
|
6
|
+
import { createEmissiveModifier } from './createEmissiveModifier.ts';
|
|
7
|
+
import { getUnregisteredModifierKinds } from './getUnregisteredModifierKinds.ts';
|
|
8
|
+
import { createModifierRegistry } from './modifierRegistry.ts';
|
|
9
|
+
import { registerBuiltInModifiers } from './registerBuiltInModifiers.ts';
|
|
10
10
|
|
|
11
11
|
describe('getUnregisteredModifierKinds', () => {
|
|
12
12
|
it('returns an empty array when every kind is registered', () => {
|
|
@@ -26,23 +26,23 @@ describe('getUnregisteredModifierKinds', () => {
|
|
|
26
26
|
registerBuiltInModifiers(registry);
|
|
27
27
|
const stack: Modifier[] = [
|
|
28
28
|
(() => {
|
|
29
|
-
const out = allocateEntity<any>();
|
|
29
|
+
const out = allocateEntity<any>() as any;
|
|
30
30
|
out.kind = 'acme.Missing';
|
|
31
31
|
out.slot = 'Effect';
|
|
32
|
-
return
|
|
32
|
+
return out;
|
|
33
33
|
})(),
|
|
34
34
|
createEmissiveModifier({ color: 0xffffffff }),
|
|
35
35
|
(() => {
|
|
36
|
-
const out = allocateEntity<any>();
|
|
36
|
+
const out = allocateEntity<any>() as any;
|
|
37
37
|
out.kind = 'acme.Other';
|
|
38
38
|
out.slot = 'Normal';
|
|
39
|
-
return
|
|
39
|
+
return out;
|
|
40
40
|
})(),
|
|
41
41
|
(() => {
|
|
42
|
-
const out = allocateEntity<any>();
|
|
42
|
+
const out = allocateEntity<any>() as any;
|
|
43
43
|
out.kind = 'acme.Missing';
|
|
44
44
|
out.slot = 'Effect';
|
|
45
|
-
return
|
|
45
|
+
return out;
|
|
46
46
|
})(),
|
|
47
47
|
];
|
|
48
48
|
expect(getUnregisteredModifierKinds(registry, stack)).toEqual(['acme.Missing', 'acme.Other']);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ModifierSlot } from '@flighthq/types/contract';
|
|
2
1
|
import { describe, expect, it } from 'vitest';
|
|
3
2
|
|
|
4
|
-
import {
|
|
3
|
+
import { ModifierSlot } from './contract.shading-types.ts';
|
|
4
|
+
import { isBuiltInModifierSlot } from './isBuiltInModifierSlot.ts';
|
|
5
5
|
|
|
6
6
|
describe('isBuiltInModifierSlot', () => {
|
|
7
7
|
it('accepts every built-in slot name', () => {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { allocateEntity
|
|
2
|
-
import type { Modifier } from '@flighthq/types/contract';
|
|
1
|
+
import { allocateEntity } from '@flighthq/entity/contract';
|
|
3
2
|
import { describe, expect, it } from 'vitest';
|
|
4
3
|
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
4
|
+
import type { Modifier } from './contract.shading-types.ts';
|
|
5
|
+
import { createEmissiveModifier } from './createEmissiveModifier.ts';
|
|
6
|
+
import { isModifierStackValid } from './isModifierStackValid.ts';
|
|
7
|
+
import { createModifierRegistry } from './modifierRegistry.ts';
|
|
8
|
+
import { registerBuiltInModifiers } from './registerBuiltInModifiers.ts';
|
|
9
9
|
|
|
10
10
|
describe('isModifierStackValid', () => {
|
|
11
11
|
it('is true when every kind is registered', () => {
|
|
@@ -25,10 +25,10 @@ describe('isModifierStackValid', () => {
|
|
|
25
25
|
const stack: Modifier[] = [
|
|
26
26
|
createEmissiveModifier({ color: 0xffffffff }),
|
|
27
27
|
(() => {
|
|
28
|
-
const out = allocateEntity<any>();
|
|
28
|
+
const out = allocateEntity<any>() as any;
|
|
29
29
|
out.kind = 'acme.Missing';
|
|
30
30
|
out.slot = 'Effect';
|
|
31
|
-
return
|
|
31
|
+
return out;
|
|
32
32
|
})(),
|
|
33
33
|
];
|
|
34
34
|
expect(isModifierStackValid(registry, stack)).toBe(false);
|
package/src/modifier.test.ts
CHANGED
|
@@ -1,13 +1,8 @@
|
|
|
1
|
-
import { allocateEntity
|
|
2
|
-
import type { Modifier } from '@flighthq/types/contract';
|
|
1
|
+
import { allocateEntity } from '@flighthq/entity/contract';
|
|
3
2
|
import { describe, expect, it } from 'vitest';
|
|
4
3
|
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
initializeModifierRegistry,
|
|
8
|
-
registerModifier,
|
|
9
|
-
resolveModifier,
|
|
10
|
-
} from './modifierRegistry';
|
|
4
|
+
import type { Modifier } from './contract.shading-types.ts';
|
|
5
|
+
import { createModifierRegistry, registerModifier, resolveModifier } from './modifierRegistry.ts';
|
|
11
6
|
|
|
12
7
|
describe('createModifierRegistry', () => {
|
|
13
8
|
it('allocates an empty registry', () => {
|
|
@@ -23,12 +18,6 @@ describe('createModifierRegistry', () => {
|
|
|
23
18
|
});
|
|
24
19
|
});
|
|
25
20
|
|
|
26
|
-
describe('initializeModifierRegistry', () => {
|
|
27
|
-
it('is the construction initializer of createModifierRegistry', () => {
|
|
28
|
-
expect(typeof initializeModifierRegistry).toBe('function');
|
|
29
|
-
});
|
|
30
|
-
});
|
|
31
|
-
|
|
32
21
|
describe('registerModifier', () => {
|
|
33
22
|
it('stores a definition retrievable by kind', () => {
|
|
34
23
|
const registry = createModifierRegistry();
|
|
@@ -55,10 +44,10 @@ describe('registerModifier', () => {
|
|
|
55
44
|
expect(
|
|
56
45
|
definition?.getDefineSignature?.(
|
|
57
46
|
(() => {
|
|
58
|
-
const out = allocateEntity<any>();
|
|
47
|
+
const out = allocateEntity<any>() as any;
|
|
59
48
|
out.kind = 'acme.Foo';
|
|
60
49
|
out.slot = 'Effect';
|
|
61
|
-
return
|
|
50
|
+
return out;
|
|
62
51
|
})(),
|
|
63
52
|
),
|
|
64
53
|
).toBe('Effect');
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { allocateEntity
|
|
2
|
-
import type { Modifier } from '@flighthq/types/contract';
|
|
1
|
+
import { allocateEntity } from '@flighthq/entity/contract';
|
|
3
2
|
import { describe, expect, it } from 'vitest';
|
|
4
3
|
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
4
|
+
import type { Modifier } from './contract.shading-types.ts';
|
|
5
|
+
import { createAnimatedNormalModifier } from './createAnimatedNormalModifier.ts';
|
|
6
|
+
import { createEmissiveModifier } from './createEmissiveModifier.ts';
|
|
7
|
+
import { createRimModifier } from './createRimModifier.ts';
|
|
8
|
+
import { orderModifierStack } from './orderModifierStack.ts';
|
|
9
9
|
|
|
10
10
|
describe('orderModifierStack', () => {
|
|
11
11
|
const normal = createAnimatedNormalModifier({ map: null, scroll: { x: 0, y: 0 } });
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import type { Texture } from '@flighthq/
|
|
1
|
+
import type { Texture } from '@flighthq/texture/contract';
|
|
2
|
+
import { describe, expect, it } from 'vitest';
|
|
3
|
+
|
|
2
4
|
import {
|
|
3
5
|
AnimatedNormalModifierKind,
|
|
4
6
|
DissolveModifierKind,
|
|
@@ -12,16 +14,14 @@ import {
|
|
|
12
14
|
ToonModifierKind,
|
|
13
15
|
VertexDisplaceModifierKind,
|
|
14
16
|
VertexDisplaceModifierSource,
|
|
15
|
-
} from '
|
|
16
|
-
import {
|
|
17
|
-
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import { createModifierRegistry, resolveModifier } from './modifierRegistry';
|
|
24
|
-
import { registerBuiltInModifiers } from './registerBuiltInModifiers';
|
|
17
|
+
} from './contract.shading-types.ts';
|
|
18
|
+
import { createAnimatedNormalModifier } from './createAnimatedNormalModifier.ts';
|
|
19
|
+
import { createDissolveModifier } from './createDissolveModifier.ts';
|
|
20
|
+
import { createEmissiveModifier } from './createEmissiveModifier.ts';
|
|
21
|
+
import { createFogModifier } from './createFogModifier.ts';
|
|
22
|
+
import { createVertexDisplaceModifier } from './createVertexDisplaceModifier.ts';
|
|
23
|
+
import { createModifierRegistry, resolveModifier } from './modifierRegistry.ts';
|
|
24
|
+
import { registerBuiltInModifiers } from './registerBuiltInModifiers.ts';
|
|
25
25
|
|
|
26
26
|
describe('registerBuiltInModifiers', () => {
|
|
27
27
|
it('registers all eight built-in kinds against their slots', () => {
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { EntityRuntimeKey } from '@flighthq/entity/contract';
|
|
2
|
+
|
|
3
|
+
import type { AnimatedNormalModifier } from './AnimatedNormalModifier.ts';
|
|
4
|
+
import { AnimatedNormalModifierKind } from './AnimatedNormalModifier.ts';
|
|
5
|
+
import type { Modifier } from './Modifier.ts';
|
|
6
|
+
|
|
7
|
+
describe('AnimatedNormalModifier', () => {
|
|
8
|
+
describe('AnimatedNormalModifierKind', () => {
|
|
9
|
+
it('is the canonical PascalCase type name', () => {
|
|
10
|
+
expect(AnimatedNormalModifierKind).toBe('AnimatedNormalModifier');
|
|
11
|
+
});
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
describe('descriptor shape', () => {
|
|
15
|
+
it('is assignable to the open Modifier base with slot Normal', () => {
|
|
16
|
+
const ocean: AnimatedNormalModifier = {
|
|
17
|
+
[EntityRuntimeKey]: undefined,
|
|
18
|
+
kind: 'AnimatedNormalModifier',
|
|
19
|
+
slot: 'Normal',
|
|
20
|
+
map: null,
|
|
21
|
+
scroll: { x: 0.02, y: 0.01 },
|
|
22
|
+
strength: 0.5,
|
|
23
|
+
};
|
|
24
|
+
const base: Modifier = ocean;
|
|
25
|
+
expect(base.slot).toBe('Normal');
|
|
26
|
+
expect(ocean.scroll.x).toBeCloseTo(0.02);
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
it('supports an optional dual-scroll second layer', () => {
|
|
30
|
+
const water: AnimatedNormalModifier = {
|
|
31
|
+
[EntityRuntimeKey]: undefined,
|
|
32
|
+
kind: 'AnimatedNormalModifier',
|
|
33
|
+
slot: 'Normal',
|
|
34
|
+
map: null,
|
|
35
|
+
scroll: { x: 0.02, y: 0 },
|
|
36
|
+
secondaryScroll: { x: -0.01, y: 0.03 },
|
|
37
|
+
};
|
|
38
|
+
expect(water.secondaryScroll?.y).toBeCloseTo(0.03);
|
|
39
|
+
});
|
|
40
|
+
});
|
|
41
|
+
});
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { EntityRuntimeKey } from '@flighthq/entity/contract';
|
|
2
|
+
|
|
3
|
+
import { DissolveModifierKind } from './DissolveModifier.ts';
|
|
4
|
+
import type { DissolveModifier } from './DissolveModifier.ts';
|
|
5
|
+
import type { Modifier } from './Modifier.ts';
|
|
6
|
+
|
|
7
|
+
describe('DissolveModifier', () => {
|
|
8
|
+
describe('DissolveModifierKind', () => {
|
|
9
|
+
it('is the canonical PascalCase type name', () => {
|
|
10
|
+
expect(DissolveModifierKind).toBe('DissolveModifier');
|
|
11
|
+
});
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
describe('descriptor shape', () => {
|
|
15
|
+
it('is assignable to the open Modifier base with slot Effect', () => {
|
|
16
|
+
const burn: DissolveModifier = {
|
|
17
|
+
[EntityRuntimeKey]: undefined,
|
|
18
|
+
kind: 'DissolveModifier',
|
|
19
|
+
slot: 'Effect',
|
|
20
|
+
threshold: 0.4,
|
|
21
|
+
edgeColor: 0xff6600ff,
|
|
22
|
+
edgeWidth: 0.05,
|
|
23
|
+
scale: 8,
|
|
24
|
+
};
|
|
25
|
+
const base: Modifier = burn;
|
|
26
|
+
expect(base.slot).toBe('Effect');
|
|
27
|
+
expect(burn.threshold).toBe(0.4);
|
|
28
|
+
});
|
|
29
|
+
});
|
|
30
|
+
});
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { EntityRuntimeKey } from '@flighthq/entity/contract';
|
|
2
|
+
|
|
3
|
+
import type { EmissiveModifier } from './EmissiveModifier.ts';
|
|
4
|
+
import { EmissiveModifierFacing, EmissiveModifierKind } from './EmissiveModifier.ts';
|
|
5
|
+
import type { Modifier } from './Modifier.ts';
|
|
6
|
+
|
|
7
|
+
describe('EmissiveModifier', () => {
|
|
8
|
+
describe('EmissiveModifierKind', () => {
|
|
9
|
+
it('is the canonical PascalCase type name', () => {
|
|
10
|
+
expect(EmissiveModifierKind).toBe('EmissiveModifier');
|
|
11
|
+
});
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
describe('EmissiveModifierFacing', () => {
|
|
15
|
+
it('names the facing gates as canonical PascalCase values', () => {
|
|
16
|
+
expect(EmissiveModifierFacing.Ignore).toBe('Ignore');
|
|
17
|
+
expect(EmissiveModifierFacing.AwayFromLight).toBe('AwayFromLight');
|
|
18
|
+
expect(EmissiveModifierFacing.TowardLight).toBe('TowardLight');
|
|
19
|
+
});
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
describe('descriptor shape', () => {
|
|
23
|
+
it('is assignable to the open Modifier base with slot Emissive', () => {
|
|
24
|
+
const nightSide: EmissiveModifier = {
|
|
25
|
+
[EntityRuntimeKey]: undefined,
|
|
26
|
+
kind: 'EmissiveModifier',
|
|
27
|
+
slot: 'Emissive',
|
|
28
|
+
color: 0xffdd88ff,
|
|
29
|
+
strength: 2,
|
|
30
|
+
facing: EmissiveModifierFacing.AwayFromLight,
|
|
31
|
+
};
|
|
32
|
+
const base: Modifier = nightSide;
|
|
33
|
+
expect(base.slot).toBe('Emissive');
|
|
34
|
+
expect(nightSide.color).toBe(0xffdd88ff);
|
|
35
|
+
});
|
|
36
|
+
});
|
|
37
|
+
});
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { EntityRuntimeKey } from '@flighthq/entity/contract';
|
|
2
|
+
|
|
3
|
+
import { EnvReflectModifierKind } from './EnvReflectModifier.ts';
|
|
4
|
+
import type { EnvReflectModifier } from './EnvReflectModifier.ts';
|
|
5
|
+
import type { Modifier } from './Modifier.ts';
|
|
6
|
+
|
|
7
|
+
describe('EnvReflectModifier', () => {
|
|
8
|
+
describe('EnvReflectModifierKind', () => {
|
|
9
|
+
it('is the canonical PascalCase type name', () => {
|
|
10
|
+
expect(EnvReflectModifierKind).toBe('EnvReflectModifier');
|
|
11
|
+
});
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
describe('descriptor shape', () => {
|
|
15
|
+
it('is assignable to the open Modifier base with slot Effect', () => {
|
|
16
|
+
const chrome: EnvReflectModifier = {
|
|
17
|
+
[EntityRuntimeKey]: undefined,
|
|
18
|
+
kind: 'EnvReflectModifier',
|
|
19
|
+
slot: 'Effect',
|
|
20
|
+
tint: 0xffffffff,
|
|
21
|
+
intensity: 0.8,
|
|
22
|
+
fresnelBias: 0.04,
|
|
23
|
+
roughness: 0,
|
|
24
|
+
};
|
|
25
|
+
const base: Modifier = chrome;
|
|
26
|
+
expect(base.slot).toBe('Effect');
|
|
27
|
+
expect(chrome.intensity).toBe(0.8);
|
|
28
|
+
});
|
|
29
|
+
});
|
|
30
|
+
});
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { EntityRuntimeKey } from '@flighthq/entity/contract';
|
|
2
|
+
|
|
3
|
+
import { FogModifierKind, FogModifierMode } from './FogModifier.ts';
|
|
4
|
+
import type { FogModifier } from './FogModifier.ts';
|
|
5
|
+
import type { Modifier } from './Modifier.ts';
|
|
6
|
+
|
|
7
|
+
describe('FogModifier', () => {
|
|
8
|
+
describe('FogModifierKind', () => {
|
|
9
|
+
it('is the canonical PascalCase type name', () => {
|
|
10
|
+
expect(FogModifierKind).toBe('FogModifier');
|
|
11
|
+
});
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
describe('FogModifierMode', () => {
|
|
15
|
+
it('names the distance-to-density curves as canonical PascalCase values', () => {
|
|
16
|
+
expect(FogModifierMode.Linear).toBe('Linear');
|
|
17
|
+
expect(FogModifierMode.Exponential).toBe('Exponential');
|
|
18
|
+
expect(FogModifierMode.Exponential2).toBe('Exponential2');
|
|
19
|
+
});
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
describe('descriptor shape', () => {
|
|
23
|
+
it('is assignable to the open Modifier base with slot Effect', () => {
|
|
24
|
+
const haze: FogModifier = {
|
|
25
|
+
[EntityRuntimeKey]: undefined,
|
|
26
|
+
kind: 'FogModifier',
|
|
27
|
+
slot: 'Effect',
|
|
28
|
+
color: 0xaabbccff,
|
|
29
|
+
mode: FogModifierMode.Exponential2,
|
|
30
|
+
density: 0.02,
|
|
31
|
+
};
|
|
32
|
+
const base: Modifier = haze;
|
|
33
|
+
expect(base.slot).toBe('Effect');
|
|
34
|
+
expect(haze.mode).toBe('Exponential2');
|
|
35
|
+
});
|
|
36
|
+
});
|
|
37
|
+
});
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { EntityRuntimeKey } from '@flighthq/entity/contract';
|
|
2
|
+
|
|
3
|
+
import type { Modifier } from './Modifier.ts';
|
|
4
|
+
import { ModifierSlot } from './ModifierSlot.ts';
|
|
5
|
+
|
|
6
|
+
describe('Modifier', () => {
|
|
7
|
+
describe('open base contract', () => {
|
|
8
|
+
it('accepts a foreign custom modifier kind', () => {
|
|
9
|
+
interface AcmeModifier extends Modifier {
|
|
10
|
+
kind: 'acme.Dissolve';
|
|
11
|
+
threshold: number;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
const modifier: AcmeModifier = {
|
|
15
|
+
[EntityRuntimeKey]: undefined,
|
|
16
|
+
kind: 'acme.Dissolve',
|
|
17
|
+
slot: ModifierSlot.Effect,
|
|
18
|
+
threshold: 0.5,
|
|
19
|
+
};
|
|
20
|
+
const base: Modifier = modifier;
|
|
21
|
+
expect(base.kind).toBe('acme.Dissolve');
|
|
22
|
+
expect(base.slot).toBe('Effect');
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
it('narrows on the kind discriminant', () => {
|
|
26
|
+
interface RedModifier extends Modifier {
|
|
27
|
+
kind: 'RedModifier';
|
|
28
|
+
strength: number;
|
|
29
|
+
}
|
|
30
|
+
interface BlueModifier extends Modifier {
|
|
31
|
+
kind: 'BlueModifier';
|
|
32
|
+
amount: number;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
const mod: RedModifier | BlueModifier = {
|
|
36
|
+
[EntityRuntimeKey]: undefined,
|
|
37
|
+
kind: 'RedModifier',
|
|
38
|
+
slot: ModifierSlot.Diffuse,
|
|
39
|
+
strength: 2,
|
|
40
|
+
};
|
|
41
|
+
if (mod.kind === 'RedModifier') {
|
|
42
|
+
expectTypeOf(mod).toHaveProperty('strength');
|
|
43
|
+
}
|
|
44
|
+
expect(mod.kind).toBe('RedModifier');
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
it('accepts any string kind and slot', () => {
|
|
48
|
+
const modifier: Modifier = { [EntityRuntimeKey]: undefined, kind: 'SomeModifier', slot: 'SomeSlot' };
|
|
49
|
+
expect(modifier.kind).toBe('SomeModifier');
|
|
50
|
+
});
|
|
51
|
+
});
|
|
52
|
+
});
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ModifierSlot } from './ModifierSlot.ts';
|
|
2
|
+
|
|
3
|
+
describe('ModifierSlot', () => {
|
|
4
|
+
it('exposes the slot taxonomy as canonical PascalCase values', () => {
|
|
5
|
+
expect(ModifierSlot.Vertex).toBe('Vertex');
|
|
6
|
+
expect(ModifierSlot.Diffuse).toBe('Diffuse');
|
|
7
|
+
expect(ModifierSlot.Specular).toBe('Specular');
|
|
8
|
+
expect(ModifierSlot.Normal).toBe('Normal');
|
|
9
|
+
expect(ModifierSlot.Emissive).toBe('Emissive');
|
|
10
|
+
expect(ModifierSlot.Effect).toBe('Effect');
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
it('is open — a vendor-prefixed slot satisfies the type', () => {
|
|
14
|
+
const custom: ModifierSlot = 'acme.Displacement';
|
|
15
|
+
expect(custom).toBe('acme.Displacement');
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
it('does not reserve ambient/shadow as active members in v1', () => {
|
|
19
|
+
expect((ModifierSlot as Record<string, string>).Ambient).toBeUndefined();
|
|
20
|
+
expect((ModifierSlot as Record<string, string>).Shadow).toBeUndefined();
|
|
21
|
+
});
|
|
22
|
+
});
|