Skip to content

Commit

Permalink
Added missing type definition for twgl.js based on work by @mode777 f…
Browse files Browse the repository at this point in the history
…rom this page https://gist.github.com/mode777/4f8eb25b123b2c5627034f797834f949

Tried to use more elegant approach suggested by @colorpump here:
greggman/twgl.js#50
This code can be backed out when type definitions are added to twgl.js
  • Loading branch information
sami-badawi committed Sep 16, 2017
1 parent d0503f6 commit 5f2e597
Show file tree
Hide file tree
Showing 2 changed files with 364 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import * as sc from './shader-code'
import * as m from 'mithril'
import * as mh from './mithril-helper'
import * as _ from 'lodash'
// import * as twgl from '../node_modules/twgl.js/dist/3.x/twgl-full.js'
const twgl = require('../node_modules/twgl.js/dist/3.x/twgl-full')
import * as twgl from 'twgl.js'
// const twgl = require('../node_modules/twgl.js/dist/3.x/twgl-full')

const verboseLogging = false

Expand Down Expand Up @@ -39,6 +39,7 @@ let imageSources = [

function info() {
const twglCreateProgramInfoType = typeof twgl.createProgramInfo;
// twgl.createProgramInfo()
console.log(`twglCreateProgramInfoType: ${twglCreateProgramInfoType}`)
}

Expand Down
Loading

0 comments on commit 5f2e597

Please sign in to comment.