Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: virtual cam components iteration #219

Merged
merged 3 commits into from
Sep 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
syntax = "proto3";
package decentraland.sdk.components.common;

// Defines the transition used towards the camera that contains the CameraTransition.
// This structure may be updated in the future to specify from/to entities and to have easing functions.
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
float time = 1;
float speed = 2; // meters per second; e.g. speed 1 -> 1 meter per second
}
// EasingFunction easing_function = 5; // enable in the future
}
6 changes: 3 additions & 3 deletions proto/decentraland/sdk/components/main_camera.proto
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ 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.
// PBMainCamera.virtualCameraEntity defines which VirtualCamera entity is active at the moment.
// This component may hold 'repeated common.CameraTransition' transitionOverrides in the future
message PBMainCamera {
uint32 virtual_camera_entity = 1; // currently active virtual camera (default: 0)
// repeated common.CameraTransition transitionOverrides = 2; // enable in the future
optional uint32 virtual_camera_entity = 1; // current active virtual camera
}
5 changes: 3 additions & 2 deletions proto/decentraland/sdk/components/virtual_camera.proto
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@ 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 defaultTransition represents the transition TOWARDS this camera. If there is none, it's treated as
// an 'instant' transition (like using speed/time = 0)
// * 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 common.CameraTransition default_transition = 1;
optional uint32 look_at_entity = 2;
}
Loading