-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: MainCamera and VirtualCamera components (#214)
- Loading branch information
Showing
3 changed files
with
38 additions
and
0 deletions.
There are no files selected for viewing
12 changes: 12 additions & 0 deletions
12
proto/decentraland/sdk/components/common/camera_transition.proto
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
syntax = "proto3"; | ||
package decentraland.sdk.components.common; | ||
|
||
message CameraTransition { | ||
optional uint32 from_entity = 1; | ||
optional uint32 to_entity = 2; | ||
oneof transition_mode { | ||
float time = 3; | ||
float speed = 4; // meters per second; e.g. speed 1 -> 1 meter per second | ||
} | ||
// EasingFunction easing_function = 5; // enable in the future | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
syntax = "proto3"; | ||
package decentraland.sdk.components; | ||
|
||
import "decentraland/sdk/components/common/id.proto"; | ||
option (common.ecs_component_id) = 1075; | ||
|
||
// PBMainCamera.virtualCameraEntity defines which VirtualCamera entity is active at the moment. 0 means none. | ||
message PBMainCamera { | ||
uint32 virtual_camera_entity = 1; // currently active virtual camera (default: 0) | ||
// repeated common.CameraTransition transitionOverrides = 2; // enable in the future | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
syntax = "proto3"; | ||
package decentraland.sdk.components; | ||
|
||
import "decentraland/sdk/components/common/camera_transition.proto"; | ||
import "decentraland/sdk/components/common/id.proto"; | ||
option (common.ecs_component_id) = 1076; | ||
|
||
// PBVirtualCamera represents a camera to be used at some point in time during the scene execution | ||
// * The defaultTransition represents the transition TOWARDS this camera. | ||
// * The lookAtEntity defines to which entity the Camera has to look at constantly (independent from | ||
// the holding entity transform). | ||
message PBVirtualCamera { | ||
common.CameraTransition default_transition = 1; | ||
optional uint32 look_at_entity = 2; | ||
} |