Remove scene exit handling and related entities
This commit is contained in:
@@ -14,7 +14,6 @@ import {
|
||||
createPlayerStartEntity,
|
||||
createPointLightEntity,
|
||||
createSceneEntryEntity,
|
||||
createSceneExitEntity,
|
||||
createSoundEmitterEntity,
|
||||
createSpotLightEntity,
|
||||
createTeleportTargetEntity,
|
||||
@@ -64,7 +63,7 @@ function createTransformCommandLabel(session: ActiveTransformSession): string {
|
||||
? "teleport target"
|
||||
: session.target.entityKind === "interactable"
|
||||
? "interactable"
|
||||
: "scene exit";
|
||||
: "entity";
|
||||
break;
|
||||
case "modelInstance":
|
||||
break;
|
||||
@@ -280,14 +279,6 @@ export function createCommitTransformSessionCommand(document: SceneDocument, ses
|
||||
}),
|
||||
label: createTransformCommandLabel(session)
|
||||
});
|
||||
case "sceneExit":
|
||||
return createUpsertEntityCommand({
|
||||
entity: createSceneExitEntity({
|
||||
...entity,
|
||||
position: session.preview.position
|
||||
}),
|
||||
label: createTransformCommandLabel(session)
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,8 +6,7 @@ export const CONTROL_ENTITY_TARGET_KINDS = [
|
||||
"soundEmitter"
|
||||
] as const;
|
||||
export const CONTROL_INTERACTION_TARGET_KINDS = [
|
||||
"interactable",
|
||||
"sceneExit"
|
||||
"interactable"
|
||||
] as const;
|
||||
export const CONTROL_CAPABILITY_KINDS = [
|
||||
"projectTimePause",
|
||||
@@ -1874,8 +1873,6 @@ function formatTargetKindLabel(
|
||||
return "Sound Emitter";
|
||||
case "interactable":
|
||||
return "Interactable";
|
||||
case "sceneExit":
|
||||
return "Scene Exit";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@ import {
|
||||
createSetLightEnabledControlEffect,
|
||||
createSetLightIntensityControlEffect,
|
||||
createSetModelInstanceVisibleControlEffect,
|
||||
createProjectGlobalControlTargetRef,
|
||||
createSetSoundVolumeControlEffect,
|
||||
createSetSunLightColorControlEffect,
|
||||
createSetSunLightIntensityControlEffect,
|
||||
@@ -98,13 +99,14 @@ export interface ProjectScheduleTargetOption {
|
||||
}
|
||||
|
||||
const PROJECT_SCHEDULE_GROUP_ORDER: Record<string, number> = {
|
||||
"Scene Lighting": 0,
|
||||
Actors: 1,
|
||||
"Model Instances": 2,
|
||||
"Sound Emitters": 3,
|
||||
Interactions: 4,
|
||||
Lights: 5,
|
||||
Other: 6
|
||||
Project: 0,
|
||||
"Scene Lighting": 1,
|
||||
Actors: 2,
|
||||
"Model Instances": 3,
|
||||
"Sound Emitters": 4,
|
||||
Interactions: 5,
|
||||
Lights: 6,
|
||||
Other: 7
|
||||
};
|
||||
|
||||
const PROJECT_SCHEDULE_EFFECT_OPTIONS: Record<
|
||||
@@ -265,6 +267,17 @@ function createSceneLightingTargetOption(
|
||||
};
|
||||
}
|
||||
|
||||
function createProjectEventTargetOption(): ProjectScheduleTargetOption {
|
||||
return {
|
||||
key: getControlTargetRefKey(createProjectGlobalControlTargetRef()),
|
||||
target: createProjectGlobalControlTargetRef(),
|
||||
label: "Project Events",
|
||||
subtitle: "Timeline-triggered sequences and global one-shot events.",
|
||||
groupLabel: "Project",
|
||||
defaults: {}
|
||||
};
|
||||
}
|
||||
|
||||
function createFallbackProjectScheduleTargetOption(
|
||||
target: ControlTargetRef
|
||||
): ProjectScheduleTargetOption {
|
||||
@@ -289,6 +302,7 @@ export function listProjectScheduleTargetOptions(
|
||||
}
|
||||
};
|
||||
|
||||
pushOption(createProjectEventTargetOption());
|
||||
pushOption(createSceneLightingTargetOption(projectDocument));
|
||||
|
||||
for (const actor of listProjectNpcActors(projectDocument)) {
|
||||
@@ -400,19 +414,6 @@ export function listProjectScheduleTargetOptions(
|
||||
});
|
||||
break;
|
||||
}
|
||||
case "sceneExit": {
|
||||
const target = createInteractionControlTargetRef("sceneExit", entity.id);
|
||||
|
||||
pushOption({
|
||||
key: getControlTargetRefKey(target),
|
||||
target,
|
||||
label,
|
||||
subtitle: getSceneTargetSubtitle(scene),
|
||||
groupLabel: "Interactions",
|
||||
defaults: {}
|
||||
});
|
||||
break;
|
||||
}
|
||||
case "pointLight": {
|
||||
const target = createLightControlTargetRef("pointLight", entity.id);
|
||||
|
||||
|
||||
@@ -353,7 +353,6 @@ function includeEntity(bounds: FocusBoundsAccumulator, entity: EntityInstance) {
|
||||
includeTeleportTarget(bounds, entity.position);
|
||||
break;
|
||||
case "interactable":
|
||||
case "sceneExit":
|
||||
includeSphereEntity(bounds, entity.position, Math.max(0.4, entity.radius));
|
||||
break;
|
||||
}
|
||||
@@ -376,7 +375,6 @@ function createEntityFocusTarget(entity: EntityInstance): ViewportFocusTarget {
|
||||
case "teleportTarget":
|
||||
return createTeleportTargetFocusTarget(entity.position);
|
||||
case "interactable":
|
||||
case "sceneExit":
|
||||
return createSphereEntityFocusTarget(entity.position, entity.radius, 0.65);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user