💄 Useless `image` param
This commit is contained in:
		
							parent
							
								
									9452b2a0bc
								
							
						
					
					
						commit
						41c3ce8b17
					
				| 
						 | 
				
			
			@ -495,14 +495,13 @@ function _typeof(obj) { return obj && typeof Symbol !== "undefined" && obj.const
 | 
			
		|||
         * the next `n` points. To get to the next point, we apply
 | 
			
		||||
         * a random transformation among given ones
 | 
			
		||||
         *
 | 
			
		||||
         * @param {ImageData} image Image to write on
 | 
			
		||||
         * @param {Array} start Starting point
 | 
			
		||||
         * @param {number} iterations Number of points to plot
 | 
			
		||||
         * @param {Array} transforms List of available transforms
 | 
			
		||||
         * @param {Array} weights Probability weights for each transform
 | 
			
		||||
         * @return {null}
 | 
			
		||||
         */
 | 
			
		||||
        var applyChaos = exports.applyChaos = function applyChaos(image, start, iterations, transforms, weights, cb) {
 | 
			
		||||
        var applyChaos = exports.applyChaos = function applyChaos(start, iterations, transforms, weights, cb) {
 | 
			
		||||
            var point = start;
 | 
			
		||||
 | 
			
		||||
            if (weights === undefined) {
 | 
			
		||||
| 
						 | 
				
			
			@ -519,12 +518,11 @@ function _typeof(obj) { return obj && typeof Symbol !== "undefined" && obj.const
 | 
			
		|||
            }
 | 
			
		||||
        };
 | 
			
		||||
    }, {}], 7: [function (require, module, exports) {
 | 
			
		||||
        "use strict";
 | 
			
		||||
        'use strict';
 | 
			
		||||
 | 
			
		||||
        Object.defineProperty(exports, "__esModule", {
 | 
			
		||||
            value: true
 | 
			
		||||
        });
 | 
			
		||||
 | 
			
		||||
        var linearTransform = function linearTransform(a, b, c, d, e, f) {
 | 
			
		||||
            return function (point) {
 | 
			
		||||
                return [a * point[0] + b * point[1] + e, c * point[0] + d * point[1] + f];
 | 
			
		||||
| 
						 | 
				
			
			@ -592,7 +590,7 @@ function _typeof(obj) { return obj && typeof Symbol !== "undefined" && obj.const
 | 
			
		|||
            var color = [0, 0, 0];
 | 
			
		||||
            var skip = 50;
 | 
			
		||||
 | 
			
		||||
            _chaos.applyChaos.apply(undefined, [image, [0, 0], 500000].concat(_toConsumableArray(_ifs.barnsley), [function (point) {
 | 
			
		||||
            _chaos.applyChaos.apply(undefined, [[0, 0], 200000].concat(_toConsumableArray(_ifs.barnsley), [function (point) {
 | 
			
		||||
                var x = Math.floor(point[0] * zoom + center[0]);
 | 
			
		||||
                var y = height - Math.floor(point[1] * zoom + center[1]);
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -24,14 +24,13 @@ const chooseIndex = weights => {
 | 
			
		|||
 * the next `n` points. To get to the next point, we apply
 | 
			
		||||
 * a random transformation among given ones
 | 
			
		||||
 *
 | 
			
		||||
 * @param {ImageData} image Image to write on
 | 
			
		||||
 * @param {Array} start Starting point
 | 
			
		||||
 * @param {number} iterations Number of points to plot
 | 
			
		||||
 * @param {Array} transforms List of available transforms
 | 
			
		||||
 * @param {Array} weights Probability weights for each transform
 | 
			
		||||
 * @return {null}
 | 
			
		||||
 */
 | 
			
		||||
export const applyChaos = (image, start, iterations, transforms, weights, cb) => {
 | 
			
		||||
export const applyChaos = (start, iterations, transforms, weights, cb) => {
 | 
			
		||||
    let point = start;
 | 
			
		||||
 | 
			
		||||
    if (weights === undefined) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -33,7 +33,7 @@ const render = () => {
 | 
			
		|||
    const color = [0, 0, 0];
 | 
			
		||||
    let skip = 50;
 | 
			
		||||
 | 
			
		||||
    applyChaos(image, [0, 0], 500000, ...barnsley, point => {
 | 
			
		||||
    applyChaos([0, 0], 200000, ...barnsley, point => {
 | 
			
		||||
        const x = Math.floor(point[0] * zoom + center[0]);
 | 
			
		||||
        const y = height - Math.floor(point[1] * zoom + center[1]);
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue