-
Notifications
You must be signed in to change notification settings - Fork 4
/
CameraServer.hx
67 lines (56 loc) · 2.19 KB
/
CameraServer.hx
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
// Automatically generated Godot externs: DO NOT EDIT
// MIT licensed, see LICENSE.md
package godot;
import cs.system.*;
/**
The `godot.CameraServer` keeps track of different cameras accessible in Godot. These are external cameras such as webcams or the cameras on your phone.
It is notably used to provide AR modules with a video feed from the camera.
Note: This class is currently only implemented on macOS and iOS. On other platforms, no `godot.CameraFeed`s will be available.
**/
@:libType
@:csNative
@:native("Godot.CameraServer")
@:autoBuild(godot.Godot.buildUserClass())
extern class CameraServer {
/**
`camera_feed_added` signal.
**/
public static var onCameraFeedAdded(get, never):Signal<(id:Int)->Void>;
@:dox(hide) @:noCompletion inline static function get_onCameraFeedAdded():Signal<(id:Int)->Void> {
return new Signal(SINGLETON, "camera_feed_added", Signal.SignalHandlerIntVoid.connectSignal, Signal.SignalHandlerIntVoid.disconnectSignal, Signal.SignalHandlerIntVoid.isSignalConnected);
}
/**
`camera_feed_removed` signal.
**/
public static var onCameraFeedRemoved(get, never):Signal<(id:Int)->Void>;
@:dox(hide) @:noCompletion inline static function get_onCameraFeedRemoved():Signal<(id:Int)->Void> {
return new Signal(SINGLETON, "camera_feed_removed", Signal.SignalHandlerIntVoid.connectSignal, Signal.SignalHandlerIntVoid.disconnectSignal, Signal.SignalHandlerIntVoid.isSignalConnected);
}
@:native("Singleton")
public static var SINGLETON(default, never):godot.Object;
/**
Returns the `godot.CameraFeed` corresponding to the camera with the given `index`.
**/
@:native("GetFeed")
public static function getFeed(index:Int):godot.CameraFeed;
/**
Returns the number of `godot.CameraFeed`s registered.
**/
@:native("GetFeedCount")
public static function getFeedCount():Int;
/**
Returns an array of `godot.CameraFeed`s.
**/
@:native("Feeds")
public static function feeds():godot.collections.Array;
/**
Adds the camera `feed` to the camera server.
**/
@:native("AddFeed")
public static function addFeed(feed:godot.CameraFeed):Void;
/**
Removes the specified camera `feed`.
**/
@:native("RemoveFeed")
public static function removeFeed(feed:godot.CameraFeed):Void;
}