Skip to content

Commit

Permalink
content: Filling out Routes
Browse files Browse the repository at this point in the history
  • Loading branch information
lloydrichards committed Jun 17, 2020
1 parent e6b4c6e commit 0603b47
Show file tree
Hide file tree
Showing 6 changed files with 53 additions and 43 deletions.
1 change: 1 addition & 0 deletions components/LifePlastic/Interfaces/Interfaces.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ export interface SystemList {
LDPEMachineSort: boolean;
OTHERMachineSort: boolean;
SeperatedPETGrinder: boolean;
OTHERRefiner: boolean;
}

export interface PlasticType {
Expand Down
87 changes: 47 additions & 40 deletions components/LifePlastic/RootRoutes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,77 +6,77 @@ export const RootRoutes: Array<RouteType> = [
{
parent: "Mixed-Garbage",
require: "TRASHBin",
possible: ["Garbage"],
possible: [""],
waste: "none",
wasteChance: 0,
},
{
parent: "Other-Garbage",
require: "TRASHBin",
possible: ["Garbage"],
possible: [""],
waste: "none",
wasteChance: 0,
},
{
parent: "LDPE-Garbage",
require: "TRASHBin",
possible: ["Garbage"],
possible: [""],
waste: "none",
wasteChance: 0,
},
{
parent: "ESP-Garbage",
require: "TRASHBin",
possible: ["Garbage"],
possible: [""],
waste: "none",
wasteChance: 0,
},
{
parent: "SeperateHDPE-Garbage",
require: "TRASHBin",
possible: ["Garbage"],
possible: [""],
waste: "none",
wasteChance: 0,
},
{
parent: "SeperatePETE-Garbage",
require: "TRASHBin",
possible: ["Garbage"],
possible: [""],
waste: "none",
wasteChance: 0,
},
{
parent: "PVC-Garbage",
require: "TRASHBin",
possible: ["Garbage"],
possible: [""],
waste: "none",
wasteChance: 0,
},
{
parent: "MixedPS-Garbage",
require: "TRASHBin",
possible: ["Garbage"],
possible: [""],
waste: "none",
wasteChance: 0,
},
{
parent: "PP-Garbage",
require: "TRASHBin",
possible: ["Garbage"],
possible: [""],
waste: "none",
wasteChance: 0,
},
{
parent: "MixedPETE-Garbage",
require: "TRASHBin",
possible: ["Garbage"],
possible: [""],
waste: "none",
wasteChance: 0,
},
{
parent: "MixedHDPE-Garbage",
require: "TRASHBin",
possible: ["Garbage"],
possible: [""],
waste: "none",
wasteChance: 0,
},
Expand Down Expand Up @@ -185,6 +185,13 @@ export const RootRoutes: Array<RouteType> = [
waste: "none",
wasteChance: 0,
},
{
parent: "Garbage",
require: "TRASHBin",
possible: [""],
waste: "none",
wasteChance: 0,
},
//-----------------------------------------------------
//-----------------MIXED Routes
//-----------------------------------------------------
Expand Down Expand Up @@ -334,7 +341,7 @@ export const RootRoutes: Array<RouteType> = [
"Pellet-GreenrPET",
"Pellet-BluerPET",
"Pellet-BrownrPET",
"Pellet-ClearnrPET",
"Pellet-ClearrPET",
"Regrind-PP-Recovered",
"Regrind-MixedPETE-Recovered",
],
Expand All @@ -357,7 +364,7 @@ export const RootRoutes: Array<RouteType> = [
"Pellet-GreenrPET",
"Pellet-BluerPET",
"Pellet-BrownrPET",
"Pellet-ClearnrPET",
"Pellet-ClearrrPET",
"Regrind-PP-Recovered",
"Regrind-MixedPETE-Recovered",
],
Expand All @@ -373,7 +380,7 @@ export const RootRoutes: Array<RouteType> = [
"Pellet-GreenrPET",
"Pellet-BluerPET",
"Pellet-BrownrPET",
"Pellet-ClearnrPET",
"Pellet-ClearrPET",
"Regrind-PP-Recovered",
"Regrind-MixedPETE-Recovered",
],
Expand Down Expand Up @@ -512,16 +519,16 @@ export const RootRoutes: Array<RouteType> = [
},
{
parent: "Bale-Other-Hand",
require: "PETBin",
possible: [""],
waste: "",
require: "OTHERRefiner",
possible: ["Pellet-Other-Concrete", "Pellet-Other-Furniture"],
waste: "Other-Garbage",
wasteChance: 0.1,
},
{
parent: "Bale-Other-Machine",
require: "PETBin",
possible: [""],
waste: "",
require: "OTHERRefiner",
possible: ["Pellet-Other-Concrete", "Pellet-Other-Furniture"],
waste: "Other-Garbage",
wasteChance: 0.1,
},
//-----------------------------------------------------
Expand Down Expand Up @@ -551,9 +558,9 @@ export const RootRoutes: Array<RouteType> = [
{
parent: "Pellet-MixedPETE-Fibre",
require: "PETBin",
possible: [""],
waste: "",
wasteChance: 0.1,
possible: ["rPET-Fibre"],
waste: "none",
wasteChance: 0,
},
{
parent: "Pellet-MixedPETE-Furniture",
Expand Down Expand Up @@ -662,17 +669,17 @@ export const RootRoutes: Array<RouteType> = [
},
{
parent: "Pellet-Other-Furniture",
require: "PETBin",
possible: [""],
waste: "",
wasteChance: 0.1,
require: "TRASHBin",
possible: ["Product-Furniture"],
waste: "none",
wasteChance: 0,
},
{
parent: "Pellet-Other-Concrete",
require: "PETBin",
possible: [""],
waste: "",
wasteChance: 0.1,
require: "TRASHBin",
possible: ["Product-Concrete"],
waste: "none",
wasteChance: 0,
},
{
parent: "Regrind-SeperateHDPE",
Expand Down Expand Up @@ -784,10 +791,10 @@ export const RootRoutes: Array<RouteType> = [
},
{
parent: "Other",
require: "PETBin",
possible: [""],
waste: "",
wasteChance: 0.1,
require: "OTHERBin",
possible: ["Bale-Other-Hand"],
waste: "none",
wasteChance: 0,
},
{
parent: "PCV",
Expand All @@ -807,8 +814,8 @@ export const RootRoutes: Array<RouteType> = [
//-----------------PRODUCT Routes
//-----------------------------------------------------
{
parent: "rPET Fibre",
require: "PETBin",
parent: "rPET-Fibre",
require: "TRASHBin",
possible: [
"Product-Cloths",
"Product-NylonBags",
Expand Down Expand Up @@ -849,7 +856,7 @@ export const RootRoutes: Array<RouteType> = [
{
parent: "Product-Frames",
require: "OTHERBin",
possible: ["OTHER"],
possible: ["Other"],
waste: "none",
wasteChance: 0,
},
Expand Down Expand Up @@ -912,7 +919,7 @@ export const RootRoutes: Array<RouteType> = [
{
parent: "Product-Bucket",
require: "OTHERBin",
possible: ["OTHER"],
possible: ["Other"],
waste: "none",
wasteChance: 0,
},
Expand All @@ -933,7 +940,7 @@ export const RootRoutes: Array<RouteType> = [
{
parent: "Product-Furniture",
require: "OTHERBin",
possible: ["OTHER"],
possible: ["Other"],
waste: "none",
wasteChance: 0,
},
Expand Down
2 changes: 1 addition & 1 deletion components/LifePlastic/Routes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@ export const Routes = () => {
d="M519.526 1767.81v136.16c0 3.44-1.774 6.64-4.695 8.47l-6.589 4.13a9.986 9.986 0 00-4.695 8.47v138.59"
/>
<path
id="rPET Fibre"
id="rPET-Fibre"
d="M583.287 336.001v69.936c0 5.523 4.477 10 10 10h32.518c2.129 0 4.203-.68 5.92-1.94l8.442-6.202a9.997 9.997 0 004.081-8.059V224.347a10 10 0 013.812-7.855l7.74-6.097a9.994 9.994 0 016.188-2.145h23.156c5.522 0 10 4.477 10 10v5.751"
/>
</g>
Expand Down
2 changes: 1 addition & 1 deletion components/LifePlastic/Routes/HandRoutes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export const HandRoutes: Array<PathType> = [
type: "PET",
plastic: "PET",
amount: 1,
name: "rPET Fibre",
name: "rPET-Fibre",
path:
"M583.287 336.001v69.936c0 5.523 4.477 10 10 10h32.518c2.129 0 4.203-.68 5.92-1.94l8.442-6.202a9.997 9.997 0 004.081-8.059V224.347a10 10 0 013.812-7.855l7.74-6.097a9.994 9.994 0 016.188-2.145h23.156c5.522 0 10 4.477 10 10v5.751",
},
Expand Down
2 changes: 1 addition & 1 deletion components/animejs/garbage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export const Garbage = ({ pathRef, onComplete, delay }: BoxProps) => {
width: 25,
backgroundColor: "green",
position: "absolute",
top: "415px",
top: "350px",
left: "-12px",
}}
></div>
Expand Down
2 changes: 2 additions & 0 deletions pages/experiment/010.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ const Experiment010: React.FC = () => {
LDPEMachineSort: true,
OTHERMachineSort: true,
SeperatedPETGrinder: true,
OTHERRefiner: true,
});

const pickPath = (path: RouteType): PathType => {
Expand All @@ -66,6 +67,7 @@ const Experiment010: React.FC = () => {
const currentPath = RootRoutes.find((i) => i.parent === item.name);
if (currentPath) {
const nextPath = pickPath(currentPath);
console.log(nextPath);
for (var x = 0; x < nextPath.amount; x++)
nextMaterial(setMaterials)(item, nextPath);
}
Expand Down

0 comments on commit 0603b47

Please sign in to comment.