mirror of
https://github.com/gpujs/gpu.js.git
synced 2026-02-01 16:57:35 +00:00
@static complete
This commit is contained in:
parent
3ec6dfc33b
commit
054dd55c67
29
gulpfile.js
vendored
29
gulpfile.js
vendored
@ -14,35 +14,6 @@ const jsprettify = require('gulp-jsbeautifier');
|
||||
const babel = require('gulp-babel');
|
||||
const stripComments = require('gulp-strip-comments');
|
||||
|
||||
const glob = require('glob');
|
||||
|
||||
gulp.task('refactor', ()=>{
|
||||
glob('./src/**/*.js', (err, files)=>{
|
||||
var count = 0;
|
||||
files.forEach(file=>{
|
||||
fs.readFile(file, (err, data)=>{
|
||||
|
||||
const dataString = data.toString();
|
||||
let chunks = dataString.split('\n');
|
||||
var stream = false;
|
||||
// console.log(chunks);
|
||||
for (var i = 0; i < chunks.length; i++) {
|
||||
if(chunks[i].includes(' @function')){
|
||||
stream = !stream;
|
||||
}else if(stream){
|
||||
if(chunks[i].includes(/(\t+|\s+)\*\//g)){
|
||||
stream = !stream;
|
||||
console.log(chunks[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
const finalData = chunks.join('\n');
|
||||
fs.writeFile(file, finalData);
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
/// Build the scripts
|
||||
gulp.task('build', function() {
|
||||
browserify('./src/index.js')
|
||||
|
||||
@ -58,7 +58,7 @@ module.exports = class CPUKernel extends KernelBase {
|
||||
|
||||
/**
|
||||
* @name validateOptions
|
||||
* @function
|
||||
* @function
|
||||
*
|
||||
* Validate options related to CPU Kernel, such as
|
||||
* dimensions size, and auto dimension support.
|
||||
@ -313,7 +313,8 @@ module.exports = class CPUKernel extends KernelBase {
|
||||
|
||||
/**
|
||||
* @name compileKernel
|
||||
* @function
|
||||
* @function
|
||||
* @static
|
||||
*
|
||||
* Takes a previously precompiled kernel object,
|
||||
* and complete compilation into a full kernel
|
||||
|
||||
@ -144,6 +144,7 @@ module.exports = class WebGLFunctionNode extends FunctionNodeBase {
|
||||
/**
|
||||
* @name astFunctionPrototype
|
||||
* @function
|
||||
* @static
|
||||
*
|
||||
* Parses the abstract syntax tree for to its *named function prototype*
|
||||
*
|
||||
|
||||
@ -14,6 +14,7 @@ module.exports = class GPUCore {
|
||||
/**
|
||||
* @name validateKernelObj
|
||||
* @function
|
||||
* @static
|
||||
*
|
||||
* Validates the KernelObj to comply with the defined format
|
||||
* Note that this does only a limited sanity check, and does not
|
||||
@ -60,6 +61,7 @@ module.exports = class GPUCore {
|
||||
/**
|
||||
* @name loadKernelObj
|
||||
* @function
|
||||
* @static
|
||||
*
|
||||
* Loads the precompilled kernel object. For GPUCore this is the ONLY way to create the kernel.
|
||||
* To generate the kernelObj use <Kernel.exportKernelObj>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user