Open sasha240100 opened 7 years ago
Implementation
There is a materials.js configuration file that explains dat.gui which properties should be editable.
materials.js
Properties should be taken from three.js documentation for material objects.
propertyName: 'propertyType'
propertyName
propertyType
number
color
texture
boolean
Should be added to additional object and separated regarding their meaning (like wireframe):
additional
wireframe
Should be added to any object.
any
Do as many properties as you can.
Progress
MeshBasicMaterial
MeshDepthMaterial
MeshLambertMaterial
MeshNormalMaterial
MeshPhongMaterial
MeshPhysicalMaterial
MeshStandardMaterial
MeshToonMaterial
MultiMaterial
add(originObject, ...extensions)
extensions
add({} , 'example')
additional.example
{}
@sasha240100 could you clarify the explanation of this one?
@t4r0 yes, ask me what you misunderstood. Can you go to discord?
I think we got to fix the problem with the gui data before adding more properties.
Implementation
There is a
materials.js
configuration file that explains dat.gui which properties should be editable.Properties should be taken from three.js documentation for material objects.
propertyName: 'propertyType'
propertyName
should be the same as in three.js docs.propertyType
can be:number
color
texture
(for maps)boolean
In priority
Properties that can be used in multiple materials
Should be added to
additional
object and separated regarding their meaning (likewireframe
):Properties used in all materials
Should be added to
any
object.Progress
MeshBasicMaterial
MeshDepthMaterial
MeshLambertMaterial
(in progress)MeshNormalMaterial
MeshPhongMaterial
(in progress)MeshPhysicalMaterial
MeshStandardMaterial
MeshToonMaterial
MultiMaterial
add(originObject, ...extensions)
additional
object.extensions
are names of properties groups insideadditional
. Example:add({} , 'example')
will add properties fromadditional.example
to{}
.Version:
Issue type:
Tested on:
###### Desktop - [ ] Chrome - [ ] Chrome Canary - [ ] Chrome dev-channel - [ ] Firefox - [ ] Opera - [ ] Microsoft IE - [ ] Microsoft Edge ###### Android - [ ] Chrome - [ ] Firefox - [ ] Opera ###### IOS - [ ] Chrome - [ ] Firefox - [ ] Opera