Skip to content

Commit

Permalink
fix: ensure draw calls are being run
Browse files Browse the repository at this point in the history
  • Loading branch information
trezy committed Sep 1, 2024
1 parent 86b833d commit f7a0eb7
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
5 changes: 4 additions & 1 deletion src/constants/PixiReactIgnoredProps.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
import { PixiToReactEventPropNames } from './EventPropNames';

export const PixiReactIgnoredProps = Object.freeze(Object.keys(PixiToReactEventPropNames));
export const PixiReactIgnoredProps = Object.freeze([
...Object.keys(PixiToReactEventPropNames),
'draw',
]);
3 changes: 2 additions & 1 deletion src/helpers/createInstance.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { ReactToPixiEventPropNames } from '../constants/EventPropNames';
import { PixiReactIgnoredProps } from '../constants/PixiReactIgnoredProps';
import { applyProps } from './applyProps';
import { catalogue } from './catalogue';
import { convertStringToPascalCase } from './convertStringToPascalCase';
Expand Down Expand Up @@ -30,7 +31,7 @@ export function createInstance(
// Get the class from an imported Pixi.js namespace
const PixiComponent = catalogue[name];

const pixiProps = gentleCloneProps(props);
const pixiProps = gentleCloneProps(props, PixiReactIgnoredProps);

// Clone event props
Object.entries(props).forEach(([key, value]) =>
Expand Down
3 changes: 1 addition & 2 deletions src/helpers/gentleCloneProps.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { PixiReactIgnoredProps } from '../constants/PixiReactIgnoredProps';
import { ReactIgnoredProps } from '../constants/ReactIgnoredProps';
import { gentleClone } from './gentleClone';

Expand All @@ -8,5 +7,5 @@ export function gentleCloneProps(
additionalIgnoredProps: readonly string[] = [],
)
{
return gentleClone(props, ReactIgnoredProps.concat(PixiReactIgnoredProps, additionalIgnoredProps));
return gentleClone(props, ReactIgnoredProps.concat(additionalIgnoredProps));
}

0 comments on commit f7a0eb7

Please sign in to comment.