Skip to content

Commit 6d8b508

Browse files
committed
ms to fps and other little improvements in the no wasm example
1 parent 381b1aa commit 6d8b508

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

examples/nft_improved_worker/main_threejs_worker.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
padding: 0;
1111
}
1212
</style>
13+
<link rel="stylesheet" type="text/css" href="../css/style.css">
1314
</head>
1415

1516
<body>
@@ -30,21 +31,20 @@
3031
<canvas style="position: absolute; left:0; top:0" id="canvas_draw"></canvas>
3132
</div>
3233

33-
<link rel="stylesheet" type="text/css" href="style.css">
3434
<script src="../js/third_party/three.js/stats.min.js"></script>
3535
<script src="../js/third_party/three.js/three.min.js"></script>
3636
<script src="threejs_worker.js"></script>
3737

3838
<script>
3939
var statsMain = new Stats();
40-
statsMain.showPanel(1); // 0: fps, 1: ms, 2: mb, 3+: custom
40+
statsMain.showPanel(0); // 0: fps, 1: ms, 2: mb, 3+: custom
4141
statsMain.domElement.style.position = 'relative';
4242
statsMain.domElement.style.left = '0px';
4343
statsMain.domElement.style.top = '0px';
4444
document.getElementById("stats1").appendChild(statsMain.dom);
4545

4646
var statsWorker = new Stats();
47-
statsWorker.showPanel(1); // 0: fps, 1: ms, 2: mb, 3+: custom
47+
statsWorker.showPanel(0); // 0: fps, 1: ms, 2: mb, 3+: custom
4848
statsWorker.domElement.style.position = 'relative';
4949
statsWorker.domElement.style.left = '0px';
5050
statsWorker.domElement.style.top = '0px';

examples/nft_improved_worker/threejs_wasm_worker.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,7 @@ function start2(container, marker, video, input_width, input_height, canvas_draw
177177
};
178178

179179
var lasttime = Date.now();
180+
var time = 0;
180181

181182
var draw = function() {
182183
render_update();

0 commit comments

Comments
 (0)