From b55ac9713b2a23d7af110e7096ab28c71477dfcb Mon Sep 17 00:00:00 2001 From: "jiaxin.lai" Date: Tue, 10 Dec 2019 19:05:10 +0800 Subject: [PATCH] remove some unneeded code (#5878) --- cocos/core/scene-graph/deprecated.ts | 6 ----- cocos/core/utils/index.ts | 35 ---------------------------- 2 files changed, 41 deletions(-) diff --git a/cocos/core/scene-graph/deprecated.ts b/cocos/core/scene-graph/deprecated.ts index 936564319c..62b57548e0 100644 --- a/cocos/core/scene-graph/deprecated.ts +++ b/cocos/core/scene-graph/deprecated.ts @@ -7,12 +7,6 @@ import { replaceProperty, removeProperty } from '../utils/deprecated'; import { Layers } from './layers'; import { Node } from './node'; -// js.get(BaseNode.prototype, 'childrenCount', function () { -// cc.warn("`childrenCount` is deprecated, please use `node.children.length` instead."); -// // @ts-ignore -// return this.children.length; -// }); - replaceProperty(BaseNode.prototype, 'BaseNode', [ { 'name': 'childrenCount', diff --git a/cocos/core/utils/index.ts b/cocos/core/utils/index.ts index 14ee250d5e..12ca0d2f08 100644 --- a/cocos/core/utils/index.ts +++ b/cocos/core/utils/index.ts @@ -35,41 +35,6 @@ import * as misc from './misc'; * 用于处理文件与目录的路径的模块 */ import * as path from './path'; -import { replaceProperty } from './deprecated'; -import * as math from '../math'; - -// replaceProperty(misc,'misc',[ -// { -// name: 'clampf', -// newName: 'clamp', -// target: math, -// targetName: 'math' -// }, -// { -// name: 'clamp01', -// newName: 'clamp01', -// target: math, -// targetName: 'math' -// }, -// { -// name: 'lerp', -// newName: 'lerp', -// target: math, -// targetName: 'math' -// }, -// { -// name: 'degreesToRadians', -// newName: 'toRadian', -// target: math, -// targetName: 'math' -// }, -// { -// name: 'radiansToDegrees', -// newName: 'toDegree', -// target: math, -// targetName: 'math' -// }, -// ]); export * from './deprecated'; export * from './text-utils';