p01 information 5232 glöps
- general:
- level: user
- personal:
- first name: mathieu
- last name: henri
- portals:
- demozoo: profile
- cdcs:
- cdc #1: Flip-O-Demo by Oxygene [web] & Diamond Design
- cdc #2: Ooh Crikey Wot A Scorcher by The Lost Boys
- cdc #3: Blood by Holocaust [web]
- cdc #4: Cuddly Demos by The Carebears [web]
- cdc #5: The Union Demo by The Union
- cdc #6: Fantasia by Dune & Sector One [web]
- cdc #7: Flashback by The Carebears [web]
- 128b JavaScript dragon punch by Ribbon [web]
- I don't feel good about the 7 instead of 'x', but templates literals ( the back ticks ) are super nice.
Pretty sure we can go under 100b - isokadded on the 2017-10-07 00:08:31
- 128b JavaScript dragon punch by Ribbon [web]
- 100 bytes
- isokadded on the 2017-10-04 23:53:14
- demo JavaScript hold on by Holon [web]
- :U
- rulezadded on the 2017-10-01 22:10:01
- demo PICO-8 There is no transition in heaven by Desire [web]
- smooth
- rulezadded on the 2017-10-01 01:11:42
- 256b MS-Dos Pool patrol by Digimind
- 🦆🦆🦆⛵
- rulezadded on the 2017-09-11 22:41:50
- 256b MS-Dos TCTRONIC by Abaddon [web]
- TCTRONIC
- rulezadded on the 2017-09-10 16:01:46
- demo JavaScript Boxbuffergeometry by Elude [web] & Logicoma [web]
- Using CSS, the sizing and vertical centering should occur only in the compositer. As a rule of thumb, I try to touch CSS properties in JS as a last resort.
However this potential optimization is moot since the canvas is resized to match the viewport. The browsers most likely freak out and trigger a style recalc anyways. And to be completely honest, no one resizes the browser window for several seconds to see how smoothly, or not, a prod/app/demo is.
Sorry ubik and wobble for derailing. - isokadded on the 2017-09-07 09:42:30
- demo JavaScript Boxbuffergeometry by Elude [web] & Logicoma [web]
- Good point about the CSS transforms. As for the resizing and style recalcs, I just did profiled a simple test case ( albeit with a 2D canvas ) and style recalcs only occured while resizing the window which is expected. No extra cost in this case.
But yeah the blur from the CSS transform is a bummer. Better use FlexBox to center the canvas then.
Code:html, body { margin: 0; height: 100%; display: flex; align-items:center; } canvas { width: 100vw; height: calc(900vw / 16); } - isokadded on the 2017-09-06 23:19:32
- demo JavaScript Boxbuffergeometry by Elude [web] & Logicoma [web]
- What you all said: Cool visuals, but disconnected from the music.
As for the vertical centering, better do this in CSS ;)Code:canvas { width: 100vw; height: calc(100vw * 9 / 16); position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); } - rulezadded on the 2017-09-06 22:14:18
- 1k Amiga OCS/ECS Boot me up before you go go by Booze Design
- :U
- rulezadded on the 2017-09-04 21:12:51
account created on the 2000-07-30 00:31:20
