MCPcopy
hub / github.com/visgl/deck.gl / initializeState

Method initializeState

modules/layers/src/bitmap-layer/bitmap-layer.ts:135–161  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

133 }
134
135 initializeState() {
136 const attributeManager = this.getAttributeManager()!;
137
138 attributeManager.remove(['instancePickingColors']);
139 const noAlloc = true;
140
141 attributeManager.add({
142 indices: {
143 size: 1,
144 isIndexed: true,
145 update: attribute => (attribute.value = this.state.mesh.indices),
146 noAlloc
147 },
148 positions: {
149 size: 3,
150 type: 'float64',
151 fp64: this.use64bitPositions(),
152 update: attribute => (attribute.value = this.state.mesh.positions),
153 noAlloc
154 },
155 texCoords: {
156 size: 2,
157 update: attribute => (attribute.value = this.state.mesh.texCoords),
158 noAlloc
159 }
160 });
161 }
162
163 updateState({props, oldProps, changeFlags}: UpdateParameters<this>): void {
164 // setup model first

Callers

nothing calls this directly

Calls 2

removeMethod · 0.65
addMethod · 0.45

Tested by

no test coverage detected