import { BinaryDataType } from "../../../../../../../core/binary/type/BinaryDataType.js";
import { AttributeGroupSpec } from "../../../../../geometry/AttributeGroupSpec.js";
import { AttributeSpec } from "../../../../../geometry/AttributeSpec.js";

export const BILLBOARD_PARTICLE_ATTRIBUTE_POSITION = 0;
export const BILLBOARD_PARTICLE_ATTRIBUTE_UV = 1;
export const BILLBOARD_PARTICLE_ATTRIBUTE_SIZE = 2;
export const BILLBOARD_PARTICLE_ATTRIBUTE_VELOCITY = 3;
export const BILLBOARD_PARTICLE_ATTRIBUTE_COLOR = 5;
export const BILLBOARD_PARTICLE_ATTRIBUTE_BLEND = 6;

export const BILLBOARD_PARTICLE_SPECIFICATION = new AttributeGroupSpec();

BILLBOARD_PARTICLE_SPECIFICATION.add(AttributeSpec.fromJSON({ name: 'position', itemSize: 3, type: BinaryDataType.Float32 }));
BILLBOARD_PARTICLE_SPECIFICATION.add(AttributeSpec.fromJSON({
    name: 'atlasPatch',
    itemSize: 4,
    type: BinaryDataType.Float32
}));
BILLBOARD_PARTICLE_SPECIFICATION.add(AttributeSpec.fromJSON({ name: 'size', itemSize: 1, type: BinaryDataType.Float32 }));
BILLBOARD_PARTICLE_SPECIFICATION.add(AttributeSpec.fromJSON({ name: 'velocity', itemSize: 3, type: BinaryDataType.Float32 }));
BILLBOARD_PARTICLE_SPECIFICATION.add(AttributeSpec.fromJSON({ name: 'rotation', itemSize: 1, type: BinaryDataType.Float32 }));
BILLBOARD_PARTICLE_SPECIFICATION.add(AttributeSpec.fromJSON({ name: 'color', itemSize: 1, type: BinaryDataType.Float32 }));
BILLBOARD_PARTICLE_SPECIFICATION.add(AttributeSpec.fromJSON({ name: 'blending', itemSize: 1, type: BinaryDataType.Uint8 }));
