Skip to content

Commit

Permalink
fix: passing class and style attrs only (#423)
Browse files Browse the repository at this point in the history
  • Loading branch information
alvarosabu authored Oct 19, 2023
1 parent 453c862 commit 8fd991a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions playground/src/components/TheExperience.vue
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ watchEffect(() => {
<TresCanvas
v-bind="gl"
ref="canvas"
window-size
class="awiwi"
:style="{ background: '#008080' }"
>
<TresPerspectiveCamera
:position="[7, 7, 7]"
Expand Down
3 changes: 2 additions & 1 deletion src/components/TresCanvas.vue
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ onMounted(() => {
<canvas
ref="canvas"
:data-scene="scene.uuid"
v-bind="$attrs"
:class="$attrs.class"
:style="{
display: 'block',
width: '100%',
Expand All @@ -191,6 +191,7 @@ onMounted(() => {
left: 0,
pointerEvents: 'auto',
touchAction: 'none',
...$attrs.style as Object,
}"
/>
</template>

0 comments on commit 8fd991a

Please sign in to comment.