Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
OrigamiSimulator
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Amanda Ghassaei
OrigamiSimulator
Commits
c008b28d
Commit
c008b28d
authored
May 08, 2017
by
amandaghassaei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
patterns
parent
cd631bff
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
359 additions
and
12 deletions
+359
-12
assets/Tessellations/honeycomb_333_cp.svg
assets/Tessellations/honeycomb_333_cp.svg
+345
-0
index.html
index.html
+8
-7
js/pattern.js
js/pattern.js
+6
-5
No files found.
assets/Tessellations/honeycomb_333_cp.svg
0 → 100644
View file @
c008b28d
This diff is collapsed.
Click to expand it.
index.html
View file @
c008b28d
...
...
@@ -438,6 +438,7 @@
<ul
class=
"dropdown-menu"
>
<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/honeycomb_333_cp.svg"
>
Lang Honeycomb Tessellation
</a></li>
</ul>
</li>
</ul>
...
...
@@ -588,13 +589,13 @@
</label>
</div>
</div><br/>
Rendering:
<
div
class=
"indent"
>
<
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
>
Ambient Occlusion
<
/label
>
<
/div
>
<!--Rendering:-->
<
!--<div class="indent">--
>
<
!--<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>--
>
<!--Ambient Occlusion-->
<
!--</label>--
>
<
!--</div>--
>
</div>
</div>
</div>
...
...
js/pattern.js
View file @
c008b28d
...
...
@@ -40,7 +40,7 @@ function initPattern(globals){
var
$mountains
=
$paths
.
filter
(
function
(){
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
"
));
if
(
isNaN
(
opacity
))
opacity
=
1
;
_mountainAngles
.
push
(
opacity
*
Math
.
PI
);
...
...
@@ -51,7 +51,7 @@ function initPattern(globals){
var
$valleys
=
$paths
.
filter
(
function
(){
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
"
));
if
(
isNaN
(
opacity
))
opacity
=
1
;
_valleyAngles
.
push
(
-
opacity
*
Math
.
PI
);
...
...
@@ -67,7 +67,7 @@ function initPattern(globals){
var
$triangulations
=
$paths
.
filter
(
function
(){
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
);
...
...
@@ -327,8 +327,9 @@ function initPattern(globals){
}
}
if
(
_weededVertices
.
length
>
0
){
alert
(
"
Some vertices are not fully connected, try increasing vertex merge tolerance
"
);
return
;
console
.
log
(
_weededVertices
);
globals
.
warn
(
"
Some vertices are not fully connected, try increasing vertex merge tolerance
"
);
// return;
}
removeCombinedFromSet
(
combined
,
outlines
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment