@tresjs/nuxt 5.7.2 → 5.8.0
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 +15 -0
- package/dist/client/200.html +1 -1
- package/dist/client/404.html +1 -1
- package/dist/client/_nuxt/builds/latest.json +1 -1
- package/dist/client/_nuxt/builds/meta/a1c93da7-38b6-4e1a-ba1a-98d48528e116.json +1 -0
- package/dist/client/_nuxt/{entry.BbJJZhU5.css → entry.D4Mz9uzH.css} +1 -1
- package/dist/client/favicon.svg +5 -0
- package/dist/client/index.html +1 -1
- package/dist/module.d.mts +8 -0
- package/dist/module.json +1 -1
- package/dist/module.mjs +91 -25
- package/dist/runtime/TresCanvasWebGPU.client.d.vue.ts +13 -0
- package/dist/runtime/TresCanvasWebGPU.client.vue +11 -0
- package/dist/runtime/TresCanvasWebGPU.client.vue.d.ts +13 -0
- package/dist/runtime/TresCanvasWebGPU.vue.d.ts +2 -0
- package/dist/runtime/webgpuStub.d.ts +5 -0
- package/dist/runtime/webgpuStub.js +11 -0
- package/package.json +24 -2
- package/dist/client/_nuxt/builds/meta/93132f4d-8f48-4e01-a3cc-f57150c9f9f2.json +0 -1
- /package/dist/client/_nuxt/{De_eJlbP.js → BfVx0l2S.js} +0 -0
package/README.md
CHANGED
|
@@ -63,6 +63,21 @@ export default defineNuxtConfig({
|
|
|
63
63
|
})
|
|
64
64
|
```
|
|
65
65
|
|
|
66
|
+
## WebGPU
|
|
67
|
+
|
|
68
|
+
Set `renderer: 'webgpu'` to auto-import from the `/webgpu` entries (`@tresjs/core/webgpu`, `@tresjs/cientos/webgpu`). `<TresCanvas>` then uses `WebGPURenderer`.
|
|
69
|
+
|
|
70
|
+
```js
|
|
71
|
+
export default defineNuxtConfig({
|
|
72
|
+
modules: ['@tresjs/nuxt'],
|
|
73
|
+
tres: {
|
|
74
|
+
renderer: 'webgpu',
|
|
75
|
+
},
|
|
76
|
+
})
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
The option applies to the whole app. A cientos component without a WebGPU version throws an error that names it when it mounts. `@tresjs/post-processing` is not auto-imported in this mode, because it works only with `WebGLRenderer`. See the [WebGPU guide](https://docs.tresjs.org/api/advanced/web-gpu).
|
|
80
|
+
|
|
66
81
|
## GLSL shaders support
|
|
67
82
|
|
|
68
83
|
TresJS nuxt module comes with a vite plugin that allows you to import GLSL shaders as strings. It uses [`vite-plugin-glsl`](https://github.com/UstymUkhman/vite-plugin-glsl) under the hood.
|
package/dist/client/200.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><script type="importmap">{"imports":{"#entry":"/__tres_nuxt_devtools/_nuxt/
|
|
1
|
+
<!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><script type="importmap">{"imports":{"#entry":"/__tres_nuxt_devtools/_nuxt/BfVx0l2S.js"}}</script><link rel="stylesheet" href="/__tres_nuxt_devtools/_nuxt/entry.D4Mz9uzH.css" crossorigin><link rel="modulepreload" as="script" crossorigin href="/__tres_nuxt_devtools/_nuxt/BfVx0l2S.js"><link rel="modulepreload" as="script" crossorigin href="/__tres_nuxt_devtools/_nuxt/B7oceTSY.js"><link rel="modulepreload" as="script" crossorigin href="/__tres_nuxt_devtools/_nuxt/DlyN-BeH.js"><script type="module" src="/__tres_nuxt_devtools/_nuxt/BfVx0l2S.js" crossorigin></script><link rel="prefetch" as="style" crossorigin href="/__tres_nuxt_devtools/_nuxt/error-404.a_6S_W9T.css"><link rel="prefetch" as="script" crossorigin href="/__tres_nuxt_devtools/_nuxt/7VW5Q03I.js"><link rel="prefetch" as="style" crossorigin href="/__tres_nuxt_devtools/_nuxt/error-500.0YBD5JWJ.css"><link rel="prefetch" as="script" crossorigin href="/__tres_nuxt_devtools/_nuxt/d-7YrwQl.js"><script>"use strict";(()=>{const o=window,e=document.documentElement,c=["dark","light"],s=getStorageValue("localStorage","nuxt-color-mode")||"system";let r=s==="system"?f():s;const l=e.getAttribute("data-color-mode-forced");l&&(r=l),i(r),o["__NUXT_COLOR_MODE__"]={preference:s,value:r,getColorScheme:f,addColorScheme:i,removeColorScheme:d};function i(t){const a=""+t+"",n="";e.classList?e.classList.add(a):e.className+=" "+a,n&&e.setAttribute("data-"+n,t)}function d(t){const a=""+t+"",n="";e.classList?e.classList.remove(a):e.className=e.className.replace(new RegExp(a,"g"),""),n&&e.removeAttribute("data-"+n)}function u(t){return o.matchMedia("(prefers-color-scheme"+t+")")}function f(){if(o.matchMedia&&u("").media!=="not all"){for(const t of c)if(u(":"+t).matches)return t}return"light"}})();function getStorageValue(o,e){switch(o){case"localStorage":try{return window.localStorage.getItem(e)}catch{return null}case"sessionStorage":try{return window.sessionStorage.getItem(e)}catch{return null}case"cookie":try{return getCookie(e)}catch{return null}default:return null}}function getCookie(o){const c=("; "+window.document.cookie).split("; "+o+"=");if(c.length===2){const s=c.pop();return s?s.split(";").shift():null}}</script></head><body><div id="__nuxt" class="isolate"></div><div id="teleports"></div><script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__tres_nuxt_devtools",buildId:"a1c93da7-38b6-4e1a-ba1a-98d48528e116",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1792682426487,false]</script></body></html>
|
package/dist/client/404.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><script type="importmap">{"imports":{"#entry":"/__tres_nuxt_devtools/_nuxt/
|
|
1
|
+
<!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><script type="importmap">{"imports":{"#entry":"/__tres_nuxt_devtools/_nuxt/BfVx0l2S.js"}}</script><link rel="stylesheet" href="/__tres_nuxt_devtools/_nuxt/entry.D4Mz9uzH.css" crossorigin><link rel="modulepreload" as="script" crossorigin href="/__tres_nuxt_devtools/_nuxt/BfVx0l2S.js"><link rel="modulepreload" as="script" crossorigin href="/__tres_nuxt_devtools/_nuxt/B7oceTSY.js"><link rel="modulepreload" as="script" crossorigin href="/__tres_nuxt_devtools/_nuxt/DlyN-BeH.js"><script type="module" src="/__tres_nuxt_devtools/_nuxt/BfVx0l2S.js" crossorigin></script><link rel="prefetch" as="style" crossorigin href="/__tres_nuxt_devtools/_nuxt/error-404.a_6S_W9T.css"><link rel="prefetch" as="script" crossorigin href="/__tres_nuxt_devtools/_nuxt/7VW5Q03I.js"><link rel="prefetch" as="style" crossorigin href="/__tres_nuxt_devtools/_nuxt/error-500.0YBD5JWJ.css"><link rel="prefetch" as="script" crossorigin href="/__tres_nuxt_devtools/_nuxt/d-7YrwQl.js"><script>"use strict";(()=>{const o=window,e=document.documentElement,c=["dark","light"],s=getStorageValue("localStorage","nuxt-color-mode")||"system";let r=s==="system"?f():s;const l=e.getAttribute("data-color-mode-forced");l&&(r=l),i(r),o["__NUXT_COLOR_MODE__"]={preference:s,value:r,getColorScheme:f,addColorScheme:i,removeColorScheme:d};function i(t){const a=""+t+"",n="";e.classList?e.classList.add(a):e.className+=" "+a,n&&e.setAttribute("data-"+n,t)}function d(t){const a=""+t+"",n="";e.classList?e.classList.remove(a):e.className=e.className.replace(new RegExp(a,"g"),""),n&&e.removeAttribute("data-"+n)}function u(t){return o.matchMedia("(prefers-color-scheme"+t+")")}function f(){if(o.matchMedia&&u("").media!=="not all"){for(const t of c)if(u(":"+t).matches)return t}return"light"}})();function getStorageValue(o,e){switch(o){case"localStorage":try{return window.localStorage.getItem(e)}catch{return null}case"sessionStorage":try{return window.sessionStorage.getItem(e)}catch{return null}case"cookie":try{return getCookie(e)}catch{return null}default:return null}}function getCookie(o){const c=("; "+window.document.cookie).split("; "+o+"=");if(c.length===2){const s=c.pop();return s?s.split(";").shift():null}}</script></head><body><div id="__nuxt" class="isolate"></div><div id="teleports"></div><script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__tres_nuxt_devtools",buildId:"a1c93da7-38b6-4e1a-ba1a-98d48528e116",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1792682426488,false]</script></body></html>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"id":"
|
|
1
|
+
{"id":"a1c93da7-38b6-4e1a-ba1a-98d48528e116","timestamp":1792682420491}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"id":"a1c93da7-38b6-4e1a-ba1a-98d48528e116","timestamp":1792682420491,"prerendered":[]}
|