Skip to content

Commit

Permalink
feat: add defaults props for trescanvas to match renderer ones
Browse files Browse the repository at this point in the history
  • Loading branch information
alvarosabu committed Jul 25, 2023
1 parent 59f3437 commit b7d1c58
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/components/TresCanvas.vue
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,13 @@ export interface TresCanvasProps extends Omit<WebGLRendererParameters, 'canvas'>
camera?: TresCamera,
}
const props = defineProps<TresCanvasProps>()
const props = withDefaults(defineProps<TresCanvasProps>(), {
alpha: false,
antialias: true,
depth: true,
stencil: true,
preserveDrawingBuffer: false,
})
const { logWarning } = useLogger()
Expand Down Expand Up @@ -88,7 +94,7 @@ onMounted(() => {
canvas: existingCanvas,
windowSize: props.windowSize,
disableRender,
rendererOptions: props
rendererOptions: props,
})
usePointerEventHandler({ scene: scene.value, contextParts: context })
Expand Down

0 comments on commit b7d1c58

Please sign in to comment.