Procházet zdrojové kódy

docs: better approach for use of core in docs examples

alvarosabu před 2 roky
rodič
revize
4c7fb943c4

+ 48 - 48
docs/.vitepress/cache/deps/@tresjs_cientos.js

@@ -1,3 +1,51 @@
+import {
+  createEventHook,
+  toValue,
+  unrefElement,
+  useDevicePixelRatio,
+  useElementSize,
+  useEventListener,
+  useRafFn,
+  useWindowSize
+} from "./chunk-YZCJI2S3.js";
+import {
+  Fragment,
+  computed,
+  createBaseVNode,
+  createBlock,
+  createCommentVNode,
+  createElementBlock,
+  createRenderer,
+  customRef,
+  defineComponent,
+  getCurrentInstance,
+  getCurrentScope,
+  guardReactiveProps,
+  h,
+  inject,
+  mergeProps,
+  nextTick,
+  normalizeProps,
+  onMounted,
+  onScopeDispose,
+  onUnmounted,
+  openBlock,
+  provide,
+  readonly,
+  ref,
+  renderList,
+  renderSlot,
+  resolveComponent,
+  shallowReactive,
+  shallowRef,
+  toRef,
+  toRefs,
+  unref,
+  useSlots,
+  watch,
+  watchEffect,
+  withAsyncContext
+} from "./chunk-LZPJ5JBW.js";
 import {
   ACESFilmicToneMapping,
   AmbientLight,
@@ -106,54 +154,6 @@ import {
   sRGBEncoding,
   three_module_exports
 } from "./chunk-PDZK3SQX.js";
-import {
-  createEventHook,
-  toValue,
-  unrefElement,
-  useDevicePixelRatio,
-  useElementSize,
-  useEventListener,
-  useRafFn,
-  useWindowSize
-} from "./chunk-YZCJI2S3.js";
-import {
-  Fragment,
-  computed,
-  createBaseVNode,
-  createBlock,
-  createCommentVNode,
-  createElementBlock,
-  createRenderer,
-  customRef,
-  defineComponent,
-  getCurrentInstance,
-  getCurrentScope,
-  guardReactiveProps,
-  h,
-  inject,
-  mergeProps,
-  nextTick,
-  normalizeProps,
-  onMounted,
-  onScopeDispose,
-  onUnmounted,
-  openBlock,
-  provide,
-  readonly,
-  ref,
-  renderList,
-  renderSlot,
-  resolveComponent,
-  shallowReactive,
-  shallowRef,
-  toRef,
-  toRefs,
-  unref,
-  useSlots,
-  watch,
-  watchEffect,
-  withAsyncContext
-} from "./chunk-LZPJ5JBW.js";
 import "./chunk-JC4IRQUL.js";
 
 // dist/tres.js

+ 16 - 16
docs/.vitepress/cache/deps/_metadata.json

@@ -1,54 +1,54 @@
 {
-  "hash": "e740f549",
-  "browserHash": "6f7a1cca",
+  "hash": "028d4228",
+  "browserHash": "5bbe5833",
   "optimized": {
     "vue": {
       "src": "../../../../node_modules/.pnpm/vue@3.2.47/node_modules/vue/dist/vue.runtime.esm-bundler.js",
       "file": "vue.js",
-      "fileHash": "68f880b6",
-      "needsInterop": false
-    },
-    "@stackblitz/sdk": {
-      "src": "../../../../node_modules/.pnpm/@stackblitz+sdk@1.9.0/node_modules/@stackblitz/sdk/bundles/sdk.m.js",
-      "file": "@stackblitz_sdk.js",
-      "fileHash": "1e4743e8",
+      "fileHash": "dd414ec0",
       "needsInterop": false
     },
     "three": {
       "src": "../../../../node_modules/.pnpm/three@0.152.2/node_modules/three/build/three.module.js",
       "file": "three.js",
-      "fileHash": "39d750e2",
+      "fileHash": "201076c8",
       "needsInterop": false
     },
     "@tresjs/cientos": {
       "src": "../../../../node_modules/.pnpm/@tresjs+cientos@2.0.0_@tresjs+core@_three@0.152.2_vue@3.2.47/node_modules/@tresjs/cientos/dist/trescientos.js",
       "file": "@tresjs_cientos.js",
-      "fileHash": "3ead023b",
+      "fileHash": "43ab126d",
+      "needsInterop": false
+    },
+    "@stackblitz/sdk": {
+      "src": "../../../../node_modules/.pnpm/@stackblitz+sdk@1.9.0/node_modules/@stackblitz/sdk/bundles/sdk.m.js",
+      "file": "@stackblitz_sdk.js",
+      "fileHash": "f3131c6e",
       "needsInterop": false
     },
     "gsap": {
       "src": "../../../../node_modules/.pnpm/gsap@3.11.5/node_modules/gsap/index.js",
       "file": "gsap.js",
-      "fileHash": "42304c85",
+      "fileHash": "5a3975c5",
       "needsInterop": false
     },
     "@vueuse/core": {
       "src": "../../../../node_modules/.pnpm/@vueuse+core@10.1.2_vue@3.2.47/node_modules/@vueuse/core/index.mjs",
       "file": "@vueuse_core.js",
-      "fileHash": "288e8586",
+      "fileHash": "be8aed76",
       "needsInterop": false
     }
   },
   "chunks": {
-    "chunk-PDZK3SQX": {
-      "file": "chunk-PDZK3SQX.js"
-    },
     "chunk-YZCJI2S3": {
       "file": "chunk-YZCJI2S3.js"
     },
     "chunk-LZPJ5JBW": {
       "file": "chunk-LZPJ5JBW.js"
     },
+    "chunk-PDZK3SQX": {
+      "file": "chunk-PDZK3SQX.js"
+    },
     "chunk-JC4IRQUL": {
       "file": "chunk-JC4IRQUL.js"
     }

+ 1 - 1
docs/.vitepress/config.ts

@@ -99,7 +99,7 @@ export default defineConfig({
     plugins: [svgLoader(), Unocss()],
     resolve: {
       alias: {
-        '/@': resolve(__dirname, '../../src'),
+        '/@': resolve(__dirname, '../../dist'),
       },
     },
   },

+ 1 - 1
docs/.vitepress/theme/components/DonutExample.vue

@@ -1,5 +1,5 @@
 <script setup lang="ts">
-import { TresCanvas } from '@tresjs/core'
+import { TresCanvas } from '/@/tres'
 import { BasicShadowMap, SRGBColorSpace, NoToneMapping } from 'three'
 
 import { OrbitControls } from '@tresjs/cientos'

+ 1 - 1
docs/.vitepress/theme/components/ExtendExample.vue

@@ -1,5 +1,5 @@
 <script setup lang="ts">
-import { useTres } from '@tresjs/core'
+import { useTres } from '/@/'
 
 const styles = {
   width: '100%',

+ 1 - 1
docs/.vitepress/theme/components/FirstScene.vue

@@ -2,7 +2,7 @@
 import { ref, onMounted } from 'vue'
 import { BasicShadowMap, SRGBColorSpace, NoToneMapping } from 'three'
 
-import { TresCanvas } from '@tresjs/core'
+import { TresCanvas } from '/@/tres'
 import { OrbitControls } from '@tresjs/cientos'
 const LightRef = ref()
 

+ 1 - 1
docs/.vitepress/theme/components/FirstSceneLightToon.vue

@@ -1,5 +1,5 @@
 <script setup lang="ts">
-import { TresCanvas } from '@tresjs/core'
+import { TresCanvas } from '/@/tres'
 import { OrbitControls } from '@tresjs/cientos'
 
 const styles = {

+ 1 - 1
docs/.vitepress/theme/components/StackBlitzEmbed.vue

@@ -1,5 +1,5 @@
 <script setup lang="ts">
-import sdk, { EmbedOptions, Project } from '@stackblitz/sdk'
+import sdk, { EmbedOptions } from '@stackblitz/sdk'
 import { ref, watch } from 'vue'
 
 const props = withDefaults(

+ 1 - 1
netlify.toml

@@ -2,4 +2,4 @@
   NODE_VERSION = "18"
 [build]
   publish = "docs/.vitepress/dist"
-  command = "pnpm docs:build"
+  command = "pnpm run build && pnpm docs:build"

+ 0 - 1
package.json

@@ -65,7 +65,6 @@
     "@huntersofbook/plausible-vue": "^1.0.0",
     "@release-it/conventional-changelog": "^5.1.1",
     "@stackblitz/sdk": "^1.9.0",
-    "@tresjs/core": "2.0.0",
     "@tresjs/cientos": "2.0.0",
     "@types/three": "^0.152.0",
     "@typescript-eslint/eslint-plugin": "^5.59.2",

+ 0 - 3
pnpm-lock.yaml

@@ -29,9 +29,6 @@ importers:
       '@tresjs/cientos':
         specifier: 2.0.0
         version: 2.0.0(@tresjs/core@)(three@0.152.2)(vue@3.2.47)
-      '@tresjs/core':
-        specifier: 2.0.0
-        version: 'link:'
       '@types/three':
         specifier: ^0.152.0
         version: 0.152.0