Aframe: Material blending property

Created on 26 Mar 2018  路  6Comments  路  Source: aframevr/aframe

Threejs' Material class has the blending property which is really useful for faking materials that emit light or other effects. (For example, see the disco lights in saturday night)

https://threejs.org/docs/#api/materials/Material.blending

It would be nice to have it available in A-Frame material directly, without having to make a custom component just for changing its value.

feature request help wanted (easy)

Most helpful comment

All 6 comments

I would like to have a crack at this. As far as I can see it just means creating a blending component that passes the property to three.js in the sme way that e.g. the position component works. Does that make sense? Thanks

Hi @samrae7, please feel free! My feeling is that it should probably be a sub-property of the material component, like:

<a-entity material="src: foo.png; blending: additive" />

where values are none, normal, additive, subtractive, multiply. I think it is OK to leave out three.js's "custom" blending modes for now.

@feiss does that sound reasonable for most use cases?

@donmccurdy yup, that is exactly what I was asking for :)

@donmccurdy @feiss thanks. I'm working on this. Seems straightforward so will be done soon.

thanks!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ngokevin picture ngokevin  路  5Comments

jgbarah picture jgbarah  路  4Comments

rich311 picture rich311  路  3Comments

RangerMauve picture RangerMauve  路  4Comments

jcarpenter picture jcarpenter  路  4Comments