@tresjs/cientos 4.0.0-next.0 → 4.0.0-rc.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.
Files changed (106) hide show
  1. package/dist/core/abstractions/AnimatedSprite/Atlas.d.ts +38 -0
  2. package/dist/core/abstractions/AnimatedSprite/AtlasAnimationDefinitionParser.d.ts +10 -0
  3. package/dist/core/abstractions/AnimatedSprite/StringOps.d.ts +2 -0
  4. package/dist/core/abstractions/AnimatedSprite/component.vue.d.ts +130 -0
  5. package/dist/core/abstractions/GlobalAudio.d.ts +1 -1
  6. package/dist/core/abstractions/Lensflare/RandUtils.d.ts +2 -2
  7. package/dist/core/abstractions/Lensflare/component.vue.d.ts +22 -21
  8. package/dist/core/abstractions/Lensflare/constants.d.ts +2 -1
  9. package/dist/core/abstractions/Lensflare/index.d.ts +5 -4
  10. package/dist/core/abstractions/Levioso.vue.d.ts +25 -23
  11. package/dist/core/abstractions/MouseParallax.vue.d.ts +31 -20
  12. package/dist/core/abstractions/PositionalAudio.vue.d.ts +69 -0
  13. package/dist/core/abstractions/Reflector.vue.d.ts +21 -18
  14. package/dist/core/abstractions/Text3D.vue.d.ts +138 -15
  15. package/dist/core/abstractions/index.d.ts +11 -8
  16. package/dist/core/abstractions/useAnimations.d.ts +4 -4
  17. package/dist/core/abstractions/useFBO/component.vue.d.ts +15 -14
  18. package/dist/core/abstractions/useFBO/index.d.ts +5 -5
  19. package/dist/core/abstractions/useSurfaceSampler/component.vue.d.ts +14 -11
  20. package/dist/core/abstractions/useSurfaceSampler/index.d.ts +170 -142
  21. package/dist/core/controls/CameraControls.vue.d.ts +4147 -3862
  22. package/dist/core/controls/KeyboardControls.vue.d.ts +51 -97
  23. package/dist/core/controls/MapControls.vue.d.ts +9507 -13
  24. package/dist/core/controls/OrbitControls.vue.d.ts +5906 -5660
  25. package/dist/core/controls/PointerLockControls.vue.d.ts +15 -14
  26. package/dist/core/controls/ScrollControls.vue.d.ts +34 -30
  27. package/dist/core/controls/TransformControls.vue.d.ts +20 -14
  28. package/dist/core/controls/index.d.ts +9 -8
  29. package/dist/core/index.d.ts +0 -1
  30. package/dist/core/loaders/SVG/component.vue.d.ts +23 -22
  31. package/dist/core/loaders/index.d.ts +4 -3
  32. package/dist/core/loaders/useFBX/component.vue.d.ts +18 -18
  33. package/dist/core/loaders/useFBX/index.d.ts +2 -1
  34. package/dist/core/loaders/useGLTF/component.vue.d.ts +25 -25
  35. package/dist/core/loaders/useGLTF/index.d.ts +14 -9
  36. package/dist/core/loaders/useProgress.d.ts +2 -1
  37. package/dist/core/loaders/useVideoTexture.d.ts +1 -0
  38. package/dist/core/materials/customShaderMaterial/index.vue.d.ts +7 -5
  39. package/dist/core/materials/holographicMaterial/HolographicMaterialParameters.d.ts +41 -0
  40. package/dist/core/materials/holographicMaterial/index.vue.d.ts +86 -0
  41. package/dist/core/materials/holographicMaterial/material.d.ts +27 -0
  42. package/dist/core/materials/index.d.ts +7 -5
  43. package/dist/core/materials/meshGlassMaterial/index.vue.d.ts +3 -3
  44. package/dist/core/materials/meshGlassMaterial/material.d.ts +2 -2
  45. package/dist/core/materials/{blurPass.d.ts → meshReflectionMaterial/BlurPass.d.ts} +8 -6
  46. package/dist/core/materials/{convolutionMaterial.d.ts → meshReflectionMaterial/ConvolutionMaterial.d.ts} +1 -0
  47. package/dist/core/materials/meshReflectionMaterial/index.vue.d.ts +180 -49
  48. package/dist/core/materials/meshReflectionMaterial/material.d.ts +33 -36
  49. package/dist/core/materials/meshWobbleMaterial/index.vue.d.ts +17 -15
  50. package/dist/core/materials/meshWobbleMaterial/material.d.ts +2 -2
  51. package/dist/core/misc/BakeShadows.d.ts +1 -1
  52. package/dist/core/misc/Stats.d.ts +2 -2
  53. package/dist/core/misc/StatsGl.d.ts +1 -1
  54. package/dist/core/misc/html/HTML.vue.d.ts +22 -17
  55. package/dist/core/misc/html/utils.d.ts +3 -3
  56. package/dist/core/misc/index.d.ts +3 -3
  57. package/dist/core/misc/useGLTFExporter.d.ts +2 -1
  58. package/dist/core/shapes/Box.vue.d.ts +22 -19
  59. package/dist/core/shapes/CatmullRomCurve3.vue.d.ts +15 -12
  60. package/dist/core/shapes/Circle.vue.d.ts +22 -19
  61. package/dist/core/shapes/Cone.vue.d.ts +22 -19
  62. package/dist/core/shapes/Cylinder.vue.d.ts +60 -0
  63. package/dist/core/shapes/Dodecahedron.vue.d.ts +22 -19
  64. package/dist/core/shapes/Icosahedron.vue.d.ts +22 -19
  65. package/dist/core/shapes/Line2.vue.d.ts +16 -13
  66. package/dist/core/shapes/Octahedron.vue.d.ts +22 -19
  67. package/dist/core/shapes/Plane.vue.d.ts +22 -19
  68. package/dist/core/shapes/Ring.vue.d.ts +22 -19
  69. package/dist/core/shapes/RoundedBox.vue.d.ts +22 -19
  70. package/dist/core/shapes/Sphere.vue.d.ts +22 -19
  71. package/dist/core/shapes/Superformula.vue.d.ts +35 -32
  72. package/dist/core/shapes/Tetrahedron.vue.d.ts +22 -19
  73. package/dist/core/shapes/Torus.vue.d.ts +22 -19
  74. package/dist/core/shapes/TorusKnot.vue.d.ts +22 -19
  75. package/dist/core/shapes/Tube.vue.d.ts +22 -20
  76. package/dist/core/shapes/index.d.ts +20 -18
  77. package/dist/core/staging/Backdrop.vue.d.ts +18 -14
  78. package/dist/core/staging/ContactShadows.vue.d.ts +168 -0
  79. package/dist/core/staging/Fit.vue.d.ts +64 -0
  80. package/dist/core/staging/Ocean.vue.d.ts +26 -23
  81. package/dist/core/staging/Precipitation.vue.d.ts +21 -18
  82. package/dist/core/staging/Sky.vue.d.ts +14 -13
  83. package/dist/core/staging/Smoke.vue.d.ts +18 -17
  84. package/dist/core/staging/Sparkles/ShaderData.d.ts +4 -3
  85. package/dist/core/staging/Sparkles/ShaderDataBuilder.d.ts +7 -7
  86. package/dist/core/staging/Sparkles/component.vue.d.ts +33 -31
  87. package/dist/core/staging/Sparkles/useEmptyDataTexture.d.ts +1 -0
  88. package/dist/core/staging/Stars.vue.d.ts +16 -16
  89. package/dist/core/staging/index.d.ts +13 -10
  90. package/dist/core/staging/useEnvironment/component.vue.d.ts +64 -0
  91. package/dist/core/staging/useEnvironment/const.d.ts +28 -0
  92. package/dist/core/staging/useEnvironment/envSence.d.ts +9 -0
  93. package/dist/core/staging/useEnvironment/index.d.ts +5 -3
  94. package/dist/core/staging/useEnvironment/lightformer/index.vue.d.ts +56 -0
  95. package/dist/trescientos.js +7318 -6360
  96. package/dist/trescientos.umd.cjs +566 -428
  97. package/dist/utils/Gradient.d.ts +3 -2
  98. package/dist/utils/index.d.ts +1 -0
  99. package/dist/utils/types.d.ts +4 -0
  100. package/package.json +29 -29
  101. package/dist/core/directives/index.d.ts +0 -5
  102. package/dist/core/directives/vAlwaysLookAt.d.ts +0 -4
  103. package/dist/core/directives/vDistanceTo.d.ts +0 -4
  104. package/dist/core/directives/vLightHelper.d.ts +0 -5
  105. package/dist/core/directives/vLog.d.ts +0 -3
  106. package/dist/core/misc/useTweakPane/index.d.ts +0 -10
