Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
B
BlocksCAD
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
BlocksCAD
Commits
a0567a26
Commit
a0567a26
authored
May 20, 2016
by
Jennie Yoder
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
trying to fix the "my model is all black" issue.
parent
7597cee3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
2 deletions
+8
-2
blockly/core/xml.js
blockly/core/xml.js
+7
-2
blockscad/blockscad.js
blockscad/blockscad.js
+1
-0
No files found.
blockly/core/xml.js
View file @
a0567a26
...
...
@@ -265,8 +265,13 @@ Blockly.Xml.domToWorkspace = function(workspace, xml) {
if
(
xmlChild
.
nodeName
.
toLowerCase
()
==
'
color
'
)
{
var
col
=
xmlChild
.
getAttribute
(
'
rgba
'
);
var
colA
=
col
.
split
(
'
,
'
);
Blockscad
.
setColor
(
colA
[
0
],
colA
[
1
],
colA
[
2
]);
found_color
=
true
;
if
(
colA
.
length
==
3
)
if
(
colA
[
0
]
>=
0
&&
colA
[
0
]
<
255
)
if
(
colA
[
1
]
>=
0
&&
colA
[
1
]
<
255
)
if
(
colA
[
2
]
>=
0
&&
colA
[
2
]
<
255
)
{
Blockscad
.
setColor
(
colA
[
0
],
colA
[
1
],
colA
[
2
]);
found_color
=
true
;
}
}
if
(
xmlChild
.
nodeName
.
toLowerCase
()
==
'
block
'
)
{
var
block
=
Blockly
.
Xml
.
domToBlock
(
workspace
,
xmlChild
);
...
...
blockscad/blockscad.js
View file @
a0567a26
...
...
@@ -293,6 +293,7 @@ Blockscad.init = function() {
});
// add "default color" picker to viewer
// r,g,b is expecting to get color values between 0 and 255 for r,g,b
Blockscad
.
setColor
=
function
(
r
,
g
,
b
)
{
// console.log("in setColor. rgb:" + r + ";" + g + ';' + b);
...
...
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