Commit c008b28d authored by amandaghassaei's avatar amandaghassaei

patterns

parent cd631bff
This diff is collapsed.
...@@ -438,6 +438,7 @@ ...@@ -438,6 +438,7 @@
<ul class="dropdown-menu"> <ul class="dropdown-menu">
<li><a href="#" class="demo" data-url="Origami/hypar.svg">Hypar</a></li> <li><a href="#" class="demo" data-url="Origami/hypar.svg">Hypar</a></li>
<li><a href="#" class="demo" data-url="Tessellations/hyperbolic_limit_cp.svg">Lang Hyperbolic Limit</a></li> <li><a href="#" class="demo" data-url="Tessellations/hyperbolic_limit_cp.svg">Lang Hyperbolic Limit</a></li>
<li><a href="#" class="demo" data-url="Tessellations/honeycomb_333_cp.svg">Lang Honeycomb Tessellation</a></li>
</ul> </ul>
</li> </li>
</ul> </ul>
...@@ -588,13 +589,13 @@ ...@@ -588,13 +589,13 @@
</label> </label>
</div> </div>
</div><br/> </div><br/>
Rendering: <!--Rendering:-->
<div class="indent"> <!--<div class="indent">-->
<label class="checkbox" for="ambientOcclusion"> <!--<label class="checkbox" for="ambientOcclusion">-->
<input id="ambientOcclusion" data-toggle="checkbox" class="custom-checkbox layersSelector" type="checkbox"><span class="icons"><span class="icon-unchecked"></span><span class="icon-checked"></span></span> <!--<input id="ambientOcclusion" data-toggle="checkbox" class="custom-checkbox layersSelector" type="checkbox"><span class="icons"><span class="icon-unchecked"></span><span class="icon-checked"></span></span>-->
Ambient Occlusion <!--Ambient Occlusion-->
</label> <!--</label>-->
</div> <!--</div>-->
</div> </div>
</div> </div>
</div> </div>
......
...@@ -40,7 +40,7 @@ function initPattern(globals){ ...@@ -40,7 +40,7 @@ function initPattern(globals){
var $mountains = $paths.filter(function(){ var $mountains = $paths.filter(function(){
var stroke = $(this).attr("stroke").toLowerCase(); var stroke = $(this).attr("stroke").toLowerCase();
if (stroke == "#ff0000" || stroke == "#f00"){ if (stroke == "#ff0000" || stroke == "#f00" || stroke == "#FF0000" || stroke == "#F00"){
var opacity = parseFloat($(this).attr("opacity")); var opacity = parseFloat($(this).attr("opacity"));
if (isNaN(opacity)) opacity = 1; if (isNaN(opacity)) opacity = 1;
_mountainAngles.push(opacity*Math.PI); _mountainAngles.push(opacity*Math.PI);
...@@ -51,7 +51,7 @@ function initPattern(globals){ ...@@ -51,7 +51,7 @@ function initPattern(globals){
var $valleys = $paths.filter(function(){ var $valleys = $paths.filter(function(){
var stroke = $(this).attr("stroke").toLowerCase(); var stroke = $(this).attr("stroke").toLowerCase();
if (stroke == "#0000ff" || stroke == "#00f"){ if (stroke == "#0000ff" || stroke == "#00f" || stroke == "#0000FF" || stroke == "#00F"){
var opacity = parseFloat($(this).attr("opacity")); var opacity = parseFloat($(this).attr("opacity"));
if (isNaN(opacity)) opacity = 1; if (isNaN(opacity)) opacity = 1;
_valleyAngles.push(-opacity*Math.PI); _valleyAngles.push(-opacity*Math.PI);
...@@ -67,7 +67,7 @@ function initPattern(globals){ ...@@ -67,7 +67,7 @@ function initPattern(globals){
var $triangulations = $paths.filter(function(){ var $triangulations = $paths.filter(function(){
var stroke = $(this).attr("stroke").toLowerCase(); var stroke = $(this).attr("stroke").toLowerCase();
return stroke == "#ffff00" || stroke == "#ff0"; return stroke == "#ffff00" || stroke == "#ff0" || stroke == "#FFFF00" || stroke == "#FF0";
}); });
parseSVG($outlines, $mountains, $valleys, $cuts, $triangulations, _mountainAngles, _valleyAngles); parseSVG($outlines, $mountains, $valleys, $cuts, $triangulations, _mountainAngles, _valleyAngles);
...@@ -327,8 +327,9 @@ function initPattern(globals){ ...@@ -327,8 +327,9 @@ function initPattern(globals){
} }
} }
if (_weededVertices.length > 0){ if (_weededVertices.length > 0){
alert("Some vertices are not fully connected, try increasing vertex merge tolerance"); console.log(_weededVertices);
return; globals.warn("Some vertices are not fully connected, try increasing vertex merge tolerance");
// return;
} }
removeCombinedFromSet(combined, outlines); removeCombinedFromSet(combined, outlines);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment