mirror of
https://github.com/cocos/cocos4.git
synced 2026-12-02 00:22:43 +08:00
Fix ccclass warns on render pipeline properties (#5885)
This commit is contained in:
committed by
pandamicro
parent
a7115f18d3
commit
5599130328
@@ -638,9 +638,13 @@ export const string = type(CCString);
|
||||
*/
|
||||
export function type (type: Function): PropertyDecorator;
|
||||
|
||||
export function type (type: [Function]): PropertyDecorator;
|
||||
|
||||
export function type<T> (type: PrimitiveType<T>): PropertyDecorator;
|
||||
|
||||
export function type<T> (type: PrimitiveType<T> | Function): PropertyDecorator {
|
||||
export function type<T> (type: [PrimitiveType<T>]): PropertyDecorator;
|
||||
|
||||
export function type<T> (type: PrimitiveType<T> | Function | [PrimitiveType<T>] | [Function]): PropertyDecorator {
|
||||
return property({
|
||||
type,
|
||||
});
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
|
||||
import { ccclass, property } from '../data/class-decorator';
|
||||
import { ccclass, property, type } from '../data/class-decorator';
|
||||
import { ccenum } from '../value-types/enum';
|
||||
import { GFXFormat, GFXLoadOp, GFXStoreOp, GFXTextureLayout, GFXTextureType, GFXTextureUsageBit, GFXTextureViewType} from '../gfx/define';
|
||||
import { CCString } from '../data';
|
||||
|
||||
ccenum(GFXTextureType);
|
||||
ccenum(GFXTextureViewType);
|
||||
@@ -50,10 +51,8 @@ export class FrameBufferDesc {
|
||||
public name: string = '';
|
||||
@property
|
||||
public renderPass: number = 0;
|
||||
@property({
|
||||
type: [String],
|
||||
})
|
||||
public colorViews = [];
|
||||
@type([CCString])
|
||||
public colorViews: string[] = [];
|
||||
@property
|
||||
public depthStencilView: string = '';
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* @category pipeline
|
||||
*/
|
||||
|
||||
import { ccclass, property } from '../data/class-decorator';
|
||||
import { ccclass, property, type } from '../data/class-decorator';
|
||||
import { ccenum } from '../value-types/enum';
|
||||
import { GFXCommandBuffer } from '../gfx/command-buffer';
|
||||
import { IGFXColor, IGFXRect, GFXClearFlag, GFXCommandBufferType } from '../gfx/define';
|
||||
@@ -16,6 +16,7 @@ import { RenderFlow } from './render-flow';
|
||||
import { RenderPipeline } from './render-pipeline';
|
||||
import { opaqueCompareFn, RenderQueue, transparentCompareFn } from './render-queue';
|
||||
import { RenderView } from './render-view';
|
||||
import { CCString } from '../data';
|
||||
|
||||
const colors: IGFXColor[] = [ { r: 0, g: 0, b: 0, a: 1 } ];
|
||||
const bufs: GFXCommandBuffer[] = [];
|
||||
@@ -46,9 +47,7 @@ class RenderQueueDesc {
|
||||
type: RenderQueueSortMode,
|
||||
})
|
||||
public sortMode: RenderQueueSortMode = RenderQueueSortMode.FRONT_TO_BACK;
|
||||
@property({
|
||||
type: [String],
|
||||
})
|
||||
@type([CCString])
|
||||
public stages: string[] = [];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user