Socket
Socket
Sign inDemoInstall

lore-engine

Package Overview
Dependencies
Maintainers
1
Versions
51
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lore-engine - npm Package Compare versions

Comparing version 1.0.18 to 1.0.19

doc/scripts/collapse.js

0

.vscode/settings.json

@@ -0,0 +0,0 @@ {

@@ -0,0 +0,0 @@ //@ts-check

@@ -0,0 +0,0 @@ [![view on npm](http://img.shields.io/npm/v/example.svg)](https://www.npmjs.org/package/example)

@@ -0,0 +0,0 @@ /*global document */

PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\f\r ]+/,null," \t\r\n "]],[["str",/^"(?:[^\n\f\r"\\]|\\(?:\r\n?|\n|\f)|\\[\S\s])*"/,null],["str",/^'(?:[^\n\f\r'\\]|\\(?:\r\n?|\n|\f)|\\[\S\s])*'/,null],["lang-css-str",/^url\(([^"')]*)\)/i],["kwd",/^(?:url|rgb|!important|@import|@page|@media|@charset|inherit)(?=[^\w-]|$)/i,null],["lang-css-kw",/^(-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*)\s*:/i],["com",/^\/\*[^*]*\*+(?:[^*/][^*]*\*+)*\//],["com",
/^(?:<\!--|--\>)/],["lit",/^(?:\d+|\d*\.\d+)(?:%|[a-z]+)?/i],["lit",/^#[\da-f]{3,6}/i],["pln",/^-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*/i],["pun",/^[^\s\w"']+/]]),["css"]);PR.registerLangHandler(PR.createSimpleLexer([],[["kwd",/^-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*/i]]),["css-kw"]);PR.registerLangHandler(PR.createSimpleLexer([],[["str",/^[^"')]+/]]),["css-str"]);

@@ -0,0 +0,0 @@ var q=null;window.PR_SHOULD_USE_CONTINUATION=!0;

@@ -0,0 +0,0 @@ (function () {

@@ -0,0 +0,0 @@ (function () {

@@ -0,0 +0,0 @@ (function() {

@@ -0,0 +0,0 @@ (function() {

@@ -0,0 +0,0 @@ (function() {

60

gulpfile.js

@@ -22,5 +22,2 @@ var fs = require('fs');

gulp.task('default', ['build', 'doc', 'md']);
function compile(watch) {

@@ -73,31 +70,46 @@ var bundler = watchify(browserify('./app.js', {

gulp.task('build', function () {
return compile();
return new Promise(function(resolve, reject) {
compile();
resolve();
})
});
gulp.task('watch', function () {
return watch();
return new Promise(function(resolve, reject) {
watch();
resolve();
});
});
gulp.task('doc', function (cb) {
var config = require('./jsdocConfig.json');
gulp.src(['README.md', './src/*.js'], {
read: false
})
.pipe(jsdoc(config, cb))
return new Promise(function(resolve, reject) {
var config = require('./jsdocConfig.json');
gulp.src(['README.md', './src/*.js'], {
read: false
})
.pipe(jsdoc(config, cb))
resolve();
});
});
gulp.task('md', function (cb) {
var config = require('./jsdocConfig.json');
gulp.src('./src/*.js')
.pipe(concat('all.md'))
.pipe(gulpJsdoc2md({
template: fs.readFileSync('./readme.hbs', 'utf8')
}))
.on('error', function (err) {
gutil.log(gutil.colors.red('jsdoc2md failed'), err.message);
})
.pipe(rename(function (path) {
path.extname = '.md';
}))
.pipe(gulp.dest('doc'));
});
return new Promise(function(resolve, reject) {
var config = require('./jsdocConfig.json');
gulp.src('./src/*.js')
.pipe(concat('all.md'))
.pipe(gulpJsdoc2md({
template: fs.readFileSync('./readme.hbs', 'utf8')
}))
.on('error', function (err) {
gutil.log(gutil.colors.red('jsdoc2md failed'), err.message);
})
.pipe(rename(function (path) {
path.extname = '.md';
}))
.pipe(gulp.dest('doc'));
resolve();
});
});
gulp.task('default', gulp.series('build', 'doc', 'md'));

@@ -0,0 +0,0 @@ {

{
"name": "lore-engine",
"version": "1.0.18",
"version": "1.0.19",
"description": "A WebGL based 3D data visualization engine.",

@@ -21,21 +21,21 @@ "main": "./app.js",

"devDependencies": {
"babel-core": "^6.26.0",
"babel-preset-env": "^1.6.1",
"babelify": "^8.0.0",
"browserify": "^16.1.1",
"docdash": "^0.4.0",
"gulp": "^3.9.1",
"gulp-babel-minify": "^0.3.0",
"gulp-concat": "^2.6.1",
"babel-core": ">=6.26.3",
"babel-preset-env": ">=1.7.0",
"babelify": "^10.0.0",
"browserify": ">=16.2.3",
"docdash": "^1.0.3",
"gulp": "^4.0.0",
"gulp-babel-minify": "^0.5.0",
"gulp-concat": ">=2.6.1",
"gulp-exit": "0.0.2",
"gulp-jsdoc-to-markdown": "^1.2.2",
"gulp-jsdoc3": "^2.0.0",
"gulp-rename": "^1.2.2",
"gulp-sourcemaps": "^2.6.4",
"vinyl-buffer": "^1.0.1",
"vinyl-source-stream": "^2.0.0",
"watchify": "^3.11.0",
"webpack-stream": "^4.0.3"
"gulp-jsdoc-to-markdown": ">=1.2.2",
"gulp-jsdoc3": ">=2.0.0",
"gulp-rename": ">=1.4.0",
"gulp-sourcemaps": "^2.6.5",
"vinyl-buffer": ">=1.0.1",
"vinyl-source-stream": ">=2.0.0",
"watchify": "^3.11.1",
"webpack-stream": "^5.2.1"
},
"private": false
}

@@ -6,3 +6,3 @@ ![Lore](https://github.com/reymond-group/lore/blob/master/logo.png?raw=true)

# Lore
Current Version: 1.0.18 ([Godzilla](https://youtu.be/RTzb-sduiWc))
Current Version: 1.0.17 ([Godzilla](https://youtu.be/RTzb-sduiWc))

@@ -9,0 +9,0 @@ ### Teasers

@@ -0,0 +0,0 @@ const CameraBase = require('./CameraBase');

@@ -0,0 +0,0 @@ //@ts-check

@@ -0,0 +0,0 @@ //@ts-check

@@ -0,0 +0,0 @@ //@ts-check

@@ -0,0 +0,0 @@ //@ts-check

@@ -0,0 +0,0 @@ const ControlsBase = require('./ControlsBase');

@@ -0,0 +0,0 @@ //@ts-check

@@ -0,0 +0,0 @@ //@ts-check

@@ -0,0 +0,0 @@ //@ts-check

@@ -0,0 +0,0 @@ //@ts-check

@@ -0,0 +0,0 @@ const Attribute = require('./Attribute');

@@ -0,0 +0,0 @@ //@ts-check

@@ -0,0 +0,0 @@ //@ts-check

@@ -0,0 +0,0 @@ //@ts-check

@@ -0,0 +0,0 @@ //@ts-check

@@ -0,0 +0,0 @@ //@ts-check

@@ -0,0 +0,0 @@ //@ts-check

@@ -0,0 +0,0 @@ const FilterBase = require('./FilterBase');

@@ -0,0 +0,0 @@ //@ts-check

@@ -0,0 +0,0 @@ //@ts-check

@@ -0,0 +0,0 @@ //@ts-check

@@ -0,0 +0,0 @@ //@ts-check

@@ -0,0 +0,0 @@ const AABBHelper = require('./AABBHelper');

@@ -0,0 +0,0 @@ //@ts-check

@@ -202,2 +202,24 @@ //@ts-check

/**
* Set the positions (XYZ), the color (RGB) and size (S) of the points.
*
* @param {Number[]|Array|Float32Array} x An array containing the x components.
* @param {Number[]|Array|Float32Array} y An array containing the y components.
* @param {Number[]|Array|Float32Array} z An array containing the z components.
* @param {String} hex A hex value.
* @param {Number} [s=1.0] The size of the points.
* @returns {PointHelper} Itself.
*/
setXYZHexS(x, y, z, hex, s = 1.0) {
const length = x.length;
let c = new Float32Array(length);
let floatColor = Color.hexToFloat(hex);
for (var i = 0; i < length; i++) {
c[i] = floatColor;
}
this._setValues(x, y, z, c, s);
return this;
}
/**
* Set the positions (XYZ), the hue (H) and size (S) of the points.

@@ -204,0 +226,0 @@ *

@@ -5,2 +5,3 @@ //@ts-check

const DrawModes = require('../Core/DrawModes')
const Color = require('../Core/Color');
const Utils = require('../Utils/Utils');

@@ -33,3 +34,4 @@

setPositionsXYZ(x, y, z, length) {
setPositionsXYZ(x, y, z) {
const length = x.length;
let positions = new Float32Array(length * 3);

@@ -48,3 +50,106 @@

/**
* Set the positions (XYZ), the color (RGB) and size (S) of the points.
*
* @param {Number[]|Array|Float32Array} x An array containing the x components.
* @param {Number[]|Array|Float32Array} y An array containing the y components.
* @param {Number[]|Array|Float32Array} z An array containing the z components.
* @param {Number[]|Array|Float32Array} r An array containing the r components.
* @param {Number[]|Array|Float32Array} g An array containing the g components.
* @param {Number[]|Array|Float32Array} b An array containing the b components.
* @param {Number} [s=1.0] The size of the points.
* @returns {TreeHelper} Itself.
*/
setXYZRGBS(x, y, z, r, g, b, s = 1.0) {
const length = r.length;
let c = new Float32Array(length);
for (var i = 0; i < length; i++) {
c[i] = Color.rgbToFloat(r[i], g[i], b[i]);
}
this._setValues(x, y, z, c, s);
return this;
}
/**
* Set the positions (XYZ), the color (RGB) and size (S) of the points.
*
* @param {Number[]|Array|Float32Array} x An array containing the x components.
* @param {Number[]|Array|Float32Array} y An array containing the y components.
* @param {Number[]|Array|Float32Array} z An array containing the z components.
* @param {String} hex A hex value.
* @param {Number} [s=1.0] The size of the points.
* @returns {TreeHelper} Itself.
*/
setXYZHexS(x, y, z, hex, s = 1.0) {
const length = x.length;
let c = new Float32Array(length);
let floatColor = Color.hexToFloat(hex);
for (var i = 0; i < length; i++) {
c[i] = floatColor;
}
this._setValues(x, y, z, c, s);
return this;
}
/**
* Set the positions (XYZ), the hue (H) and size (S) of the points.
*
* @param {Number[]|Array|Float32Array} x An array containing the x components.
* @param {Number[]|Array|Float32Array} y An array containing the y components.
* @param {Number[]|Array|Float32Array} z An array containing the z components.
* @param {Number[]|Array|Float32Array|Number} [h=1.0] The hue as a number or an array.
* @param {Number[]|Array|Float32Array|Number} [s=1.0] The size of the points.
* @returns {TreeHelper} Itself.
*/
setXYZHS(x, y, z, h = 1.0, s = 1.0) {
const length = x.length;
let c = new Float32Array(length);
if (typeof h !== 'number') {
for (var i = 0; i < length; i++) {
c[i] = Color.hslToFloat(h[i]);
}
} else if (typeof h) {
h = Color.hslToFloat(h);
for (var i = 0; i < length; i++) {
c[i] = h;
}
}
this._setValues(x, y, z, c, s);
return this;
}
// TODO: Get rid of saturation
_setValues(x, y, z, c, s) {
let length = this.getMaxLength(x, y, z);
let saturation = new Float32Array(length);
for (var i = 0; i < length; i++) {
saturation[i] = 0.0;
}
if (typeof s === 'number') {
let tmpSize = new Float32Array(length);
for (var i = 0; i < length; i++) {
tmpSize[i] = s;
}
s = tmpSize;
}
this.setPositionsXYZ(x, y, z);
this.setHSSFromArrays(c, saturation, s);
// TODO: Check why the projection matrix update is needed
this.renderer.camera.updateProjectionMatrix();
this.renderer.camera.updateViewMatrix();
return this;
}
setPositionsXYZHSS(x, y, z, hue, saturation, size) {
console.warn('The method "setPositionsXYZHSS" is marked as deprecated.');
let length = this.getMaxLength(x, y, z);

@@ -135,3 +240,29 @@

/**
* Set the HSS values.
*
* @param {Number[]|Array|Float32Array} hue An array of hue values.
* @param {Number[]|Array|Float32Array} saturation An array of saturation values.
* @param {Number[]|Array|Float32Array} size An array of size values.
*/
setHSSFromArrays(hue, saturation, size) {
let length = hue.length;
let c = new Float32Array(length * 3);
let index = 0;
if (hue.length !== length && saturation.length !== length && size.length !== length) {
throw 'Hue, saturation and size have to be arrays of length "length" (' + length + ').';
}
for (let i = 0; i < length * 3; i += 3) {
c[i] = hue[index];
c[i + 1] = saturation[index];
c[i + 2] = size[index];
index++;
}
this.setColors(c);
}
addFilter(name, filter) {

@@ -138,0 +269,0 @@ filter.setGeometry(this.geometry);

@@ -0,0 +0,0 @@ //@ts-check

@@ -0,0 +0,0 @@ //@ts-check

@@ -0,0 +0,0 @@ const CsvFileReader = require('./CsvFileReader');

@@ -0,0 +0,0 @@ //@ts-check

@@ -0,0 +0,0 @@ const Core = require('./Core');

@@ -0,0 +0,0 @@ const Matrix3f = require('./Matrix3f');

@@ -0,0 +0,0 @@ //@ts-check

@@ -0,0 +0,0 @@ //@ts-check

@@ -0,0 +0,0 @@ //@ts-check

@@ -0,0 +0,0 @@ //@ts-check

@@ -0,0 +0,0 @@ //@ts-check

@@ -0,0 +0,0 @@ //@ts-check

@@ -0,0 +0,0 @@ //@ts-check

@@ -0,0 +0,0 @@ //@ts-check

@@ -0,0 +0,0 @@ const Shader = require('../Core/Shader')

@@ -0,0 +0,0 @@ const Shader = require('../Core/Shader')

@@ -0,0 +0,0 @@ const Shader = require('../Core/Shader')

@@ -0,0 +0,0 @@ const Shader = require('../Core/Shader')

@@ -0,0 +0,0 @@ const Shader = require('../Core/Shader')

@@ -0,0 +0,0 @@ const Shader = require('../Core/Shader')

@@ -0,0 +0,0 @@ var circle = require('./Circle');

@@ -0,0 +0,0 @@ const Shader = require('../Core/Shader')

@@ -6,3 +6,3 @@ const Shader = require('../Core/Shader')

cutoff: new Uniform('cutoff', 0.0, 'float'),
clearColor: new Uniform('clearColor', [1.0, 1.0, 1.0, 1.0], 'float_vec4'),
clearColor: new Uniform('clearColor', [0.0, 0.0, 0.0, 1.0], 'float_vec4'),
fogDensity: new Uniform('fogDensity', 6.0, 'float') }, [

@@ -9,0 +9,0 @@ 'uniform float size;',

@@ -0,0 +0,0 @@ const Shader = require('../Core/Shader')

@@ -0,0 +0,0 @@ const Shader = require('../Core/Shader')

@@ -0,0 +0,0 @@ //@ts-check

@@ -0,0 +0,0 @@ const AABB = require('./AABB');

@@ -0,0 +0,0 @@ //@ts-check

@@ -0,0 +0,0 @@ //@ts-check

@@ -0,0 +0,0 @@ const Utils = require('./Utils');

@@ -0,0 +0,0 @@ //@ts-check

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc