This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defn ws-listener | |
[_request _response ws-map] | |
(proxy [WebSocketAdapter] [] | |
(onWebSocketConnect [^Session ws-session] | |
(proxy-super onWebSocketConnect ws-session) | |
(when-let [f (:on-connect ws-map)] | |
(f ws-session))) | |
(onWebSocketClose [status-code reason] | |
(when-let [f (:on-close ws-map)] | |
(f (.getSession this) status-code reason))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html> | |
<head> | |
<title>Resolution independent rendering of Bezier curves in WebGL</title> | |
<meta http-equiv="content-type" content="text/html; charset=UTF-8"> | |
<script src="glMatrix-0.9.6.min.js"></script> | |
<script id="shader-vs" type="x-shader/x-vertex"> | |
attribute vec3 aVertexPosition; | |
attribute vec2 aBezierCoord; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; implementing a React component in pure cljs, no reagent necessary | |
;; using goog.object.extend to create a ES6 class that inherits from | |
;; React.Component | |
;; credit to @thheller | |
(defn MyReact [props context updater] | |
(this-as this | |
(js/React.Component.call this props context updater))) |