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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: page scroll over 3d models #7452

Merged
merged 3 commits into from
Oct 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions components/carousel/module/CarouselMedia.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
:src="imageSrc || ''"
:animation-src="item.animationUrl || ''"
:title="item.name"
disable-operation
:audio-player-cover="imageSrc || ''"
audio-hover-on-cover-play />
</nuxt-link>
Expand Down
3 changes: 3 additions & 0 deletions libs/ui/src/components/MediaItem/MediaItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
:original="original"
:is-lewd="isLewd"
:is-detail="isDetail"
:disable-operation="disableOperation"
:player-cover="audioPlayerCover"
:hover-on-cover-play="audioHoverOnCoverPlay" />
<div
Expand Down Expand Up @@ -58,6 +59,7 @@ const props = withDefaults(
isLewd?: boolean
isDetail?: boolean
placeholder?: string
disableOperation?: boolean
audioPlayerCover?: string
audioHoverOnCoverPlay?: boolean
}>(),
Expand All @@ -70,6 +72,7 @@ const props = withDefaults(
isLewd: false,
isDetail: false,
placeholder: '',
disableOperation: undefined,
}
)
// props.mimeType may be empty string "". Add `image/png` as fallback
Expand Down
3 changes: 2 additions & 1 deletion libs/ui/src/components/MediaItem/type/ModelMedia.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,16 @@
shadow-intensity="1"
autoplay
camera-controls
:disable-zoom="disableOperation"
data-testid="type-3d" />
</div>
</template>

<script lang="ts" setup>
import '@google/model-viewer'

defineProps<{
animationSrc: string
disableOperation?: boolean
}>()
</script>

Expand Down
1 change: 1 addition & 0 deletions libs/ui/src/components/NeoNftCard/NeoNftCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
:mime-type="nft.mimeType"
:placeholder="placeholder"
:title="nft?.name"
disable-operation
:audio-player-cover="mediaPlayerCover"
:audio-hover-on-cover-play="mediaHoverOnCoverPlay" />
<div
Expand Down
3 changes: 3 additions & 0 deletions nuxt.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ export default defineNuxtConfig({
productionTip: false,
runtimeCompiler: true,
},
compilerOptions: {
isCustomElement: (tag) => ['model-viewer'].includes(tag),
},
},

server: {
Expand Down