MCPcopy Index your code
hub / github.com/sparkjsdev/spark / constructor

Method constructor

src/ExtSplats.ts:96–113  ·  view source on GitHub ↗
(options: ExtSplatsOptions = {})

Source from the content-addressed store, hash-verified

94 dynoNumSh: DynoInt<"numSh">;
95
96 constructor(options: ExtSplatsOptions = {}) {
97 this.extArrays = [new Uint32Array(0), new Uint32Array(0)];
98 this.textures = [ExtSplats.emptyTexture, ExtSplats.emptyTexture];
99
100 this.extra = {};
101 this.dyno = new DynoExtSplats({ extSplats: this });
102 this.dynoNumSh = new DynoInt({
103 key: "numSh",
104 value: 0,
105 update: () => {
106 return Math.min(this.getNumSh(), this.maxSh);
107 },
108 });
109
110 // The following line will be overridden by reinitialize()
111 this.initialized = Promise.resolve(this);
112 this.reinitialize(options);
113 }
114
115 reinitialize(options: ExtSplatsOptions) {
116 this.isInitialized = false;

Callers

nothing calls this directly

Calls 2

getNumShMethod · 0.95
reinitializeMethod · 0.95

Tested by

no test coverage detected