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
import UIKit | |
import WebKit | |
class ViewController: UIViewController { | |
override func viewDidLoad() { | |
super.viewDidLoad() | |
// Configure the web view for JavaScript injection | |
configureWebView() |
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
// | |
// MakeTransparentHoleOnOverlayView.swift | |
// | |
// Created by James Laurenstin on 2015-04-10. | |
// Copyright (c) 2015 Aldo Group Inc. All rights reserved. | |
// | |
import UIKit | |
class MakeTransparentHoleOnOverlayView: UIView { |
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
<h1>vertices</h1> | |
<input id="SLID" type="range" min="1" max="21" value="10"><input id="TEXT"> | |
<canvas id="CNVS" width="1024" height="1024"></canvas><hr/> | |
<script> | |
const vs=`attribute vec4 a;uniform float vt; | |
void main(){ | |
gl_PointSize=1.0; | |
float th=vt*a.z/2.0; | |
gl_Position=a; | |
gl_Position.xy*=mat2(cos(th),-sin(th),sin(th),cos(th)); |