From b7d1c589387a08fdb10008a4223fed0fca808327 Mon Sep 17 00:00:00 2001 From: alvarosabu Date: Tue, 25 Jul 2023 13:28:19 +0200 Subject: [PATCH] feat: add defaults props for trescanvas to match renderer ones --- src/components/TresCanvas.vue | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/components/TresCanvas.vue b/src/components/TresCanvas.vue index 3220d8fde..95222742d 100644 --- a/src/components/TresCanvas.vue +++ b/src/components/TresCanvas.vue @@ -40,7 +40,13 @@ export interface TresCanvasProps extends Omit camera?: TresCamera, } -const props = defineProps() +const props = withDefaults(defineProps(), { + alpha: false, + antialias: true, + depth: true, + stencil: true, + preserveDrawingBuffer: false, +}) const { logWarning } = useLogger() @@ -88,7 +94,7 @@ onMounted(() => { canvas: existingCanvas, windowSize: props.windowSize, disableRender, - rendererOptions: props + rendererOptions: props, }) usePointerEventHandler({ scene: scene.value, contextParts: context })