소스 검색

First person camera now works on web

Ray 8 년 전
부모
커밋
8ccb558996
3개의 변경된 파일15개의 추가작업 그리고 1개의 파일을 삭제
  1. 3 0
      docs/examples/web/core/core_3d_camera_first_person.c
  2. 1 1
      docs/examples/web/core/core_3d_camera_first_person.js
  3. 11 0
      docs/examples/web/makefile

+ 3 - 0
docs/examples/web/core/core_3d_camera_first_person.c

@@ -88,6 +88,9 @@ void UpdateDrawFrame(void)
     // Update
     //----------------------------------------------------------------------------------
     UpdateCamera(&camera);          // Update camera and player position
+    
+    // Lock mouse cursor if mouse click on canvas
+    if (IsMouseButtonPressed(MOUSE_LEFT_BUTTON)) DisableCursor();
     //----------------------------------------------------------------------------------
 
     // Draw

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 1 - 1
docs/examples/web/core/core_3d_camera_first_person.js


+ 11 - 0
docs/examples/web/makefile

@@ -58,6 +58,17 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP)
     endif
 endif
 
+ifeq ($(PLATFORM),PLATFORM_WEB)
+    # Emscripten required variables
+    EMSDK_PATH = C:/emsdk
+    EMSCRIPTEN_VERSION = 1.37.9
+    CLANG_VERSION=e1.37.9_64bit
+    PYTHON_VERSION=2.7.5.3_64bit
+    NODE_VERSION=4.1.1_64bit
+    export PATH=$(EMSDK_PATH);$(EMSDK_PATH)\clang\$(CLANG_VERSION);$(EMSDK_PATH)\node\$(NODE_VERSION)\bin;$(EMSDK_PATH)\python\$(PYTHON_VERSION);$(EMSDK_PATH)\emscripten\$(EMSCRIPTEN_VERSION);C:\raylib\MinGW\bin:$$(PATH)
+    EMSCRIPTEN=$(EMSDK_PATH)\emscripten\$(EMSCRIPTEN_VERSION)
+endif
+
 # define compiler: gcc for C program, define as g++ for C++
 ifeq ($(PLATFORM),PLATFORM_WEB)
     # define emscripten compiler

이 변경점에서 너무 많은 파일들이 변경되어 몇몇 파일들은 표시되지 않았습니다.