Open gaitat opened 7 years ago
All the content should already be rendering in WebGL: https://mattdesl.svbtle.com/drawing-lines-is-hard
WebGL is implemented in the browser's <canvas>
tag.
I see in webgl-lines\base\index.js you have let isWebGL = opt.context === 'webgl'
which comes back false and then when I explicitly change the context to have webgl
let context = require('../base')(render, {
name: __dirname,
description: "_touch and drag to draw_ rendering with triangles ",
context: "webgl"
})
I get
Uncaught TypeError: context.clearRect is not a function
at render (bundle.js:37)
at renderRetina (bundle.js:1247)
at Array.resize (bundle.js:1204)
at drainQueue (bundle.js:2263)
so webgl is not enabled.
What do I need to do to get WebGL rendering? The way it is currently Canvas is used.