mirror of
https://github.com/cocos/cocos4.git
synced 2026-12-03 17:42:41 +08:00
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
|
||||
export enum RenderPassStage {
|
||||
DEFAULT = 100,
|
||||
}
|
||||
@@ -1 +1,2 @@
|
||||
import "./render-view";
|
||||
import './define';
|
||||
import './render-view';
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user