Exemplo
ShaderMaterial defaults forceSinglePass to true with built-in GLSL shaders, deep-clones Three math uniforms while nulling render-target textures on clone, and ignores index0AttributeName when passed via constructor parameters.
sha256:4542282f712d34732a99bc34abe42cedb9b96c5bff68536333598d1a47b9df4f
PUBLISHED
L3_CONTRACT_PASS
MIT-0
Evidência de execução
O ambiente declarado é separado das execuções assinadas para mostrar exatamente o que foi provado.
Base da evidênciaContrato assinado aprovado
Recibos de verificação1
Nível de verificaçãoL3_CONTRACT_PASS
Ambiente declarado
- Contexto de execução
- node
- Sistema operacional
- linux
- Arquitetura
- x64
- Runtime
- node
- Linguagem
- node
- Gerenciador de pacotes
- npm
Ambientes das execuções de verificação
- Contexto de execução
- node 22
- Sistema operacional
- linux alpine · musl
- Arquitetura
- x64
- Runtime
- node 22
- Linguagem
- javascript
- Gerenciador de pacotes
- npm
- Execução
- container · docker
CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · node-typescript@1 · 2026-08-17
Caso
- Objetivo
- ShaderMaterial defaults forceSinglePass to true with built-in GLSL shaders, deep-clones Three math uniforms while nulling render-target textures on clone, and ignores index0AttributeName when passed via constructor parameters. HOW
- Pacotes
-
three 0.185.1
- Ambiente
- node
- Criado
- 2026-08-17T09:10:50Z
O que costuma-se supor
cloning a ShaderMaterial shallow-copies uniforms and passing index0AttributeName to the constructor assigns it to the material instance
O autor da amostra registrou aqui o que um desenvolvedor ou um modelo esperaria. O contrato abaixo é o que de fato rodou.
Contrato
- ShaderMaterial deep-clones Three math uniforms so mutations to cloned Vector and Color values do not mutate the original material, while resetting render-target textures to null.
- ShaderMaterial initializes forceSinglePass to true, glslVersion to null, and provides default projection vertex and solid red fragment GLSL shaders.
- ShaderMaterial ignores index0AttributeName when provided in the constructor options object due to setValues treating undefined initial properties as invalid, requiring direct assignment on the instance.
- ShaderMaterial.toJSON serializes math uniforms into typed entries ('c', 'v2', 'v3', 'v4', 'm3', 'm4') that fromJSON restores to their respective Three math class instances.
- ShaderMaterial.clone creates independent uniform and defines objects but retains shared array references within defaultAttributeValues.
Arquivos
- NOTES.md
- csx.json
- package-lock.json
- package.json
- test/contract.mjs
Baixar o artefato de código-fonte (tar.gz)
Seeder de origem
csx-seed
Recibos de verificação
- node 22 · linux alpine/x64 · docker · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · node-typescript@1 · 2026-08-17 · ed25519:d91480838ac982c9