@@ -1,6 +1,7 @@
1
1
  import { Color } from 'three';
2
- import type { TresColor } from '@tresjs/core';
3
- import type { VectorFlexibleParams } from '@tresjs/core/dist/utils/normalize';
2
+ import { TresColor } from '@tresjs/core';
3
+ import { VectorFlexibleParams } from '@tresjs/core/dist/utils/normalize';
4
+
4
5
  export type Gradient<T> = T | T[] | NormalizedGradient<T>;
5
6
  export type NormalizedGradient<T> = [number, T][];
6
7
  export type GradientTresColor = Gradient<TresColor>;
@@ -1,4 +1,5 @@
1
1
  import { Vector3 } from 'three';
2
+
2
3
  /**
3
4
  * Update the function signature to explicitly specify the type of the props parameter
4
5
  *
@@ -0,0 +1,4 @@
1
+ import { Camera, OrthographicCamera, PerspectiveCamera } from 'three';
2
+
3
+ export declare const isPerspectiveCamera: (camera?: Camera) => camera is PerspectiveCamera;
4
+ export declare const isOrthographicCamera: (camera?: Camera) => camera is OrthographicCamera;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tresjs/cientos",
3
3
  "type": "module",
4
- "version": "4.0.0-next.0",
4
+ "version": "4.0.0-rc.0",
5
5
  "packageManager": "pnpm@8.10.2",
6
6
  "description": "Collection of useful helpers and fully functional, ready-made abstractions for Tres",
7
7
  "author": "Alvaro Saburido <hola@alvarosaburido.dev> (https://github.com/alvarosabu/)",
@@ -34,8 +34,8 @@
34
34
  "module": "./dist/trescientos.js",
35
35
  "types": "./dist/index.d.ts",
36
36
  "files": [
37
- "dist",
38
- "*.d.ts"
37
+ "*.d.ts",
38
+ "dist"
39
39
  ],
40
40
  "publishConfig": {
41
41
  "access": "public"
@@ -45,52 +45,52 @@
45
45
  "playground": "cd playground && pnpm dev",
46
46
  "build": "vite build",
47
47
  "release": "release-it",
48
- "lint": "eslint . --ext .js,.jsx,.ts,.tsx,.vue",
48
+ "lint": "eslint .",
49
+ "lint:fix": "eslint . --fix",
49
50
  "docs:dev": "vitepress dev docs",
50
51
  "docs:build": "vitepress build docs",
51
- "docs:preview": "vitepress preview docs"
52
+ "docs:preview": "vitepress preview docs",
53
+ "prepare": "node .husky/install.mjs"
52
54
  },
53
55
  "peerDependencies": {
54
- "@tresjs/core": ">=3.2",
56
+ "@tresjs/core": ">=4.2.1",
55
57
  "three": ">=0.133",
56
- "tweakpane": ">=3.0.0",
57
58
  "vue": ">=3.3"
58
59
  },
59
60
  "dependencies": {
60
- "@vueuse/core": "^10.7.2",
61
- "camera-controls": "^2.7.4",
61
+ "@vueuse/core": "^10.11.0",
62
+ "camera-controls": "^2.8.5",
62
63
  "stats-gl": "^2.0.1",
63
64
  "stats.js": "^0.17.0",
64
65
  "three-custom-shader-material": "^5.4.0",
65
- "three-stdlib": "^2.29.4"
66
+ "three-stdlib": "^2.30.4"
66
67
  },
67
68
  "devDependencies": {
68
69
  "@release-it/conventional-changelog": "^8.0.1",
69
- "@tresjs/core": "4.0.0-next.1",
70
- "@tresjs/eslint-config-vue": "^0.2.1",
71
- "@tweakpane/core": "^1.1.9",
72
- "@types/node": "^20.11.16",
73
- "@types/three": "^0.161.2",
74
- "@typescript-eslint/eslint-plugin": "^6.21.0",
75
- "@typescript-eslint/parser": "^6.21.0",
76
- "@vitejs/plugin-vue": "^5.0.3",
77
- "eslint": "^8.56.0",
78
- "eslint-plugin-vue": "^9.21.1",
70
+ "@tresjs/core": "4.2.2",
71
+ "@tresjs/eslint-config": "^1.1.0",
72
+ "@types/node": "^20.14.12",
73
+ "@types/three": "^0.166.0",
74
+ "@typescript-eslint/eslint-plugin": "^7.17.0",
75
+ "@typescript-eslint/parser": "^7.17.0",
76
+ "@vitejs/plugin-vue": "^5.1.0",
77
+ "eslint": "^9.7.0",
78
+ "eslint-plugin-vue": "^9.27.0",
79
79
  "gsap": "^3.12.5",
80
+ "husky": "^9.1.1",
80
81
  "kolorist": "^1.8.0",
81
82
  "pathe": "^1.1.2",
82
- "release-it": "^17.0.3",
83
+ "release-it": "^17.6.0",
83
84
  "rollup-plugin-analyzer": "^4.0.0",
84
85
  "rollup-plugin-visualizer": "^5.12.0",
85
- "three": "^0.161.0",
86
- "tweakpane": "^3.1.10",
87
- "typescript": "^5.3.3",
88
- "unocss": "^0.58.5",
89
- "vite": "^5.0.12",
86
+ "three": "^0.166.1",
87
+ "typescript": "^5.5.4",
88
+ "unocss": "^0.61.5",
89
+ "vite": "^5.3.4",
90
90
  "vite-plugin-banner": "^0.7.1",
91
- "vite-plugin-dts": "3.7.2",
92
- "vite-plugin-glsl": "^1.2.1",
91
+ "vite-plugin-dts": "4.0.0-beta.1",
92
+ "vite-plugin-glsl": "^1.3.0",
93
93
  "vite-svg-loader": "^5.1.0",
94
- "vitepress": "1.0.0-rc.42"
94
+ "vitepress": "1.3.1"
95
95
  }
96
96
  }
@@ -1,5 +0,0 @@
1
- import { vLog } from './vLog';
2
- import { vLightHelper } from './vLightHelper';
3
- import { vAlwaysLookAt } from './vAlwaysLookAt';
4
- import { vDistanceTo } from './vDistanceTo';
5
- export { vLog, vLightHelper, vAlwaysLookAt, vDistanceTo };
@@ -1,4 +0,0 @@
1
- import type { Object3D } from 'three';
2
- export declare const vAlwaysLookAt: {
3
- updated: (el: Object3D, binding: any) => void;
4
- };
@@ -1,4 +0,0 @@
1
- export declare const vDistanceTo: {
2
- updated: (el: any, binding: any) => void;
3
- unmounted: (el: any) => void;
4
- };
@@ -1,5 +0,0 @@
1
- export declare const vLightHelper: {
2
- mounted: (el: any) => void;
3
- updated: (el: any) => void;
4
- unmounted: (el: any) => void;
5
- };
@@ -1,3 +0,0 @@
1
- export declare const vLog: {
2
- mounted: (el: any, binding: any) => void;
3
- };
@@ -1,10 +0,0 @@
1
- import { Pane } from 'tweakpane';
2
- type TweakPane = Pane & {
3
- addBlade(blade: any): void;
4
- addInput(blade: any): void;
5
- };
6
- export declare const useTweakPane: (selector?: string) => {
7
- pane: TweakPane;
8
- disposeTweakPane: () => void;
9
- };
10
- export {};