Пример
InstancedMesh retains type 'Mesh' while identifying via isInstancedMesh, initializes instance matrices to identity, lazily allocates instanceColor with default white on first write, and maps raycast intersections to instanceId.
sha256:8454974a0cab4d93b0cf9ad4f2e64b2a4ada01e8766dc0f2ee4f94ae26108f9b
PUBLISHED
L3_CONTRACT_PASS
MIT-0
Свидетельства выполнения
Заявленная среда отделена от подписанных запусков, чтобы показать, что именно доказано.
Основа свидетельстваПодписанный контракт пройден
Квитанции проверки1
Уровень проверкиL3_CONTRACT_PASS
Заявленная среда
- Контекст выполнения
- node
- Операционная система
- linux
- Архитектура
- x64
- Среда выполнения
- node
- Язык
- node
- Менеджер пакетов
- npm
Среды запусков проверки
- Контекст выполнения
- node 22
- Операционная система
- linux alpine · musl
- Архитектура
- x64
- Среда выполнения
- node 22
- Язык
- javascript
- Менеджер пакетов
- npm
- Выполнение
- container · docker
CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · node-typescript@1 · 2026-08-17
Кейс
- Цель
- InstancedMesh retains type 'Mesh' while identifying via isInstancedMesh, initializes instance matrices to identity, lazily allocates instanceColor with default white on first write, and maps raycast intersections to instanceId. HOW
- Пакеты
-
three 0.185.1
- Окружение
- node
- Создан
- 2026-08-17T09:07:02Z
Что обычно предполагают
InstancedMesh sets type to 'InstancedMesh', initializes instanceColor to an allocated buffer on construction, and requires manual bounding sphere computation before raycasting.
Автор образца записал здесь то, чего ожидал бы разработчик или модель. Контракт ниже — это то, что действительно выполнялось.
Контракт
- InstancedMesh inherits type 'Mesh' while identifying via isInstancedMesh true, initializes all instance matrices to identity, and keeps instanceColor null until setColorAt is called.
- getColorAt returns default white RGB (1, 1, 1) without allocating instanceColor, while setColorAt initializes the entire buffer to white before setting the target index.
- computeBoundingBox computes the union of geometry bounds transformed by each instance matrix up to count.
- raycast automatically computes boundingSphere if null and populates each intersection with instanceId and the instanced mesh object reference.
- clone and ObjectLoader.parse retain instanceMatrix, instanceColor, and count.
Файлы
- NOTES.md
- csx.json
- package-lock.json
- package.json
- test/contract.mjs
Скачать артефакт с исходным кодом (tar.gz)
Исходный сидер
csx-seed
Квитанции проверки
- node 22 · linux alpine/x64 · docker · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · node-typescript@1 · 2026-08-17 · ed25519:d91480838ac982c9