Comparing version 0.0.9 to 0.0.10
16
core.js
@@ -6,2 +6,16 @@ 'use strict'; | ||
module.exports = require('./binary/glfw'); | ||
const { binPath } = require('addon-tools-raub'); | ||
const core = require(`./${binPath}/glfw`); | ||
// Initialize GLFW | ||
if ( ! core.init() ) { | ||
throw new Error('Failed to initialize GLFW'); | ||
} | ||
// OpenGL window default hints | ||
core.defaultWindowHints(); | ||
module.exports = core; |
11
index.js
@@ -5,15 +5,6 @@ 'use strict'; | ||
const Window = require('./js/window'); | ||
const Window = require('./js/window'); | ||
const Document = require('./js/document'); | ||
// Initialize GLFW | ||
if ( ! glfw.init() ) { | ||
throw new Error('Failed to initialize GLFW'); | ||
} | ||
// OpenGL window default hints | ||
glfw.defaultWindowHints(); | ||
module.exports = Object.assign(glfw, { Window, Document }); |
@@ -16,3 +16,3 @@ 'use strict'; | ||
global.HTMLImageElement = Image; | ||
}; | ||
} | ||
@@ -22,3 +22,3 @@ static setWebgl(webgl) { | ||
this.isWebglInited = false; | ||
}; | ||
} | ||
@@ -67,3 +67,3 @@ | ||
this._ratio = sizeFB.width / sizeWin.width; | ||
this._ratio = sizeFB.width / sizeWin.width; | ||
@@ -108,3 +108,3 @@ this.requestAnimationFrame = this._requestAnimationFrame.bind(this); | ||
get context() { return Document.webgl; } | ||
getContext() { return Document.webgl } | ||
getContext() { return Document.webgl; } | ||
@@ -154,3 +154,3 @@ | ||
}; | ||
} | ||
@@ -163,3 +163,3 @@ | ||
get src() { console.error('Document.Image class not set.'); return ''; } | ||
set src(v) { console.error('Document.Image class not set.'); v = v; } | ||
set src(v) { console.error('Document.Image class not set.'); v = null; } | ||
get complete() { return false; } | ||
@@ -166,0 +166,0 @@ on() {} |
{ | ||
"author": "Luis Blanco <luisblanco1337@gmail.com>", | ||
"name": "glfw-raub", | ||
"version": "0.0.9", | ||
"version": "0.0.10", | ||
"description": "GLFW for Node.js", | ||
@@ -31,5 +31,5 @@ "license": "MIT", | ||
"dependencies": { | ||
"deps-opengl-raub": "0.0.6", | ||
"addon-tools-raub": "^1.0.0" | ||
"deps-opengl-raub": "0.0.7", | ||
"addon-tools-raub": "^2.0.1" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
63077
380
1
+ Addedaddon-tools-raub@2.0.1(transitive)
+ Addeddeps-opengl-raub@0.0.7(transitive)
- Removedaddon-tools-raub@1.0.0(transitive)
- Removeddeps-opengl-raub@0.0.6(transitive)
Updatedaddon-tools-raub@^2.0.1
Updateddeps-opengl-raub@0.0.7