Skip to content
This repository was archived by the owner on Dec 12, 2022. It is now read-only.

Commit 9ac320a

Browse files
committed
Add default values to boolean properties since three does not generally serialize default boolean properties. Fixes #50
1 parent a1c955a commit 9ac320a

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

src/app/data/material-common.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,12 @@ export default {
3535
name: 'Depth Test',
3636
prop: 'depthTest',
3737
type: 'boolean',
38+
default: true,
3839
}, {
3940
name: 'Depth Write',
4041
prop: 'depthWrite',
4142
type: 'boolean',
43+
default: true,
4244
}, {
4345
name: 'Lights',
4446
prop: 'lights',

src/app/data/material-shared.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export const combine = {
1919
export const depthPacking = {
2020
name: 'Depth Packing',
2121
prop: 'depthPacking',
22-
type: 'boolean',
22+
type: 'enum',
2323
};
2424

2525
export const alphaMap = {
@@ -169,6 +169,7 @@ export const morphTargets = {
169169
name: 'Morph Targets',
170170
type: 'boolean',
171171
prop: 'morphTargets',
172+
default: false,
172173
}
173174

174175
export const reflectivity = {
@@ -229,6 +230,7 @@ export const wireframe = {
229230
name: 'Enabled',
230231
type: 'boolean',
231232
prop: 'wireframe',
233+
default: false,
232234
}, {
233235
name: 'Line Width',
234236
type: 'number',

0 commit comments

Comments
 (0)