Skip to content

Commit

Permalink
Rename to shapeBuilders
Browse files Browse the repository at this point in the history
  • Loading branch information
ShukantPal committed May 5, 2024
1 parent 7fcb3a3 commit 6a4a6bd
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/scene/graphics/shared/utils/buildContextBatches.ts
Expand Up @@ -18,7 +18,7 @@ import type { GpuGraphicsContext } from '../GraphicsContextSystem';
import type { GraphicsPath } from '../path/GraphicsPath';
import type { ShapePath } from '../path/ShapePath';

export const shapeBuildCommandMap: Record<string, ShapeBuildCommand> = {
export const shapeBuilders: Record<string, ShapeBuildCommand> = {
rectangle: buildRectangle,
polygon: buildPolygon,
triangle: buildTriangle,
Expand Down Expand Up @@ -86,7 +86,7 @@ function addTextureToGeometryData(

const points: number[] = [];

const build = shapeBuildCommandMap.rectangle;
const build = shapeBuilders.rectangle;

const rect = tempRect;

Expand Down Expand Up @@ -158,7 +158,7 @@ function addShapePathToGeometryData(

const points: number[] = [];

const build = shapeBuildCommandMap[shape.type];
const build = shapeBuilders[shape.type];

// TODO - this can be cached...
// TODO - THIS IS DONE TWICE!!!!!!
Expand Down Expand Up @@ -261,7 +261,7 @@ function getHoleArrays(shape: ShapePath)
// TODO - need to transform the points via there transform here..
const holePoints: number[] = [];

const holeBuilder = shapeBuildCommandMap[holePrimitive.type] as ShapeBuildCommand;
const holeBuilder = shapeBuilders[holePrimitive.type] as ShapeBuildCommand;

holeBuilder.build(holePrimitive, holePoints);

Expand Down

0 comments on commit 6a4a6bd

Please sign in to comment.