-
-
Notifications
You must be signed in to change notification settings - Fork 108
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: use render instead of createApp (#375)
Co-authored-by: Alvaro Saburido <[email protected]>
- Loading branch information
1 parent
f2ae46b
commit 9461a78
Showing
2 changed files
with
26 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,12 @@ | ||
import * as THREE from 'three' | ||
|
||
import { createRenderer, Slots } from 'vue' | ||
import { createRenderer } from 'vue' | ||
import { extend } from './catalogue' | ||
import { nodeOps } from './nodeOps' | ||
|
||
export const { createApp } = createRenderer(nodeOps) | ||
|
||
export const createTres = (slots: Slots) => { | ||
const app = createApp(internalFnComponent) | ||
function internalFnComponent() { | ||
return slots && slots.default ? slots.default() : [] | ||
} | ||
return app | ||
} | ||
export const { render } = createRenderer(nodeOps) | ||
|
||
// Creates the catalogue of components based on THREE namespace | ||
extend(THREE) | ||
|
||
export default { createTres, extend } | ||
export default { extend } |