Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RuggeroVisintin/issue20 #21

Merged
merged 6 commits into from
Dec 5, 2023
Merged

RuggeroVisintin/issue20 #21

merged 6 commits into from
Dec 5, 2023

Conversation

RuggeroVisintin
Copy link
Owner

Uses RenderSystem to render ShapeComponents

@Scrice994 Scrice994 merged commit 8f045fb into main Dec 5, 2023
3 checks passed
@Scrice994 Scrice994 deleted the RuggeroVisintin/issue20 branch December 5, 2023 21:55
@RuggeroVisintin RuggeroVisintin mentioned this pull request Dec 5, 2023
const size = this.transform.size;

renderer.pushRenderCommand(new DrawPrimitiveCommand(
PrimitiveType.Rectangle,
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pass this.shapeType instead

const shapeComponent = new ShapeComponent();
const renderer = new Renderer(new CanvasDevice());

it('Should push the right draw command to the renderer', () => {
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add more test cases with different positions and sizes


it.todo('Should render objects based on their depthIndex in reverse order (0 rendered last)')

it.todo('Should render object based on their transparency (transparent last)')
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add another test case like it('Should render transparency objects as last but ordered by depth index)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants