@lukekaalim/act-three 5.10.5 → 5.11.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/components.d.ts +85 -0
- package/entry.d.ts +2 -1
- package/package.json +1 -1
package/components.d.ts
ADDED
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { Component, Ref } from "@lukekaalim/act";
|
|
2
|
+
import { AmbientLight, Color, CubeTexture, DirectionalLight, Euler, HemisphereLight, Light, Mesh, PerspectiveCamera, PointLight, Quaternion, Scene, Sprite, Texture, Vector3 } from "three";
|
|
3
|
+
|
|
4
|
+
export type ReferenceProps<T> = {
|
|
5
|
+
ref?: ((reference: T) => unknown) | Ref<T>
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
type PropsFromList<TObject, TPropList extends (keyof TObject)[]> = {
|
|
9
|
+
[Property in TPropList[number]]?: undefined | TObject[Property]
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export type Object3DProps<T> =
|
|
13
|
+
& ReferenceProps<T>
|
|
14
|
+
& {
|
|
15
|
+
name?: string,
|
|
16
|
+
position?: Vector3,
|
|
17
|
+
rotation?: Euler,
|
|
18
|
+
quaternion?: Quaternion,
|
|
19
|
+
visible?: boolean,
|
|
20
|
+
scale?: Vector3,
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export const scene: Component<SceneProps>;
|
|
24
|
+
export type SceneProps =
|
|
25
|
+
& Object3DProps<Scene>
|
|
26
|
+
& PropsFromList<Scene, [
|
|
27
|
+
"fog",
|
|
28
|
+
"backgroundBlurriness",
|
|
29
|
+
"backgroundIntensity",
|
|
30
|
+
"overrideMaterial",
|
|
31
|
+
"background",
|
|
32
|
+
"environment"
|
|
33
|
+
]>
|
|
34
|
+
|
|
35
|
+
export const mesh: Component<MeshProps>;
|
|
36
|
+
export type MeshProps =
|
|
37
|
+
& Object3DProps<Mesh>
|
|
38
|
+
& PropsFromList<Mesh, ["geometry", "material"]>
|
|
39
|
+
|
|
40
|
+
export const sprite: Component<SpriteProps>;
|
|
41
|
+
export type SpriteProps =
|
|
42
|
+
& Object3DProps<Sprite>
|
|
43
|
+
& PropsFromList<Sprite, ["geometry", "material", "center"]>
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
export type LightProps = PropsFromList<Light, [
|
|
47
|
+
"color", "intensity", "shadow"
|
|
48
|
+
]>
|
|
49
|
+
|
|
50
|
+
export const pointLight: Component<PointerLightProps>;
|
|
51
|
+
export type PointerLightProps =
|
|
52
|
+
& Object3DProps<PointLight>
|
|
53
|
+
& LightProps
|
|
54
|
+
& PropsFromList<PointLight, [
|
|
55
|
+
"distance", "castShadow",
|
|
56
|
+
"decay", "shadow", "power"
|
|
57
|
+
]>
|
|
58
|
+
|
|
59
|
+
export const ambientLight: Component<AmbientLightProps>;
|
|
60
|
+
export type AmbientLightProps =
|
|
61
|
+
& Object3DProps<AmbientLight>
|
|
62
|
+
& LightProps
|
|
63
|
+
|
|
64
|
+
export const directionalLight: Component<DirectionalLightProps>;
|
|
65
|
+
export type DirectionalLightProps =
|
|
66
|
+
& Object3DProps<DirectionalLight>
|
|
67
|
+
& LightProps
|
|
68
|
+
& PropsFromList<DirectionalLight, [
|
|
69
|
+
"shadow", "target",
|
|
70
|
+
]>
|
|
71
|
+
|
|
72
|
+
export const hemisphereLight: Component<HemisphereLightProps>;
|
|
73
|
+
export type HemisphereLightProps =
|
|
74
|
+
& Object3DProps<HemisphereLight>
|
|
75
|
+
& LightProps
|
|
76
|
+
|
|
77
|
+
export const perspectiveCamera: Component<PerspectiveCameraProps>;
|
|
78
|
+
export type PerspectiveCameraProps =
|
|
79
|
+
& Object3DProps<PerspectiveCamera>
|
|
80
|
+
& PropsFromList<PerspectiveCamera, [
|
|
81
|
+
"aspect", "near", "far",
|
|
82
|
+
"zoom", "fov", "focus", "view",
|
|
83
|
+
"filmGauge", "filmOffset"
|
|
84
|
+
]>
|
|
85
|
+
|
package/entry.d.ts
CHANGED