-
Notifications
You must be signed in to change notification settings - Fork 57
/
ProjectedMaterial.d.ts
98 lines (90 loc) · 1.99 KB
/
ProjectedMaterial.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
declare module 'three-projected-material' {
import {
MeshPhysicalMaterial,
PerspectiveCamera,
Texture,
Vector2,
Matrix4,
Vector3,
BufferGeometry,
InstancedMesh,
MeshPhysicalMaterialParameters,
OrthographicCamera,
Mesh,
} from 'three'
interface ProjectedMaterialParameters extends MeshPhysicalMaterialParameters {
camera?: PerspectiveCamera | OrthographicCamera
texture?: Texture
textureScale?: number
textureOffset?: Vector2
cover?: boolean
backgroundOpacity?: number
}
export default class ProjectedMaterial extends MeshPhysicalMaterial {
camera: PerspectiveCamera | OrthographicCamera
texture: Texture
textureScale: number
textureOffset: Vector2
cover: boolean
backgroundOpacity: number
uniforms: {
projectedTexture: {
value: Texture
}
isTextureLoaded: {
value: boolean
}
isTextureProjected: {
value: boolean
}
backgroundOpacity: {
value: number
}
viewMatrixCamera: {
value: Matrix4
}
projectionMatrixCamera: {
value: Matrix4
}
projPosition: {
value: Vector3
}
projDirection: {
value: Vector3
}
savedModelMatrix: {
value: Matrix4
}
widthScaled: {
value: number
}
heightScaled: {
value: number
}
textureOffset: {
value: Vector2
}
}
readonly isProjectedMaterial = true
constructor({
camera,
texture,
textureScale,
textureOffset,
cover,
...options
}?: ProjectedMaterialParameters)
project(mesh: Mesh): void
projectInstanceAt(
index: number,
instancedMesh: InstancedMesh,
matrixWorld: Matrix4,
{
forceCameraSave,
}?: {
forceCameraSave?: boolean | undefined
}
): void
}
export function allocateProjectionData(geometry: BufferGeometry, instancesCount: number): void
}