Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/Lightning.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ class SparkPlatform {
let sparkImage = sparkscene.create({t:"image", resource:imageResource});
const sparkGl = this.stage.gl;
sparkImage.ready.then( function(obj) {
sparkImage.parent = sparkscene.root;
let texture = sparkImage.texture();
cb(null, {source: sparkGl.createWebGLTexture(texture), w: sparkImage.resource.w, h: sparkImage.resource.h, premultiplyAlpha: false, flipBlueRed: false, imageRef: sparkImage, flipTextureY:true});
});
Expand Down Expand Up @@ -99,6 +100,7 @@ class SparkPlatform {

let imageObj = sparkscene.create({ t: "image", url:data});
imageObj.ready.then( function(obj) {
imageObj.parent = sparkscene.root;
let canvas = {};
canvas.flipTextureY = true;
canvas.internal = imageObj;
Expand Down Expand Up @@ -131,6 +133,7 @@ class SparkPlatform {

let imageObj = sparkscene.create({ t: "image", url:data});
imageObj.ready.then( function(obj) {
imageObj.parent = sparkscene.root;
let canvas = {};
canvas.flipTextureY = true;
canvas.internal = imageObj;
Expand All @@ -150,6 +153,7 @@ class SparkPlatform {
let imageResource = sparkscene.create({t:"imageResource", url:src, proxy:proxyServer});
let imageObj = sparkscene.create({ t: "image", resource:imageResource});
imageObj.ready.then( function(obj) {
imageObj.parent = sparkscene.root;
let canvas = {};
canvas.flipTextureY = true;
canvas.internal = imageObj;
Expand Down