-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix compiler errors in particle-2d module and optimize TIFFReader usage. #18230
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[]
];
|
cocos/particle-2d/tiff-reader.ts
Outdated
0x0107: 'Threshholding', | ||
0x011A: 'XResolution', | ||
0x011B: 'YResolution', | ||
0x013B: 'Artist' as const, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the effect to add as const
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
} | ||
// Bilevel or Grayscale | ||
// BlackIsZero | ||
case 1: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please fix eslint error.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And it's not this PR cause the eslint issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
…18244) Co-authored-by: cocos-robot <[email protected]>
Re: #18222
Changelog
Continuous Integration
This pull request:
Compatibility Check
This pull request: