MCPcopy
hub / github.com/g3n/engine / UpdateTargetAttributes

Method UpdateTargetAttributes

geometry/morph.go:179–186  ·  view source on GitHub ↗

UpdateTargetAttributes updates the attribute names of the specified morph targets in order.

(morphTargets []*Geometry)

Source from the content-addressed store, hash-verified

177
178// UpdateTargetAttributes updates the attribute names of the specified morph targets in order.
179func (mg *MorphGeometry) UpdateTargetAttributes(morphTargets []*Geometry) {
180
181 for i, mt := range morphTargets {
182 mt.SetAttributeName(gls.VertexPosition, "MorphPosition"+strconv.Itoa(i))
183 mt.SetAttributeName(gls.VertexNormal, "MorphNormal"+strconv.Itoa(i))
184 mt.SetAttributeName(gls.VertexTangent, "MorphTangent"+strconv.Itoa(i))
185 }
186}
187
188// RenderSetup is called by the renderer before drawing the geometry.
189func (mg *MorphGeometry) RenderSetup(gs *gls.GLS) {

Callers 3

AddMorphTargetsMethod · 0.95
AddMorphTargetDeltasMethod · 0.95
RenderSetupMethod · 0.95

Calls 1

SetAttributeNameMethod · 0.80

Tested by

no test coverage detected