@carbonenginejs/runtime-resource 0.15.0 → 0.16.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/dist/resource/shader/reflection/Tr2EffectParameterAnnotation.js +2 -2
- package/dist/resource/shader/reflection/Tr2EffectParameterAnnotation.js.map +1 -1
- package/dist/resource/shader/reflection/Tr2EffectResource.js +2 -2
- package/dist/resource/shader/reflection/Tr2EffectResource.js.map +1 -1
- package/dist/resource/texture/Tr2TexturePipelineStepCompress.js +2 -2
- package/dist/resource/texture/Tr2TexturePipelineStepCompress.js.map +1 -1
- package/dist/resource/texture/Tr2TexturePipelineStepPack.js +2 -2
- package/dist/resource/texture/Tr2TexturePipelineStepPack.js.map +1 -1
- package/package.json +61 -61
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CjsSchema, type, impl
|
|
1
|
+
import { CjsSchema, type, impl } from '@carbonenginejs/runtime-utils/schema';
|
|
2
2
|
import { CjsModel } from '@carbonenginejs/runtime-utils/model';
|
|
3
3
|
import { dwordToFloat } from '@carbonenginejs/runtime-utils/math/num';
|
|
4
4
|
import { isPlainObject } from '@carbonenginejs/runtime-utils/is';
|
|
@@ -112,7 +112,7 @@ CjsSchema.define(Tr2EffectParameterAnnotation, {
|
|
|
112
112
|
family: "shader",
|
|
113
113
|
fields: {
|
|
114
114
|
name: type.string,
|
|
115
|
-
type: [type.int32,
|
|
115
|
+
type: [type.int32, type.enum("Type")],
|
|
116
116
|
boolValue: type.boolean,
|
|
117
117
|
rawValue: [impl.adapted, impl.reason("Carbon reads numeric annotations into typed values; the portable source contract retains the exact uint32 payload so NaN, negative zero, and integer bit patterns round-trip losslessly."), type.uint32],
|
|
118
118
|
intValue: type.int32,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tr2EffectParameterAnnotation.js","sources":["../../../../../src/resource/shader/reflection/Tr2EffectParameterAnnotation.js"],"sourcesContent":["// Source: trinity/trinity/Shader/Tr2EffectDescription.h\nimport { CjsSchema, impl,
|
|
1
|
+
{"version":3,"file":"Tr2EffectParameterAnnotation.js","sources":["../../../../../src/resource/shader/reflection/Tr2EffectParameterAnnotation.js"],"sourcesContent":["// Source: trinity/trinity/Shader/Tr2EffectDescription.h\nimport { CjsSchema, impl, type } from \"@carbonenginejs/runtime-utils/schema\";\nimport { CjsModel } from \"@carbonenginejs/runtime-utils/model\";\nimport { dwordToFloat } from \"@carbonenginejs/runtime-utils/math/num\";\nimport {\n isPlainObject\n} from \"@carbonenginejs/runtime-utils/is\";\nimport { recordRawValue, recordText, toRecordRawValue, toRecordText } from \"./carbonRecordFields.js\";\n\n/** Typed annotation attached to a reflected effect parameter. */\nexport class Tr2EffectParameterAnnotation extends CjsModel\n{\n\n /** name (const char*) */\n name = \"\";\n\n /** type (Type - enum Type) */\n type = 0;\n\n /** boolValue (bool) */\n boolValue = false;\n\n /** Exact serialized BOOL, INT, or FLOAT payload bits. */\n rawValue = 0;\n\n /** intValue (int) */\n intValue = 0;\n\n /** floatValue (float) */\n floatValue = 0;\n\n /** stringValue (const char*) */\n stringValue = \"\";\n\n /**\n * Build one typed annotation from its Carbon v15 description record.\n *\n * The type byte decides which member is meaningful, and every non-string type\n * arrives as four untyped bytes rather than a number — Carbon writes the value\n * through one member of a `{float,int32_t}` union and reads it back through\n * another, so the bit pattern is the only faithful carrier. `rawValue` keeps\n * those bits and the typed accessor is derived from them, never the reverse.\n *\n * @param {object} record Carbon annotation record.\n * @returns {Tr2EffectParameterAnnotation} Reflected annotation.\n */\n static fromCarbonBinary(record)\n {\n if (!isPlainObject(record))\n {\n throw new TypeError(\"Carbon effect annotation record must be an object\");\n }\n\n const annotation = new this();\n annotation.name = recordText(record.name);\n annotation.type = record.type;\n\n switch (annotation.type)\n {\n case this.Type.BOOL:\n annotation.rawValue = recordRawValue(record.rawValue);\n annotation.boolValue = annotation.rawValue !== 0;\n break;\n\n case this.Type.INT:\n annotation.rawValue = recordRawValue(record.rawValue);\n annotation.intValue = annotation.rawValue | 0;\n break;\n\n case this.Type.FLOAT:\n annotation.rawValue = recordRawValue(record.rawValue);\n annotation.floatValue = dwordToFloat(annotation.rawValue);\n break;\n\n case this.Type.STRING:\n annotation.stringValue = recordText(record.stringValue);\n break;\n\n default:\n throw new Error(\n `Carbon effect annotation type ${annotation.type} is unsupported`\n );\n }\n\n return annotation;\n }\n\n /**\n * Emit this annotation as a Carbon v15 record.\n *\n * The type byte decides which branch the writer takes, and every non-string\n * type travels as the raw bits rather than the typed member.\n *\n * @returns {object} Carbon annotation record.\n */\n toCarbonBinary()\n {\n if (this.type === Tr2EffectParameterAnnotation.Type.STRING)\n {\n return {\n name: toRecordText(this.name),\n type: this.type,\n stringValue: toRecordText(this.stringValue),\n rawValue: null\n };\n }\n return {\n name: toRecordText(this.name),\n type: this.type,\n stringValue: null,\n rawValue: toRecordRawValue(this.rawValue)\n };\n }\n\n static Type = Object.freeze({\n BOOL: 0,\n INT: 1,\n FLOAT: 2,\n STRING: 3\n });\n\n}\n\n// Declared imperatively rather than with decorators, so this module stays\n// plain ESM that loads from source without a transform. The decorator\n// expressions are reused verbatim, so the registered metadata is identical.\n// Statics belong in `methods`: decorateMethod targets the prototype and\n// would register a static as an instance field.\nCjsSchema.define(Tr2EffectParameterAnnotation, {\n className: \"Tr2EffectParameterAnnotation\",\n family: \"shader\",\n fields: {\n name: type.string,\n type: [ type.int32, type.enum(\"Type\") ],\n boolValue: type.boolean,\n rawValue: [ impl.adapted, impl.reason(\"Carbon reads numeric annotations into typed values; the portable source contract retains the exact uint32 payload so NaN, negative zero, and integer bit patterns round-trip losslessly.\"), type.uint32 ],\n intValue: type.int32,\n floatValue: type.float32,\n stringValue: type.string\n }\n});\n"],"names":["Tr2EffectParameterAnnotation","CjsModel","name","type","boolValue","rawValue","intValue","floatValue","stringValue","fromCarbonBinary","record","isPlainObject","TypeError","annotation","recordText","Type","BOOL","recordRawValue","INT","FLOAT","dwordToFloat","STRING","Error","toCarbonBinary","toRecordText","toRecordRawValue","Object","freeze","CjsSchema","define","className","family","fields","string","int32","enum","boolean","impl","adapted","reason","uint32","float32"],"mappings":";;;;;;AAAA;;AASA;AACO,MAAMA,4BAA4B,SAASC,QAAQ,CAC1D;AAEE;AACAC,EAAAA,IAAI,GAAG,EAAE;;AAET;AACAC,EAAAA,IAAI,GAAG,CAAC;;AAER;AACAC,EAAAA,SAAS,GAAG,KAAK;;AAEjB;AACAC,EAAAA,QAAQ,GAAG,CAAC;;AAEZ;AACAC,EAAAA,QAAQ,GAAG,CAAC;;AAEZ;AACAC,EAAAA,UAAU,GAAG,CAAC;;AAEd;AACAC,EAAAA,WAAW,GAAG,EAAE;;AAEhB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACE,OAAOC,gBAAgBA,CAACC,MAAM,EAC9B;AACE,IAAA,IAAI,CAACC,aAAa,CAACD,MAAM,CAAC,EAC1B;AACE,MAAA,MAAM,IAAIE,SAAS,CAAC,mDAAmD,CAAC;AAC1E,IAAA;AAEA,IAAA,MAAMC,UAAU,GAAG,IAAI,IAAI,EAAE;IAC7BA,UAAU,CAACX,IAAI,GAAGY,UAAU,CAACJ,MAAM,CAACR,IAAI,CAAC;AACzCW,IAAAA,UAAU,CAACV,IAAI,GAAGO,MAAM,CAACP,IAAI;IAE7B,QAAQU,UAAU,CAACV,IAAI;AAErB,MAAA,KAAK,IAAI,CAACY,IAAI,CAACC,IAAI;QACjBH,UAAU,CAACR,QAAQ,GAAGY,cAAc,CAACP,MAAM,CAACL,QAAQ,CAAC;AACrDQ,QAAAA,UAAU,CAACT,SAAS,GAAGS,UAAU,CAACR,QAAQ,KAAK,CAAC;AAChD,QAAA;AAEF,MAAA,KAAK,IAAI,CAACU,IAAI,CAACG,GAAG;QAChBL,UAAU,CAACR,QAAQ,GAAGY,cAAc,CAACP,MAAM,CAACL,QAAQ,CAAC;AACrDQ,QAAAA,UAAU,CAACP,QAAQ,GAAGO,UAAU,CAACR,QAAQ,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AE,CAAC;AACRE,IAAAA,MAAM,EAAE;AACV,GAAC,CAAC;AAEJ;;AAEA;AACA;AACA;AACA;AACA;AACAO,SAAS,CAACC,MAAM,CAAC7B,4BAA4B,EAAE;AAC7C8B,EAAAA,SAAS,EAAE,8BAA8B;AACzCC,EAAAA,MAAM,EAAE,QAAQ;AAChBC,EAAAA,MAAM,EAAE;IACN9B,IAAI,EAAEC,IAAI,CAAC8B,MAAM;AACjB9B,IAAAA,IAAI,EAAE,CAAEA,IAAI,CAAC+B,KAAK,EAAE/B,IAAI,CAACgC,IAAI,CAAC,MAAM,CAAC,CAAE;IACvC/B,SAAS,EAAED,IAAI,CAACiC,OAAO;AACvB/B,IAAAA,QAAQ,EAAE,CAAEgC,IAAI,CAACC,OAAO,EAAED,IAAI,CAACE,MAAM,CAAC,0LAA0L,CAAC,EAAEpC,IAAI,CAACqC,MAAM,CAAE;IAChPlC,QAAQ,EAAEH,IAAI,CAAC+B,KAAK;IACpB3B,UAAU,EAAEJ,IAAI,CAACsC,OAAO;IACxBjC,WAAW,EAAEL,IAAI,CAAC8B;AACpB;AACF,CAAC,CAAC;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CjsSchema, type
|
|
1
|
+
import { CjsSchema, type } from '@carbonenginejs/runtime-utils/schema';
|
|
2
2
|
import { CjsModel } from '@carbonenginejs/runtime-utils/model';
|
|
3
3
|
import { isPlainObject } from '@carbonenginejs/runtime-utils/is';
|
|
4
4
|
import { recordText, toRecordText } from './carbonRecordFields.js';
|
|
@@ -111,7 +111,7 @@ CjsSchema.define(Tr2EffectResource, {
|
|
|
111
111
|
isSRGB: type.boolean,
|
|
112
112
|
isAutoregister: type.boolean,
|
|
113
113
|
name: type.string,
|
|
114
|
-
type: [type.int32,
|
|
114
|
+
type: [type.int32, type.enum("Type")],
|
|
115
115
|
arrayElements: type.uint32
|
|
116
116
|
}
|
|
117
117
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tr2EffectResource.js","sources":["../../../../../src/resource/shader/reflection/Tr2EffectResource.js"],"sourcesContent":["// Source: trinity/trinity/Shader/Tr2EffectDescription.h\nimport { CjsSchema, impl,
|
|
1
|
+
{"version":3,"file":"Tr2EffectResource.js","sources":["../../../../../src/resource/shader/reflection/Tr2EffectResource.js"],"sourcesContent":["// Source: trinity/trinity/Shader/Tr2EffectDescription.h\nimport { CjsSchema, impl, type } from \"@carbonenginejs/runtime-utils/schema\";\nimport { CjsModel } from \"@carbonenginejs/runtime-utils/model\";\nimport {\n isPlainObject\n} from \"@carbonenginejs/runtime-utils/is\";\nimport { recordText, toRecordText } from \"./carbonRecordFields.js\";\n\n/** Reflected SRV or UAV resource metadata. */\nexport class Tr2EffectResource extends CjsModel\n{\n\n /** isSRGB (bool) */\n isSRGB = false;\n\n /** isAutoregister (bool) */\n isAutoregister = false;\n\n /** name (const char*) */\n name = \"\";\n\n /** type (Type - enum Type) */\n type = 0;\n\n /** arrayElements (uint32_t) */\n arrayElements = 0;\n\n /**\n * Build one SRV or UAV from its Carbon v15 description record.\n *\n * Both a texture record and a UAV record land here, and they are not the same\n * shape: a UAV record carries no `isSRGB` at all. Carbon's reader hardcodes\n * `isSRGB = false` for UAVs rather than reading a byte, and `Uav::Save` omits\n * it, so the field being absent is correct rather than missing — reading\n * `undefined` through `!!` reproduces Carbon exactly. The array size is spelled\n * `count` in the record and `arrayElements` on the class.\n *\n * @param {object} record Carbon texture or UAV record.\n * @returns {Tr2EffectResource} Reflected resource.\n */\n static fromCarbonBinary(record)\n {\n if (!isPlainObject(record))\n {\n throw new TypeError(\"Carbon effect resource record must be an object\");\n }\n\n const resource = new this();\n resource.name = recordText(record.name);\n resource.type = record.type;\n resource.arrayElements = record.count;\n resource.isSRGB = !!record.isSRGB;\n resource.isAutoregister = !!record.isAutoregister;\n return resource;\n }\n\n /**\n * Emit this resource as a Carbon v15 texture or UAV record.\n *\n * A UAV record is one byte shorter: it carries no `isSRGB`, because Carbon's\n * reader hardcodes it false and `Uav::Save` omits it. Emitting the field\n * anyway would desynchronise every following field in the stage.\n *\n * @param {number} registerIndex Register this resource is bound at.\n * @param {boolean} [uav] Whether to emit the UAV shape.\n * @returns {object} Carbon texture or UAV record.\n */\n toCarbonBinary(registerIndex, uav = false)\n {\n const record = {\n registerIndex,\n name: toRecordText(this.name),\n type: this.type,\n count: this.arrayElements,\n isAutoregister: this.isAutoregister ? 1 : 0\n };\n if (uav)\n {\n return record;\n }\n return {\n registerIndex,\n name: record.name,\n type: record.type,\n count: record.count,\n isSRGB: this.isSRGB ? 1 : 0,\n isAutoregister: record.isAutoregister\n };\n }\n\n static BINDLESS_SAMPLER = 100;\n\n static Type = Object.freeze({\n TEXTURE_1D: 1,\n TEXTURE_2D: 2,\n TEXTURE_3D: 3,\n TEXTURE_CUBE: 4,\n TEXTURE_TYPELESS: 5,\n BUFFER: 6,\n STRUCTURED_BUFFER: 7,\n TBUFFER: 8,\n BYTEADDRESS_BUFFER: 9,\n UAV_RWTYPED: 10,\n UAV_RWSTRUCTURED: 11,\n UAV_RWBYTEADDRESS: 12,\n UAV_APPEND_STRUCTURED: 13,\n UAV_CONSUME_STRUCTURED: 14,\n UAV_RWSTRUCTURED_WITH_COUNTER: 15\n });\n\n}\n\n// Declared imperatively rather than with decorators, so this module stays\n// plain ESM that loads from source without a transform. The decorator\n// expressions are reused verbatim, so the registered metadata is identical.\n// Statics belong in `methods`: decorateMethod targets the prototype and\n// would register a static as an instance field.\nCjsSchema.define(Tr2EffectResource, {\n className: \"Tr2EffectResource\",\n family: \"shader\",\n fields: {\n isSRGB: type.boolean,\n isAutoregister: type.boolean,\n name: type.string,\n type: [ type.int32, type.enum(\"Type\") ],\n arrayElements: type.uint32\n }\n});\n"],"names":["Tr2EffectResource","CjsModel","isSRGB","isAutoregister","name","type","arrayElements","fromCarbonBinary","record","isPlainObject","TypeError","resource","recordText","count","toCarbonBinary","registerIndex","uav","toRecordText","BINDLESS_SAMPLER","Type","Object","freeze","TEXTURE_1D","TEXTURE_2D","TEXTURE_3D","TEXTURE_CUBE","TEXTURE_TYPELESS","BUFFER","STRUCTURED_BUFFER","TBUFFER","BYTEADDRESS_BUFFER","UAV_RWTYPED","UAV_RWSTRUCTURED","UAV_RWBYTEADDRESS","UAV_APPEND_STRUCTURED","UAV_CONSUME_STRUCTURED","UAV_RWSTRUCTURED_WITH_COUNTER","CjsSchema","define","className","family","fields","boolean","string","int32","enum","uint32"],"mappings":";;;;;AAAA;;AAQA;AACO,MAAMA,iBAAiB,SAASC,QAAQ,CAC/C;AAEE;AACAC,EAAAA,MAAM,GAAG,KAAK;;AAEd;AACAC,EAAAA,cAAc,GAAG,KAAK;;AAEtB;AACAC,EAAAA,IAAI,GAAG,EAAE;;AAET;AACAC,EAAAA,IAAI,GAAG,CAAC;;AAER;AACAC,EAAAA,aAAa,GAAG,CAAC;;AAEjB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACE,OAAOC,gBAAgBA,CAACC,MAAM,EAC9B;AACE,IAAA,IAAI,CAACC,aAAa,CAACD,MAAM,CAAC,EAC1B;AACE,MAAA,MAAM,IAAIE,SAAS,CAAC,iDAAiD,CAAC;AACxE,IAAA;AAEA,IAAA,MAAMC,QAAQ,GAAG,IAAI,IAAI,EAAE;IAC3BA,QAAQ,CAACP,IAAI,GAAGQ,UAAU,CAACJ,MAAM,CAACJ,IAAI,CAAC;AACvCO,IAAAA,QAAQ,CAACN,IAAI,GAAGG,MAAM,CAACH,IAAI;AAC3BM,IAAAA,QAAQ,CAACL,aAAa,GAAGE,MAAM,CAACK,KAAK;AACrCF,IAAAA,QAAQ,CAACT,MAAM,GAAG,CAAC,CAACM,MAAM,CAACN,MAAM;AACjCS,IAAAA,QAAQ,CAACR,cAAc,GAAG,CAAC,CAACK,MAAM,CAACL,cAAc;AACjD,IAAA,OAAOQ,QAAQ;AACjB,EAAA;;AAEA;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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C,CAAC;AAEJ;;AAEA;AACA;AACA;AACA;AACA;AACAC,SAAS,CAACC,MAAM,CAACtC,iBAAiB,EAAE;AAClCuC,EAAAA,SAAS,EAAE,mBAAmB;AAC9BC,EAAAA,MAAM,EAAE,QAAQ;AAChBC,EAAAA,MAAM,EAAE;IACNvC,MAAM,EAAEG,IAAI,CAACqC,OAAO;IACpBvC,cAAc,EAAEE,IAAI,CAACqC,OAAO;IAC5BtC,IAAI,EAAEC,IAAI,CAACsC,MAAM;AACjBtC,IAAAA,IAAI,EAAE,CAAEA,IAAI,CAACuC,KAAK,EAAEvC,IAAI,CAACwC,IAAI,CAAC,MAAM,CAAC,CAAE;IACvCvC,aAAa,EAAED,IAAI,CAACyC;AACtB;AACF,CAAC,CAAC;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { applyDecs2311 as _applyDecs2311 } from '../../_virtual/_rollupPluginBabelHelpers.js';
|
|
2
|
-
import { io, type
|
|
2
|
+
import { io, type } from '@carbonenginejs/runtime-utils/schema';
|
|
3
3
|
import { CjsModel } from '@carbonenginejs/runtime-utils/model';
|
|
4
4
|
|
|
5
5
|
let _initClass, _init_format, _init_extra_format, _init_b, _init_extra_b, _init_g, _init_extra_g, _init_r, _init_extra_r;
|
|
@@ -14,7 +14,7 @@ class Tr2TexturePipelineStepCompress extends CjsModel {
|
|
|
14
14
|
} = _applyDecs2311(this, [type.define({
|
|
15
15
|
className: "Tr2TexturePipelineStepCompress",
|
|
16
16
|
family: "resources"
|
|
17
|
-
})], [[[io, io.persist, type, type.int32, void 0,
|
|
17
|
+
})], [[[io, io.persist, type, type.int32, void 0, type.enum("PixelFormat")], 16, "format"], [[io, io.persist, type, type.float32], 16, "b"], [[io, io.persist, type, type.float32], 16, "g"], [[io, io.persist, type, type.float32], 16, "r"]], 0, void 0, CjsModel));
|
|
18
18
|
}
|
|
19
19
|
constructor(...args) {
|
|
20
20
|
super(...args);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tr2TexturePipelineStepCompress.js","sources":["../../../../src/resource/texture/Tr2TexturePipelineStepCompress.js"],"sourcesContent":["// Source: trinity/trinity/Resources/TexturePipeline/Tr2TexturePipelineStepCompress.h\r\n// Schema: format-carbon resources/Tr2TexturePipelineStepCompress.json; maintained by runtime-resource.\r\nimport { io,
|
|
1
|
+
{"version":3,"file":"Tr2TexturePipelineStepCompress.js","sources":["../../../../src/resource/texture/Tr2TexturePipelineStepCompress.js"],"sourcesContent":["// Source: trinity/trinity/Resources/TexturePipeline/Tr2TexturePipelineStepCompress.h\r\n// Schema: format-carbon resources/Tr2TexturePipelineStepCompress.json; maintained by runtime-resource.\r\nimport { io, type } from \"@carbonenginejs/runtime-utils/schema\";\r\nimport { CjsModel } from \"@carbonenginejs/runtime-utils/model\";\r\n\r\n/** Tr2TexturePipelineStepCompress (resources) - maintained from schema shapeHash 4d367f1c.... */\r\n@type.define({ className: \"Tr2TexturePipelineStepCompress\", family: \"resources\" })\r\nexport class Tr2TexturePipelineStepCompress extends CjsModel\r\n{\r\n\r\n /** m_format (Tr2RenderContextEnum::PixelFormat - enum PixelFormat) [READWRITE, PERSIST, ENUM] */\r\n @io.persist\r\n @type.int32\r\n @type.enum(\"PixelFormat\")\r\n format = 71;\r\n\r\n /** m_bWeight (float) [READWRITE, PERSIST] */\r\n @io.persist\r\n @type.float32\r\n b = 1;\r\n\r\n /** m_gWeight (float) [READWRITE, PERSIST] */\r\n @io.persist\r\n @type.float32\r\n g = 1;\r\n\r\n /** m_rWeight (float) [READWRITE, PERSIST] */\r\n @io.persist\r\n @type.float32\r\n r = 1;\r\n\r\n}\r\n"],"names":["_Tr2TexturePipelineSt","Tr2TexturePipelineStepCompress","CjsModel","e","_init_format","_init_extra_format","_init_b","_init_extra_b","_init_g","_init_extra_g","_init_r","_init_extra_r","c","_initClass","_applyDecs","type","define","className","family","io","persist","int32","enum","float32","constructor","args","format","b","g","r"],"mappings":";;;;;;AAKA;AAAA,IAAAA;AACA,MAA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AAAA,CAAC,IAAAtB,kBAAA,CAAA,IAAA,CAAA,EAAAC,OAAA,OAAG,CAAC,CAAA;;AAEL;AAGAsB,EAAAA,CAAC,IAAArB,aAAA,CAAA,IAAA,CAAA,EAAAC,OAAA,OAAG,CAAC,CAAA;;AAEL;AAGAqB,EAAAA,CAAC,IAAApB,aAAA,CAAA,IAAA,CAAA,EAAAC,OAAA,OAAG,CAAC,CAAA;AAAC,EAAA;IAAAG,UAAA,EAAA;AAAA;AAER;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { applyDecs2311 as _applyDecs2311 } from '../../_virtual/_rollupPluginBabelHelpers.js';
|
|
2
|
-
import { io, type
|
|
2
|
+
import { io, type } from '@carbonenginejs/runtime-utils/schema';
|
|
3
3
|
import { CjsModel } from '@carbonenginejs/runtime-utils/model';
|
|
4
4
|
|
|
5
5
|
let _initClass, _init_format, _init_extra_format, _init_a, _init_extra_a, _init_b, _init_extra_b, _init_g, _init_extra_g, _init_r, _init_extra_r;
|
|
@@ -14,7 +14,7 @@ class Tr2TexturePipelineStepPack extends CjsModel {
|
|
|
14
14
|
} = _applyDecs2311(this, [type.define({
|
|
15
15
|
className: "Tr2TexturePipelineStepPack",
|
|
16
16
|
family: "resources"
|
|
17
|
-
})], [[[io, io.persist, type, type.int32, void 0,
|
|
17
|
+
})], [[[io, io.persist, type, type.int32, void 0, type.enum("PixelFormat")], 16, "format"], [[io, io.persist, void 0, type.objectRef("Tr2TexturePackChannel")], 16, "a"], [[io, io.persist, void 0, type.objectRef("Tr2TexturePackChannel")], 16, "b"], [[io, io.persist, void 0, type.objectRef("Tr2TexturePackChannel")], 16, "g"], [[io, io.persist, void 0, type.objectRef("Tr2TexturePackChannel")], 16, "r"]], 0, void 0, CjsModel));
|
|
18
18
|
}
|
|
19
19
|
constructor(...args) {
|
|
20
20
|
super(...args);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tr2TexturePipelineStepPack.js","sources":["../../../../src/resource/texture/Tr2TexturePipelineStepPack.js"],"sourcesContent":["// Source: trinity/trinity/Resources/TexturePipeline/Tr2TexturePipelineStepPack.h\r\n// Schema: format-carbon resources/Tr2TexturePipelineStepPack.json; maintained by runtime-resource.\r\nimport { io,
|
|
1
|
+
{"version":3,"file":"Tr2TexturePipelineStepPack.js","sources":["../../../../src/resource/texture/Tr2TexturePipelineStepPack.js"],"sourcesContent":["// Source: trinity/trinity/Resources/TexturePipeline/Tr2TexturePipelineStepPack.h\r\n// Schema: format-carbon resources/Tr2TexturePipelineStepPack.json; maintained by runtime-resource.\r\nimport { io, type } from \"@carbonenginejs/runtime-utils/schema\";\r\nimport { CjsModel } from \"@carbonenginejs/runtime-utils/model\";\r\n\r\n/** Tr2TexturePipelineStepPack (resources) - maintained from schema shapeHash 3efe48d4.... */\r\n@type.define({ className: \"Tr2TexturePipelineStepPack\", family: \"resources\" })\r\nexport class Tr2TexturePipelineStepPack extends CjsModel\r\n{\r\n\r\n /** m_format (Tr2RenderContextEnum::PixelFormat - enum PixelFormat) [READWRITE, PERSIST, ENUM] */\r\n @io.persist\r\n @type.int32\r\n @type.enum(\"PixelFormat\")\r\n format = 87;\r\n\r\n /** m_a (PTr2TexturePackChannel) [READ, PERSIST] */\r\n @io.persist\r\n @type.objectRef(\"Tr2TexturePackChannel\")\r\n a = null;\r\n\r\n /** m_b (PTr2TexturePackChannel) [READ, PERSIST] */\r\n @io.persist\r\n @type.objectRef(\"Tr2TexturePackChannel\")\r\n b = null;\r\n\r\n /** m_g (PTr2TexturePackChannel) [READ, PERSIST] */\r\n @io.persist\r\n @type.objectRef(\"Tr2TexturePackChannel\")\r\n g = null;\r\n\r\n /** m_r (PTr2TexturePackChannel) [READ, PERSIST] */\r\n @io.persist\r\n @type.objectRef(\"Tr2TexturePackChannel\")\r\n r = null;\r\n\r\n}\r\n"],"names":["_Tr2TexturePipelineSt","Tr2TexturePipelineStepPack","CjsModel","e","_init_format","_init_extra_format","_init_a","_init_extra_a","_init_b","_init_extra_b","_init_g","_init_extra_g","_init_r","_init_extra_r","c","_initClass","_applyDecs","type","define","className","family","io","persist","int32","enum","objectRef","constructor","args","format","a","b","g","r"],"mappings":";;;;;;AAKA;AAAA,IAAAA;AACA,MAAAC,0BAAA,SACgDC,QAAQ,CACxD;AAAA,EAAA;AAAA,IAAA,CAAA;AAAAC,MAAAA,CAAA,GAAAC,YAAA,EAAAC,kBAAA,EAAAC,OAAA,EAAAC,aAAA,EAAAC,OAAA,EAAAC,aAAA,EAAAC,OAAA,EAAAC,aAAA,EAAAC,OAAA,EAAAC,aAAA,CAAA;MAAAC,CAAA,EAAA,CAAAd,qBAAA,EAAAe,UAAA;AAAA,KAAA,GAAAC,cAAA,CAAA,IAAA,EAAA,CAFCC,IAAI,CAACC,MAAM,CAAC;AAAEC,MAAAA,SAAS,EAAE,4BAA4B;AAAEC,MAAAA,MAAM,EAAE;AAAY,KAAC,CAAC,CAAA,EAAA,CAAA,CAAA,CAK3EC,EAAE,EAAFA,EAAE,CAACC,OAAO,EACVL,IAAI,EAAJA,IAAI,CAACM,KAAK,EAAA,MAAA,EACVN,IAAI,CAACO,IAAI,CAAC,aAAa,CAAC,CAAA,EAAA,EAAA,EAAA,QAAA,CAAA,EAAA,CAAA,CAIxBH,EAAE,EAAFA,EAAE,CAACC,OAAO,EAAA,MAAA,EACVL,IAAI,CAACQ,SAAS,CAAC,uBAAuB,CAAC,eAIvCJ,EAAE,EAAFA,EAAE,CAACC,OAAO,EAAA,MAAA,EACVL,IAAI,CAACQ,SAAS,CAAC,uBAAuB,CAAC,CAAA,EAAA,EAAA,EAAA,GAAA,CAAA,EAAA,CAAA,CAIvCJ,EAAE,EAAFA,EAAE,CAACC,OAAO,UACVL,IAAI,CAACQ,SAAS,CAAC,uBAAuB,CAAC,CAAA,EAAA,EAAA,EAAA,GAAA,CAAA,EAAA,CAAA,CAIvCJ,EAAE,EAAFA,EAAE,CAACC,OAAO,EAAA,MAAA,EACVL,IAAI,CAACQ,SAAS,C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44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
2
|
+
"name": "@carbonenginejs/runtime-resource",
|
|
3
|
+
"version": "0.16.0",
|
|
4
|
+
"description": "CarbonEngineJS resource lifecycle, cache, source, and object loading contracts.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"exports": {
|
|
7
|
+
".": "./dist/index.js",
|
|
8
|
+
"./resource": "./dist/resource/index.js",
|
|
9
|
+
"./resource/audio": "./dist/resource/audio/index.js",
|
|
10
|
+
"./resource/geometry": "./dist/resource/geometry/index.js",
|
|
11
|
+
"./resource/geometry/granny": "./dist/resource/geometry/granny/index.js",
|
|
12
|
+
"./resource/shader": "./dist/resource/shader/index.js",
|
|
13
|
+
"./resource/texture": "./dist/resource/texture/index.js",
|
|
14
|
+
"./worker": "./dist/worker/CjsResManWorker.js",
|
|
15
|
+
"./format": "./dist/format/index.js",
|
|
16
|
+
"./formats": "./dist/formats/index.js",
|
|
17
|
+
"./formats/black": "./dist/formats/black/index.js",
|
|
18
|
+
"./formats/black/schema": "./dist/formats/black/core/blackSchema.js",
|
|
19
|
+
"./formats/black/enums": "./dist/formats/black/core/blackEnums.js",
|
|
20
|
+
"./formats/black/version": "./dist/formats/black/core/blackVersion.js",
|
|
21
|
+
"./formats/bnk": "./dist/formats/bnk/index.js",
|
|
22
|
+
"./formats/cmf": "./dist/formats/cmf/index.js",
|
|
23
|
+
"./formats/dds": "./dist/formats/dds/index.js",
|
|
24
|
+
"./formats/dxbc": "./dist/formats/dxbc/index.js",
|
|
25
|
+
"./formats/hlsl": "./dist/formats/hlsl/index.js",
|
|
26
|
+
"./formats/webgl": "./dist/formats/webgl/index.js",
|
|
27
|
+
"./formats/webgpu": "./dist/formats/webgpu/index.js",
|
|
28
|
+
"./formats/fbx": "./dist/formats/fbx/index.js",
|
|
29
|
+
"./formats/flac": "./dist/formats/flac/index.js",
|
|
30
|
+
"./formats/gif": "./dist/formats/gif/index.js",
|
|
31
|
+
"./formats/gltf": "./dist/formats/gltf/index.js",
|
|
32
|
+
"./formats/gr2": "./dist/formats/gr2/index.js",
|
|
33
|
+
"./formats/jpeg": "./dist/formats/jpeg/index.js",
|
|
34
|
+
"./formats/mp3": "./dist/formats/mp3/index.js",
|
|
35
|
+
"./formats/mp4": "./dist/formats/mp4/index.js",
|
|
36
|
+
"./formats/obj": "./dist/formats/obj/index.js",
|
|
37
|
+
"./formats/ogg": "./dist/formats/ogg/index.js",
|
|
38
|
+
"./formats/pickle": "./dist/formats/pickle/index.js",
|
|
39
|
+
"./formats/png": "./dist/formats/png/index.js",
|
|
40
|
+
"./formats/red": "./dist/formats/red/index.js",
|
|
41
|
+
"./formats/red/schema": "./dist/formats/red/core/blackDefinitions.js",
|
|
42
|
+
"./formats/stl": "./dist/formats/stl/index.js",
|
|
43
|
+
"./formats/tga": "./dist/formats/tga/index.js",
|
|
44
|
+
"./formats/wav": "./dist/formats/wav/index.js",
|
|
45
|
+
"./formats/webm": "./dist/formats/webm/index.js",
|
|
46
|
+
"./formats/webp": "./dist/formats/webp/index.js",
|
|
47
|
+
"./formats/wem": "./dist/formats/wem/index.js",
|
|
48
|
+
"./formats/yaml": "./dist/formats/yaml/index.js"
|
|
49
|
+
},
|
|
50
|
+
"sideEffects": false,
|
|
51
|
+
"engines": {
|
|
52
|
+
"node": ">=18"
|
|
53
|
+
},
|
|
54
|
+
"dependencies": {
|
|
55
|
+
"@carbonenginejs/runtime-utils": "^0.1.5",
|
|
56
|
+
"meshoptimizer": "^1.2.0",
|
|
57
|
+
"yaml": "^2.4.0"
|
|
58
|
+
},
|
|
59
|
+
"license": "MIT",
|
|
60
|
+
"publishConfig": {
|
|
61
|
+
"access": "public"
|
|
62
|
+
}
|
|
63
63
|
}
|