chiark / gitweb /
Get rid of Bigfloat in JS
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 11 Oct 2020 21:45:47 +0000 (22:45 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 11 Oct 2020 21:45:47 +0000 (22:45 +0100)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Makefile
templates/script.ts

index d489fbd0e2255e1ea62feef149f54684f463d297..f1c90d7756d5e4e3d111dd1c8b0bb5e428e4f2b8 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -178,7 +178,7 @@ $(LIBRARY_FILES): $(USVG_PROCESSOR) $(USVG_BINARY) Makefile
 
 #---------- typescript ----------
 
-TS_SRCS= script bigfloat
+TS_SRCS= script
 TS_SRC_FILES= \
        webassembly-types/webassembly.d.ts \
        templates/otter_wasm.ns.d.ts \
index c812b67ec8ba1b47ff20eea87777f54ecf99a391..2f77cfdadc3f06dfc4659bb4693941279d72f95e 100644 (file)
@@ -59,11 +59,13 @@ type UoRecord = UoDescription & {
   targets: PieceId[] | null,
 }
 
+type ZCoord = string;
+
 type PieceInfo = {
   held : PlayerId | null,
   cseq : number | null,
   cseq_updatesvg : number | null,
-  z : Bigfloat,
+  z : ZCoord,
   zg : Generation,
   pinned: boolean,
   uos : UoDescription[],
@@ -819,7 +821,7 @@ type PieceStateMessage = {
   svg: string,
   held: PlayerId,
   pos: Pos,
-  z: Bigfloat,
+  z: ZCoord,
   zg: Generation,
   pinned: boolean,
   uos: UoDescription[],
@@ -932,7 +934,7 @@ pieceops.Move = <PieceHandler>function
 }
 
 pieceops.SetZLevel = <PieceHandler>function
-(piece,p, info: { z: Bigfloat, zg: Generation }) {
+(piece,p, info: { z: ZCoord, zg: Generation }) {
   piece_set_zlevel(piece,p, (oldtop_piece)=>{
     let oldtop_p = pieces[oldtop_piece]!;
     p.z  = info.z;