Index: js/sdk/Makefile-SDK-Emscripten.mak
===================================================================
--- js/sdk/Makefile-SDK-Emscripten.mak	(revision 944)
+++ js/sdk/Makefile-SDK-Emscripten.mak	(revision 1324)
@@ -1,16 +1,13 @@
 #
 # Framsticks SDK makefile for Emscripten builds
+#
+# Before 2020, this makefile could be used natively under Windows as well (see history if needed).
+# However, now that the Windows Subsystem for Linux (WSL) exists, this file only supports Linux.
 #
 
 include frams/Makefile-SDK-files
 
+# set this path based on the project directory structure
 JS_PATH=../js/sdk
-
-#Note: CURDIR needed because on linux, Emscripten does not differentiate between relative and absolute path, which causes shutil to raise Error("%s and %s are the same file" % (src, dst))
-ifeq ($(OS),Windows_NT)
-	CACHE_DIR=cache-tmp 
-else
-	CACHE_DIR=$(CURDIR)/cache-tmp 
-endif
 
 SDK_JS=$(JS_PATH)/frams-sdk.js
@@ -25,30 +22,24 @@
 
 # same as in cpp/frams/Makefile-SDK:
-CXXWARNINGS=-Wall -Wno-parentheses -Wno-overloaded-virtual -Wno-format -Werror=return-type
+CXXWARNINGS=-Wall -Wno-parentheses -Wno-overloaded-virtual -Wno-format -Wno-invalid-offsetof -Werror=return-type
 
-SDK_BUILD_CONFIG= -include frams/config/sdk_build_config.h
-CACHE_DESTINATION= --cache $(CACHE_DIR)
-CXXFLAGS= -I$(CURDIR) -std=gnu++11 -O3 $(SDK_BUILD_CONFIG) $(CXXWARNINGS) $(CACHE_DESTINATION)
+SDK_BUILD_CONFIG= -include frams/config/sdk-build-config.h
+CXXFLAGS= -I$(CURDIR) -std=gnu++17 -O3 $(SDK_BUILD_CONFIG) $(CXXWARNINGS)
+
+# avoid "duplicate symbol" linking errors. Instead of this pipeline, could use the "uniq" function built in included gmsl, or define a recursive function to filter out duplicates while preserving the order of elements. Also consider "$^".
+SDK_LIB_OBJS := $(shell echo $(SDK_LIB_OBJS) | tr ' ' '\n' | sort | uniq | tr '\n' ' ')
 
 #############################################
 
-$(SDK_JS): $(I_IMPL_JS) $(I_IMPL_SRC) $(I_OBJ) $(SDK_BIN)
-	$(CXX) $(SDK_BIN) $(I_OBJ) --post-js $(I_IMPL_JS) -g4 --memory-init-file 0 -s FORCE_FILESYSTEM=1 -s ALIASING_FUNCTION_POINTERS=0 -s ALLOW_MEMORY_GROWTH=1 -s ASSERTIONS=3 -s BINARYEN_ASYNC_COMPILATION=0 -s WASM=0 $(CACHE_DESTINATION) -o $@
-
-$(SDK_BIN): $(SDK_LIB_OBJS)
-	$(CXX) $(SDK_LIB_OBJS) $(LDFLAGS) $(CACHE_DESTINATION) -o $@
+$(SDK_JS): $(I_IMPL_JS) $(I_IMPL_SRC) $(I_OBJ) $(SDK_LIB_OBJS)
+	$(CXX) $(SDK_LIB_OBJS) $(I_OBJ) --post-js $(I_IMPL_JS) -O3 -s FORCE_FILESYSTEM=1 -s ALIASING_FUNCTION_POINTERS=0 -s ALLOW_MEMORY_GROWTH=1 -s ASSERTIONS=3 -s BINARYEN_ASYNC_COMPILATION=0 -sWASM=0  -o $@
 
 $(I_IMPL_SRC) $(I_IMPL_JS): $(I_IDL)
-	python $(EMSCRIPTEN)/tools/webidl_binder.py $(I_IDL) $(I_PATH)/js_interface_impl
+	python3 $(EMSCRIPTEN)/tools/webidl_binder.py $(I_IDL) $(I_PATH)/js_interface_impl
 
 #############################################
 
+include common/Makefile-maintain
 
-full_clean:
-ifeq ($(OS),Windows_NT)
-	del /s /q WebIDLGrammar.pkl parser.out *.o
-	rmdir /s /q $(CACHE_DIR)
-else
-	rm -f WebIDLGrammar.pkl parser.out $(SDK_LIB_OBJS)
-	rm -rf $(CACHE_DIR)
-endif
+full_clean: clean
+	rm -f WebIDLGrammar.pkl parser.out $(I_OBJ) $(I_IMPL_SRC) $(I_IMPL_JS) $(SDK_BIN) $(SDK_JS)
Index: js/sdk/README.txt
===================================================================
--- js/sdk/README.txt	(revision 944)
+++ js/sdk/README.txt	(revision 1324)
@@ -8,5 +8,5 @@
 of Emscripten installed. To perform a compilation, you first need to activate the Emscripten SDK:
 
-On Windows:
+On Windows (deprecated):
 	emsdk.bat activate latest
 
@@ -18,5 +18,5 @@
 After activating the Emscripten SDK, to compile Framsticks SDK you need to call:
 
-On Windows:
+On Windows (deprecated):
 	emmake.bat mingw32-make.exe -j8 --directory=../../cpp -f ../js/sdk/Makefile-SDK-Emscripten.mak
 
Index: js/sdk/js_interface/js_interface.cpp
===================================================================
--- js/sdk/js_interface/js_interface.cpp	(revision 944)
+++ js/sdk/js_interface/js_interface.cpp	(revision 1324)
@@ -15,4 +15,14 @@
 #include <frams/genetics/f9/f9_oper.h>
 #include <frams/genetics/fF/fF_oper.h>
+#include <frams/genetics/fS/fS_oper.h>
+#include <frams/genetics/fn/fn_oper.h>
+#include <frams/genetics/genoconv.h>
+#include <frams/genetics/f4/f4_conv.h>
+#include <frams/genetics/fH/fH_conv.h>
+#include <frams/genetics/fB/fB_conv.h>
+#include <frams/genetics/f9/f9_conv.h>
+#include <frams/genetics/fS/fS_conv.h>
+#include <frams/genetics/fn/fn_conv.h>
+#include <frams/genetics/fL/fL_conv.h>
 #include <common/loggers/loggers.h>
 #include <common/loggers/loggertostdout.h>
Index: js/sdk/js_interface/js_interface.idl
===================================================================
--- js/sdk/js_interface/js_interface.idl	(revision 944)
+++ js/sdk/js_interface/js_interface.idl	(revision 1324)
@@ -91,5 +91,5 @@
 
 enum Part_Shape {
-	"Part::SHAPE_BALL_AND_STICK",
+	"Part::SHAPE_BALL",
 	"Part::SHAPE_ELLIPSOID",
 	"Part::SHAPE_CUBOID",
@@ -111,8 +111,8 @@
 	[Value] attribute Pt3D scale;
 	[Value] attribute Pt3D vcolor;
-	attribute double vsize;
 	attribute long shape;
-
-	void Part(optional Part_Shape s = "Part::SHAPE_BALL_AND_STICK");
+	static readonly attribute double BALL_AND_STICK_RADIUS;
+
+	void Part(optional Part_Shape s = "Part::SHAPE_BALL");
 
 	void setPositionAndRotationFromAxis([Const, Ref] Pt3D p1, [Const, Ref] Pt3D p2);
@@ -126,6 +126,8 @@
 
 enum Joint_Shape {
-	"Joint::SHAPE_BALL_AND_STICK",
-	"Joint::SHAPE_FIXED"
+	"Joint::SHAPE_STICK",
+	"Joint::SHAPE_FIXED",
+	"Joint::SHAPE_HINGE_X",
+	"Joint::SHAPE_HINGE_XY"
 };
 
@@ -247,6 +249,7 @@
 	void Geno([Const] DOMString genstring, byte genformat, [Const] DOMString genname, [Const] DOMString comment);
 	boolean isValid();
-	byte getFormat();
+	[Value] SString getFormat();
 	[Value] SString getGenes();
+	[Value] SString getGenesAndFormat();
 	static Validators useValidators(Validators val);
 	static GenoConvManager useConverters(GenoConvManager gcm);
@@ -261,8 +264,8 @@
 
 enum Model_ShapeType {
-	"Model::SHAPE_UNKNOWN",
-	"Model::SHAPE_ILLEGAL",
-	"Model::SHAPE_BALL_AND_STICK",
-	"Model::SHAPE_SOLIDS"
+	"Model::SHAPETYPE_UNKNOWN",
+	"Model::SHAPETYPE_ILLEGAL",
+	"Model::SHAPETYPE_BALL_AND_STICK",
+	"Model::SHAPETYPE_SOLIDS"
 };
 
@@ -272,6 +275,9 @@
 	attribute double startenergy;
 
-	void Model();
-	void Model([Ref, Const] Geno newgeno, optional boolean buildmaps = false);
+	void Model(optional Model_ShapeType sh = "Model::SHAPETYPE_UNKNOWN");
+
+	void Model([Ref, Const] Geno src, Model_ShapeType sh, optional boolean buildmaps = false, optional boolean _using_checkpoints = false, optional boolean _is_checkpoint = false);
+	// The following constructor exists in the SDK, however in idl functions need to differ in number of arguments so it can't exist with the previous constructor
+	//void Model([Ref, Const] Model model, optional boolean buildmaps = false, optional boolean _using_checkpoints = false, optional boolean _is_checkpoint = false);
 
 	[Value] MultiMap getMap();
@@ -283,7 +289,8 @@
 	long getErrorPosition(boolean includingwarnings);
 	Model_ShapeType getShapeType();
+	void declareShapeType(Model_ShapeType sh);
 	void updateRefno();
 	[Const, Value] Geno getF0Geno();
-	void makeGeno([Ref] Geno geno);
+	void makeGeno([Ref] Geno geno, optional MultiMap sh,optional boolean handle_defaults,optional boolean can_be_invalid);
 	void setGeno([Const, Ref] Geno newgeno);
 	void setValidationLevel(long level);
@@ -348,5 +355,7 @@
 
 interface GenotypeMiniLoader : MultiParamLoader {
-    void GenotypeMiniLoader(VirtFILE f);
+	//this constructor has the same number of arguments as the next one which is not allowed in idl
+    //void GenotypeMiniLoader(VirtFILE f);
+	void GenotypeMiniLoader([Const] DOMString filename);
 	GenotypeMini loadNextGenotype();
 };
@@ -442,4 +451,40 @@
 };
 
+interface GenoConverter {
+	[Const] attribute DOMString name;
+	[Value] attribute SString in_format;
+	[Value] attribute SString out_format;
+};
+
+interface GenoConv_f40 : GenoConverter{
+	void GenoConv_f40();
+};
+
+interface GenoConv_f90 : GenoConverter{
+	void GenoConv_f90();
+};
+
+interface GenoConv_fL0 : GenoConverter{
+	void GenoConv_fL0();
+};
+
+interface GenoConv_fBH : GenoConverter{
+	void GenoConv_fBH();
+};
+
+
+interface GenoConv_fS0s : GenoConverter{
+	void GenoConv_fS0s();
+};
+
+interface GenoConv_fH0 : GenoConverter{
+	void GenoConv_fH0();
+};
+
+interface GenoConvHelper{
+	void GenoConvHelper(GenoConverter genoConv);
+	[Const] DOMString getName();
+};
+
 interface GenoOperators {
 	void GenoOperators();
@@ -447,5 +492,5 @@
 	long checkValidity([Const] DOMString geno, [Const] DOMString genoname);
 	long validate(DOMString geno, [Const] DOMString genoname);
-	[Value] SString getSimplest();
+	[Const] DOMString getSimplest();
 };
 
@@ -473,4 +518,9 @@
 	void GenoOper_fF();
 };
+
+interface GenoOper_fS : GenoOperators {
+	void GenoOper_fS();
+};
+
 
 interface GenoOperatorsHelper {
@@ -481,4 +531,5 @@
 	[Value] SString getLastCrossGeno1();
 	[Value] SString getLastCrossGeno2();
+	[Const] DOMString getSimplest();
 };
 
@@ -542,5 +593,5 @@
 	void quickCopyFrom(ParamInterface src);
 
-	//long save(VirtFILE file, [Const] DOMString altname, optional boolean force = false);
+	//long saveMultiLine(VirtFILE file, [Const] DOMString altname, optional boolean force = false);
 
 	static boolean isValidTypeDescription([Const] DOMString t);
@@ -553,5 +604,5 @@
 interface Param : SimpleAbstractParam {
 	void Param(ParamEntry t, VoidPtr o);
-	//long save(VirtFILE file, [Const] DOMString altname, optional boolean force = false);
+	long saveMultiLine(VirtFILE file, [Const] DOMString altname, optional boolean force = false);
 };
 
Index: js/sdk/js_interface/js_types.h
===================================================================
--- js/sdk/js_interface/js_types.h	(revision 944)
+++ js/sdk/js_interface/js_types.h	(revision 1324)
@@ -205,4 +205,9 @@
 	}
 
+	const char* getSimplest()
+	{
+		return genoOper->getSimplest();
+	}
+
 	~GenoOperatorsHelper()
 	{
@@ -214,4 +219,17 @@
 };
 
+struct GenoConvHelper
+{
+	GenoConverter* genoConv;
+	GenoConvHelper(GenoConverter* _genoConv)
+	{
+		genoConv = _genoConv;
+	}
+	const char* getName()
+	{
+		return genoConv->name;
+	}
+};
+
 #endif
 #endif //JS_TYPES_H_
