Skip to content

Commit

Permalink
fix: explicitely set app context app
Browse files Browse the repository at this point in the history
  • Loading branch information
alvarosabu committed Sep 11, 2023
1 parent c214400 commit c2a758f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions playground/src/components/TestSphere.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ const pbrTexture = await useTexture({
ambientOcclusion:
'https://raw.githubusercontent.com/Tresjs/assets/main/textures/black-rock/Rock035_2K_AmbientOcclusion.jpg',
})
console.log('sphereRef', getCurrentInstance())
</script>

<template>
Expand Down
2 changes: 1 addition & 1 deletion src/components/TresCanvas.vue
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ const createInternalComponent = (context: TresContext) =>
setup() {
const inner = getCurrentInstance()!
Object.assign(inner.appContext, instance.appContext)
Object.assign(inner.appContext.app, instance.appContext.app)
//@ts-expect-error: internal property
Object.assign(inner.provides, inner.appContext.provides)
if (import.meta.env.DEV) {
Expand Down

0 comments on commit c2a758f

Please sign in to comment.