MCPcopy Create free account
hub / github.com/BladeTransformerLLC/gauzilla / getVectorParam

Function getVectorParam

helper.js:51–62  ·  view source on GitHub ↗
(paramName, defaultValue)

Source from the content-addressed store, hash-verified

49
50
51function getVectorParam(paramName, defaultValue) {
52 const params = new URLSearchParams(window.location.search);
53 const param = params.get(paramName);
54 if (!param) {
55 return defaultValue; // Default value if the parameter is not found
56 }
57 const numbers = param.split(',').map(Number);
58 if (numbers.length !== 3 || numbers.some(isNaN)) {
59 return defaultValue; // Default value if the parameter is malformed
60 }
61 return numbers;
62}
63
64
65export function get_position_param() {

Callers 3

get_position_paramFunction · 0.85
get_target_paramFunction · 0.85
get_up_paramFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected