@tresjs/core 5.0.0-next.5 → 5.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.
- package/dist/src/components/TresCanvas.vue.d.ts +14 -14
- package/dist/src/composables/index.d.ts +1 -1
- package/dist/src/composables/useCreateRafLoop/index.d.ts +2 -6
- package/dist/src/composables/useGraph/index.d.ts +1 -1
- package/dist/src/composables/useLoader/component.vue.d.ts +1 -1
- package/dist/src/composables/useLoop/index.d.ts +1 -1
- package/dist/src/composables/useRenderer/pixelRatio.d.ts +4 -0
- package/dist/src/composables/useRenderer/useRendererManager.d.ts +2 -1
- package/dist/src/composables/useTresContextProvider/index.d.ts +5 -3
- package/dist/src/devtools/DevtoolsMessenger.d.ts +53 -0
- package/dist/src/devtools/index.d.ts +1 -0
- package/dist/src/index.d.ts +3 -0
- package/dist/src/utils/array.d.ts +6 -0
- package/dist/src/utils/graph.d.ts +2 -2
- package/dist/src/utils/index.d.ts +1 -30
- package/dist/src/utils/is/dom.d.ts +1 -0
- package/dist/src/utils/is/index.d.ts +4 -0
- package/dist/src/utils/is/three.d.ts +162 -0
- package/dist/src/utils/is/tres.d.ts +70 -0
- package/dist/src/utils/is/typed.d.ts +1 -0
- package/dist/src/utils/is/util.d.ts +1 -0
- package/dist/src/utils/makeMap.d.ts +9 -0
- package/dist/src/utils/string.d.ts +1 -0
- package/dist/src/utils/three.d.ts +9 -0
- package/dist/tres.js +1853 -1846
- package/package.json +56 -36
- package/dist/src/utils/is.d.ts +0 -295
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tresjs/core",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "5.0.0-
|
|
5
|
-
"packageManager": "pnpm@10.
|
|
4
|
+
"version": "5.0.0-rc.0",
|
|
5
|
+
"packageManager": "pnpm@10.17.0",
|
|
6
6
|
"description": "Declarative ThreeJS using Vue Components",
|
|
7
7
|
"author": "Alvaro Saburido <hola@alvarosaburido.dev> (https://github.com/alvarosabu/)",
|
|
8
8
|
"license": "MIT",
|
|
@@ -21,7 +21,9 @@
|
|
|
21
21
|
"exports": {
|
|
22
22
|
".": {
|
|
23
23
|
"types": "./dist/index.d.ts",
|
|
24
|
-
"import": "./dist/tres.js"
|
|
24
|
+
"import": "./dist/tres.js",
|
|
25
|
+
"require": "./dist/tres.js",
|
|
26
|
+
"default": "./dist/tres.js"
|
|
25
27
|
},
|
|
26
28
|
"./components": {
|
|
27
29
|
"types": "./dist/src/components/index.d.ts"
|
|
@@ -59,62 +61,80 @@
|
|
|
59
61
|
"lint": "eslint .",
|
|
60
62
|
"lint:fix": "eslint . --fix",
|
|
61
63
|
"typecheck": "vue-tsc --noEmit",
|
|
62
|
-
"docs:dev": "
|
|
63
|
-
"docs:
|
|
64
|
-
"docs:
|
|
65
|
-
"docs:
|
|
66
|
-
"docs:
|
|
64
|
+
"docs:dev": "pnpm --filter='./docs' dev",
|
|
65
|
+
"docs:generate": "pnpm --filter='./docs' generate",
|
|
66
|
+
"docs:prepare": "pnpm --filter='./docs' prepare",
|
|
67
|
+
"docs:lint": "pnpm --filter='./docs' lint",
|
|
68
|
+
"docs:typecheck": "pnpm --filter='./docs' typecheck",
|
|
69
|
+
"postinstall": "pnpm run build && pnpm --filter='./docs' prepare"
|
|
67
70
|
},
|
|
68
71
|
"peerDependencies": {
|
|
69
72
|
"three": ">=0.133",
|
|
70
73
|
"vue": ">=3.4"
|
|
71
74
|
},
|
|
72
75
|
"dependencies": {
|
|
73
|
-
"@alvarosabu/utils": "^3.2.0",
|
|
74
76
|
"@pmndrs/pointer-events": "^6.6.17",
|
|
75
77
|
"@vue/devtools-api": "^7.7.2",
|
|
76
|
-
"@vueuse/core": "^
|
|
78
|
+
"@vueuse/core": "^13.9.0",
|
|
79
|
+
"radashi": "^12.6.2"
|
|
77
80
|
},
|
|
78
81
|
"devDependencies": {
|
|
79
82
|
"@release-it/conventional-changelog": "^10.0.0",
|
|
80
83
|
"@stackblitz/sdk": "^1.11.0",
|
|
81
|
-
"@tresjs/cientos": "5.0.0-
|
|
84
|
+
"@tresjs/cientos": "5.0.0-alpha.1",
|
|
82
85
|
"@tresjs/eslint-config": "^1.4.0",
|
|
83
|
-
"@
|
|
84
|
-
"@
|
|
85
|
-
"@typescript-eslint/
|
|
86
|
-
"@
|
|
86
|
+
"@tresjs/leches": "1.0.0-next.0",
|
|
87
|
+
"@types/three": "^0.180.0",
|
|
88
|
+
"@typescript-eslint/eslint-plugin": "^8.42.0",
|
|
89
|
+
"@typescript-eslint/parser": "^8.42.0",
|
|
90
|
+
"@vitejs/plugin-vue": "^6.0.1",
|
|
87
91
|
"@vitest/coverage-c8": "^0.33.0",
|
|
88
|
-
"@vitest/coverage-v8": "^3.
|
|
89
|
-
"@vitest/ui": "^3.
|
|
92
|
+
"@vitest/coverage-v8": "^3.2.4",
|
|
93
|
+
"@vitest/ui": "^3.2.4",
|
|
90
94
|
"@vue/test-utils": "^2.4.6",
|
|
91
|
-
"eslint": "^9.
|
|
92
|
-
"eslint-plugin-vue": "^
|
|
95
|
+
"eslint": "^9.34.0",
|
|
96
|
+
"eslint-plugin-vue": "^10.4.0",
|
|
93
97
|
"esno": "^4.8.0",
|
|
94
|
-
"gsap": "^3.
|
|
95
|
-
"jsdom": "^
|
|
98
|
+
"gsap": "^3.13.0",
|
|
99
|
+
"jsdom": "^27.0.0",
|
|
96
100
|
"kolorist": "^1.8.0",
|
|
97
101
|
"ohmyfetch": "^0.4.21",
|
|
98
|
-
"pathe": "^2.0.
|
|
99
|
-
"release-it": "^
|
|
102
|
+
"pathe": "^2.0.3",
|
|
103
|
+
"release-it": "^19.0.4",
|
|
100
104
|
"rollup-plugin-analyzer": "^4.0.0",
|
|
101
105
|
"rollup-plugin-copy": "^3.5.0",
|
|
102
|
-
"rollup-plugin-visualizer": "^
|
|
103
|
-
"sponsorkit": "^
|
|
104
|
-
"three": "^0.
|
|
105
|
-
"unocss": "^65.
|
|
106
|
-
"unplugin": "^2.
|
|
107
|
-
"unplugin-vue-components": "^
|
|
108
|
-
"vite": "^
|
|
109
|
-
"vite-plugin-banner": "^0.8.
|
|
106
|
+
"rollup-plugin-visualizer": "^6.0.3",
|
|
107
|
+
"sponsorkit": "^17.0.0",
|
|
108
|
+
"three": "^0.180.0",
|
|
109
|
+
"unocss": "^65.5.0",
|
|
110
|
+
"unplugin": "^2.3.10",
|
|
111
|
+
"unplugin-vue-components": "^29.0.0",
|
|
112
|
+
"vite": "^7.1.6",
|
|
113
|
+
"vite-plugin-banner": "^0.8.1",
|
|
110
114
|
"vite-plugin-dts": "4.5.4",
|
|
111
|
-
"vite-plugin-inspect": "^
|
|
115
|
+
"vite-plugin-inspect": "^11.3.3",
|
|
112
116
|
"vite-plugin-require-transform": "^1.0.21",
|
|
113
117
|
"vite-svg-loader": "^5.1.0",
|
|
114
|
-
"vitepress": "1.6.
|
|
115
|
-
"vitest": "3.
|
|
116
|
-
"vue": "3.5.
|
|
118
|
+
"vitepress": "1.6.4",
|
|
119
|
+
"vitest": "3.2.4",
|
|
120
|
+
"vue": "3.5.21",
|
|
117
121
|
"vue-demi": "^0.14.10",
|
|
118
|
-
"vue-tsc": "^
|
|
122
|
+
"vue-tsc": "^3.0.6"
|
|
123
|
+
},
|
|
124
|
+
"pnpm": {
|
|
125
|
+
"onlyBuiltDependencies": [
|
|
126
|
+
"better-sqlite3"
|
|
127
|
+
],
|
|
128
|
+
"ignoredBuiltDependencies": [
|
|
129
|
+
"vue-demi"
|
|
130
|
+
],
|
|
131
|
+
"overrides": {
|
|
132
|
+
"ipx": "^3.0.3",
|
|
133
|
+
"vue": "^3.5.21",
|
|
134
|
+
"vue-router": "^4.5.1"
|
|
135
|
+
}
|
|
136
|
+
},
|
|
137
|
+
"resolutions": {
|
|
138
|
+
"unimport": "4.1.1"
|
|
119
139
|
}
|
|
120
140
|
}
|
package/dist/src/utils/is.d.ts
DELETED
|
@@ -1,295 +0,0 @@
|
|
|
1
|
-
import { TresCamera, TresInstance, TresObject, TresPrimitive } from 'src/types';
|
|
2
|
-
import { BufferGeometry, Color, ColorRepresentation, Fog, Light, Material, Object3D, OrthographicCamera, PerspectiveCamera, Scene, Layers } from 'three';
|
|
3
|
-
/**
|
|
4
|
-
* Type guard to check if a value is undefined
|
|
5
|
-
* @param value - The value to check
|
|
6
|
-
* @returns True if the value is undefined, false otherwise
|
|
7
|
-
* @example
|
|
8
|
-
* ```ts
|
|
9
|
-
* const value = undefined
|
|
10
|
-
* if (isUndefined(value)) {
|
|
11
|
-
* // TypeScript knows value is undefined here
|
|
12
|
-
* }
|
|
13
|
-
* ```
|
|
14
|
-
*/
|
|
15
|
-
export declare function isUndefined(value: unknown): value is undefined;
|
|
16
|
-
/**
|
|
17
|
-
* Type guard to check if a value is an array
|
|
18
|
-
* @param value - The value to check
|
|
19
|
-
* @returns True if the value is an array, false otherwise
|
|
20
|
-
* @example
|
|
21
|
-
* ```ts
|
|
22
|
-
* const value = [1, 2, 3]
|
|
23
|
-
* if (isArray(value)) {
|
|
24
|
-
* // TypeScript knows value is Array<unknown> here
|
|
25
|
-
* value.length // OK
|
|
26
|
-
* value.map(x => x) // OK
|
|
27
|
-
* }
|
|
28
|
-
* ```
|
|
29
|
-
*/
|
|
30
|
-
export declare function isArray(value: unknown): value is Array<unknown>;
|
|
31
|
-
/**
|
|
32
|
-
* Type guard to check if a value is a number
|
|
33
|
-
* @param value - The value to check
|
|
34
|
-
* @returns True if the value is a number (including NaN and Infinity), false otherwise
|
|
35
|
-
* @example
|
|
36
|
-
* ```ts
|
|
37
|
-
* const value = 42
|
|
38
|
-
* if (isNumber(value)) {
|
|
39
|
-
* // TypeScript knows value is number here
|
|
40
|
-
* value.toFixed(2) // OK
|
|
41
|
-
* value * 2 // OK
|
|
42
|
-
* }
|
|
43
|
-
* ```
|
|
44
|
-
*/
|
|
45
|
-
export declare function isNumber(value: unknown): value is number;
|
|
46
|
-
/**
|
|
47
|
-
* Type guard to check if a value is a string
|
|
48
|
-
* @param value - The value to check
|
|
49
|
-
* @returns True if the value is a string, false otherwise
|
|
50
|
-
* @example
|
|
51
|
-
* ```ts
|
|
52
|
-
* const value = "hello"
|
|
53
|
-
* if (isString(value)) {
|
|
54
|
-
* // TypeScript knows value is string here
|
|
55
|
-
* value.length // OK
|
|
56
|
-
* value.toUpperCase() // OK
|
|
57
|
-
* }
|
|
58
|
-
* ```
|
|
59
|
-
*/
|
|
60
|
-
export declare function isString(value: unknown): value is string;
|
|
61
|
-
/**
|
|
62
|
-
* Type guard to check if a value is a boolean
|
|
63
|
-
* @param value - The value to check
|
|
64
|
-
* @returns True if the value is strictly true or false, false otherwise
|
|
65
|
-
* @example
|
|
66
|
-
* ```ts
|
|
67
|
-
* const value = true
|
|
68
|
-
* if (isBoolean(value)) {
|
|
69
|
-
* // TypeScript knows value is boolean here
|
|
70
|
-
* !value // OK
|
|
71
|
-
* value && true // OK
|
|
72
|
-
* }
|
|
73
|
-
* ```
|
|
74
|
-
*/
|
|
75
|
-
export declare function isBoolean(value: unknown): value is boolean;
|
|
76
|
-
/**
|
|
77
|
-
* Type guard to check if a value is a function
|
|
78
|
-
* @param value - The value to check
|
|
79
|
-
* @returns True if the value is a callable function, false otherwise
|
|
80
|
-
* @example
|
|
81
|
-
* ```ts
|
|
82
|
-
* const value = () => {}
|
|
83
|
-
* if (isFunction(value)) {
|
|
84
|
-
* // TypeScript knows value is (...args: any[]) => any here
|
|
85
|
-
* value() // OK
|
|
86
|
-
* value.call(null) // OK
|
|
87
|
-
* }
|
|
88
|
-
* ```
|
|
89
|
-
*/
|
|
90
|
-
export declare function isFunction(value: unknown): value is (...args: any[]) => any;
|
|
91
|
-
/**
|
|
92
|
-
* Type guard to check if a value is a plain object
|
|
93
|
-
* @param value - The value to check
|
|
94
|
-
* @returns True if the value is a plain object (not null, array, or function), false otherwise
|
|
95
|
-
* @example
|
|
96
|
-
* ```ts
|
|
97
|
-
* const value = { key: 'value' }
|
|
98
|
-
* if (isObject(value)) {
|
|
99
|
-
* // TypeScript knows value is Record<string | number | symbol, unknown> here
|
|
100
|
-
* Object.keys(value) // OK
|
|
101
|
-
* value.key // OK
|
|
102
|
-
* }
|
|
103
|
-
* ```
|
|
104
|
-
*/
|
|
105
|
-
export declare function isObject(value: unknown): value is Record<string | number | symbol, unknown>;
|
|
106
|
-
/**
|
|
107
|
-
* Type guard to check if a value is a Three.js Object3D
|
|
108
|
-
* @param value - The value to check
|
|
109
|
-
* @returns True if the value is a Three.js Object3D instance, false otherwise
|
|
110
|
-
* @example
|
|
111
|
-
* ```ts
|
|
112
|
-
* const value = new THREE.Object3D()
|
|
113
|
-
* if (isObject3D(value)) {
|
|
114
|
-
* // TypeScript knows value is Object3D here
|
|
115
|
-
* value.position // OK
|
|
116
|
-
* value.rotation // OK
|
|
117
|
-
* value.scale // OK
|
|
118
|
-
* }
|
|
119
|
-
* ```
|
|
120
|
-
*/
|
|
121
|
-
export declare function isObject3D(value: unknown): value is Object3D;
|
|
122
|
-
/**
|
|
123
|
-
* Type guard to check if a value is a Three.js Camera
|
|
124
|
-
* @param value - The value to check
|
|
125
|
-
* @returns True if the value is a Three.js Camera instance, false otherwise
|
|
126
|
-
* @example
|
|
127
|
-
* ```ts
|
|
128
|
-
* const value = new THREE.PerspectiveCamera()
|
|
129
|
-
* if (isCamera(value)) {
|
|
130
|
-
* // TypeScript knows value is Camera here
|
|
131
|
-
* value.fov // OK
|
|
132
|
-
* value.near // OK
|
|
133
|
-
* value.far // OK
|
|
134
|
-
* }
|
|
135
|
-
* ```
|
|
136
|
-
*/
|
|
137
|
-
export declare function isCamera(value: unknown): value is TresCamera;
|
|
138
|
-
export declare function isColor(value: unknown): value is Color;
|
|
139
|
-
export declare function isColorRepresentation(value: unknown): value is ColorRepresentation;
|
|
140
|
-
interface VectorLike {
|
|
141
|
-
set: (...args: any[]) => void;
|
|
142
|
-
constructor?: (...args: any[]) => any;
|
|
143
|
-
}
|
|
144
|
-
export declare function isVectorLike(value: unknown): value is VectorLike;
|
|
145
|
-
interface Copyable {
|
|
146
|
-
copy: (...args: any[]) => void;
|
|
147
|
-
constructor?: (...args: any[]) => any;
|
|
148
|
-
}
|
|
149
|
-
export declare function isCopyable(value: unknown): value is Copyable;
|
|
150
|
-
interface ClassInstance {
|
|
151
|
-
constructor?: (...args: any[]) => any;
|
|
152
|
-
}
|
|
153
|
-
export declare function isClassInstance(object: unknown): object is ClassInstance;
|
|
154
|
-
export declare function isLayers(value: unknown): value is Layers;
|
|
155
|
-
/**
|
|
156
|
-
* Type guard to check if a value is a Three.js OrthographicCamera
|
|
157
|
-
* @param value - The value to check
|
|
158
|
-
* @returns True if the value is a Three.js OrthographicCamera instance, false otherwise
|
|
159
|
-
*/
|
|
160
|
-
export declare function isOrthographicCamera(value: unknown): value is OrthographicCamera;
|
|
161
|
-
/**
|
|
162
|
-
* Type guard to check if a value is a Three.js PerspectiveCamera
|
|
163
|
-
* @param value - The value to check
|
|
164
|
-
* @returns True if the value is a Three.js PerspectiveCamera instance, false otherwise
|
|
165
|
-
*/
|
|
166
|
-
export declare function isPerspectiveCamera(value: unknown): value is PerspectiveCamera;
|
|
167
|
-
/**
|
|
168
|
-
* Type guard to check if a value is a Three.js BufferGeometry
|
|
169
|
-
* @param value - The value to check
|
|
170
|
-
* @returns True if the value is a Three.js BufferGeometry instance, false otherwise
|
|
171
|
-
* @example
|
|
172
|
-
* ```ts
|
|
173
|
-
* const value = new THREE.BufferGeometry()
|
|
174
|
-
* if (isBufferGeometry(value)) {
|
|
175
|
-
* // TypeScript knows value is BufferGeometry here
|
|
176
|
-
* value.attributes // OK
|
|
177
|
-
* value.index // OK
|
|
178
|
-
* value.computeVertexNormals() // OK
|
|
179
|
-
* }
|
|
180
|
-
* ```
|
|
181
|
-
*/
|
|
182
|
-
export declare function isBufferGeometry(value: unknown): value is BufferGeometry;
|
|
183
|
-
/**
|
|
184
|
-
* Type guard to check if a value is a Three.js Material
|
|
185
|
-
* @param value - The value to check
|
|
186
|
-
* @returns True if the value is a Three.js Material instance, false otherwise
|
|
187
|
-
* @example
|
|
188
|
-
* ```ts
|
|
189
|
-
* const value = new THREE.MeshStandardMaterial()
|
|
190
|
-
* if (isMaterial(value)) {
|
|
191
|
-
* // TypeScript knows value is Material here
|
|
192
|
-
* value.color // OK
|
|
193
|
-
* value.metalness // OK
|
|
194
|
-
* value.roughness // OK
|
|
195
|
-
* }
|
|
196
|
-
* ```
|
|
197
|
-
*/
|
|
198
|
-
export declare function isMaterial(value: unknown): value is Material;
|
|
199
|
-
/**
|
|
200
|
-
* Type guard to check if a value is a Three.js Light
|
|
201
|
-
* @param value - The value to check
|
|
202
|
-
* @returns True if the value is a Three.js Light instance, false otherwise
|
|
203
|
-
* @example
|
|
204
|
-
* ```ts
|
|
205
|
-
* const value = new THREE.DirectionalLight()
|
|
206
|
-
* if (isLight(value)) {
|
|
207
|
-
* // TypeScript knows value is Light here
|
|
208
|
-
* value.intensity // OK
|
|
209
|
-
* value.color // OK
|
|
210
|
-
* value.position // OK
|
|
211
|
-
* }
|
|
212
|
-
* ```
|
|
213
|
-
*/
|
|
214
|
-
export declare function isLight(value: unknown): value is Light;
|
|
215
|
-
/**
|
|
216
|
-
* Type guard to check if a value is a Three.js Fog
|
|
217
|
-
* @param value - The value to check
|
|
218
|
-
* @returns True if the value is a Three.js Fog instance, false otherwise
|
|
219
|
-
* @example
|
|
220
|
-
* ```ts
|
|
221
|
-
* const value = new THREE.Fog(0x000000, 1, 1000)
|
|
222
|
-
* if (isFog(value)) {
|
|
223
|
-
* // TypeScript knows value is Fog here
|
|
224
|
-
* value.color // OK
|
|
225
|
-
* value.near // OK
|
|
226
|
-
* value.far // OK
|
|
227
|
-
* }
|
|
228
|
-
* ```
|
|
229
|
-
*/
|
|
230
|
-
export declare function isFog(value: unknown): value is Fog;
|
|
231
|
-
/**
|
|
232
|
-
* Type guard to check if a value is a Three.js Scene
|
|
233
|
-
* @param value - The value to check
|
|
234
|
-
* @returns True if the value is a Three.js Scene instance, false otherwise
|
|
235
|
-
* @example
|
|
236
|
-
* ```ts
|
|
237
|
-
* const value = new THREE.Scene()
|
|
238
|
-
* if (isScene(value)) {
|
|
239
|
-
* // TypeScript knows value is Scene here
|
|
240
|
-
* value.children // OK
|
|
241
|
-
* value.add(new THREE.Object3D()) // OK
|
|
242
|
-
* value.remove(new THREE.Object3D()) // OK
|
|
243
|
-
* }
|
|
244
|
-
* ```
|
|
245
|
-
*/
|
|
246
|
-
export declare function isScene(value: unknown): value is Scene;
|
|
247
|
-
/**
|
|
248
|
-
* Type guard to check if a value is a TresObject
|
|
249
|
-
* @param value - The value to check
|
|
250
|
-
* @returns True if the value is a TresObject (Object3D | BufferGeometry | Material | Fog), false otherwise
|
|
251
|
-
* @example
|
|
252
|
-
* ```ts
|
|
253
|
-
* const value = new THREE.Mesh()
|
|
254
|
-
* if (isTresObject(value)) {
|
|
255
|
-
* // TypeScript knows value is TresObject here
|
|
256
|
-
* // You can use common properties and methods shared by all TresObjects
|
|
257
|
-
* }
|
|
258
|
-
* ```
|
|
259
|
-
* @remarks
|
|
260
|
-
* TresObject is a union type that represents the core Three.js objects that can be used in TresJS.
|
|
261
|
-
* This includes Object3D, BufferGeometry, Material, and Fog instances.
|
|
262
|
-
*/
|
|
263
|
-
export declare function isTresObject(value: unknown): value is TresObject;
|
|
264
|
-
/**
|
|
265
|
-
* Type guard to check if a value is a TresPrimitive
|
|
266
|
-
* @param value - The value to check
|
|
267
|
-
* @returns True if the value is a TresPrimitive instance, false otherwise
|
|
268
|
-
* @example
|
|
269
|
-
* ```ts
|
|
270
|
-
* const value = { isPrimitive: true }
|
|
271
|
-
* if (isTresPrimitive(value)) {
|
|
272
|
-
* // TypeScript knows value is TresPrimitive here
|
|
273
|
-
* // You can use properties and methods specific to TresPrimitives
|
|
274
|
-
* }
|
|
275
|
-
* ```
|
|
276
|
-
* @remarks
|
|
277
|
-
* TresPrimitive is a special type in TresJS that represents primitive objects
|
|
278
|
-
* that can be used directly in the scene without needing to be wrapped in a Three.js object.
|
|
279
|
-
*/
|
|
280
|
-
export declare function isTresPrimitive(value: unknown): value is TresPrimitive;
|
|
281
|
-
/**
|
|
282
|
-
* Type guard to check if a value is a TresInstance (has __tres property)
|
|
283
|
-
* @param value - The value to check
|
|
284
|
-
* @returns True if the value is a TresInstance (has __tres property), false otherwise
|
|
285
|
-
* @example
|
|
286
|
-
* ```ts
|
|
287
|
-
* const value = new THREE.Mesh()
|
|
288
|
-
* if (isTresInstance(value)) {
|
|
289
|
-
* // TypeScript knows value is TresInstance here
|
|
290
|
-
* // You can safely access value.__tres
|
|
291
|
-
* }
|
|
292
|
-
* ```
|
|
293
|
-
*/
|
|
294
|
-
export declare function isTresInstance(value: unknown): value is TresInstance;
|
|
295
|
-
export {};
|