@tresjs/nuxt 1.0.0-alpha.2 → 1.0.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -11,12 +11,13 @@ Official Nuxt module for TresJS. Build 3D scenes as they were Vue components.
11
11
 
12
12
  - [✨  Release Notes](/CHANGELOG.md)
13
13
  <!-- - [🏀 Online playground](https://stackblitz.com/github/@tresjs/nuxt?file=playground%2Fapp.vue) -->
14
- <!-- - [📖 &nbsp;Documentation](https://example.com) -->
14
+ - [📖 &nbsp;Documentation](https://tresjs.org/guide/nuxt.html)
15
15
 
16
16
  ## Features
17
17
 
18
18
  - 🤓 Auto-import components and composables from the [TresJS ecosystem](https://github.com/orgs/Tresjs/repositories)
19
- - `TresCanvas` client only, you don't need of adding `.client` to the component name or `<ClientOnly />`
19
+ - `TresCanvas` client only, you don't need to add `.client` to the component name or `<ClientOnly />`
20
+ - Automatically configures vue compiler to support TresJS components, see [why](http://localhost:5174/guide/troubleshooting.html#failed-resolve-component-trescomponent-%F0%9F%A4%94)?
20
21
  - All the DX Magic that comes with Nuxt ✨
21
22
 
22
23
  ## Quick Setup
@@ -25,13 +26,13 @@ Official Nuxt module for TresJS. Build 3D scenes as they were Vue components.
25
26
 
26
27
  ```bash
27
28
  # Using pnpm
28
- pnpm add -D @tresjs/nuxt
29
+ pnpm add @tresjs/nuxt
29
30
 
30
31
  # Using yarn
31
- yarn add --dev @tresjs/nuxt
32
+ yarn add @tresjs/nuxt
32
33
 
33
34
  # Using npm
34
- npm install --save-dev @tresjs/nuxt
35
+ npm install @tresjs/nuxt
35
36
  ```
36
37
 
37
38
  2. Add `@tresjs/nuxt` to the `modules` section of `nuxt.config.ts`
package/dist/module.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@tresjs/nuxt",
3
3
  "configKey": "tres",
4
- "version": "1.0.0-alpha.2"
4
+ "version": "1.0.0-beta.1"
5
5
  }
@@ -1,11 +1,20 @@
1
1
  <script setup lang="ts">
2
2
  import { TresCanvas as TC, TresCanvasProps } from '@tresjs/core';
3
3
  defineProps<TresCanvasProps>()
4
+
5
+ const stateRef = ref()
6
+
7
+ defineExpose({
8
+ state: stateRef
9
+ })
4
10
  </script>
5
11
 
6
12
  <template>
7
13
  <ClientOnly>
8
- <TC v-bind="$props">
14
+ <TC
15
+ ref="stateRef"
16
+ v-bind="$props"
17
+ >
9
18
  <slot />
10
19
  </TC>
11
20
  </ClientOnly>
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@tresjs/nuxt",
3
3
  "type": "module",
4
4
  "packageManager": "pnpm@8.6.2",
5
- "version": "1.0.0-alpha.2",
5
+ "version": "1.0.0-beta.1",
6
6
  "description": "TresJS integration for Nuxt.",
7
7
  "repository": "@tresjs/nuxt",
8
8
  "author": "Daniel Roe (https://github.com/danielroe/)",
@@ -35,7 +35,7 @@
35
35
  "dependencies": {
36
36
  "@nuxt/kit": "^3.5.2",
37
37
  "@tresjs/cientos": "^2.1.4",
38
- "@tresjs/core": "^2.1.3",
38
+ "@tresjs/core": "^2.2.0",
39
39
  "@tresjs/post-processing": "^0.2.0",
40
40
  "@types/three": "^0.152.1",
41
41
  "mlly": "^1.3.0",
@@ -51,10 +51,10 @@
51
51
  "@release-it/conventional-changelog": "^5.1.1",
52
52
  "@types/node": "^20.3.1",
53
53
  "changelogen": "^0.5.3",
54
- "eslint": "^8.42.0",
54
+ "eslint": "^8.43.0",
55
55
  "nuxt": "^3.5.1",
56
56
  "playwright": "^1.35.1",
57
57
  "release-it": "^15.11.0",
58
- "vitest": "^0.32.1"
58
+ "vitest": "^0.32.2"
59
59
  }
60
60
  }