diff --git a/cocos/3d/assets/mesh.ts b/cocos/3d/assets/mesh.ts index 9bbdf5aff5..c2ad0ce406 100644 --- a/cocos/3d/assets/mesh.ts +++ b/cocos/3d/assets/mesh.ts @@ -404,7 +404,7 @@ export class Mesh extends Asset { * !#en * Gets the specified submesh. * @param index Index of the specified submesh. - * @deprecated Using this.renderingMesh.getSubmesh(index)inputAssembler instead. + * @deprecated Use this.renderingMesh.getSubmesh(index).inputAssembler instead. */ public getSubMesh (index: number) { const renderingSubmesh = this.renderingMesh ? this.renderingMesh.getSubmesh(index) : null; diff --git a/cocos/3d/misc/utils.ts b/cocos/3d/misc/utils.ts index 4070547774..8279f7c0d8 100644 --- a/cocos/3d/misc/utils.ts +++ b/cocos/3d/misc/utils.ts @@ -39,13 +39,13 @@ export function createJointsTexture (skinning: { joints: any[]; }) { return texture; } +const copyAttribute = (attribute: IVertexAttribute) => Object.assign({}, attribute); export function createMesh (geometry: IGeometry) { // Collect attributes and calculate length of result vertex buffer. const attributes: IVertexAttribute[] = []; let stride = 0; const channels: Array<{ offset: number; data: number[]; attribute: IVertexAttribute; }> = []; let verticesCount = 0; - const copyAttribute = (attribute: IVertexAttribute) => Object.assign({}, attribute); const addAttribute = (attribute: IVertexAttribute, data: number[]) => { const componentCount = _getComponentCount(attribute); const componentBytesLength = _getComponentByteLength(attribute); diff --git a/cocos/pipeline/define.ts b/cocos/pipeline/define.ts new file mode 100644 index 0000000000..bd8119ba8b --- /dev/null +++ b/cocos/pipeline/define.ts @@ -0,0 +1,4 @@ + +export enum RenderPassStage { + DEFAULT = 100, +} diff --git a/cocos/pipeline/index.ts b/cocos/pipeline/index.ts index 3bdeba37ab..7c6da1eb92 100644 --- a/cocos/pipeline/index.ts +++ b/cocos/pipeline/index.ts @@ -1 +1,2 @@ -import "./render-view"; +import './define'; +import './render-view'; diff --git a/cocos/pipeline/render-pipeline.ts b/cocos/pipeline/render-pipeline.ts index 94712630ce..cddb7ab4cf 100644 --- a/cocos/pipeline/render-pipeline.ts +++ b/cocos/pipeline/render-pipeline.ts @@ -1,7 +1,6 @@ import { intersect } from '../3d/geom-utils'; import { Root } from '../core/root'; -import { vec3 } from '../core/vmath'; -import mat4 from '../core/vmath/mat4'; +import { mat4, vec3 } from '../core/vmath'; import { GFXBuffer } from '../gfx/buffer'; import { GFXBufferUsageBit, GFXFormat, GFXMemoryUsageBit, GFXType } from '../gfx/define'; import { GFXDevice } from '../gfx/device'; @@ -15,10 +14,6 @@ import { IRenderFlowInfo, RenderFlow } from './render-flow'; import { RenderQueue } from './render-queue'; import { RenderView } from './render-view'; -export enum RenderPassStage { - DEFAULT = 100, -} - export class UBOGlobal { public static TIME_OFFSET: number = 0; public static SCREEN_SIZE_OFFSET: number = UBOGlobal.TIME_OFFSET + 4; diff --git a/index.js b/index.js index 31c44b1770..f301a466cc 100644 --- a/index.js +++ b/index.js @@ -41,5 +41,6 @@ export * from './cocos/components'; export * from './cocos/animation'; export * from './cocos/3d'; export * from './cocos/gfx'; +export * from './cocos/pipeline'; // export default cc;