-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathReadFloat.html
More file actions
29 lines (28 loc) · 1.17 KB
/
Copy pathReadFloat.html
File metadata and controls
29 lines (28 loc) · 1.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<!doctype html>
<html>
<head>
<script type="text/javascript" src="../../Libraries/JSIL.Core.js"></script>
<script type="text/javascript" src="../../Libraries/JSIL.Bootstrap.js"></script>
<script type="text/javascript" src="../../Libraries/JSIL.IO.js"></script>
<script type="text/javascript" src="../../Libraries/JSIL.Browser.js"></script>
<script type="text/javascript" src="../../jsil.org/demos/RPG/mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089.js"></script>
</head>
<body>
<script type="text/javascript">
JSIL.Initialize();
loadBinaryFileAsync("../Data/FloatTest.bin", function (result, error) {
var bytes = result;
console.log(bytes);
var stream = new System.IO.MemoryStream(bytes);
console.log(stream);
var binaryReader = new System.IO.BinaryReader(stream);
console.log(binaryReader);
var i1 = binaryReader.ReadInt32();
var f1 = binaryReader.ReadSingle();
var f2 = binaryReader.ReadSingle();
var i2 = binaryReader.ReadInt32();
console.log(i1 + ", " + f1 + ", " + f2 + ", " + i2);
});
</script>
</body>
</html>