@polygonjs/polygonjs
Version:
node-based WebGL 3D engine https://polygonjs.com
39 lines (38 loc) • 1.61 kB
TypeScript
import { BufferGeometry, InstancedBufferGeometry, Matrix4 } from 'three';
import { BaseCorePoint } from './entities/point/CorePoint';
import { CoreGroup } from './Group';
export declare enum InstanceAttrib {
POSITION = "instancePosition",
SCALE = "instanceScale",
QUATERNION = "instanceQuaternion",
COLOR = "instanceColor",
UV = "instanceUv"
}
export declare class CoreInstancer {
private _coreGroup?;
private _is_pscale_present;
private _is_scale_present;
private _is_normal_present;
private _is_up_present;
private _do_rotate_matrices;
private _matrixT;
private _matrixR;
private _matrixS;
static transformAttributeNames: string[];
static remapName(name: string): string;
constructor(_coreGroup?: CoreGroup | undefined);
setCoreGroup(coreGroup: CoreGroup): void;
private _pointScale;
private _pointNormal;
private _pointUp;
matrixFromPoint(point: BaseCorePoint, targetMatrix: Matrix4): void;
private static _point_color;
private static _point_uv;
private static _position;
private static _quaternion;
private static _scale;
private static _tmpMatrix;
static updateTransformInstanceAttributes(instancePts: BaseCorePoint[], templateCoreGroup: CoreGroup, geometry: InstancedBufferGeometry): void;
static updateColorInstanceAttribute(instancePts: BaseCorePoint[], templateCoreGroup: CoreGroup, geometry: InstancedBufferGeometry): void;
static createInstanceBufferGeometry(geometryToInstance: BufferGeometry, templateCoreGroup: CoreGroup, attributesToCopy: string): InstancedBufferGeometry;
}