Skip to content

Commit

Permalink
Swap driving screen grid mat for NME grid mat to see if it's neater
Browse files Browse the repository at this point in the history
  • Loading branch information
jelster committed Aug 22, 2022
1 parent 916ac63 commit 30abc0d
Show file tree
Hide file tree
Showing 2 changed files with 6,546 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/driving/spaceTruckerDrivingScreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import { ActionManager } from "@babylonjs/core/Actions/actionManager";
import { ExecuteCodeAction } from "@babylonjs/core/Actions/directActions";
import { PhysicsImpostor } from "@babylonjs/core/Physics/physicsImpostor";
import { AmmoJSPlugin } from "@babylonjs/core/Physics/Plugins/ammoJSPlugin";
import { NodeMaterial } from "@babylonjs/core/Materials/Node/nodeMaterial";
import "@babylonjs/core/Physics/physicsEngineComponent";
import "@babylonjs/core/Meshes/Builders/ribbonBuilder";
import "@babylonjs/core/Meshes/Builders/linesBuilder";
Expand All @@ -34,6 +35,7 @@ import SpaceTruckerSoundManager from "../spaceTruckerSoundManager";
import computeScores from "../scoring/spaceTruckerScoreManager";
import truckExploderSPS from "./truckExploderSPS";
import postProcesses from "../post-processes";
import gridNodeMaterial from "../nme/materials/gridNodeMaterial.json";

const { GUI_MASK, SCENE_MASK } = screenConfig;
const { followCamSetup } = screenConfig;
Expand Down Expand Up @@ -144,7 +146,7 @@ class SpaceTruckerDrivingScreen {
this.truck = await tP;
this.cameraDolly.parent = this.truck.mesh;
this.followCamera.parent = this.cameraDolly;
var groundMat = this.groundMaterial = new GridMaterial("roadMat", this.scene);
var groundMat = this.groundMaterial = NodeMaterial.Parse(gridNodeMaterial, this.scene, "gridNodeMaterial");
this.ground = MeshBuilder.CreateRibbon("road", {
pathArray: route.paths,
sideOrientation: Mesh.DOUBLESIDE,
Expand Down
Loading

0 comments on commit 30abc0d

Please sign in to comment.