Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Canvas or WebGL #5

Open
gaitat opened this issue Feb 23, 2017 · 2 comments
Open

Canvas or WebGL #5

gaitat opened this issue Feb 23, 2017 · 2 comments

Comments

@gaitat
Copy link

gaitat commented Feb 23, 2017

What do I need to do to get WebGL rendering? The way it is currently Canvas is used.

@mattdesl
Copy link
Owner

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.

@gaitat
Copy link
Author

gaitat commented Feb 23, 2017

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants