mirror of
https://github.com/cocos/cocos4.git
synced 2026-12-01 07:42:38 +08:00
Merge TiledMap from 2.x (#7610)
* Save all * fix uv * fix object groups * fix tintcolor * add method modifier * tslint * replace ccCOlor * add import warning * rename * add comments * add comments * update zlib * Save * pixel offset * update tests/general/sealed-global-variables.json * exclude from cc * remove _walkGen * update setScale & setRotationFromEuler
This commit is contained in:
Vendored
+32
-3
@@ -1,6 +1,35 @@
|
||||
|
||||
declare namespace codec {
|
||||
export function unzipBase64AsArray(input: string, bytes: number): Array<number>;
|
||||
import b64 from "./base64";
|
||||
import gzip from "./gzip";
|
||||
export declare module codec {
|
||||
const name = "Jacob__Codec";
|
||||
export const Base64: typeof b64;
|
||||
export const GZip: typeof gzip;
|
||||
/**
|
||||
* Unpack a gzipped byte array
|
||||
* @param {Array} input Byte array
|
||||
* @returns {String} Unpacked byte string
|
||||
*/
|
||||
export function unzip(args: string | number[]): string;
|
||||
/**
|
||||
* Unpack a gzipped byte string encoded as base64
|
||||
* @param {String} input Byte string encoded as base64
|
||||
* @returns {String} Unpacked byte string
|
||||
*/
|
||||
export function unzipBase64(arg: string): string;
|
||||
/**
|
||||
* Unpack a gzipped byte string encoded as base64
|
||||
* @param {String} input Byte string encoded as base64
|
||||
* @param {Number} bytes Bytes per array item
|
||||
* @returns {Array} Unpacked byte array
|
||||
*/
|
||||
export function unzipBase64AsArray(input: string, bytes?: number): number[];
|
||||
/**
|
||||
* Unpack a gzipped byte array
|
||||
* @param {Array} input Byte array
|
||||
* @param {Number} bytes Bytes per array item
|
||||
* @returns {Array} Unpacked byte array
|
||||
*/
|
||||
export function unzipAsArray(input: number[], bytes?: number): number[];
|
||||
}
|
||||
|
||||
export default codec;
|
||||
Vendored
+31
-8
@@ -1,10 +1,33 @@
|
||||
|
||||
declare namespace Base64 {
|
||||
export const name: string;
|
||||
|
||||
export function decode(input: string): string;
|
||||
|
||||
export function decodeAsArray(input: string): number[];
|
||||
/**
|
||||
* mixin cc.Codec.Base64
|
||||
*/
|
||||
export declare class Base64 {
|
||||
static name_: string;
|
||||
/**
|
||||
* <p>
|
||||
* cc.Codec.Base64.decode(input[, unicode=false]) -> String (http://en.wikipedia.org/wiki/Base64).
|
||||
* </p>
|
||||
* @function
|
||||
* @param {String} input The base64 encoded string to decode
|
||||
* @return {String} Decodes a base64 encoded String
|
||||
* @example
|
||||
* //decode string
|
||||
* cc.Codec.Base64.decode("U29tZSBTdHJpbmc="); // => "Some String"
|
||||
*/
|
||||
static decode(input: string): string;
|
||||
/**
|
||||
* <p>
|
||||
* Converts an input string encoded in base64 to an array of integers whose<br/>
|
||||
* values represent the decoded string's characters' bytes.
|
||||
* </p>
|
||||
* @function
|
||||
* @param {String} input The String to convert to an array of Integers
|
||||
* @param {Number} bytes
|
||||
* @return {Array}
|
||||
* @example
|
||||
* //decode string to array
|
||||
* var decodeArr = cc.Codec.Base64.decodeAsArray("U29tZSBTdHJpbmc=");
|
||||
*/
|
||||
static decodeAsArray(input: string, bytes: number): number[];
|
||||
}
|
||||
|
||||
export default Base64;
|
||||
|
||||
Vendored
+51
-3
@@ -1,6 +1,54 @@
|
||||
|
||||
declare namespace GZip {
|
||||
|
||||
/**
|
||||
* See cc.Codec.GZip.gunzip.
|
||||
* @param {Array | String} data The bytestream to decompress
|
||||
* Constructor
|
||||
*/
|
||||
declare class HufNode {
|
||||
b0: number;
|
||||
b1: number;
|
||||
jump: any;
|
||||
jumppos: number;
|
||||
}
|
||||
export declare class GZip {
|
||||
constructor(data: string | number[]);
|
||||
/**
|
||||
* Unzips the gzipped data of the 'data' argument.
|
||||
* @param string The bytestream to decompress. Either an array of Integers between 0 and 255, or a String.
|
||||
* @return {String}
|
||||
*/
|
||||
static gunzip(string: string | number[]): string;
|
||||
static HufNode: typeof HufNode;
|
||||
/**
|
||||
* @constant
|
||||
* @type Number
|
||||
*/
|
||||
static LITERALS: number;
|
||||
/**
|
||||
* @constant
|
||||
* @type Number
|
||||
*/
|
||||
static NAMEMAX: number;
|
||||
static bitReverse: number[];
|
||||
/**
|
||||
* gunzip
|
||||
* @return {Array}
|
||||
*/
|
||||
gunzip(): string[][];
|
||||
readByte_array(): number;
|
||||
readByte_string(): number;
|
||||
byteAlign(): void;
|
||||
readBit(): number;
|
||||
readBits(a: number): number;
|
||||
flushBuffer(): void;
|
||||
addBuffer(a: number): void;
|
||||
IsPat(): number;
|
||||
Rec(): 0 | -1;
|
||||
CreateTree(currentTree: any, numval: any, lengths: any, show: any): 0 | -1;
|
||||
DecodeValue(currentTree: any): any;
|
||||
DeflateLoop(): 1 | 0;
|
||||
unzipFile(name: string): string;
|
||||
nextFile(): void;
|
||||
skipdir(): number;
|
||||
}
|
||||
|
||||
export default GZip;
|
||||
Vendored
+1
-1
@@ -1,6 +1,6 @@
|
||||
|
||||
declare namespace zlib {
|
||||
export function Inflate(data: any, info: any): void;
|
||||
export function Inflate(data: any, info?: any): void;
|
||||
}
|
||||
|
||||
export default zlib;
|
||||
|
||||
Reference in New Issue
Block a user