Comments (5)
It looks like it wouldn't work as is. As far as I can tell, IEWebGL uses an <object>
element in place of a canvas. Seriously.js requires "Target" nodes to be a <canvas>
element. I suppose it's possible to use duck typing instead to allow an <object>
element with a .getContext
method, assuming everything else works the same as native WebGL.
As long as you're going to require users to install a plugin, why not just use Chrome Frame?
from seriously.js.
Thanks for the answer! I have a local application where the UI is done by embedding Internet Explorer 9. I chose IE because of the ease of communication using ActiveX, and also because it worked way smoother for my workloads than other browsers. Seriously.js, especially the hue-saturation filter, would greatly enhance its uses.
IEWebGL seems to have a setting that allows local video files to be played (http://iewebgl.com/Developer.aspx#SpecialSettings), allowing it to be used in such a context.
I could try to remove the canvas element checks myself in a local copy, but I figured it wouldn't hurt to ask about official IEWebGL support first.
from seriously.js.
Couldn't hurt to fork and create new branch.
Maybe try a polyfill on the canvas element that creates a new <object> element and a WebGLRenderingContext using the IEWebGL plugin. Something like...
(function() {
var canvas = document.createElement('canvas');
var gl = canvas.getContext('webgl') || canvas.getContext('experimental-webgl');
if (gl) {
return;
}
var originalGetContext = window.HTMLCanvasElement.prototype.getContext;
window.HTMLCanvasElement.prototype.getContext = function(contextType) {
if (contextType !== 'experimental-webgl' && contextType !== 'webgl') {
return originalGetContext.call(this, contextType);
}
// <object style="width:100%;height:100%" id="glCanvas" type="application/x-webgl"></object>
var element = document.createElement('object');
element.setAttribute('type', 'application/x-webgl');
element.setAttribute('width', this.width);
element.setAttribute('height', this.height);
//todo: position this object element on top of the canvas element.
gl = element.getContext(contextType);
return gl;
};
}());
You'd have a lot of work to do to keep the object element in the right place, but this might help you use the existing code - in particular the unit tests, which will really help you make sure everything is working right. Many of the unit tests explicitly create a canvas element, and you'd have to rewrite them all to get them using an object instead.
from seriously.js.
It's probably worth reading an analogous thread on three.js where they tried the same thing.
mrdoob/three.js#2173
from seriously.js.
I'm going to close this for now, since there hasn't been activity in over a year. IE is on it's way to full WebGL support, and this is outside the scope of Seriously.js. I have added a new feature that allows for different source types to be defined as plugins. I may one day make targets pluggable as well, which might make something like this easier.
from seriously.js.
Related Issues (20)
- How do you read the pixel array?
- Use on static images processing in NodeJS HOT 1
- Pause camera frame on Capture
- video stream targeting texture in P5.js HOT 1
- Transitions between videos of differing aspect ratio
- Future of Seriously.js HOT 1
- Worpress plugin HOT 1
- Callback/event when the Chromakey effect has been applied to an image HOT 4
- Canvas - background image instead transparent background under chroma image HOT 1
- Website obsolete HOT 2
- Zoom level of source camera
- Cartoon Effect
- Issue with rendered canvas when using chromakey effect HOT 4
- Error: Unknown effect: blend
- demo / preview HOT 3
- Code sample to process a live youtube video
- Why Doesn't this work?
- ascii hack and bug
- seriously.js goes NFT
- Three.js Source Broken HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from seriously.js.