-
Notifications
You must be signed in to change notification settings - Fork 10
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
Remove dependency on DOM classes #7
Comments
vorg
changed the title
Remove dependency of DOM classes
Remove dependency on DOM classes
Feb 20, 2015
👍 It's not pretty but this would work without changing the existing behaviour at all: if (('undefined' != typeof HTMLCanvasElement && obj instanceof HTMLCanvasElement) ||
('undefined' != typeof HTMLImageElement && obj instanceof HTMLImageElement) ||
('undefined' != typeof HTMLVideoElement && obj instanceof HTMLVideoElement) ||
('undefined' != typeof ImageData && obj instanceof ImageData)) { |
👍 to @hughsk's solution. also @vorg, see my thoughts on text rendering here. Feel free to add any thoughts: |
I've provided a PR that implement @hughsk suggested solution. |
mikolalysenko
added a commit
that referenced
this issue
Nov 2, 2016
Fixes #7: make gl-texture2d DOM independent
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Currently
createTexture2D
checks if provided texture object is some kind of image data by doing following checksthat prevents us from suppling valid texture object in non browser environment like Plask.
I've run into this issue while trying to use gl-sprite-text in pex and even though i have texture wrapper passing this test:
it breaks because of the DOM classes.
The text was updated successfully, but these errors were encountered: