Quantcast
Channel: Appcelerator Developer Center Q&A Unanswered Questions 20
Viewing all articles
Browse latest Browse all 8068

Playing of animated molecules in webgl player

$
0
0

Hi coders,

this awesome stuff GLmol I can play in webview of iPhone. On Android the webview keeps empty. If I use to transfer a QR code scanner app the animation works too. Any ideas how I can solve it?

var GLmol = function(options) {
    this._view = Ti.UI.createWebView({
        touchEnabled : true,
        borderRadius : 5,
        zIndex : 9999,
        borderRadius : 1,
        willHandleTouches : false,
        url : Ti.Android ? 'main.html' : 'vendor/glmol/main.html',
    });
    this._view.addEventListener('load', function() {
        Ti.App.fireEvent('setDims', options);
    });
    return this;
};
 
GLmol.prototype = {
    setMol : function(pdb) {
        var path = 'images/pdb/' + pdb + ".pdb";
        var file = Ti.Filesystem.getFile(Ti.Filesystem.resourcesDirectory, path);
        Ti.App.fireEvent('setMol', {
                sdf : file.read().text
        });
     },
    createView : function() {
        return this._view;
    }
};
module.exports = GLmol;
With the events setDims I set the size of canvas, with setMol I control the webgl player in HTML file.

Devices: NEXUS5, SAMSUNG S5, Android 4.4 / 5.*


Viewing all articles
Browse latest Browse all 8068

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>