You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<script lang="ts">
import * as SC from 'svelte-cubed';
import * as THREE from 'three';
import ReusableGltf from '$lib/components/atoms/ReusableGLTF.svelte';
import { updateModelStatus } from '$lib/stores/stores';
export let modelURL;
function handleStatusChange(evt) {
updateModelStatus(evt.detail);
}
</script>
<SC.Canvas antialias shadows background={new THREE.Color('papayawhip')}>
<SC.PerspectiveCamera position={[0.5, 0, 10]} />
<SC.OrbitControls enableZoom={false} />
<SC.DirectionalLight
color={new THREE.Color(0xffffff)}
position={[10, 10, 10]}
intensity={1}
shadow={false}
/>
<SC.AmbientLight color={new THREE.Color(0xffffff)} intensity={0.75} />
<ReusableGltf {modelURL} on:statusChange={handleStatusChange} />
</SC.Canvas>
DevTools shows the following elements in the DOM tree:
Is the SC.Canvas automatically embedded in this <div class="container">?
When using tailwind, this causes the div to have the same dimensions as the next-lowest media query breakpoint. It would make it necessary to override the Tailwind container class, in order to properly resize the canvas.
The text was updated successfully, but these errors were encountered:
I'm having a similar issue as well. Would it be possible to change the library to use a name like sc-container? I think this would fix the issue and make the library more compatible with other libraries that use a container class. I would be happy to take up this issue if needed.
This is my code for a Canvas.svelte component
DevTools shows the following elements in the DOM tree:
Is the SC.Canvas automatically embedded in this
<div class="container">
?When using tailwind, this causes the div to have the same dimensions as the next-lowest media query breakpoint. It would make it necessary to override the Tailwind container class, in order to properly resize the canvas.
The text was updated successfully, but these errors were encountered: