diff --git a/layers/dist/sketch.js b/layers/dist/sketch.js index f442292..28dc1a7 100644 --- a/layers/dist/sketch.js +++ b/layers/dist/sketch.js @@ -3,7 +3,7 @@ * Source code in TypeScript: https://github.com/fal-works/p5js-sketches/tree/master/layers * * @copyright 2020 FAL - * @version 0.1.0 + * @version 0.1.1 */ (function (p5ex, creativeCodingCore, chroma) { diff --git a/layers/dist/sketch.min.js b/layers/dist/sketch.min.js index 12302f0..5dda1c7 100644 --- a/layers/dist/sketch.min.js +++ b/layers/dist/sketch.min.js @@ -3,6 +3,6 @@ * Source code in TypeScript: https://github.com/fal-works/p5js-sketches/tree/master/layers * * @copyright 2020 FAL - * @version 0.1.0 + * @version 0.1.1 */ !function(e,t,a){"use strict";function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function r(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(a){if("default"!==a){var n=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(t,a,n.get?n:{enumerable:!0,get:function(){return e[a]}})}})),t.default=e,Object.freeze(t)}const o=r(e),i=n(a),{onSetup:h,onInstantiate:c}=o;let l,s;c.push((e=>{l=e})),h.push((()=>{s=e.canvas}));const d=(e,t,a,n,r,o)=>{let h;switch(r){case 0:h={x:e,y:t,width:a,height:0};break;case 1:h={x:e,y:t,width:0,height:n}}const c=i.default.lch(95,120,o).rgb();return{bounds:h,targetBounds:{x:e,y:t,width:a,height:n},color:l.color(c[0],c[1],c[2]),alpha:1,targetAlpha:160,type:r}},u=.05,g=e=>{const{bounds:t,targetBounds:a,type:n}=e;if(t.x+=u*(a.x-t.x),t.y+=u*(a.y-t.y),t.width+=u*(a.width-t.width),t.height+=u*(a.height-t.height),e.alpha+=u*(e.targetAlpha-e.alpha),159{const{bounds:a,color:n,alpha:r}=t;l.fill(e.colorWithAlpha(n,r)),l.rect(a.x,a.y,a.width,a.height)};let f=[];const b=()=>{l.frameCount%120==1&&(()=>{const{topLeft:e,bottomRight:a}=s.logicalRegion,{width:n,height:r}=s.logicalSize,o=.1*n,i=.1*r,h=.7*n,c=.7*r,l=[],u=()=>{let e=0;for(let a=0;a<1e3&&(e=10*t.Random.Integer.value(36),l.includes(e));a+=1);return l.push(e),e};for(let n=0;n<4;n+=1){const n=t.Random.Curved.between(t.Numeric.cube,o,h),i=r,c=t.Random.between(e.x,a.x-n),l=0;f.push(d(c,l,n,i,1,u()))}for(let r=0;r<3;r+=1){const r=n,o=t.Random.Curved.between(t.Numeric.cube,i,c),h=0,l=t.Random.between(e.y,a.y-o);f.push(d(h,l,r,o,0,u()))}})(),f=f.filter(g)},w=()=>{l.blendMode(l.REPLACE),l.background(255),l.blendMode(l.MULTIPLY),f.forEach(p)},y={keyTyped:()=>{switch(l.key){case"p":e.pauseOrResume();break;case"g":l.save("image.png")}return!1},draw:()=>{b(),s.drawScaled(w)}};e.startSketch({htmlElement:"Layers",logicalCanvasHeight:1080,initialize:()=>{l.noStroke()},windowResized:()=>s.resizeIfNeeded(),onCanvasResized:()=>{},p5Methods:y})}(p5ex,CreativeCodingCore,chroma); \ No newline at end of file diff --git a/layers/package.json b/layers/package.json index 0891719..bf9d41c 100644 --- a/layers/package.json +++ b/layers/package.json @@ -1,7 +1,7 @@ { "name": "none", "description": "none", - "version": "0.1.0", + "version": "0.1.1", "author": "FAL", "dependencies": { "@fal-works/creative-coding-core": "0.10.0", diff --git a/layers/rollup.config.js b/layers/rollup.config.js index 4bc3c85..5096054 100644 --- a/layers/rollup.config.js +++ b/layers/rollup.config.js @@ -7,7 +7,7 @@ import cleanup from "rollup-plugin-cleanup"; const name = "layers"; const title = "Layers"; -const version = "0.1.0"; +const version = "0.1.1"; const year = "2020"; const bundleFalWorksLibraries = false; const additionalBannerComment = ``;