@@ -183,6 +184,7 @@ export default {
watch : {
sculptureError(error) {
if(error) {
+ this.errorMessages = [];
let message = error.toString();
let lastErrorIndex = this.errorMessages.length - 1;
if(!this.errorMessages.length) { // empty, so push new message
@@ -241,6 +243,25 @@ export default {
}
},
methods: {
+ showHideConsole() {
+ let cm = this.$refs.myCm.$el;
+ let consoleContainer = this.$refs.consoleContainer;
+ let showHideConsole = this.$refs.showHideConsole;
+ console.log('showHideConsole',cm, consoleContainer);
+ if(cm && consoleContainer) {
+ if(cm.classList.contains('max')) {
+ cm.classList.remove('max');
+ consoleContainer.classList.remove('max')
+ showHideConsole.classList.remove('max');
+
+ } else {
+ cm.classList.add('max');
+ consoleContainer.classList.add('max');
+ showHideConsole.classList.add('max');
+ }
+ }
+ console.log('showHideConsole',cm, consoleContainer);
+ },
cycleResizeWindows() {
let interval = setInterval(() => {
this.codemirror.refresh();
@@ -258,6 +279,7 @@ export default {
onCmFocus(cm) {
},
onCmCodeChange(newCode) {
+
if(newCode !== this.selectedSculpture.shaderSource){
this.selectedSculpture.saved = false;
this.$store.commit('setUnsavedChanges', {[this.selectedSculpture.id] : false})
@@ -265,6 +287,7 @@ export default {
this.code = newCode;
if(this.autoUpdate) {
if(this.selectedSculpture){
+
this.selectedSculpture.shaderSource = this.code;
}
}
@@ -465,23 +488,32 @@ export default {
pointer-events: none;
//border-bottom: 2px solid #f5f5f5;
- .clear-console {
+ .show-hide-console {
position: absolute;
pointer-events: initial !important;
- right: 20px;
+ padding-bottom: 1px;
+ right: 10px;
line-height: 20px;
margin: 0px;
+ margin-top: -7px;
left: auto;
+ transform: rotate(0deg);
+ transition: transform 300ms ease-in-out, box-shadow 300ms ease-in-out;
+ &.max {
+ box-shadow: 0 -1px -3px 0 rgba(0, 0, 0, 0.15);
+ transform: rotate(180deg);
+ }
}
}
.console-container {
overflow: scroll;
- height: 8vh;
+ height: 12vh;
padding-left: 10px;
+ transition: height 300ms ease-in-out;
- .error-messages {
-
+ &.max {
+ height: 45vh;
}
// padding-bottom: 10px;
// padding-top: 10px;
@@ -568,11 +600,14 @@ label {
.CodeMirror-scroll {
height: auto;
overflow: scroll !important;
- max-height: 81vh;
- max-width: 100%;
- &.embed {
- max-height: 92vh;
- }
+ // max-height: 81vh;
+ // max-width: 100%;
+ // &.max{
+ // max-height: 48vh;
+ // }
+ // &.embed {
+ // max-height: 92vh;
+ // }
}
.CodeMirror {
@@ -595,7 +630,11 @@ label {
}
.vue-codemirror {
- max-height: calc(74vh - 2px);
+ max-height: calc(70vh - 2px);
+ &.max{
+ max-height: calc(37vh - 2px);
+ }
+ transition: max-height 300ms ease-in-out;
overflow: scroll;
}
diff --git a/src/components/Examples.vue b/src/components/Examples.vue
index ffaf2143..7c629ce0 100644
--- a/src/components/Examples.vue
+++ b/src/components/Examples.vue
@@ -19,7 +19,7 @@ export default {
room : Room
},
mounted() {
- this.$store.commit('setInitialCameraPose', [6, 2.5, 4]);
+ this.$store.commit('setInitialCameraPose', [14, 2.5, 4]);
if(this.embed && this.embed === 'true') {
this.$store.commit('setEmbedded', true);
}
@@ -32,7 +32,7 @@ export default {
temp.reverse();
this.sculptures = temp; //array.push isn't tracked by state, resetting is
setTimeout(() => {
- window.onCanvasResize();
+ window.onCanvasResize();
}, 10);
}
diff --git a/src/components/Explore.vue b/src/components/Explore.vue
index 06632e38..09a0abe4 100644
--- a/src/components/Explore.vue
+++ b/src/components/Explore.vue
@@ -1,11 +1,12 @@
-
+
+ Featured Sculptures
+
New Sculptures
@@ -43,7 +44,7 @@ export default {
sculptures.reverse();
let featured = sculptures.filter(sculpture => sculpture.featured == true);
this.sculptures = sculptures;
- this.featuredSculptures = featured.slice(0, 8);
+ // this.featuredSculptures = featured.slice(0, 8);
this.finishedLoading();
}
})
diff --git a/src/components/Header.vue b/src/components/Header.vue
index 3787502f..32b0cc1a 100644
--- a/src/components/Header.vue
+++ b/src/components/Header.vue
@@ -12,7 +12,8 @@
Explore
- References
+ Docs
+ Discord
New
About
Sign In
@@ -25,7 +26,7 @@
v-bind:class="{ dynamicBadge: profileBadgeCount > 0, mobile: isMobile }"
class="link" v-if="user"
active-class="active">
- My Sculptures
+ Profile
@@ -40,7 +41,8 @@
\ No newline at end of file
+
+
+
\ No newline at end of file
diff --git a/src/components/Room.vue b/src/components/Room.vue
index a8e5abec..b5cad0cb 100644
--- a/src/components/Room.vue
+++ b/src/components/Room.vue
@@ -14,8 +14,8 @@ import {Vector3} from 'three';
export default {
props: ['sculpturesData'],
data: function() {
- return {
- grid : {x: 5, z: 0, spacing: 3.0, size: 1.0},
+ return {
+ grid : {x: 11, z: 0, spacing: 4.0, size: 1.0},
sculptures : this.sculpturesData || [],
sculpPositions: []
}
diff --git a/src/components/Sculpture.vue b/src/components/Sculpture.vue
index 8ff46779..6fe9b077 100644
--- a/src/components/Sculpture.vue
+++ b/src/components/Sculpture.vue
@@ -111,6 +111,7 @@ export default {
this.shaderSource = input;
try {
this.sculpture.refreshMaterial(input);
+ this.$store.commit('setSculptureError', ' ');
} catch (e) {
this.$store.commit('setSculptureError', e);
}
diff --git a/src/components/SculptureFeed.vue b/src/components/SculptureFeed.vue
index 7b28910b..d48a53bd 100644
--- a/src/components/SculptureFeed.vue
+++ b/src/components/SculptureFeed.vue
@@ -4,7 +4,7 @@
-
+
{{sculpture.title}}
@@ -90,11 +90,15 @@ img[lazy=loaded] {
filter: blur(10px);
opacity: 0.5;
min-width: 0;
+ height: 350px;
+ object-fit: contain;
transition: filter 0.5s ease-in-out, opacity 0.5s ease-in-out;
}
.v-lazy-image-loaded {
opacity: 1;
filter: blur(0);
+ height: 350px;
+ object-fit: contain;
}
.sculpture-container {
diff --git a/src/components/ShareModal.vue b/src/components/ShareModal.vue
index 86574ea5..fa04c1de 100644
--- a/src/components/ShareModal.vue
+++ b/src/components/ShareModal.vue
@@ -35,9 +35,6 @@
export default {
data: function() {
return {
- // shareUrl: "https://shaderpark.netlify.com/embed/",
- // embedUrl: "https://shaderpark.netlify.com/sculpture/",
- // codeOpen: false,
showCopiedEmbedInfo: false,
showCopiedEditInfo: false,
showCopiedFullScreenInfo: false,
@@ -57,13 +54,13 @@ export default {
return this.$store.state.currSculpture;
},
embedUrl() {
- return ``;
+ return ``;
},
fullScreenUrl() {
- return `https://shaderpark.netlify.com/embed/${this.currSculpture.id}${this.isExample}`;
+ return `https://shaderpark.com/embed/${this.currSculpture.id}${this.isExample}`;
},
editUrl() {
- return `https://shaderpark.netlify.com/sculpture/${this.currSculpture.id}${this.isExample}`;
+ return `https://shaderpark.com/sculpture/${this.currSculpture.id}${this.isExample}`;
},
sculptureTitle() {
return this.currSculpture.title;
diff --git a/src/components/SignIn.vue b/src/components/SignIn.vue
index 438893e7..8f21f72b 100644
--- a/src/components/SignIn.vue
+++ b/src/components/SignIn.vue
@@ -13,7 +13,8 @@