@lukekaalim/act-three 5.13.0 → 5.15.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 (2) hide show
  1. package/components.d.ts +68 -31
  2. package/package.json +1 -1
package/components.d.ts CHANGED
@@ -1,24 +1,43 @@
1
1
  import { Component, Ref } from "@lukekaalim/act";
2
- import { AmbientLight, Color, CubeTexture, DirectionalLight, Euler, HemisphereLight, Light, Line, LineLoop, LineSegments, Mesh, PerspectiveCamera, PointLight, Quaternion, Scene, Sprite, Texture, Vector3 } from "three";
2
+ import {
3
+ AmbientLight,
4
+ DirectionalLight,
5
+ Euler,
6
+ Group,
7
+ HemisphereLight,
8
+ Light,
9
+ Line,
10
+ LineLoop,
11
+ LineSegments,
12
+ Mesh,
13
+ PerspectiveCamera,
14
+ PointLight,
15
+ Points,
16
+ Quaternion,
17
+ Scene,
18
+ Sprite,
19
+ Texture,
20
+ Vector3,
21
+ } from "three";
3
22
 
4
23
  export type ReferenceProps<T> = {
5
- ref?: ((reference: T) => unknown) | Ref<null | T>
24
+ ref?: ((reference: T) => unknown) | Ref<null | T>;
6
25
  };
7
26
 
8
27
  type PropsFromList<TObject, TPropList extends (keyof TObject)[]> = {
9
- [Property in TPropList[number]]?: undefined | TObject[Property]
28
+ [Property in TPropList[number]]?: undefined | TObject[Property];
10
29
  };
11
30
 
12
31
  export type Object3DProps<T> =
13
32
  & ReferenceProps<T>
14
33
  & {
15
- name?: string,
16
- position?: Vector3,
17
- rotation?: Euler,
18
- quaternion?: Quaternion,
19
- visible?: boolean,
20
- scale?: Vector3,
21
- };
34
+ name?: string;
35
+ position?: Vector3;
36
+ rotation?: Euler;
37
+ quaternion?: Quaternion;
38
+ visible?: boolean;
39
+ scale?: Vector3;
40
+ };
22
41
 
23
42
  export const scene: Component<SceneProps>;
24
43
  export type SceneProps =
@@ -29,64 +48,82 @@ export type SceneProps =
29
48
  "backgroundIntensity",
30
49
  "overrideMaterial",
31
50
  "background",
32
- "environment"
33
- ]>
51
+ "environment",
52
+ ]>;
53
+
54
+ export const group: Component<GroupProps>;
55
+ export type GroupProps = Object3DProps<Group>;
34
56
 
35
57
  export const mesh: Component<MeshProps>;
36
- export type MeshProps =
58
+ export type MeshProps =
37
59
  & Object3DProps<Mesh>
38
- & PropsFromList<Mesh, ["geometry", "material"]>
60
+ & PropsFromList<Mesh, ["geometry", "material"]>;
39
61
 
40
62
  export const sprite: Component<SpriteProps>;
41
63
  export type SpriteProps =
42
64
  & Object3DProps<Sprite>
43
- & PropsFromList<Sprite, ["geometry", "material", "center"]>
65
+ & PropsFromList<Sprite, ["geometry", "material", "center"]>;
66
+
67
+ export const points: Component<PointsProps>;
68
+ export type PointsProps =
69
+ & Object3DProps<Points>
70
+ & PropsFromList<Points, ["geometry", "material"]>;
44
71
 
45
72
  export const line: Component<LineProps>;
46
73
  export const lineLoop: Component<LineProps>;
47
74
  export const lineSegments: Component<LineProps>;
48
75
  export type LineProps =
49
76
  & Object3DProps<Line>
50
- & PropsFromList<Line, ["geometry", "material"]>
51
-
77
+ & PropsFromList<Line, ["geometry", "material"]>;
52
78
 
53
79
  export type LightProps = PropsFromList<Light, [
54
- "color", "intensity", "shadow"
55
- ]>
80
+ "color",
81
+ "intensity",
82
+ "shadow",
83
+ ]>;
56
84
 
57
85
  export const pointLight: Component<PointerLightProps>;
58
86
  export type PointerLightProps =
59
87
  & Object3DProps<PointLight>
60
88
  & LightProps
61
89
  & PropsFromList<PointLight, [
62
- "distance", "castShadow",
63
- "decay", "shadow", "power"
64
- ]>
90
+ "distance",
91
+ "castShadow",
92
+ "decay",
93
+ "shadow",
94
+ "power",
95
+ ]>;
65
96
 
66
97
  export const ambientLight: Component<AmbientLightProps>;
67
98
  export type AmbientLightProps =
68
99
  & Object3DProps<AmbientLight>
69
- & LightProps
100
+ & LightProps;
70
101
 
71
102
  export const directionalLight: Component<DirectionalLightProps>;
72
103
  export type DirectionalLightProps =
73
104
  & Object3DProps<DirectionalLight>
74
105
  & LightProps
75
106
  & PropsFromList<DirectionalLight, [
76
- "shadow", "target",
77
- ]>
107
+ "shadow",
108
+ "target",
109
+ ]>;
78
110
 
79
111
  export const hemisphereLight: Component<HemisphereLightProps>;
80
112
  export type HemisphereLightProps =
81
113
  & Object3DProps<HemisphereLight>
82
- & LightProps
114
+ & LightProps;
83
115
 
84
116
  export const perspectiveCamera: Component<PerspectiveCameraProps>;
85
117
  export type PerspectiveCameraProps =
86
118
  & Object3DProps<PerspectiveCamera>
87
119
  & PropsFromList<PerspectiveCamera, [
88
- "aspect", "near", "far",
89
- "zoom", "fov", "focus", "view",
90
- "filmGauge", "filmOffset"
91
- ]>
92
-
120
+ "aspect",
121
+ "near",
122
+ "far",
123
+ "zoom",
124
+ "fov",
125
+ "focus",
126
+ "view",
127
+ "filmGauge",
128
+ "filmOffset",
129
+ ]>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lukekaalim/act-three",
3
- "version": "5.13.0",
3
+ "version": "5.15.0",
4
4
  "description": "Render threejs content using act",
5
5
  "main": "entry.js",
6
6
  "types": "entry.d.ts",