DEV Community

Theo Armour
Theo Armour

Posted on

2020-04-26 dev.to, glitch, markdown & three.js

Posting to Dev.to?

Blogging as a pastime is a really nice activity for oneself , but where you blog brings other people into the process. So blogging about technical matters on Facebook tends to toward losing followers. Blogging on your own website - unless you are already famous - means almost no readers. Wordpress.com, Blogger.com and Medium.com are all great platforms. I have used and admire all of them. The issue is that the readerships - even when the readers are themselves programmers - don't really have the intention of going to those sites to read about programming.

I have been following Dev.to for a while and this is my second post. From what I have seen so far, Dev.to is a nice place for quick and easy posting dedicated to discussing topical aspects of coding - while at the same fulfilling a bunch of items on my wishlist.

Real 3D in the post

I build real-time 3D web-pages that work on your computer, tablet or laptop. The three.js WebGL JavaScript library is my single dependency. Everything I do is free and open source and in plain-vanilla JavaScript.

What this means is that I do not do 2D. I do not do static. I do not do Ruby. I do not do Node. I do not do Videos (2D after all). I do not do databases. So what do I want to be able to show in my blog posts? Real-time, animated interactive 3D. the question is: where can you do this on the web? I have had some success in embedding iframes in WordPress and blogger posts, but the process is by no means satisfactory - let alone easy, fast and producing nice results.

The other day while going through the help menu I noticed this Liquid Tags thing. Scrolling down screws that I noticed that you could embed Glitch files - actual working scripts - in a Dev.to post. just like this one:

WooHoo! Write the text in Markdown. View the 3D demo "inworld". This could be the beginning of a dream come true.

Today's script

The script you see above is a side hustle on my main current project c10-viz3d. in 2019, three.js added some modules that make it possible to generate and process huge numbers of 3D faces. I just started playing with these modules and the script above has some of the first demos.

This afternoon I set one of the scripts to load and display a million boxes. And to my shock and awe, the script worked - six million faces or twelve million triangles were rotating on my screen at 60 frames per second. I couldn't believe it. Neither could my computer. After three minutes it overheated and shut itself down.

Top comments (0)