@galacean/effects-core 1.1.8 → 1.2.1

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.
@@ -5,6 +5,7 @@ export * from './image-data';
5
5
  export * from './sortable';
6
6
  export * from './asserts';
7
7
  export * from './timeline-component';
8
+ export * from './logger';
8
9
  export type Immutable<O> = O extends Record<any, any> ? {
9
10
  readonly [key in keyof O]: Immutable<O[key]>;
10
11
  } : O extends Array<infer X> ? ReadonlyArray<X> : O;
@@ -34,7 +35,7 @@ export declare function noop(): void;
34
35
  * @param {object} obj - 要判断的对象
35
36
  * @return {boolean}
36
37
  */
37
- export declare function isString(obj: any): boolean;
38
+ export declare function isString(obj: any): obj is string;
38
39
  /**
39
40
  * 判断对象是否是`Array`类型
40
41
  *
@@ -0,0 +1,22 @@
1
+ type LogType = 'info' | 'error' | 'warn';
2
+ declare function error(message: string, ...args: any[]): void;
3
+ /**
4
+ * info 会转换成浏览器的 console.debug
5
+ * @param message
6
+ * @param args
7
+ */
8
+ declare function info(message: string, ...args: any[]): void;
9
+ declare function warn(message: string, ...args: any[]): void;
10
+ /**
11
+ * 注册自定义埋点函数
12
+ *
13
+ * @param fn
14
+ */
15
+ declare function register(fn: (type: LogType, message: string, ...args: any[]) => void): void;
16
+ export declare const logger: {
17
+ error: typeof error;
18
+ info: typeof info;
19
+ warn: typeof warn;
20
+ register: typeof register;
21
+ };
22
+ export {};
@@ -295,7 +295,7 @@ export declare abstract class VFXItem<T extends VFXItemContent> implements Dispo
295
295
  */
296
296
  scale(x: number, y: number, z: number): void;
297
297
  /**
298
- * 设置元素的在画布上的像素位置
298
+ * 设置元素的在画布上的像素位置, 坐标原点在 canvas 中心,x 正方向水平向右, y 正方向垂直向下
299
299
  */
300
300
  setPositionByPixel(x: number, y: number): void;
301
301
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@galacean/effects-core",
3
- "version": "1.1.8",
3
+ "version": "1.2.1",
4
4
  "description": "Galacean Effects runtime core for the web",
5
5
  "module": "./dist/index.mjs",
6
6
  "main": "./dist/index.js",
@@ -42,7 +42,7 @@
42
42
  "registry": "https://registry.npmjs.org"
43
43
  },
44
44
  "dependencies": {
45
- "@galacean/effects-specification": "1.0.0",
45
+ "@galacean/effects-specification": "1.0.1",
46
46
  "@galacean/effects-math": "1.0.1"
47
47
  },
48
48
  "scripts": {
@@ -1,4 +0,0 @@
1
- import 'core-js/features/array/includes';
2
- import 'core-js/features/object/values';
3
- import 'core-js/features/object/entries';
4
- import 'core-js/features/typed-array';