Skip to content

Commit 7bf5e3f

Browse files
committed
Done before compatibility problem
will all psd, huge
1 parent 29af397 commit 7bf5e3f

98 files changed

Lines changed: 12238 additions & 101 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

addLight.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ function addLightParameters(index){
189189
lightColor[index] =[Math.random(), Math.random(), Math.random()];
190190
lightIntensity[index] = 0.5;
191191
pointLightDis[index] = 0.5;
192-
pointLightDis[index] = 0.1;
192+
pointLightDecay[index] = 0.1;
193193
showDiffuse[index] = 1;
194194
showSpec[index] = 1;
195195

css/mock3d.css

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ label{margin-bottom:0;}
5757
overflow-y: hidden;
5858
width:100%;
5959
height:auto;
60-
padding: 20px calc(200px + 20px);
60+
padding: 20px calc(160px + 20px);
6161
padding-left:20px;
6262
}
6363

@@ -75,7 +75,19 @@ label{margin-bottom:0;}
7575
}
7676

7777
.sidebar-left{display: none; border-right: 1px solid #eee;}/* Hide for mobile, show later */
78-
.sidebar-right{right:0; border-left: 1px solid #eee;}
78+
.sidebar-right{right:0; border-left: 1px solid #eee;
79+
width:25%;
80+
min-width:160px;
81+
}
82+
83+
/*just for main padding*/
84+
@media (min-width: 640px) {
85+
.main {
86+
padding-right: calc(25% + 20px);
87+
}
88+
89+
}
90+
7991

8092
/* left and right sidebar for large screen*/
8193
@media (min-width: 768px) {
@@ -88,7 +100,7 @@ label{margin-bottom:0;}
88100

89101
.main {
90102
width:100%;
91-
padding: 20px calc(25% + 10px);
103+
padding: 20px calc(25% + 20px);
92104
}
93105

94106
.main_button_container{
@@ -106,19 +118,15 @@ label{margin-bottom:0;}
106118
@media (min-width: 920px) {
107119
.main_button{width:50%; }
108120

109-
.main {
110-
padding: 20px calc(25% + 0px);
111-
}
112-
113121
}
114122

115-
@media (min-width: 992px) {
123+
@media (min-width: 1200px) {
116124
.sidebar-left{
117-
width:250px;
125+
width:300px;
118126
}
119127

120128
.sidebar-right{
121-
width:250px;
129+
width:300px;
122130
}
123131
}
124132

@@ -210,7 +218,7 @@ label{margin-bottom:0;}
210218

211219

212220
#btn_addLight {
213-
padding:8px 12px;
221+
padding:8px 0px;
214222
background: #E8E8E8;
215223
color:#500000;
216224
font-weight: 400;
@@ -534,6 +542,7 @@ input[type="checkbox"] + .pseudoCheckbox{
534542

535543
.dropdown-menu{
536544
margin-top: -1px;
545+
font-size: 12px;
537546
}
538547

539548

cube.js

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ showSpec[0] = 1;
3434
var styleBright = 0,
3535
styleDark = 1;
3636

37-
var alphaR = 0,
38-
alphaG = 1,
39-
alphaB = 1;
37+
var alphaR = 1;
38+
var alphaG = 1;
39+
var alphaB = 1;
4040

4141
var logIOR = 0.25;//[-1, 1]
4242
var BGdis = 0.6;
@@ -182,6 +182,13 @@ window.onload = function init()
182182

183183
initTextures();
184184

185+
normalImage.src = image3.src;
186+
lightImage.src = image2.src;
187+
darkImage.src = image1.src;
188+
refractImage.src = image5.src;
189+
reflectImage.src = image4.src;
190+
alphaImage.src = image6.src;
191+
185192

186193
gl.activeTexture(gl.TEXTURE0);
187194
gl.bindTexture(gl.TEXTURE_2D, normalTexture);
@@ -274,12 +281,7 @@ function initTextures() {
274281
alphaImage = new Image();
275282
alphaImage.onload = function() { handleTextureLoaded(alphaImage, alphaTexture); }
276283

277-
normalImage.src = image3.src;
278-
lightImage.src = image2.src;
279-
darkImage.src = image1.src;
280-
refractImage.src = image5.src;
281-
reflectImage.src = image4.src;
282-
alphaImage.src = image6.src;
284+
283285

284286
}
285287

@@ -293,6 +295,7 @@ function handleTextureLoaded(image, texture) {
293295
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
294296
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
295297
gl.generateMipmap(gl.TEXTURE_2D);
298+
//gl.bindTexture(gl.TEXTURE_2D, 0);
296299

297300
}
298301

@@ -362,6 +365,8 @@ function render() {
362365
gl.uniform1i(checkFresnelLoc, checkFresnel);
363366

364367
gl.drawArrays( gl.TRIANGLES, 0, numVertices );
368+
369+
365370
requestAnimFrame(render);
366371
}
367372

0 commit comments

Comments
 (0)