<commit_before>const path = require('path')
const createRenderer = require('../')
const createContext = require('pex-context')
const io = require('pex-io')
const { quat, vec3 } = require('pex-math')
const GUI = require('pex-gui')
const isBrowser = require('is-browser')
const { loadText } = require('pex-io')
const createCube = require('primitive-cube')
const dragon = require('./assets/models/stanford-dragon/stanford-dragon')
const normals = require('angle-normals')
const centerAndNormalize = require('geom-center-and-normalize')

const State = {
  rotation: 1.5 * Math.PI
}
const ctx = createContext()
const renderer = createRenderer(ctx)
const gui = new GUI(ctx)

const ASSETS_DIR = isBrowser ? 'assets' : path.join(__dirname, 'assets')

const orbitCameraEntity = renderer.entity([
  renderer.camera({
    fov: Math.PI / 3,
    aspect: ctx.gl.drawingBufferWidth / ctx.gl.drawingBufferHeight,
    near: 0.1,
    far: 100,
    postprocess: false,
    viewport: [0, 0, Math.floor(0.75 * window.innerWidth), window.innerHeight]
  }),
  renderer.transform({ position: [0, 2, 3] }),
  renderer.orbiter({ position: [2, 2, -2] }),
])
renderer.add(orbitCameraEntity)

const persCameraCmp = renderer.camera({
  fov: Math.PI / 4,
  aspect: ctx.gl.drawingBufferWidth / ctx.gl.drawingBufferHeight,
  near: 1,
  far: 8,
  postprocess: false,
  viewport: [
    Math.floor(0.75 * window.innerWidth),
    window.innerHeight - Math.floor((1 / 2) * window.innerHeight),
    Math.floor(0.25 * window.innerWidth),
    Math.floor((1 / 2) * window.innerHeight)
  ]
})
const persCameraEntity = renderer.entity([
  persCameraCmp,
  renderer.transform({
    position: [0, 2, 3],
    rotation: quat.fromEuler(quat.create(), [-Math.PI / 5, 0, 0])
  }),<commit_msg>Add postprocessing to helpers example<commit_after>const path = require('path')
const createRenderer = require('../')
const createContext = require('pex-context')
const io = require('pex-io')
const { quat, vec3 } = require('pex-math')
const GUI = require('pex-gui')
const isBrowser = require('is-browser')
const { loadText } = require('pex-io')
const createCube = require('primitive-cube')
const dragon = require('./assets/models/stanford-dragon/stanford-dragon')
const normals = require('angle-normals')
const centerAndNormalize = require('geom-center-and-normalize')

const State = {
  rotation: 1.5 * Math.PI
}
const ctx = createContext()
const renderer = createRenderer(ctx)
const gui = new GUI(ctx)

const ASSETS_DIR = isBrowser ? 'assets' : path.join(__dirname, 'assets')

const orbitCameraEntity = renderer.entity([
  renderer.camera({
    fov: Math.PI / 3,
    aspect: ctx.gl.drawingBufferWidth / ctx.gl.drawingBufferHeight,
    near: 0.1,
    far: 100,
    exposure: 0.6,
    viewport: [0, 0, Math.floor(0.75 * window.innerWidth), window.innerHeight]
  }),
  renderer.postProcessing({
  }),
  renderer.transform({ position: [0, 2, 3] }),
  renderer.orbiter({ position: [2, 2, -2] }),
])
renderer.add(orbitCameraEntity)

const persCameraCmp = renderer.camera({
  fov: Math.PI / 4,
  aspect: ctx.gl.drawingBufferWidth / ctx.gl.drawingBufferHeight,
  near: 1,
  far: 8,
  postprocess: false,
  viewport: [
    Math.floor(0.75 * window.innerWidth),
    window.innerHeight - Math.floor((1 / 2) * window.innerHeight),
    Math.floor(0.25 * window.innerWidth),
    Math.floor((1 / 2) * window.innerHeight)
  ]
})
const persCameraEntity = renderer.entity([
  persCameraCmp,
  renderer.transform({
    position: [0, 2, 3],
    rotation: quat.fromEuler(quat.create(), [-Math.PI / 5, 0, 0])
  }),
{'fraction_non_alphanumeric': 0.15813295615275813, 'fraction_numerical': 0.02263083451202263, 'mean_word_length': 4.177159590043924, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1635132', 'n_tokens_mistral': 1268, 'n_tokens_neox': 1212, 'n_words': 271}