From 18c397577f59aa403b60ed6a0695ebd95d936fe4 Mon Sep 17 00:00:00 2001 From: TheShashank13 Date: Fri, 25 Oct 2024 23:45:55 +0530 Subject: [PATCH 1/7] Batman Scripts --- batman.html | 17 +++++++++ script.js | 99 +++++++++++++++++++++++++++++++++++++++++++++++++++++ style.css | 16 +++++++++ 3 files changed, 132 insertions(+) create mode 100644 batman.html create mode 100644 script.js create mode 100644 style.css diff --git a/batman.html b/batman.html new file mode 100644 index 0000000000..d604552c36 --- /dev/null +++ b/batman.html @@ -0,0 +1,17 @@ + + + + + Bat Signal + + + + +
+ +
+ + + + + \ No newline at end of file diff --git a/script.js b/script.js new file mode 100644 index 0000000000..dc5c75b19f --- /dev/null +++ b/script.js @@ -0,0 +1,99 @@ +let scalar = .75, + width = 610 * scalar, + height = 273 * scalar, + pSystemSize = 20, + pathString = '', + pathLength; + +const tau = Math.PI * 2, + repaint = 'rgba(0,0,10,.05)', + shadowPath = document.createElementNS('http://www.w3.org/2000/svg','path'), + wrapper = document.querySelector('.wrapper'), + canvas = document.querySelector('canvas'), + ctx = canvas.getContext('2d'); + +canvas.width = width; +canvas.height = height; +wrapper.style.width = width + 'px'; + +pathString = 'M264 97 l11 -82, 10 33, 41 0, 9 -33, 10 82 q72 32, 83 -70 c205 50, 205 155, 39 210 c-5 -60, -72 -60, -81 -12, -10 -42, -70 -32, -81 33 c-11 -72, -70 -72, -80 -33 c-9 -48, -76 -48, -81 12 c-168 -55, -168 -160, 40 -210 q9 102, 80 69 m40 -95 c405 0, 405 270, 0 270 c-405 0, -405 -270, 0 -270'; +shadowPath.setAttribute('d', pathString); +pathLength = shadowPath.getTotalLength(); + +const ParticleSystem = function(num){ + this.colour = '#eee'; + this.numParticles = num; + this.allParticles = []; + this.generate(); +} +ParticleSystem.prototype.generate = function(){ + for(let i=0; i= pathLength){ + this.position = this.position - pathLength; + } + this.pt = this.parent.getPointAtLength(this.position); + this.x = this.pt.x * this.scalar; + this.y = this.pt.y * this.scalar; +} + +function update(){ + system.update(); +} + +function draw(){ + ctx.fillStyle = repaint; + ctx.fillRect(0, 0, width, height); + ctx.fillStyle = system.colour; + for(let i=0; i Date: Sat, 26 Oct 2024 03:10:30 +0530 Subject: [PATCH 2/7] Index.html --- Batman Animated logo/Index.html | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 Batman Animated logo/Index.html diff --git a/Batman Animated logo/Index.html b/Batman Animated logo/Index.html new file mode 100644 index 0000000000..db5569af3f --- /dev/null +++ b/Batman Animated logo/Index.html @@ -0,0 +1,17 @@ + + + + + Bat Signal + + + + +
+ +
+ + + + + From 50e853799272392023470a6c752e9df53e1b2e68 Mon Sep 17 00:00:00 2001 From: TheShashank13 Date: Sat, 26 Oct 2024 03:10:51 +0530 Subject: [PATCH 3/7] Add files via upload --- Batman Animated logo/script.js | 99 ++++++++++++++++++++++++++++++++++ Batman Animated logo/style.css | 16 ++++++ 2 files changed, 115 insertions(+) create mode 100644 Batman Animated logo/script.js create mode 100644 Batman Animated logo/style.css diff --git a/Batman Animated logo/script.js b/Batman Animated logo/script.js new file mode 100644 index 0000000000..dc5c75b19f --- /dev/null +++ b/Batman Animated logo/script.js @@ -0,0 +1,99 @@ +let scalar = .75, + width = 610 * scalar, + height = 273 * scalar, + pSystemSize = 20, + pathString = '', + pathLength; + +const tau = Math.PI * 2, + repaint = 'rgba(0,0,10,.05)', + shadowPath = document.createElementNS('http://www.w3.org/2000/svg','path'), + wrapper = document.querySelector('.wrapper'), + canvas = document.querySelector('canvas'), + ctx = canvas.getContext('2d'); + +canvas.width = width; +canvas.height = height; +wrapper.style.width = width + 'px'; + +pathString = 'M264 97 l11 -82, 10 33, 41 0, 9 -33, 10 82 q72 32, 83 -70 c205 50, 205 155, 39 210 c-5 -60, -72 -60, -81 -12, -10 -42, -70 -32, -81 33 c-11 -72, -70 -72, -80 -33 c-9 -48, -76 -48, -81 12 c-168 -55, -168 -160, 40 -210 q9 102, 80 69 m40 -95 c405 0, 405 270, 0 270 c-405 0, -405 -270, 0 -270'; +shadowPath.setAttribute('d', pathString); +pathLength = shadowPath.getTotalLength(); + +const ParticleSystem = function(num){ + this.colour = '#eee'; + this.numParticles = num; + this.allParticles = []; + this.generate(); +} +ParticleSystem.prototype.generate = function(){ + for(let i=0; i= pathLength){ + this.position = this.position - pathLength; + } + this.pt = this.parent.getPointAtLength(this.position); + this.x = this.pt.x * this.scalar; + this.y = this.pt.y * this.scalar; +} + +function update(){ + system.update(); +} + +function draw(){ + ctx.fillStyle = repaint; + ctx.fillRect(0, 0, width, height); + ctx.fillStyle = system.colour; + for(let i=0; i Date: Sat, 26 Oct 2024 03:12:45 +0530 Subject: [PATCH 4/7] Create readme.md --- Batman Animated logo/readme.md | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 Batman Animated logo/readme.md diff --git a/Batman Animated logo/readme.md b/Batman Animated logo/readme.md new file mode 100644 index 0000000000..138b5350df --- /dev/null +++ b/Batman Animated logo/readme.md @@ -0,0 +1,4 @@ +# Batman-Logo-Project +Define an HTML index/use html in widget to be included in a page +Use the corresponing JS/CSS widget sections respectively for script and CSS +This can also be used directly as a browser/web view project as well. From d7a5564c6fac09dbb2cd7005dea3c38e8ac3befe Mon Sep 17 00:00:00 2001 From: TheShashank13 Date: Sat, 26 Oct 2024 03:30:07 +0530 Subject: [PATCH 5/7] Delete batman.html --- batman.html | 17 ----------------- 1 file changed, 17 deletions(-) delete mode 100644 batman.html diff --git a/batman.html b/batman.html deleted file mode 100644 index d604552c36..0000000000 --- a/batman.html +++ /dev/null @@ -1,17 +0,0 @@ - - - - - Bat Signal - - - - -
- -
- - - - - \ No newline at end of file From fd93c1dc9c0f579243432f7be2b879eb7c150559 Mon Sep 17 00:00:00 2001 From: TheShashank13 Date: Sat, 26 Oct 2024 03:30:23 +0530 Subject: [PATCH 6/7] Delete script.js --- script.js | 99 ------------------------------------------------------- 1 file changed, 99 deletions(-) delete mode 100644 script.js diff --git a/script.js b/script.js deleted file mode 100644 index dc5c75b19f..0000000000 --- a/script.js +++ /dev/null @@ -1,99 +0,0 @@ -let scalar = .75, - width = 610 * scalar, - height = 273 * scalar, - pSystemSize = 20, - pathString = '', - pathLength; - -const tau = Math.PI * 2, - repaint = 'rgba(0,0,10,.05)', - shadowPath = document.createElementNS('http://www.w3.org/2000/svg','path'), - wrapper = document.querySelector('.wrapper'), - canvas = document.querySelector('canvas'), - ctx = canvas.getContext('2d'); - -canvas.width = width; -canvas.height = height; -wrapper.style.width = width + 'px'; - -pathString = 'M264 97 l11 -82, 10 33, 41 0, 9 -33, 10 82 q72 32, 83 -70 c205 50, 205 155, 39 210 c-5 -60, -72 -60, -81 -12, -10 -42, -70 -32, -81 33 c-11 -72, -70 -72, -80 -33 c-9 -48, -76 -48, -81 12 c-168 -55, -168 -160, 40 -210 q9 102, 80 69 m40 -95 c405 0, 405 270, 0 270 c-405 0, -405 -270, 0 -270'; -shadowPath.setAttribute('d', pathString); -pathLength = shadowPath.getTotalLength(); - -const ParticleSystem = function(num){ - this.colour = '#eee'; - this.numParticles = num; - this.allParticles = []; - this.generate(); -} -ParticleSystem.prototype.generate = function(){ - for(let i=0; i= pathLength){ - this.position = this.position - pathLength; - } - this.pt = this.parent.getPointAtLength(this.position); - this.x = this.pt.x * this.scalar; - this.y = this.pt.y * this.scalar; -} - -function update(){ - system.update(); -} - -function draw(){ - ctx.fillStyle = repaint; - ctx.fillRect(0, 0, width, height); - ctx.fillStyle = system.colour; - for(let i=0; i Date: Sat, 26 Oct 2024 03:30:47 +0530 Subject: [PATCH 7/7] Delete style.css --- style.css | 16 ---------------- 1 file changed, 16 deletions(-) delete mode 100644 style.css diff --git a/style.css b/style.css deleted file mode 100644 index 274b826dd1..0000000000 --- a/style.css +++ /dev/null @@ -1,16 +0,0 @@ -* { - margin: 0; -} - -body { - background: #000008; -} - -.wrapper { - margin: 20px auto; - position: relative; -} - -canvas { - position: absolute; -}