www.meshly.com
   Login | Connect to Meshly
Most Popular Channels:
Channel View: all » blogcadre » javascript - (all posts tagged javascript)
3
votes
2
channel votes

A cool way to draw generic triangles efficiently in Javascript. This will let you create 3D objects that can be rotated or scaled. Still a bit slow, but hey, it's Javascript.

"The trick is to take advantage of the beveled edges on a div border to make right triangles. By setting the div height and width to 0px, then setting 3 borders to transparent and 1 border to an opaque color, you can make a right triangle of various sizes by adjusting the border widths.

Using some fancy geometry, you can then cut any type of triangle into a series of successively smaller right triangles. Now, in real life, the right triangles would get infinitely small (and numerous), but in the digital world, they only need to get as small as a single pixel before we don't care anymore."

Submitted by jason - 2007-07-20 08:30:17
Channels - blogcadre hackszine webdev
Tags - hack javascript 3d modeling geometry

Comment on this post

3
votes
3
channel votes

iFishEye is an open source (free) javascript tool for creating a fisheye lens effect.

Submitted by dannis - 2007-06-07 13:24:56
Channels - blogcadre opensource
Tags - tech javascript development fisheye

Comment on this post

Recent Channels



Recent Tags




Track This Page

Place the contents of this page in your site. Just set your desired title, height, and width. Then, copy and paste the embed code into your layout.

Title:
Width:
Height:

Copy & Paste Embed Code:

preview