getComponent()

in src/math/Vector3.ts [99:110]


    getComponent(axis: number) {
        switch (axis) {
            case 0:
                return this.x;
            case 1:
                return this.y;
            case 2:
                return this.z;
            default:
                throw new Error(`Invalid component index: ${axis}`);
        }
    }