1+ import { string } from "three/tsl"
2+ import { PropertiesNode } from "./PropertiesNode"
3+
4+ const tslInputs : [ string , any ] [ ] = [
5+ [ "Bitangent" , [
6+ { "name" : "bitangentGeometry" , "desc" : "Normalized bitangent in geometry space." , "type" : "vec3" } ,
7+ { "name" : "bitangentLocal" , "desc" : "Normalized bitangent in local space." , "type" : "vec3" } ,
8+ { "name" : "bitangentView" , "desc" : "Normalized bitangent in view space." , "type" : "vec3" } ,
9+ { "name" : "bitangentWorld" , "desc" : "Normalized bitangent in world space." , "type" : "vec3" } ,
10+ { "name" : "transformedBitangentView" , "desc" : "Normalized transformed bitangent in view space." , "type" : "vec3" } ,
11+ { "name" : "transformedBitangentWorld" , "desc" : "Normalized transformed bitangent in world space." , "type" : "vec3" }
12+ ] ] ,
13+
14+ [ "Camera" , [
15+ { "name" : "cameraNear" , "desc" : "Near plane distance of the camera." , "type" : "float" } ,
16+ { "name" : "cameraFar" , "desc" : "Far plane distance of the camera." , "type" : "float" } ,
17+ { "name" : "cameraProjectionMatrix" , "desc" : "Projection matrix of the camera." , "type" : "mat4" } ,
18+ { "name" : "cameraProjectionMatrixInverse" , "desc" : "Inverse projection matrix of the camera." , "type" : "mat4" } ,
19+ { "name" : "cameraViewMatrix" , "desc" : "View matrix of the camera." , "type" : "mat4" } ,
20+ { "name" : "cameraWorldMatrix" , "desc" : "World matrix of the camera." , "type" : "mat4" } ,
21+ { "name" : "cameraNormalMatrix" , "desc" : "Normal matrix of the camera." , "type" : "mat3" } ,
22+ { "name" : "cameraPosition" , "desc" : "World position of the camera." , "type" : "vec3" }
23+ ] ] ,
24+
25+ [ "Model" , [
26+ { "name" : "modelDirection" , "desc" : "Direction of the model." , "type" : "vec3" } ,
27+ { "name" : "modelViewMatrix" , "desc" : "View-space matrix of the model." , "type" : "mat4" } ,
28+ { "name" : "modelNormalMatrix" , "desc" : "View-space matrix of the model." , "type" : "mat3" } ,
29+ { "name" : "modelWorldMatrix" , "desc" : "World-space matrix of the model." , "type" : "mat4" } ,
30+ { "name" : "modelPosition" , "desc" : "Position of the model." , "type" : "vec3" } ,
31+ { "name" : "modelScale" , "desc" : "Scale of the model." , "type" : "vec3" } ,
32+ { "name" : "modelViewPosition" , "desc" : "View-space position of the model." , "type" : "vec3" } ,
33+ { "name" : "modelWorldMatrixInverse" , "desc" : "Inverse world matrix of the model." , "type" : "mat4" } ,
34+ { "name" : "highpModelViewMatrix" , "desc" : "View-space matrix of the model computed on CPU using 64-bit." , "type" : "mat4" } ,
35+ { "name" : "highpModelNormalViewMatrix" , "desc" : "View-space normal matrix of the model computed on CPU using 64-bit." , "type" : "mat3" }
36+ ] ] ,
37+
38+ [ "Normal" , [
39+ { "name" : "normalGeometry" , "desc" : "Normal attribute of geometry." , "type" : "vec3" } ,
40+ { "name" : "normalLocal" , "desc" : "Local variable for normal." , "type" : "vec3" } ,
41+ { "name" : "normalView" , "desc" : "Normalized view normal." , "type" : "vec3" } ,
42+ { "name" : "normalWorld" , "desc" : "Normalized world normal." , "type" : "vec3" } ,
43+ { "name" : "transformedNormalView" , "desc" : "Transformed normal in view space." , "type" : "vec3" } ,
44+ { "name" : "transformedNormalWorld" , "desc" : "Normalized transformed normal in world space." , "type" : "vec3" } ,
45+ { "name" : "transformedClearcoatNormalView" , "desc" : "Transformed clearcoat normal in view space." , "type" : "vec3" }
46+ ] ] ,
47+
48+ [ "Position" , [
49+ { "name" : "positionGeometry" , "desc" : "Position attribute of geometry." , "type" : "vec3" } ,
50+ { "name" : "positionLocal" , "desc" : "Local variable for position." , "type" : "vec3" } ,
51+ { "name" : "positionWorld" , "desc" : "World position." , "type" : "vec3" } ,
52+ { "name" : "positionWorldDirection" , "desc" : "Normalized world direction." , "type" : "vec3" } ,
53+ { "name" : "positionView" , "desc" : "View position." , "type" : "vec3" } ,
54+ { "name" : "positionViewDirection" , "desc" : "Normalized view direction." , "type" : "vec3" }
55+ ] ] ,
56+
57+ [ "Tangent" , [
58+ { "name" : "tangentGeometry" , "desc" : "Tangent attribute of geometry." , "type" : "vec4" } ,
59+ { "name" : "tangentLocal" , "desc" : "Local variable for tangent." , "type" : "vec3" } ,
60+ { "name" : "tangentView" , "desc" : "Normalized view tangent." , "type" : "vec3" } ,
61+ { "name" : "tangentWorld" , "desc" : "Normalized world tangent." , "type" : "vec3" } ,
62+ { "name" : "transformedTangentView" , "desc" : "Transformed tangent in view space." , "type" : "vec3" } ,
63+ { "name" : "transformedTangentWorld" , "desc" : "Normalized transformed tangent in world space." , "type" : "vec3" }
64+ ] ] ,
65+
66+ [ "Screen" , [
67+ { "name" : "screenUV" , "desc" : "Returns the normalized frame buffer coordinate." , "type" : "vec2" } ,
68+ { "name" : "screenCoordinate" , "desc" : "Returns the frame buffer coordinate in physical pixel units." , "type" : "vec2" } ,
69+ { "name" : "screentSize" , "desc" : "Returns the frame buffer size in physical pixel units." , "type" : "vec2" }
70+ ] ] ,
71+
72+ [ "Viewport" , [
73+ { "name" : "viewportUV" , "desc" : "Returns the normalized viewport coordinate." , "type" : "vec2" } ,
74+ { "name" : "viewport" , "desc" : "Returns the viewport dimension in physical pixel units." , "type" : "vec4" } ,
75+ { "name" : "viewportCoordinate" , "desc" : "Returns the viewport coordinate in physical pixel units." , "type" : "vec2" } ,
76+ { "name" : "viewportSize" , "desc" : "Returns the viewport size in physical pixel units." , "type" : "vec2" }
77+ ] ] ,
78+
79+ [ "Reflect" , [
80+ { "name" : "reflectView" , "desc" : "Computes reflection direction in view space." , "type" : "vec3" } ,
81+ { "name" : "reflectVector" , "desc" : "Transforms the reflection direction to world space." , "type" : "vec3" }
82+ ] ]
83+ ]
84+
85+
86+ export const tslInputNodes = tslInputs . map ( group => ( {
87+ TypeClass : PropertiesNode ,
88+ name : group [ 0 ] ,
89+ id : group [ 0 ] . toLowerCase ( ) ,
90+ constructorArgs : [ group [ 0 ] , group [ 1 ] , ( s :string ) => s . replace ( group [ 0 ] . toLowerCase ( ) , "" ) ]
91+ } ) )
0 commit comments