/
fadaliastro
/
MGFI
Обзор
Документация
Войти
/
fadaliastro
/
MGFI
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
main
node_modules/three/src/core/InstancedBufferGeometry.js
60 строк
870 B
Fa-Dali
Initial commit
28 янв 2026, 00:16
28 янв 2026, 00:16
d5a5086
Код
Авторство
О чём код?
import { BufferGeometry } from './BufferGeometry.js'; /** * An instanced version of a geometry. */ class InstancedBufferGeometry extends BufferGeometry { /** * Constructs a new instanced buffer geometry. */ constructor() { super(); /** * This flag can be used for type testing. * * @type {boolean} * @readonly * @default true */ this.isInstancedBufferGeometry = true; this.type = 'InstancedBufferGeometry'; /** * The instance count. * * @type {number} * @default Infinity */ this.instanceCount = Infinity; } copy( source ) { super.copy( source ); this.instanceCount = source.instanceCount; return this; } toJSON() { const data = super.toJSON(); data.instanceCount = this.instanceCount; data.isInstancedBufferGeometry = true; return data; } } export { InstancedBufferGeometry };