Release Healer Man 0.1.5
This commit is contained in:
@@ -201,6 +201,7 @@ const ADT_SOURCE_BASES = new Set([
|
||||
"z-y-negative-x",
|
||||
]);
|
||||
const GLOBAL_WMO_SOURCE_BASES = new Set(["draft", "flip-x"]);
|
||||
const GLOBAL_WMO_ALIGNMENTS = new Set(["player-anchor", "source"]);
|
||||
|
||||
function sourceBasisFor(recipe, environmentMode) {
|
||||
if (environmentMode !== "adt-hybrid") {
|
||||
@@ -220,6 +221,15 @@ function sourceBasisFor(recipe, environmentMode) {
|
||||
return basis;
|
||||
}
|
||||
|
||||
function coordinateAlignmentFor(recipe, environmentMode) {
|
||||
if (environmentMode !== "global-wmo") return "player-anchor";
|
||||
const alignment = recipe.globalWmoAlignment ?? "player-anchor";
|
||||
if (!GLOBAL_WMO_ALIGNMENTS.has(alignment)) {
|
||||
throw new Error(`${recipe.slug}: unsupported global WMO alignment ${alignment}.`);
|
||||
}
|
||||
return alignment;
|
||||
}
|
||||
|
||||
/**
|
||||
* Runtime drafts retain the original pipeline convention. wow.export ADT
|
||||
* packages have an additional horizontal basis change baked into their GLBs.
|
||||
@@ -238,7 +248,10 @@ function sourceToPackageBasis(position, environmentMode, sourceBasis) {
|
||||
: point;
|
||||
}
|
||||
|
||||
function coordinateMapper(draft, environmentMode, playerAnchor, sourceBasis) {
|
||||
function coordinateMapper(draft, environmentMode, playerAnchor, sourceBasis, alignment) {
|
||||
if (alignment === "source") {
|
||||
return (position) => sourceToPackageBasis(position, environmentMode, sourceBasis);
|
||||
}
|
||||
const sourceEntrance = draft?.entrance
|
||||
?? draft?.spawns?.[0]?.position
|
||||
?? playerAnchor.position;
|
||||
@@ -764,6 +777,7 @@ async function compile() {
|
||||
}
|
||||
const environmentMode = inferEnvironmentMode(recipe, assetPackage);
|
||||
const sourceBasis = sourceBasisFor(recipe, environmentMode);
|
||||
const coordinateAlignment = coordinateAlignmentFor(recipe, environmentMode);
|
||||
const playerAnchor = assetPackage.anchors.find((anchor) => anchor.kind === "player");
|
||||
const trashAnchor = assetPackage.anchors.find((anchor) => anchor.kind === "trash");
|
||||
const bossAnchor = assetPackage.anchors.find((anchor) => anchor.kind === "boss");
|
||||
@@ -794,6 +808,12 @@ async function compile() {
|
||||
environmentMode,
|
||||
playerAnchor,
|
||||
sourceBasis,
|
||||
coordinateAlignment,
|
||||
);
|
||||
const entrancePosition = mapPosition(
|
||||
draft?.entrance
|
||||
?? draft?.spawns?.[0]?.position
|
||||
?? playerAnchor.position,
|
||||
);
|
||||
const sourceEntities = (draft?.entities ?? [])
|
||||
.filter((entity) => (
|
||||
@@ -966,7 +986,7 @@ async function compile() {
|
||||
});
|
||||
for (let index = 0; index < 15; index += 1) {
|
||||
const segment = index < 6
|
||||
? interpolate(playerAnchor.position, trashAnchor.position, 0.25 + index * 0.1)
|
||||
? interpolate(entrancePosition, trashAnchor.position, 0.25 + index * 0.1)
|
||||
: interpolate(trashAnchor.position, bossAnchor.position, 0.08 + (index - 6) * 0.085);
|
||||
staticSpawns.push({
|
||||
id: `generated-trash-${index + 1}`,
|
||||
@@ -979,7 +999,7 @@ async function compile() {
|
||||
}
|
||||
|
||||
const allPoints = [
|
||||
playerAnchor.position,
|
||||
entrancePosition,
|
||||
trashAnchor.position,
|
||||
bossAnchor.position,
|
||||
...staticSpawns.map((spawn) => spawn.position),
|
||||
@@ -1010,7 +1030,9 @@ async function compile() {
|
||||
modelCoverageWarning,
|
||||
...(syntheticTrash
|
||||
? ["Trash identities and placements are procedural; boss identities come from the installed Ascension encounter catalog."]
|
||||
: [`Server positions were aligned to the packaged ${environmentMode} environment at its reviewed player anchor.`]),
|
||||
: coordinateAlignment === "source"
|
||||
? [`Server positions use the packaged ${environmentMode} environment's native world coordinates.`]
|
||||
: [`Server positions were aligned to the packaged ${environmentMode} environment at its reviewed player anchor.`]),
|
||||
];
|
||||
|
||||
definitions.push({
|
||||
@@ -1034,12 +1056,12 @@ async function compile() {
|
||||
bounds,
|
||||
entrance: {
|
||||
name: `${recipe.title} Entrance`,
|
||||
footPosition: vector(playerAnchor.position),
|
||||
footPosition: vector(entrancePosition),
|
||||
forward: [Math.sin(entranceYaw), 0, Math.cos(entranceYaw)],
|
||||
yaw: entranceYaw,
|
||||
},
|
||||
areas: [
|
||||
{ id: "entrance", name: `${recipe.title} Entrance`, center: vector(playerAnchor.position), radius: 35 },
|
||||
{ id: "entrance", name: `${recipe.title} Entrance`, center: vector(entrancePosition), radius: 35 },
|
||||
...bosses.map((boss) => ({
|
||||
id: `area-${slugPart(boss.name)}`,
|
||||
name: `${boss.name}'s Encounter`,
|
||||
@@ -1068,6 +1090,10 @@ async function compile() {
|
||||
? sourceBasis === "z-y-negative-x"
|
||||
? "three(x,y,z)=(wow.y,wow.z,wow.x)"
|
||||
: "three(x,y,z)=(-wow.y,wow.z,wow.x)"
|
||||
: coordinateAlignment === "source"
|
||||
? sourceBasis === "flip-x"
|
||||
? "three(x,y,z)=(-draft.x,draft.y,draft.z)"
|
||||
: "three(x,y,z)=draft(x,y,z)"
|
||||
: sourceBasis === "flip-x"
|
||||
? "three(x,y,z)=(-draft.x,draft.y,draft.z)+package-anchor-translation"
|
||||
: "three(x,y,z)=draft(x,y,z)+package-anchor-translation",
|
||||
|
||||
Reference in New Issue
Block a user