-1
votes
1answer
89 views

How to draw diamond with asterisks

For my assignment I am supposed to make a Draw a diamond with asterisks using methods. I figured out how to make the first part (centered triangle) I cannot for the love of God figure it out. I have ...
0
votes
0answers
70 views

THREE.js Triangle is Black

So i was using THREE.JS and created a triangle. But even though i gave it color: 0xFF0000, it appears black on Screen. Here is my Script: var camera, scene, renderer; var geometry, material, mesh; ...
1
vote
1answer
153 views

Dynamically creating triangle with max-width/fit inside div

I have a web page that accepts three inputs. I am dynamically creating a triangle from these three inputs (by setting border-widths). I want the triangle to fit inside the div on the page. For ...
-2
votes
1answer
147 views

Dividing a rectangle into four clickable (or hover-able) triangles

Before reading on, my issue is to know what are the optimal methods to find an objects height/width/position as there seems to be some conflict about this. After that I'll need help with how to use ...
0
votes
0answers
113 views

Animation where triangle scales and fits the window after scaling

I would like to have animate that triangle (I mean to animate it's scaling). I would also like to have that triangle would scale until it fits the browser window. Any ideas? I'm very sorry, if I ...
0
votes
3answers
240 views

CSS Triangle Flip On Click

Ok so i have this triangle div and when i click it, it only rotates 180deg. Ok so far so good but if i click it again it stays the same here is my code. $('.Triangle').click(function() { var ...
1
vote
1answer
354 views

shaping triangle and sawtooth wave

I'm having really hard time drawing a triangle and sawtooth wave shape with open charts. The formulas are from the answer in this post. This is what I have for the triangle: var myArray = []; ...
1
vote
1answer
450 views

How to create an triangle shape (fixed height, width=100%) with background using html/css/js

I have a graphic background and I need to create left top corner by one color (independing the resolution). Can I create by HTML/CSS/JS an element of triangle shape, with width = 100% and height = ...
6
votes
2answers
2k views

How would one create a triangle container for an image (x-browser)

How would I create a DIV containing an IMG where the DIV cuts the image into a triangle, thereby displaying only part of the image though a triangle. so.. <div> <img src='some_image' ...
3
votes
1answer
414 views

Dividing a square by the diagonals and making each resulting triangle a separate button

Suppose I have a square and divide it by the diagonals resulting in four identical triangles (apart from their rotation). Using CSS/HTML/Javascript, what is the best way to turn each triangle into a ...
1
vote
2answers
1k views

After Effect - Triangle Wave (JavaScript)

I'm trying to control a parameter with AE expressions and I need a triangle wave. I've got this so far: freq = 20; amplitude = 8; m = amplitude; i = time*freq; m - (i % (2*m) - m); Unfortunately ...