8000 remove default uniforms · shader-park/shader-park-website@137b28b · GitHub
[go: up one dir, main page]

Skip to content

Commit 137b28b

Browse files
committed
remove default uniforms
1 parent 4eae04d commit 137b28b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

js/components/Sculpture.vue

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,10 @@ export default {
100100
this.saved = saved;
101101
},
102102
setSelectedSculpture(obj) {
103-
console.log('Set Selcted sculp', obj, this.sculpture)
104-
if(obj && obj.name == this.sculpture.mesh.name) {
103+
let uniformsToExclude = {'sculptureCenter': 0, 'msdf': 0, 'opacity': 0, 'time': 0};
104+
if(obj && this.sculpture && this.sculpture.mesh && this.sculpture.mesh.name && obj.name == this.sculpture.mesh.name) {
105105
this.$store.state.selectedSculpture = this.$data;
106+
this.sculpture.uniforms = this.sculpture.uniforms.filter(uniform => !(uniform.name in uniformsToExclude))
106107
this.sculpture.selectedSculpture(true);
107108
} else {
108109
if(this.sculpture && this.sculpture.selected) {

0 commit comments

Comments
 (0)
0