mirror of
https://github.com/gpujs/gpu.js.git
synced 2026-01-25 16:08:02 +00:00
Merge branch 'develop' of github.com:gpujs/gpu.js into develop
This commit is contained in:
commit
6a2cb13bc6
@ -1,3 +1,5 @@
|
||||
'use strict';
|
||||
|
||||
const FunctionBuilderBase = require('../function-builder-base');
|
||||
const CPUFunctionNode = require('./function-node');
|
||||
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
'use strict';
|
||||
|
||||
const BaseFunctionNode = require('../function-node-base');
|
||||
|
||||
/**
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
'use strict';
|
||||
|
||||
const utils = require('../../core/utils');
|
||||
const kernelRunShortcut = require('../kernel-run-shortcut');
|
||||
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
'use strict';
|
||||
|
||||
const KernelBase = require('../kernel-base');
|
||||
const utils = require('../../core/utils');
|
||||
const kernelString = require('./kernel-string');
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
'use strict';
|
||||
|
||||
const utils = require('../../core/utils');
|
||||
const RunnerBase = require('../runner-base');
|
||||
const CPUKernel = require('./kernel');
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = class FunctionBuilderBase {
|
||||
|
||||
/**
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
'use strict';
|
||||
|
||||
const utils = require('../core/utils');
|
||||
const parser = require('../core/parser').parser;
|
||||
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
'use strict';
|
||||
|
||||
const utils = require('../core/utils');
|
||||
|
||||
module.exports = class BaseKernel {
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
'use strict';
|
||||
|
||||
const utils = require('../core/utils');
|
||||
|
||||
module.exports = function kernelRunShortcut(kernel) {
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
'use strict';
|
||||
|
||||
const utils = require('../core/utils');
|
||||
const kernelRunShortcut = require('./kernel-run-shortcut');
|
||||
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
'use strict';
|
||||
|
||||
const FunctionBuilderBase = require('../function-builder-base');
|
||||
const WebGLFunctionNode = require('./function-node');
|
||||
const utils = require('../../core/utils');
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
'use strict';
|
||||
|
||||
const FunctionNodeBase = require('../function-node-base');
|
||||
const utils = require('../../core/utils');
|
||||
// Closure capture for the ast function, prevent collision with existing AST functions
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
'use strict';
|
||||
|
||||
const utils = require('../../core/utils');
|
||||
const kernelRunShortcut = require('../kernel-run-shortcut');
|
||||
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
'use strict';
|
||||
|
||||
const fs = require('fs');
|
||||
const KernelBase = require('../kernel-base');
|
||||
const utils = require('../../core/utils');
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
'use strict';
|
||||
|
||||
const RunnerBase = require('../runner-base');
|
||||
const WebGLKernel = require('./kernel');
|
||||
const utils = require('../../core/utils');
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
'use strict';
|
||||
|
||||
const WebGLKernel = require('./kernel');
|
||||
const utils = require('../../core/utils');
|
||||
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
'use strict';
|
||||
|
||||
const utils = require('./utils');
|
||||
module.exports = function alias(name, fn) {
|
||||
const fnString = fn.toString();
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
'use strict';
|
||||
|
||||
const UtilsCore = require("./utils-core");
|
||||
|
||||
/**
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
'use strict';
|
||||
|
||||
const utils = require('./utils');
|
||||
const WebGLRunner = require('../backend/web-gl/runner');
|
||||
const CPURunner = require('../backend/cpu/runner');
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
'use strict';
|
||||
|
||||
let gpu = null;
|
||||
|
||||
module.exports = class Texture {
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
*
|
||||
* @desc Reduced subset of Utils, used exclusively in gpu-core.js
|
||||
@ -216,10 +218,16 @@ class UtilsCore {
|
||||
const _isCanvasSupported = typeof document !== 'undefined' ? UtilsCore.isCanvas(document.createElement('canvas')) : false;
|
||||
const _testingWebGl = UtilsCore.initWebGl(UtilsCore.initCanvas());
|
||||
const _isWebGlSupported = UtilsCore.isWebGl(_testingWebGl);
|
||||
const _isWebGlDrawBuffersSupported = Boolean(_testingWebGl.getExtension('WEBGL_draw_buffers'));
|
||||
const _isWebGlDrawBuffersSupported = _isWebGlSupported && Boolean(_testingWebGl.getExtension('WEBGL_draw_buffers'));
|
||||
|
||||
UtilsCore.OES_texture_float = _testingWebGl.OES_texture_float;
|
||||
UtilsCore.OES_texture_float_linear = _testingWebGl.OES_texture_float_linear;
|
||||
UtilsCore.OES_element_index_uint = _testingWebGl.OES_element_index_uint;
|
||||
if (_isWebGlSupported) {
|
||||
UtilsCore.OES_texture_float = _testingWebGl.OES_texture_float;
|
||||
UtilsCore.OES_texture_float_linear = _testingWebGl.OES_texture_float_linear;
|
||||
UtilsCore.OES_element_index_uint = _testingWebGl.OES_element_index_uint;
|
||||
} else {
|
||||
UtilsCore.OES_texture_float = false;
|
||||
UtilsCore.OES_texture_float_linear = false;
|
||||
UtilsCore.OES_element_index_uint = false;
|
||||
}
|
||||
|
||||
module.exports = UtilsCore;
|
||||
@ -1,3 +1,5 @@
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
*
|
||||
* @classdesc Various utility functions / snippets of code that GPU.JS uses internally.\
|
||||
|
||||
4
src/index-core.js
vendored
4
src/index-core.js
vendored
@ -1,10 +1,12 @@
|
||||
'use strict';
|
||||
|
||||
const GPUCore = require("./core/gpu-core");
|
||||
if (typeof module !== 'undefined') {
|
||||
module.exports = GPUCore;
|
||||
}
|
||||
if (typeof window !== 'undefined') {
|
||||
window.GPUCore = GPUCore;
|
||||
if(window.GPU == null) {
|
||||
if(window.GPU === null) {
|
||||
window.GPU = GPUCore;
|
||||
}
|
||||
}
|
||||
2
src/index.js
vendored
2
src/index.js
vendored
@ -1,3 +1,5 @@
|
||||
'use strict';
|
||||
|
||||
const GPU = require('./core/gpu');
|
||||
const alias = require('./core/alias');
|
||||
const utils = require('./core/utils');
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user