-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: solve serializer parser selection logic
- Loading branch information
Showing
5 changed files
with
90 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
<!doctype html> | ||
<html lang="en"> | ||
|
||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" | ||
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"> | ||
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | ||
|
||
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons"> | ||
<link rel="icon" type="image/x-icon" href="https://thatopen.github.io/engine_components/resources/favicon.ico"> | ||
<title>Serializer</title> | ||
<style> | ||
body { | ||
margin: 0; | ||
padding: 0; | ||
font-family: "Plus Jakarta Sans", sans-serif; | ||
overflow: hidden; | ||
} | ||
|
||
.full-screen { | ||
width: 100vw; | ||
height: 100vh; | ||
position: relative; | ||
overflow: hidden; | ||
} | ||
|
||
.options-menu { | ||
position: fixed; | ||
min-width: unset; | ||
top: 5px; | ||
right: 5px; | ||
max-height: calc(100vh - 10px); | ||
} | ||
|
||
.phone-menu-toggler { | ||
visibility: hidden; | ||
} | ||
|
||
@media (max-width: 480px) { | ||
.options-menu { | ||
visibility: hidden; | ||
bottom: 5px; | ||
left: 5px; | ||
} | ||
|
||
.options-menu-visible { | ||
visibility: visible; | ||
} | ||
|
||
.phone-menu-toggler { | ||
visibility: visible; | ||
position: fixed; | ||
top: 5px; | ||
right: 5px; | ||
} | ||
} | ||
|
||
</style> | ||
</head> | ||
|
||
<body> | ||
<div class="full-screen" id="container"></div> | ||
<script type="module" src="./example.ts"></script> | ||
</body> | ||
|
||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import * as FRAGS from ".."; | ||
|
||
const serializer = new FRAGS.Serializer(); | ||
|
||
const group = new FRAGS.FragmentsGroup(); | ||
group.globalToExpressIDs.set("a", 11); | ||
group.globalToExpressIDs.set("b", 12); | ||
group.globalToExpressIDs.set("c", 13); | ||
group.data.set(11, [[], []]); | ||
group.data.set(12, [[], []]); | ||
group.data.set(13, [[], []]); | ||
|
||
// const exported = serializer.export(group); | ||
|
||
const result = serializer.import("../../../../resources/small_v2.frag"); | ||
console.log(result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.