Fix compiler errors in particle-2d module and optimize TIFFReader usage.#18230
Fix compiler errors in particle-2d module and optimize TIFFReader usage.#18230minggo merged 6 commits intococos:v3.8.6from
Conversation
👍 Package size ⤵ -964 bytes, old: 5230226, new: 5229262Interface Check Report! WARNING this pull request has changed these public interfaces:
@@ -46213,9 +46213,9 @@
_initTextureWithDictionary(dict: any): boolean;
/**
* @deprecated since v3.5.0, this is an engine private interface that will be removed in the future.
*/
- _initWithDictionary(dict: any): boolean;
+ _initWithDictionary(dict: Record<string, number>): boolean;
/**
* @deprecated since v3.5.0, this is an engine private interface that will be removed in the future.
*/
_syncAspect(): void;
@@ -59863,8 +59863,120 @@
node: ____private._cocos_animation_marionette_pose_graph_pose_node__PoseNode,
graph: _PoseGraph,
...root: _editor_src_marionette_visit_visit_pose_node__PoseNodeLocationRoot
];
+ export const _cocos_particle_2d_tiff_reader__fieldTypeNames: {
+ readonly 1: "BYTE";
+ readonly 2: "ASCII";
+ readonly 3: "SHORT";
+ readonly 4: "LONG";
+ readonly 5: "RATIONAL";
+ readonly 6: "SBYTE";
+ readonly 7: "UNDEFINED";
+ readonly 8: "SSHORT";
+ readonly 9: "SLONG";
+ readonly 10: "SRATIONAL";
+ readonly 11: "FLOAT";
+ readonly 12: "DOUBLE";
+ };
+ export type _cocos_particle_2d_tiff_reader__FieldTypeNamesKey = keyof typeof _cocos_particle_2d_tiff_reader__fieldTypeNames;
+ export type _cocos_particle_2d_tiff_reader__FieldTypeNamesValue = (typeof _cocos_particle_2d_tiff_reader__fieldTypeNames)[_cocos_particle_2d_tiff_reader__FieldTypeNamesKey];
+ export const _cocos_particle_2d_tiff_reader__fieldTagNames: {
+ readonly 315: "Artist";
+ readonly 258: "BitsPerSample";
+ readonly 265: "CellLength";
+ readonly 264: "CellWidth";
+ readonly 320: "ColorMap";
+ readonly 259: "Compression";
+ readonly 33432: "Copyright";
+ readonly 306: "DateTime";
+ readonly 338: "ExtraSamples";
+ readonly 266: "FillOrder";
+ readonly 289: "FreeByteCounts";
+ readonly 288: "FreeOffsets";
+ readonly 291: "GrayResponseCurve";
+ readonly 290: "GrayResponseUnit";
+ readonly 316: "HostComputer";
+ readonly 270: "ImageDescription";
+ readonly 257: "ImageLength";
+ readonly 256: "ImageWidth";
+ readonly 271: "Make";
+ readonly 281: "MaxSampleValue";
+ readonly 280: "MinSampleValue";
+ readonly 272: "Model";
+ readonly 254: "NewSubfileType";
+ readonly 274: "Orientation";
+ readonly 262: "PhotometricInterpretation";
+ readonly 284: "PlanarConfiguration";
+ readonly 296: "ResolutionUnit";
+ readonly 278: "RowsPerStrip";
+ readonly 277: "SamplesPerPixel";
+ readonly 305: "Software";
+ readonly 279: "StripByteCounts";
+ readonly 273: "StripOffsets";
+ readonly 255: "SubfileType";
+ readonly 263: "Threshholding";
+ readonly 282: "XResolution";
+ readonly 283: "YResolution";
+ readonly 326: "BadFaxLines";
+ readonly 327: "CleanFaxData";
+ readonly 343: "ClipPath";
+ readonly 328: "ConsecutiveBadFaxLines";
+ readonly 433: "Decode";
+ readonly 434: "DefaultImageColor";
+ readonly 269: "DocumentName";
+ readonly 336: "DotRange";
+ readonly 321: "HalftoneHints";
+ readonly 346: "Indexed";
+ readonly 347: "JPEGTables";
+ readonly 285: "PageName";
+ readonly 297: "PageNumber";
+ readonly 317: "Predictor";
+ readonly 319: "PrimaryChromaticities";
+ readonly 532: "ReferenceBlackWhite";
+ readonly 339: "SampleFormat";
+ readonly 559: "StripRowCounts";
+ readonly 330: "SubIFDs";
+ readonly 292: "T4Options";
+ readonly 293: "T6Options";
+ readonly 325: "TileByteCounts";
+ readonly 323: "TileLength";
+ readonly 324: "TileOffsets";
+ readonly 322: "TileWidth";
+ readonly 301: "TransferFunction";
+ readonly 318: "WhitePoint";
+ readonly 344: "XClipPathUnits";
+ readonly 286: "XPosition";
+ readonly 529: "YCbCrCoefficients";
+ readonly 531: "YCbCrPositioning";
+ readonly 530: "YCbCrSubSampling";
+ readonly 345: "YClipPathUnits";
+ readonly 287: "YPosition";
+ readonly 37378: "ApertureValue";
+ readonly 40961: "ColorSpace";
+ readonly 36868: "DateTimeDigitized";
+ readonly 36867: "DateTimeOriginal";
+ readonly 34665: "Exif IFD";
+ readonly 36864: "ExifVersion";
+ readonly 33434: "ExposureTime";
+ readonly 41728: "FileSource";
+ readonly 37385: "Flash";
+ readonly 40960: "FlashpixVersion";
+ readonly 33437: "FNumber";
+ readonly 42016: "ImageUniqueID";
+ readonly 37384: "LightSource";
+ readonly 37500: "MakerNote";
+ readonly 37377: "ShutterSpeedValue";
+ readonly 37510: "UserComment";
+ readonly 33723: "IPTC";
+ readonly 34675: "ICC Profile";
+ readonly 700: "XMP";
+ readonly 42112: "GDAL_METADATA";
+ readonly 42113: "GDAL_NODATA";
+ readonly 34377: "Photoshop";
+ };
+ export type _cocos_particle_2d_tiff_reader__FieldTagNamesKey = keyof typeof _cocos_particle_2d_tiff_reader__fieldTagNames;
+ export type _cocos_particle_2d_tiff_reader__FieldTagNamesValue = (typeof _cocos_particle_2d_tiff_reader__fieldTagNames)[_cocos_particle_2d_tiff_reader__FieldTagNamesKey];
export type _cocos_serialization_compiled_builtin_value_type__ValueTypeData = [
typeIndex: number,
...values: number[]
];
|
| 0x0107: 'Threshholding', | ||
| 0x011A: 'XResolution', | ||
| 0x011B: 'YResolution', | ||
| 0x013B: 'Artist' as const, |
There was a problem hiding this comment.
What's the effect to add as const?
| } | ||
| // Bilevel or Grayscale | ||
| // BlackIsZero | ||
| case 1: |
There was a problem hiding this comment.
Could not fix it since we don't know whether it was designed like that.
The lint said case 0 should have a break but I don't know whether it was designed like that or a mistake.
This is the code first committed in cocos2d-html5.
There was a problem hiding this comment.
And it's not this PR cause the eslint issue.
There was a problem hiding this comment.
Added comment and ignore the eslint check.
…'re internal modules.
|
@cocos-robot run test cases |
|
Particle 2d resource using PNGReader : |
…ticleSystem2D, and reset the tiff reader after decoding to avoid memory cached in it.
|
@dumganhar, Please check the result of
Task Details
|
|
@dumganhar, Please check the result of
Task Details |


Re: #18222
Changelog
Continuous Integration
This pull request:
Compatibility Check
This pull request: