Closed ngokevin closed 8 years ago
This sounds more consistent to me, but isn't type
reserved?
@msimpson haha oh, right – well not reserved by the language, by otherwise employed by the schema definition: https://aframe.io/docs/core/component.html#Schema
would be a breaking change, but i suppose the schema could use __type
instead, leaving type
available for use as a property.
@donmccurdy Oh ... missed that.
Or alternatively if we detect an attribute that is not type/default/parse/stringify, then we switch it to multi-property.
Actually, type
is not reserved. If type
's value is a string, then it will be single-prop. If it is an object type: { type: 'string' }
then it is multi-prop.
In 3D programs, the word primitives is used to create geometric primitives, yes. But three.js geometries don't have to be geometric primitives.
type
is what three.js refers to their geometry types. No one is going to confuse geometry component type with programming types. Better the possibility of being ambiguous than being incorrect anyways.
type is not descriptive enough in this context. let's move on
I made points and counterpoints. If you want to close it, it would be copacetic to address them rather than brushing them off.
I think renaming does not bring any benefit. it's changing for the shake of changing and type is a very ambigous word and used in other contexts. primitive is a common concept used in computer graphics https://en.m.wikipedia.org/wiki/Geometric_primitive
OK. The main exception I was thinking of was text, SVG, and extrude, but if they're the minority, and we're okay with the slight awkwardness of <a-entity geometry="primitive: text">
or <a-entity geometry="primitive: svg; src: mysvg.svg>
, this isn't too big of a deal.
text should probably be a separate component.
and svg as well
You could, but then you don't get free geometry merging, caching, buffering, and automatic memory management provided by the geometry component.
Description:
With the
registerGeometry
API, a variety of geometries can be registered that won't have to be geometric primitives (e.g., text, extrude, svg)Smaller reasons would consistency with three.js API as Geometry objects have a
type
and simpler wording.