News for hackers. Stuff that matters.
Re:CSS-Powered 3D Engine (2014) by pavlov on Sunday February 24, 2019 @08:42AM (#19238514)
Around 2012, there was a startup called Famo.us who raised $30 million for a CSS-based 3D engine. Looks like they pivoted to some kind of brand CMS eventually:

https://techcrunch.com/2015/11/06/nopen-source/

The company claimed to have a secret sauce for accelerating HTML5 graphics, which turned out to be the matrix3d() function for CSS transforms.

Re:CSS-Powered 3D Engine (2014) by contrahax on Sunday February 24, 2019 @01:42PM (#19239876)
Secret sauce was basically every element absolute positioned, with an event loop that was diffing a CSS transform tree each tick. Worked pretty well, but was basically a workaround for browser performance issues that ended up being fixed anyways. (Was hired by them to do their React component library long ago)
Re:CSS-Powered 3D Engine (2014) by pavlov on Sunday February 24, 2019 @06:47PM (#19241448)
It’s an awfully big stretch to hype that up as some kind of direct GPU access, as in this quote from the TechCrunch article about the pivot:

“By bypassing the CSS and HTML renderers to talk directly to the graphics processing unit, Famo.us could supposedly make 3D physics and other visual wizardry common with native games run smoothly for apps in a mobile or web browser.”

Re:CSS-Powered 3D Engine (2014) by underwater on Sunday February 24, 2019 @09:45PM (#19242400)
Journalists always simplify things to the point they become meaningless.

But avoiding DOM layout and its performance issues was relatively innovative at the time. It wasn't unheard of, but no one had really turned it into a framework like they did.

Re:CSS-Powered 3D Engine (2014) by pavlov on Monday February 25, 2019 @05:06AM (#19244464)
You can't blame journalists when the CEO of the company was actively spouting this "interfaces directly with the GPU" bullshit to describe multiplying some matrices in JS.
Re:CSS-Powered 3D Engine (2014) by KaoruAoiShiho on Sunday February 24, 2019 @09:15AM (#19238620)
They pivoted again to be a figma competitor. Yeah I think these days webgl is the way to go...
Re:CSS-Powered 3D Engine (2014) by paulddraper on Sunday February 24, 2019 @10:51AM (#19239006)
Re:CSS-Powered 3D Engine (2014) by yeahitslikethat on Monday February 25, 2019 @12:40AM (#19243284)
Or babylon.js
Re:CSS-Powered 3D Engine (2014) by pjmlp on Sunday February 24, 2019 @02:45PM (#19240201)
While WebGL 2.0 is already quite cool, having the missing features of GL ES 3.x or eventually WebGPU would be quite nice.

I still see too many WebGL demos that struggle on devices where native GL ES doesn't have any issues.

Re:CSS-Powered 3D Engine (2014) by egypturnash on Sunday February 24, 2019 @10:54PM (#19242774)
This article is hilarious. Or depressing. Maybe both.

"During the company’s debut on stage at TechCrunch Disrupt SF 2012 Startup Battlefield competition, rather than giving a traditional pitch, Famo.us CEO Steve Newcomb spent his whole six minutes asking people to imagine what could be done if apps were 3D instead of 2D and demoing a floating periodic table. [...] just days earlier, the team made its first pivot away from what it called BenchRank, a ranking system for people, into an HTML5 development platform."

"When TechCrunch reporter Anthony Ha visited [their offices], [Famo.us's CEO] pointed to some desks that seemed adequate, but insisted they would be replaced soon because they weren’t the right kind of wood."

It is now 2019 and the front page of famous.co has a big video and a pre-order button. One begins to wonder if this is an actual company, or an excuse to get a lot of VC so its CEO and a few lucky employees can afford to have nice places to live in SF.

Re:CSS-Powered 3D Engine (2014) by flanbiscuit on Sunday February 24, 2019 @12:26PM (#19239473)
For some reason I remember famo.us as being some kind of mobile browser content render replacement (instead of using html+css), not a 3D engine.
Re:CSS-Powered 3D Engine (2014) by max_ on Sunday February 24, 2019 @01:34PM (#19239835)
Curious to know about the limitations.

The demos seem to run smoothly & are pretty impressive IMHO.

Re:CSS-Powered 3D Engine (2014) by jzl on Sunday February 24, 2019 @10:31AM (#19238904)
There's also someone who does incredible artwork using only hand-written CSS:

http://diana-adrianne.com/purecss-francine/

How it works:

http://diana-adrianne.com/how/

Re:CSS-Powered 3D Engine (2014) by jjordan on Sunday February 24, 2019 @11:48AM (#19239270)
Meanwhile, I can't get a box to line up properly.
Re:CSS-Powered 3D Engine (2014) by marvindanig on Sunday February 24, 2019 @10:39AM (#19238951)
Re:CSS-Powered 3D Engine (2014) by cazum on Sunday February 24, 2019 @01:59PM (#19239972)
Just a warning to mobile users:

The upper link can absolutely grind Android Chrome to a halt.

Force closing the app doesn't fix it either, as chrome reopens the last tab you had open, so the only way out is to completely wipe the browser data which is a little annoying.

Re:CSS-Powered 3D Engine (2014) by Yetanfou on Sunday February 24, 2019 @05:26PM (#19241030)
I tried it on Chrome, Lightning, Privacy Browser, Firefox, Fennec en Firefox Klar ('always in privacy mode'), it works fine on all of these. Tested on Android 8.1 on a Xiaomi Redmi Note 5.
Re:CSS-Powered 3D Engine (2014) by pault on Sunday February 24, 2019 @11:41AM (#19239239)
I clicked expecting some cartoonish 2D illustrations, and then spent a few minutes clicking around the DOM in awe. o_O
Re:CSS-Powered 3D Engine (2014) by btbuildem on Sunday February 24, 2019 @02:15PM (#19240061)
TIL border-radius has a bit more to offer than I knew
Re:CSS-Powered 3D Engine (2014) by Yetanfou on Sunday February 24, 2019 @05:15PM (#19240971)
Strangely enough the image looks far better - as in more or less like it should - in Firefox (67.0a1) while she looks like Freddy Krueger's offspring (wrong colours, translucent areas which should be opaque or the other way around, etc) in Chromium (72.0 build 3626), both on Debian (Sid). I say this is strange as the author explicitly mentions she only expects it to look as it should on Chrome.
Re:CSS-Powered 3D Engine (2014) by arc_of_descent on Sunday February 24, 2019 @03:10PM (#19240332)
This is nice. But she is still using images right? It's the same. Choose a great texture, apply it to objects.
Re:CSS-Powered 3D Engine (2014) by barbecue_sauce on Sunday February 24, 2019 @03:36PM (#19240473)
No, all the stuff in these images are divs.
Re:CSS-Powered 3D Engine (2014) by bitwize on Sunday February 24, 2019 @06:44PM (#19241428)
Nope -- this is the HTML equivalent of Japanese Excel art.
Re:CSS-Powered 3D Engine (2014) by KaoruAoiShiho on Sunday February 24, 2019 @03:19PM (#19240383)
She is not, that's the whole point.
Re:CSS-Powered 3D Engine (2014) by andai on Sunday February 24, 2019 @08:30AM (#19238464)
Love this crazy project. In Firefox I get 1 fps and crazy graphics glitches, and in Brave I slowly float into the sky. Runs fine in Chrome though.
Re:CSS-Powered 3D Engine (2014) by twic on Sunday February 24, 2019 @08:59AM (#19238567)
In Firefox it's like a particularly unpleasant salvia trip.
Re:CSS-Powered 3D Engine (2014) by theon144 on Sunday February 24, 2019 @11:22AM (#19239149)
Win10, FF 66, I get what seems close enough to 60fps, but some graphics glitches too, mostly the texture around the barrels which doesn't go all the way "around".
Re:CSS-Powered 3D Engine (2014) by Lukas_Skywalker on Sunday February 24, 2019 @09:43AM (#19238712)
Funnily, this runs with 20-30 FPS on a (lower end) Windows Phone with Edge mobile. Is Edge optimized for CSS performance?
Re:CSS-Powered 3D Engine (2014) by pault on Sunday February 24, 2019 @11:46AM (#19239263)
Edge has always been extremely fast and competitive with other browser engines. It really shocked me when they deprecated it because in the last year of developing an app that only targets chrome and edge, I've never once had a bug that was edge-only. It seems that MS was never able to get out of the shadow of IE.
Re:CSS-Powered 3D Engine (2014) by StevePerkins on Sunday February 24, 2019 @12:45PM (#19239577)
Casual users are now trained to use Chrome. Because they browse on mobile more than on desktop, and Chrome is "The Internet" icon on their phones.

Techies and power users were never going to give Edge a second glance, because they launched without plugin support (i.e. no way to block ads).

Re:CSS-Powered 3D Engine (2014) by qpery on Sunday February 24, 2019 @05:31PM (#19241057)
The problem with Edge is that they wrapped the engine, which was great, inside a UWP app, which are known to be stupidly ugly and stupidly sluggish. That's what killed it. Had they chosen Win32, it wouldn't have died. But I guess we will never know.
Re:CSS-Powered 3D Engine (2014) by galfarragem on Sunday February 24, 2019 @10:23AM (#19238868)
Funnily, it's playable on safari/ipad mini 1st generation.
Re:CSS-Powered 3D Engine (2014) by tasty_freeze on Sunday February 24, 2019 @11:39AM (#19239228)
It is a bit choppy for me in FF 65, running on a 7 year old PC under windows 7, with a very old and low end GPU. Not sure why you see 1 fps.
Re:CSS-Powered 3D Engine (2014) by rzzzt on Sunday February 24, 2019 @03:45PM (#19240518)
The choppiness decreases tremendously if I wiggle the mouse around during the demo (clicked on the auto-running third link).
Re:CSS-Powered 3D Engine (2014) by coldtea on Sunday February 24, 2019 @08:48AM (#19238534)
Shouldn't Firefox be prioritizing fixing those things instead of BS moonshot projects they do (not talking about Rust, but various non-browser pivots).

They might be "different teams" doing each, but they all have finite resources to pay them.

Re:CSS-Powered 3D Engine (2014) by robin_reala on Sunday February 24, 2019 @08:51AM (#19238549)
WebRender currently (as of the last 2 weeks) renders this correctly, but slowly. Now that correctness is in, they can start looking at speed. Associated bug is https://bugzilla.mozilla.org/show_bug.cgi?id=1525420 , but it’s not a blocker for launching WebRender in the first place.

And no, this sort of thing isn’t particularly high priority. If lots of websites used these technologies to this extent then it’d be higher up the priority list I’m sure.

Re:CSS-Powered 3D Engine (2014) by coldtea on Sunday February 24, 2019 @09:55AM (#19238741)
That's the new Rust based render engine?
Re:CSS-Powered 3D Engine (2014) by robin_reala on Sunday February 24, 2019 @10:07AM (#19238804)
Sorry, yes, it’s the Rust GPU rendering (not layout) engine that’s being introduced into release Firefox at the moment. Lin Clark wrote a great article on it 18 months ago: https://hacks.mozilla.org/2017/10/the-whole-web-at-maximum-f... . It should eventually be considerably faster than it is at the moment, but obviously there’s been a bunch of performance work in the previous Firefox rendering engine so currently it’s a clean codebase that’s moderately faster.
Re:CSS-Powered 3D Engine (2014) by coldtea on Sunday February 24, 2019 @10:10AM (#19238816)
Thanks!

That's nice -- does that replace all rendering parts with the new Rust (servo?) equivalents?

Or are some parts still in the C++ codebase? (rendering related, not the UI code/JS engine, etc).

The diagram on the link seems to imply this is the last part! Does that mean there's some drawing library (akin to Skia) written in Rust used by WebRender too?

Re:CSS-Powered 3D Engine (2014) by styfle on Monday February 25, 2019 @10:11PM (#19251710)
There is one project I know of that is bringing webrender to desktop apps: https://news.ycombinator.com/item?id=18312983
Re:CSS-Powered 3D Engine (2014) by robin_reala on Sunday February 24, 2019 @05:50PM (#19241160)
I’m just an interested observer so handful of salt, but I believe WebRender replaces Moz2D and the old drawing libraries (which included Skia). Honestly, at this point I’m going to defer to pcwalton or whoever’s on HN that’s closer to the project than me.
Re:CSS-Powered 3D Engine (2014) by AndrewKemendo on Sunday February 24, 2019 @09:13AM (#19238611)
Works perfectly on safari (webkit) browsers for me.
Re:CSS-Powered 3D Engine (2014) by lettergram on Sunday February 24, 2019 @09:47AM (#19238721)
On Firefox mobile I had no problem
Re:CSS-Powered 3D Engine (2014) by srgpqt on Sunday February 24, 2019 @10:22AM (#19238865)
On iOS, all browsers (including firefox) use the OS’s Webview (webkit) as mandated by apple. So basically every browser are Safari reskins.
Re:CSS-Powered 3D Engine (2014) by lexicality on Sunday February 24, 2019 @11:13AM (#19239099)
This is from 2013: https://keithclark.co.uk/articles/creating-3d-worlds-with-ht...

I remember seeing his old one in 2012 and spending an 8 hour plane ride with a bottle of vodka and a laptop trying to recreate the windows maze screensaver the same way. (Needless to say, the vodka was the only winner)

Re:CSS-Powered 3D Engine (2014) by sigvef on Sunday February 24, 2019 @08:56AM (#19238564)
Three.js has an (old) css renderer too https://threejs.org/examples/#css3d_molecules
Re:CSS-Powered 3D Engine (2014) by aw3c2 on Sunday February 24, 2019 @09:24AM (#19238645)
Same author :)
Re:CSS-Powered 3D Engine (2014) by chowland on Sunday February 24, 2019 @10:25AM (#19238876)
Neat! Also, is it me or are those flammable barrels from Half Life 2? :)
Re:CSS-Powered 3D Engine (2014) by Insanity on Sunday February 24, 2019 @10:54AM (#19239022)
I think they are :p
Re:CSS-Powered 3D Engine (2014) by reificator on Sunday February 24, 2019 @11:15AM (#19239107)
Looks good, I don't know if lighting is pre baked or what but I was surprised. EDIT: Site does mention lightmaps.

Running on Chrome on Android on a Pixel XL I did encounter the following:

* Freelook camera allowed for too fast of movement, the engine struggled to keep up. Panning back to polys that were in view less than a second before reveals that they've been unloaded the instant I looked away. This allowed me to see through walls to polys that should have been fully occluded and would have been much safer to cull. What was rendered would only seem to update if I moved either stick, and so after I started to have issues I never managed to have a correctly rendered frame again. Loading missing polys would mean bringing more unloaded polys into view. Seems like one of those bugs where I would believe it took 5 seconds or 50 hours of work to resolve.

* I did start to notice the vertical seams on the barrels on my second time through, this time with the automatic camera mode. Once I noticed them, I wasn't able to stop, it was very distracting.

EDIT: I went back in to confirm, the mobile control version does not show vertical barrel seams, while the auto camera version does. Different builds for each perhaps?

Re:CSS-Powered 3D Engine (2014) by ElCapitanMarkla on Sunday February 24, 2019 @10:01PM (#19242488)
Check out Keith's project's page - https://keithclark.co.uk/ - and his lastest js1k entry - https://keithclark.co.uk/articles/js1k-2019-flux/final/

He's a clever guy

Re:CSS-Powered 3D Engine (2014) by crimsonalucard on Sunday February 24, 2019 @05:47PM (#19241145)
If css can do this maybe someone can program a better layout engine with it.
Re:CSS-Powered 3D Engine (2014) by knolan on Sunday February 24, 2019 @08:36AM (#19238483)
Crashed first time on mobile safari then ran fine when reloaded. Ran pretty smoothly on my iPhone 7 too.
Re:CSS-Powered 3D Engine (2014) by tmilard on Sunday February 24, 2019 @06:59PM (#19241519)
I think Webgl, and other JavaScript API on top of Webgl are the way to go for 3D on the Web.Like banylonjs.

This is what I use to do this : http://free-visit.net/index.php/fr/demos/les-frigos-de-paris

Re:CSS-Powered 3D Engine (2014) by empath75 on Sunday February 24, 2019 @08:31AM (#19238467)
Crashes on mobile safari
Re:CSS-Powered 3D Engine (2014) by corebit on Sunday February 24, 2019 @08:48AM (#19238533)
Works on my iPad.
Re:CSS-Powered 3D Engine (2014) by osrec on Sunday February 24, 2019 @10:05AM (#19238793)
I feel high quality 3D is one of the final things that we need to master in the browser. Once this is done, I can imagine PWAs get more widespread adoption for gaming and AR etc.

Kudos to the good people working on it!

Re:CSS-Powered 3D Engine (2014) by pavlov on Sunday February 24, 2019 @10:12AM (#19238826)
WebGL has been working fine for years...?
Re:CSS-Powered 3D Engine (2014) by pjmlp on Sunday February 24, 2019 @02:48PM (#19240214)
Not really.

Since the browsers black list GPUs and platforms where they have issues, as author you don't have any guarantee how the users will get to see your site.

Additional not all GL ES features are exposed to WebGL.

Re:CSS-Powered 3D Engine (2014) by osrec on Sunday February 24, 2019 @10:15AM (#19238832)
Depends on your definition of fine. In certain cases it would crash browsers on load, in other cases it would deliver a solid 60fps. I think 3d on the web does need a bit more polish so that it's a good experience universally.
Re:CSS-Powered 3D Engine (2014) by _bxg1 on Sunday February 24, 2019 @12:29PM (#19239487)
The Unity engine has been outputting WebGL builds for years, and having played a bunch of them (and deployed a few myself), I've never once seen a problem that didn't exist in other builds of the same game
Re:CSS-Powered 3D Engine (2014) by pavlov on Sunday February 24, 2019 @11:47AM (#19239267)
"Mostly works, sometimes doesn't" is the perennial state of accelerated 3D on the desktop. WebGL just exposes it as-is to JavaScript apps.
Re:CSS-Powered 3D Engine (2014) by calibas on Sunday February 24, 2019 @12:26PM (#19239471)
I'm hoping WebAssembly will get us there.
Re:CSS-Powered 3D Engine (2014) by dfilppi on Sunday February 24, 2019 @05:52PM (#19241178)
The modern equivalent of ASCII art
Re:CSS-Powered 3D Engine (2014) by sguwwochqbib on Sunday February 24, 2019 @10:38AM (#19238944)
what about the reverse: how is styling done in game engines ?
Re:CSS-Powered 3D Engine (2014) by tclover on Sunday February 24, 2019 @12:53PM (#19239627)
doesn't work with firefox
Re:CSS-Powered 3D Engine (2014) by welly on Monday February 25, 2019 @06:25AM (#19244801)