Files
cocos4/cocos/core/assets/deprecation.ts
T
Yun Hsiao Wu 32598c25cb switch to eslint (#7727)
* switch to eslint

* eslint: extends airbnb
2020-11-09 10:19:12 +08:00

48 lines
1002 B
TypeScript

/**
* @packageDocumentation
* @hidden
*/
import { removeProperty, replaceProperty } from '../utils';
import { Mesh } from './mesh';
import { TextureBase } from './texture-base';
import { RenderTexture } from './render-texture';
replaceProperty(Mesh.prototype, 'Mesh.prototype', [
{
name: 'renderingMesh',
newName: 'renderingSubMeshes',
},
]);
removeProperty(Mesh.prototype, 'Mesh.prototype', [
{
name: 'hasFlatBuffers',
},
{
name: 'destroyFlatBuffers',
},
]);
removeProperty(TextureBase.prototype, 'TextureBase.prototype', [
{
name: 'hasPremultipliedAlpha',
},
{
name: 'setPremultiplyAlpha',
},
{
name: 'setFlipY',
},
]);
replaceProperty(RenderTexture.prototype, 'RenderTexture.prototype', [
{
name: 'getGFXWindow',
customFunction () {
// @ts-expect-error
return this._window;
},
},
]);