Skip to content
This repository has been archived by the owner on Nov 23, 2020. It is now read-only.
/ ws-ldn-5 Public archive

Hi-performace Clojurescript w/ thi.ng, WebGL, Web Workers, WebSockets & asm.js

Notifications You must be signed in to change notification settings

thi-ng/ws-ldn-5

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WS-LDN-5

Hi-performace Clojurescript w/ thi.ng, WebGL, Web Workers, WebSockets & asm.js

Repository

git clone [email protected]:postspectacular/ws-ldn-5.git

Will be moved to GitHub later…

Day 1

Overview

  • CLJS requires different optimization strategies than Clojure
  • Focus on CPU-bound issues
  • Hard time limits due to human perception & UI usability
  • Graphics, especially if animated, often high computational demands

ex01 - Game of Life

  • basic demo of idiomatic CLJS code performance
  • various ways of optimizing
  • benefit from constrained mutability
  • intro to typed arrays, benefits

Also:

  • use thi.ng/domus for easy (non-React) DOM creation/manipulation
  • use thi.ng/strf for string formatting / parsing

Source

ex02 - SVG visualizations & animation

  • SVG is powerful, easy to generate, but highly inefficient for realtime
  • Most geometry data only passed via strings (DOM attributes)
  • Requires 2x work, 3x memory (lots of string concat, then parsing + rendering + compositing)
  • Usually 2D only, but can use thi.ng/geom to render as 3D (w/ customizable shading)

Source

ex03 - WebGL basics

Source

WebGL & GLSL specs

Day 2

Day 3