d8b916d31f
🔍 Lint / 🪄 Check lint (push) Has been cancelled
🔍 Lint / 🎨 Check format (push) Has been cancelled
🔍 Lint / 🔎 Typecheck (push) Has been cancelled
📊 Quality / 🔒 Security Audit (push) Has been cancelled
📊 Quality / 📋 Dependency Freshness (push) Has been cancelled
📊 Quality / 📦 Bundle Size (push) Has been cancelled
🔍 Lint / 🏗 Build (push) Has been cancelled
18 lines
392 B
TypeScript
18 lines
392 B
TypeScript
import type { MapNode, MapNodeInstanceTransform } from "@/types/map/mapScene";
|
|
|
|
export function mapNodeToInstanceTransform(
|
|
node: MapNode,
|
|
): MapNodeInstanceTransform {
|
|
const transform: MapNodeInstanceTransform = {
|
|
position: node.position,
|
|
rotation: node.rotation,
|
|
scale: node.scale,
|
|
};
|
|
|
|
if (node.id !== undefined) {
|
|
transform.id = node.id;
|
|
}
|
|
|
|
return transform;
|
|
}
|