Skip to content

Instantly share code, notes, and snippets.

View dawidjaniga's full-sized avatar

janigowski dawidjaniga

View GitHub Profile
@dawidjaniga
dawidjaniga / BoxProjectedEnvMapHelper.js
Created February 28, 2022 23:35 — forked from 0beqz/BoxProjectedEnvMapHelper.js
Updated code to box-project env-maps in three.js (r137) - credits go to codercat (https://codercat.tk) for the box-projecting code
import * as THREE from "three"
// credits for the box-projecting shader code go to codercat (https://codercat.tk)
const worldposReplace = /* glsl */`
#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP )
vec4 worldPosition = modelMatrix * vec4( transformed, 1.0 );
#ifdef BOX_PROJECTED_ENV_MAP
vWorldPosition = worldPosition.xyz;
class LearingHoursCounter {
    constructor({learningHoursPerDay}) {
        this.learningHoursPerDay = learningHoursPerDay
    }
    sumCoursesTime () {
      const elements = [...document.querySelectorAll('.meta')].map(
        item => item.firstChild.data
      )