mirror of
https://github.com/RandomityGuy/MBHaxe.git
synced 2025-10-30 08:11:25 +00:00
js 3
This commit is contained in:
parent
d82b49eefc
commit
b224b1c262
4 changed files with 5 additions and 10 deletions
|
|
@ -3,7 +3,7 @@
|
|||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8"/>
|
||||
<title>Hello Heaps</title>
|
||||
<title>Marble Blast Gold Haxe Port</title>
|
||||
<style>
|
||||
body {
|
||||
margin: 0;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package src;
|
||||
|
||||
import js.Browser;
|
||||
import h3d.col.Plane;
|
||||
import h3d.mat.Material;
|
||||
import h3d.prim.Cube;
|
||||
|
|
@ -76,12 +77,7 @@ class CameraController extends Object {
|
|||
// level.scene.addEventListener(onEvent);
|
||||
// Sdl.setRelativeMouseMode(true);
|
||||
level.scene.camera.fovY = 60;
|
||||
#if hlsdl
|
||||
lockCursor();
|
||||
#end
|
||||
#if hldx
|
||||
Cursor.show(false);
|
||||
#end
|
||||
}
|
||||
|
||||
public function lockCursor() {
|
||||
|
|
|
|||
|
|
@ -1029,12 +1029,8 @@ class MarbleWorld extends Scheduler {
|
|||
this.cursorLock = enabled;
|
||||
if (enabled) {
|
||||
this.marble.camera.lockCursor();
|
||||
#if hl
|
||||
#end
|
||||
} else {
|
||||
#if hl
|
||||
this.marble.camera.unlockCursor();
|
||||
#end
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -68,6 +68,9 @@ class Mission {
|
|||
var path = StringTools.replace(rawElementPath.substring(rawElementPath.indexOf('data/')), "\"", "");
|
||||
if (StringTools.contains(path, 'interiors_mbg/'))
|
||||
path = StringTools.replace(path, 'interiors_mbg/', 'interiors/');
|
||||
#if js
|
||||
path = StringTools.replace(path, "data/", "");
|
||||
#end
|
||||
if (ResourceLoader.fileSystem.exists(path))
|
||||
return path;
|
||||
return "";
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue