Add PPE images, assets, and update game scenarios and avatar logic

This commit is contained in:
Vishva
2026-09-25 19:50:38 +05:30
parent df6e844b25
commit d68131d500
57 changed files with 1479 additions and 1612 deletions
+210 -251
View File
@@ -1,13 +1,16 @@
/**
* PPE SAFETY CHALLENGE - SCENARIO DEFINITIONS & SAFETY DATABASE
* Implements: SEE THE SITUATION -> IDENTIFY HAZARDS -> SELECT PPE -> CONSEQUENCES -> CORRECT
* PPE SAFETY CHALLENGE - SCENARIO DEFINITIONS & 3x3 SAFETY LOCKER DATABASE
* "Choose Right. Work Safe."
*
* Scenario 1: Angle Grinding Operation (PNG Icons from grinding_ppe_icons_png)
* Scenario 2: Chemical Handling & Dispensing (PNG Icons from ppe_icons_png)
*/
const SCENARIO_DATA = [
{
id: "grinding",
index: 1,
title: "Metal Grinding Operation",
title: "Angle Grinding Operation",
taskName: "ANGLE GRINDER WELD SMOOTHING",
sceneClass: "stage-grinding",
environmentDesc: "An industrial worker is preparing to grind rough weld seams on heavy structural steel using a high-speed angle grinder (11,000 RPM).",
@@ -15,176 +18,150 @@ const SCENARIO_DATA = [
guideTip: "High-speed spinning discs eject fiery sparks and shrapnel at over 100 m/s with extreme noise (95+ dB).",
hazards: [
{
id: "flying_sparks",
label: "Flying hot metal sparks & abrasive wheel particles (11,000 RPM)",
criticalSlot: "eyes"
},
{
id: "high_noise",
label: "Continuous high decibel motor and grinding noise (95-105 dB)",
criticalSlot: "ears"
},
{
id: "sharp_burrs",
label: "Sharp metal burrs, intense friction heat & wheel kickback hazard",
criticalSlot: "hands"
},
{
id: "falling_debris",
label: "Heavy steel drop hazard & structural workshop overhead risks",
criticalSlot: "feet"
}
{ id: "flying_sparks", label: "Flying Hot Sparks (1000°C+)" },
{ id: "high_noise", label: "High Decibel Noise (95+ dB)" },
{ id: "sharp_burrs", label: "Sharp Metal Burrs & Jagged Edges" },
{ id: "falling_debris", label: "Heavy Structural Steel Drop Hazard" }
],
// Required protective gear items
requiredPpe: [
"faceshield_glasses",
"safety_helmet_grind",
"face_shield_grind",
"hearing_protection_grind",
"leather_grinding_gloves",
"earmuffs_heavy",
"hard_hat_cap",
"heavy_leather_jacket",
"steel_toe_boots"
"steel_toe_boots_grind"
],
// Critical slots for safety check evaluation
criticalChecks: [
{
slot: "eyes",
requiredItem: "faceshield_glasses",
consequenceTitle: "Flying Particle Hazard",
consequenceDesc: "Without full face & eye impact protection, flying abrasive particles at 11,000 RPM can cause catastrophic corneal penetration or severe facial lacerations.",
missingLabel: "Full Face Shield + Safety Glasses (ANSI Z87+)"
requiredItem: "face_shield_grind",
consequenceTitle: "High-Speed Flying Particle Hazard",
consequenceDesc: "Without full face & eye impact protection, flying abrasive disc particles and 1000°C sparks cause instant severe corneal burns and permanent vision loss.",
missingLabel: "Face Shield (ANSI Z87+ Full Impact)"
},
{
slot: "ears",
requiredItem: "earmuffs_heavy",
consequenceTitle: "Noise-Induced Hearing Damage",
consequenceDesc: "Angle grinding routinely generates 100+ dB. Operating without rated hearing protection causes irreversible inner-ear acoustic trauma.",
missingLabel: "Heavy Duty Hearing Protection (Earmuffs / Plugs)"
requiredItem: "hearing_protection_grind",
consequenceTitle: "Noise-Induced Acoustic Trauma",
consequenceDesc: "Angle grinding routinely exceeds 100 dB. Operating without acoustic earmuffs causes irreversible inner-ear cochlear damage and permanent tinnitus.",
missingLabel: "Hearing Protection (NRR 30 Earmuffs)"
},
{
slot: "hands",
requiredItem: "leather_grinding_gloves",
consequenceTitle: "Thermal Burn & Abrasion Danger",
consequenceDesc: "Thin latex or bare hands offer zero protection against glowing 800°C sparks and jagged steel edges. Heavy-duty leather gloves are required.",
missingLabel: "Heavy-Duty Split Cowhide Leather Grinding Gloves"
consequenceTitle: "Severe Thermal Burn & Laceration Danger",
consequenceDesc: "Standard cloth work gloves melt instantly from 800°C sparks and provide zero protection against razor-sharp steel burrs. Heavy split cowhide leather gloves are mandatory.",
missingLabel: "Leather Gloves (Split Cowhide)"
},
{
slot: "feet",
requiredItem: "steel_toe_boots",
consequenceTitle: "Crush & Penetration Hazard",
consequenceDesc: "Standard footwear cannot protect against dropped structural steel sections or sharp discarded metal shards on workshop floors.",
missingLabel: "Steel-Toe Safety Boots with Puncture Resistant Sole"
requiredItem: "steel_toe_boots_grind",
consequenceTitle: "Crush & Puncture Hazard",
consequenceDesc: "Standard footwear offers zero impact protection against dropped structural steel sections or sharp discarded metal shards on workshop floors.",
missingLabel: "Safety Shoes (Steel-Toe ASTM F2413)"
},
{
slot: "head",
requiredItem: "hard_hat_cap",
requiredItem: "safety_helmet_grind",
consequenceTitle: "Overhead Impact & Debris Risk",
consequenceDesc: "In fabrication bays, overhead cranes and moving metal fixtures require impact-certified head protection.",
missingLabel: "Industrial Hard Hat (Type 1, Class E)"
},
{
slot: "body",
requiredItem: "heavy_leather_jacket",
consequenceTitle: "Clothing Ignition / Hot Spark Burn",
consequenceDesc: "Synthetic regular clothing easily melts or ignites from dense grinder spark streams. Heavy flame-resistant leather/cotton protective wear is essential.",
missingLabel: "Flame-Resistant Heavy Leather Welder/Grinder Jacket"
consequenceDesc: "In fabrication bays, overhead cranes, suspended steel beams, and falling debris require impact-certified head protection.",
missingLabel: "Safety Helmet (Industrial Hard Hat)"
}
],
// Locker items available for selection (including distractors)
lockerItems: [
{
id: "faceshield_glasses",
name: "Face Shield + Safety Glasses",
slot: "eyes",
icon: "🛡️",
spec: "ANSI Z87+ Impact Dual Protection",
isCorrect: true
id: "safety_helmet_grind",
name: "Safety Helmet",
slot: "head",
iconType: "helmet",
iconImg: "grinding_ppe_icons_png/01_safety_helmet.png",
isCorrect: true,
spec: "ANSI Z89.1 Type 1 Class E Hard Hat"
},
{
id: "regular_sunglasses",
name: "Standard Tinted Sunglasses",
id: "safety_goggles_grind",
name: "Safety Goggles",
slot: "eyes",
icon: "🕶️",
spec: "Non-impact rated tinted plastic",
iconType: "sunglasses",
iconImg: "grinding_ppe_icons_png/02_safety_goggles.png",
isCorrect: false,
rejectReason: "Standard sunglasses shatter upon impact and leave the face exposed to flying debris."
rejectReason: "Standard safety glasses/goggles leave face and neck vulnerable to hot flying sparks and shattering grinding fragments. A full face shield is required.",
spec: "Non-impact safety goggles"
},
{
id: "face_shield_grind",
name: "Face Shield",
slot: "eyes",
iconType: "face_shield",
iconImg: "grinding_ppe_icons_png/03_face_shield.png",
isCorrect: true,
spec: "ANSI Z87+ Full Impact Face Visor"
},
{
id: "hearing_protection_grind",
name: "Hearing Protection",
slot: "ears",
iconType: "earmuffs",
iconImg: "grinding_ppe_icons_png/04_hearing_protection.png",
isCorrect: true,
spec: "High noise reduction acoustic seal (NRR 30)"
},
{
id: "work_gloves_grind",
name: "Work Gloves",
slot: "hands",
iconType: "work_gloves",
iconImg: "grinding_ppe_icons_png/05_work_gloves.png",
isCorrect: false,
rejectReason: "Thin work gloves offer zero thermal or cut protection against glowing 1000°C sparks and jagged burrs. Heavy split cowhide leather gloves are required.",
spec: "Porous cloth work gloves"
},
{
id: "leather_grinding_gloves",
name: "Leather Grinding Gloves",
name: "Leather Gloves",
slot: "hands",
icon: "🧤",
spec: "Heavy split cowhide heat/spark resistant",
isCorrect: true
iconType: "leather_gloves",
iconImg: "grinding_ppe_icons_png/06_leather_gloves.png",
isCorrect: true,
spec: "Heavy split cowhide heat/spark resistant"
},
{
id: "thin_latex_gloves",
name: "Thin Disposable Latex Gloves",
slot: "hands",
icon: "🧤",
spec: "Medical grade 4mil rubber (Flaggable)",
isCorrect: false,
rejectReason: "Thin latex immediately melts onto skin when hit by 800°C grinder sparks."
},
{
id: "earmuffs_heavy",
name: "Industrial Ear Muffs (NRR 30)",
slot: "ears",
icon: "🎧",
spec: "High noise reduction acoustic seal",
isCorrect: true
},
{
id: "wireless_earbuds",
name: "Consumer Music Earbuds",
slot: "ears",
icon: "🎵",
spec: "Audio playback (Non-certified)",
isCorrect: false,
rejectReason: "Music earphones are not certified PPE and distract the operator from machine warnings."
},
{
id: "hard_hat_cap",
name: "Industrial Hard Hat",
slot: "head",
icon: "⛑️",
spec: "ANSI Z89.1 Type 1 Class E",
isCorrect: true
},
{
id: "heavy_leather_jacket",
name: "Flame-Resistant Work Jacket",
id: "reflective_vest_grind",
name: "Reflective Vest",
slot: "body",
icon: "🦺",
spec: "Heavy-duty spark-resistant leather/cotton",
isCorrect: true
},
{
id: "steel_toe_boots",
name: "Steel-Toe Safety Boots",
slot: "feet",
icon: "🥾",
spec: "ASTM F2413 Impact & Puncture Rated",
isCorrect: true
},
{
id: "regular_sneakers",
name: "Canvas Running Sneakers",
slot: "feet",
icon: "👟",
spec: "Fabric sports shoe (Zero drop rating)",
iconType: "leather_jacket",
iconImg: "grinding_ppe_icons_png/07_reflective_vest.png",
isCorrect: false,
rejectReason: "Fabric sneakers ignite from sparks and offer zero crush protection from dropped metal."
rejectReason: "Synthetic high-visibility vests melt or ignite from dense grinder spark streams.",
spec: "Synthetic mesh hi-vis vest"
},
{
id: "steel_toe_boots_grind",
name: "Safety Shoes",
slot: "feet",
iconType: "safety_boots",
iconImg: "grinding_ppe_icons_png/08_safety_shoes.png",
isCorrect: true,
spec: "ASTM F2413 Impact & Puncture Rated"
},
{
id: "dust_mask_grind",
name: "Dust Mask",
slot: "body",
iconType: "cotton_coat",
iconImg: "grinding_ppe_icons_png/09_dust_mask.png",
isCorrect: false,
rejectReason: "A simple dust mask does not protect the face or body from high-speed thermal sparks.",
spec: "N95 particulate filter mask"
}
],
successMessage: {
title: "SAFE TO START",
headline: "Correct PPE selected.",
body: "Your eyes, face, hands, hearing and feet are protected from the main hazards of this task."
headline: "Correct Grinding Protection Selected.",
body: "Your eyes, face, hands, hearing and feet are fully protected from all hazards of this grinding task."
}
},
@@ -194,180 +171,162 @@ const SCENARIO_DATA = [
title: "Chemical Handling & Dispensing",
taskName: "CORROSIVE SOLVENT TRANSFER",
sceneClass: "stage-chemical",
environmentDesc: "An employee is preparing to transfer an industrial corrosive solvent between approved containment drums inside a ventilated chemical dispensing station.",
environmentDesc: "An employee is transferring an industrial corrosive solvent between approved containers at a ventilated dispensing station.",
audioCaption: "Ventilation Ambience: Fume extraction hood airflow & quiet laboratory background",
guideTip: "Corrosive chemicals cause irreversible chemical burns upon skin contact and severe vapor irritation.",
guideTip: "Observe the scene, identify the hazards and select the correct PPE before starting the task.",
hazards: [
{
id: "chemical_splash",
label: "Corrosive liquid splash risk during pouring & transfer",
criticalSlot: "eyes"
},
{
id: "skin_absorption",
label: "Acute dermal chemical burn and toxic absorption",
criticalSlot: "hands"
},
{
id: "body_soak",
label: "Direct container overflow or accidental splash onto torso & legs",
criticalSlot: "body"
},
{
id: "foot_contact",
label: "Chemical pooling on floor and footwear degradation",
criticalSlot: "feet"
}
{ id: "chemical_splash", label: "Chemical Splash" },
{ id: "skin_exposure", label: "Skin Exposure" },
{ id: "vapour_exposure", label: "Vapour Exposure" },
{ id: "floor_contamination", label: "Floor Contamination" }
],
// Required protective gear items
requiredPpe: [
"chemical_splash_goggles",
"nitrile_gauntlet_gloves",
"chemical_resistant_apron",
"chemical_rubber_boots",
"hard_hat_chemical",
"organic_vapor_respirator"
"safety_helmet_chem",
"chem_splash_goggles",
"hearing_protection_chem",
"chem_resistant_gloves",
"chem_resistant_apron",
"chem_safety_shoes"
],
// Critical slots evaluation
criticalChecks: [
{
slot: "eyes",
requiredItem: "chemical_splash_goggles",
requiredItem: "chem_splash_goggles",
consequenceTitle: "Chemical Splash to Eyes",
consequenceDesc: "Standard safety glasses with open side vents allow hazardous liquid droplets to roll directly into the eyes, causing permanent corneal scarring.",
missingLabel: "Indirectly Vented Chemical Splash Goggles (ANSI Z87.1 D3)"
consequenceDesc: "Without sealed indirectly-vented chemical splash goggles, corrosive solvent droplets roll directly into the eyes, causing permanent corneal scarring.",
missingLabel: "Chemical Splash Goggles (ANSI Z87.1 D3)"
},
{
slot: "hands",
requiredItem: "nitrile_gauntlet_gloves",
requiredItem: "chem_resistant_gloves",
consequenceTitle: "Dermal Chemical Permeation",
consequenceDesc: "Porous leather or basic household gloves rapidly absorb harsh solvents, causing chemical burns and systemic toxicity through the skin.",
missingLabel: "Heavy-Duty Chemical-Resistant Nitrile/Neoprene Gauntlets"
consequenceDesc: "Standard cloth/leather or bare hands rapidly absorb harsh corrosive solvents, causing severe chemical burns and toxic absorption.",
missingLabel: "Chemical Resistant Gloves (Nitrile / Neoprene)"
},
{
slot: "body",
requiredItem: "chemical_resistant_apron",
requiredItem: "chem_resistant_apron",
consequenceTitle: "Body Splash & Acid Soak Hazard",
consequenceDesc: "Standard porous fabric clothing absorbs chemical splashes immediately, holding corrosive liquids against the skin.",
missingLabel: "Chemical-Resistant Impervious PVC/Neoprene Apron"
consequenceDesc: "Standard cotton coats absorb corrosive chemicals immediately, holding toxic liquids against the skin. Impervious chemical apron is required.",
missingLabel: "Chemical Resistant Apron (PVC / Neoprene)"
},
{
slot: "feet",
requiredItem: "chemical_rubber_boots",
requiredItem: "chem_safety_shoes",
consequenceTitle: "Corrosive Liquid Footwear Infiltration",
consequenceDesc: "Standard leather safety boots dissolve and degrade when exposed to pooled industrial acids and solvents.",
missingLabel: "Chemical-Resistant Neoprene/Rubber Boots"
consequenceDesc: "Standard footwear degrades rapidly when exposed to pooled industrial acids. Chemical-resistant safety boots are required.",
missingLabel: "Chemical Safety Shoes / Boots"
},
{
slot: "ears",
requiredItem: "organic_vapor_respirator", // Uses respiratory/head slot
consequenceTitle: "Hazardous Vapor Inhalation",
consequenceDesc: "Concentrated chemical vapors overcome unprotected workers quickly. Half-mask respirator with chemical cartridges is required.",
missingLabel: "Half-Mask Respirator with Organic Vapor/Acid Gas Cartridges"
requiredItem: "hearing_protection_chem",
consequenceTitle: "High Ventilation & Pump Noise Hazard",
consequenceDesc: "Continuous industrial ventilation extractors and dispensing pumps exceed safe acoustic thresholds.",
missingLabel: "Hearing Protection (Earmuffs)"
},
{
slot: "head",
requiredItem: "hard_hat_chemical",
requiredItem: "safety_helmet_chem",
consequenceTitle: "Overhead Chemical Piping Hazard",
consequenceDesc: "Chemical distribution zones require head protection against overhead pipe drips and valve maintenance risks.",
missingLabel: "Chemical-Resistant Industrial Hard Hat"
consequenceDesc: "Chemical distribution bays require certified head protection against overhead pipe drips and valve fixtures.",
missingLabel: "Safety Helmet (Type 1 Class E)"
}
],
lockerItems: [
{
id: "chemical_splash_goggles",
id: "safety_helmet_chem",
name: "Safety Helmet",
slot: "head",
iconType: "helmet",
iconImg: "ppe_icons_png/01_safety_helmet.png",
isCorrect: true,
spec: "ANSI Z89.1 Certified Industrial Hard Hat"
},
{
id: "chem_splash_goggles",
name: "Chemical Splash Goggles",
slot: "eyes",
icon: "🥽",
spec: "ANSI Z87.1 D3 Sealed Splash Protection",
isCorrect: true
iconType: "splash_goggles",
iconImg: "ppe_icons_png/02_chemical_splash_goggles.png",
isCorrect: true,
spec: "ANSI Z87.1 D3 Sealed Chemical Splash Goggles"
},
{
id: "standard_safety_glasses",
name: "Open Safety Glasses",
id: "face_shield_chem",
name: "Face Shield",
slot: "eyes",
icon: "👓",
spec: "Impact rated with open side vents (Non-liquid)",
iconType: "face_shield",
iconImg: "ppe_icons_png/03_face_shield.png",
isCorrect: false,
rejectReason: "Open side vents allow liquid splashes and corrosive droplets to enter the eye."
rejectReason: "A standalone face shield without sealed splash goggles underneath allows liquid splashes to roll up into eyes.",
spec: "Full Face Visor (Secondary Protection)"
},
{
id: "nitrile_gauntlet_gloves",
name: "Nitrile Gauntlet Gloves",
slot: "hands",
icon: "🧤",
spec: "15-mil Heavy Nitrile Chemical Gauntlets",
isCorrect: true
},
{
id: "leather_work_gloves",
name: "Standard Leather Work Gloves",
slot: "hands",
icon: "🧤",
spec: "Porous split cowhide (Absorbent)",
isCorrect: false,
rejectReason: "Leather absorbs corrosive chemicals like a sponge, causing deep chemical burns."
},
{
id: "chemical_resistant_apron",
name: "Chemical-Resistant Apron",
slot: "body",
icon: "🦺",
spec: "Impermeable Heavy PVC / Neoprene Apron",
isCorrect: true
},
{
id: "cotton_lab_coat",
name: "Standard Cotton Coat",
slot: "body",
icon: "🥼",
spec: "Porous woven cotton (Non-impervious)",
isCorrect: false,
rejectReason: "Cotton absorbs acids and solvents directly into underclothes."
},
{
id: "chemical_rubber_boots",
name: "Chemical Rubber Boots",
slot: "feet",
icon: "🥾",
spec: "Seamless Neoprene Acid-Resistant Boots",
isCorrect: true
},
{
id: "organic_vapor_respirator",
name: "Organic Vapor Respirator",
slot: "ears", // Grouped in face/respiratory slot
icon: "😷",
spec: "Half-Face Mask with Dual Acid/Vapor Cartridges",
isCorrect: true
},
{
id: "hard_hat_chemical",
name: "Safety Hard Hat",
slot: "head",
icon: "⛑️",
spec: "Chemical-Resistant High Density Polyethylene",
isCorrect: true
},
{
id: "cloth_dust_mask",
name: "Simple Cloth Dust Mask",
id: "hearing_protection_chem",
name: "Hearing Protection",
slot: "ears",
icon: "😷",
spec: "Particulate only (No gas/vapor barrier)",
iconType: "earmuffs",
iconImg: "ppe_icons_png/04_hearing_protection.png",
isCorrect: true,
spec: "NRR 30 Acoustic Earmuffs"
},
{
id: "chem_resistant_gloves",
name: "Chemical Resistant Gloves",
slot: "hands",
iconType: "chem_gloves",
iconImg: "ppe_icons_png/05_chemical_resistant_gloves.png",
isCorrect: true,
spec: "15-mil Heavy Nitrile Chemical Gauntlets"
},
{
id: "standard_work_gloves",
name: "Standard Work Gloves",
slot: "hands",
iconType: "work_gloves",
iconImg: "ppe_icons_png/06_standard_work_gloves.png",
isCorrect: false,
rejectReason: "Cloth dust masks offer ZERO filtration against toxic chemical fumes and organic solvent vapors."
rejectReason: "Standard porous work gloves absorb corrosive liquids like a sponge, causing deep chemical burns.",
spec: "Cloth/Leather Work Gloves (Porous)"
},
{
id: "chem_resistant_apron",
name: "Chemical Resistant Apron",
slot: "body",
iconType: "chem_apron",
iconImg: "ppe_icons_png/07_chemical_resistant_apron.png",
isCorrect: true,
spec: "Impermeable Heavy PVC / Neoprene Apron"
},
{
id: "chem_safety_shoes",
name: "Safety Shoes",
slot: "feet",
iconType: "safety_boots",
iconImg: "ppe_icons_png/08_safety_shoes.png",
isCorrect: true,
spec: "Chemical & Acid Resistant Safety Boots"
},
{
id: "cotton_coat_chem",
name: "Cotton Coat",
slot: "body",
iconType: "cotton_coat",
iconImg: "ppe_icons_png/09_cotton_coat.png",
isCorrect: false,
rejectReason: "Cotton laboratory coats absorb acids and solvents directly into underclothing.",
spec: "Standard Woven Cotton Lab Coat"
}
],
successMessage: {
title: "SAFE TO PROCEED",
headline: "Correct chemical protection selected.",
body: "Your PPE helps protect the eyes, respiratory system and skin against accidental chemical splashes."
headline: "Correct Chemical Protection Selected.",
body: "Your PPE protects the eyes, skin, hearing, body and feet against hazardous chemical splashes and fumes."
}
}
];