Skip to content

Commit

Permalink
some dir changes
Browse files Browse the repository at this point in the history
  • Loading branch information
pedrotorres1001 committed May 13, 2024
1 parent 5e8acd8 commit 9828e39
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 37 deletions.
22 changes: 11 additions & 11 deletions game.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class Game{
this.fixedTimeStep = 1.0/60.0;
this.js = { forward:0, turn:0 };
this.startTime = new Date();
this.assetsPath = "../assets/";
this.assetsPath = "../Projeto-Final-ICG/assets/";

this.messages = {
text:[
Expand All @@ -48,14 +48,14 @@ class Game{

const options = {
assets:[
"../assets/rc_time_trial.fbx",
"../assets/images/logo.png",
"../assets/images/nx.jpg",
"../assets/images/px.jpg",
"../assets/images/ny.jpg",
"../assets/images/py.jpg",
"../assets/images/nz.jpg",
"../assets/images/pz.jpg",
"../Projeto-Final-ICG/assets/rc_time_trial.fbx",
"../Projeto-Final-ICG/assets/images/logo.png",
"../Projeto-Final-ICG/assets/images/nx.jpg",
"../Projeto-Final-ICG/assets/images/px.jpg",
"../Projeto-Final-ICG/assets/images/ny.jpg",
"../Projeto-Final-ICG/assets/images/py.jpg",
"../Projeto-Final-ICG/assets/images/nz.jpg",
"../Projeto-Final-ICG/assets/images/pz.jpg",
`${this.assetsPath}sfx/bump.${sfxExt}`,
`${this.assetsPath}sfx/click.${sfxExt}`,
`${this.assetsPath}sfx/engine.${sfxExt}`,
Expand Down Expand Up @@ -306,7 +306,7 @@ class Game{
const game = this;
const loader = new THREE.FBXLoader();

loader.load( '../assets/rc_time_trial.fbx',
loader.load( '../Projeto-Final-ICG/assets/rc_time_trial.fbx',
function ( object ){
let material, map, index, maps;
const euler = new THREE.Euler();
Expand Down Expand Up @@ -383,7 +383,7 @@ class Game{
game.scene.add( object );

const tloader = new THREE.CubeTextureLoader();
tloader.setPath( '../assets/images/' );
tloader.setPath( '../Projeto-Final-ICG/assets/images/' );

var textureCube = tloader.load( [
'px.jpg', 'nx.jpg',
Expand Down
40 changes: 14 additions & 26 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,6 @@
<title>Racing 2048</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
<meta name="description" content="RC Time Trial is a racing 3d game. Using the Three.js library. author:Nik Lever ©2018 category:application-javascript" />
<meta property="og:url" content="http://niklever.com/games/rctimetrial" />
<meta property="og:type" content="product" />
<meta property="og:title" content="RC Time Trial - a 3d racing game" />
<meta property="og:description" content="RC Ttime Trial is a 3d racing game. Using the Three.js library. author:Nik Lever ©2018 category:application-javascript" />
<meta property="og:image" content="http://niklever.com/games/rctimetrial/assets/rctimetrial-og.jpg" />
<meta property="og:image:secure_url" content="https://niklever.com/games/skyblade/assets/rctimetrial-og.jpg" />
<meta property="og:image:type" content="image/jpeg" />
<meta property="og:image:width" content="1254" />
<meta property="og:image:height" content="698" />
<meta property="og:image:alt" content="RC Time Trial - a 3d racing game" />
<meta property='og:video' content='https://youtu.be/mjQqqEUPBko' />
<link href="https://fonts.googleapis.com/css?family=IBM+Plex+Sans|Kavivanar" rel="stylesheet">
<style>
@font-face {
Expand Down Expand Up @@ -136,27 +124,27 @@
<button>Wheels</button>
</div>
<div id="car-parts">
<img src="../assets/images/carparts0001.png">
<img src="../assets/images/carparts0000.png">
<img src="../assets/images/carparts0000.png">
<img src="../assets/images/carparts0000.png">
<img src="../assets/images/carparts0000.png">
<img src="../assets/images/carparts0000.png">
<img src="../Projeto-Final-ICG/assets/images/carparts0001.png">
<img src="../Projeto-Final-ICG/assets/images/carparts0000.png">
<img src="../Projeto-Final-ICG/assets/images/carparts0000.png">
<img src="../Projeto-Final-ICG/assets/images/carparts0000.png">
<img src="../Projeto-Final-ICG/assets/images/carparts0000.png">
<img src="../Projeto-Final-ICG/assets/images/carparts0000.png">
</div>
<div id="message">Press the buttons above to customise your car.</div>
<button id="play-btn">PLAY</button>

<button id="reset-btn"><i class="fas fa-car"></i></button>
<div id="timePassed" style="position: absolute; top: 0; left: 0;"></div>

<script src="../../libs/three.min.js"></script>
<script src="../../libs/inflate.min.js"></script>
<script src="../../libs/FBXLoader.js"></script>
<script src="../../libs/OrbitControls.js"></script>
<script src="../../libs/Detector.js"></script>
<script src="../../libs/stats.min.js"></script>
<script src="../../libs/cannon.min.js"></script>
<script src="../../libs/CannonDebugRenderer.js"></script>
<script src="../Projeto-Final-ICG/libs/three.min.js"></script>
<script src="../Projeto-Final-ICG/libs/inflate.min.js"></script>
<script src="../Projeto-Final-ICG/libs/FBXLoader.js"></script>
<script src="../Projeto-Final-ICG/libs/OrbitControls.js"></script>
<script src="../Projeto-Final-ICG/libs/Detector.js"></script>
<script src="../Projeto-Final-ICG/libs/stats.min.js"></script>
<script src="../Projeto-Final-ICG/libs/cannon.min.js"></script>
<script src="../Projeto-Final-ICG/libs/CannonDebugRenderer.js"></script>
<script src="game.js"></script>
<script defer src="https://use.fontawesome.com/releases/v5.0.13/js/all.js" integrity="sha384-xymdQtn1n3lH2wcu0qhcdaOpQwyoarkgLVxC/wZ5q7h9gHtxICrpcaSUfygqZGOe" crossorigin="anonymous"></script>

Expand Down

0 comments on commit 9828e39

Please sign in to comment.