pmndrs / pmndrs/react-postprocessing
Bloom refs with TypeScript
オープン
まだ誰も着手していません。
- 主要言語
- TypeScript
- スター
- 1.4k
- フォーク
- 134
- 平均マージ
- 4分
- マージ済み PR(30日)
- 4
説明
With the following code:
import type { BloomEffect } from "postprocessing";
import { useFrame } from "@react-three/fiber";
import { Bloom } from "@react-three/postprocessing";
import { useRef } from "react";
const MyBloom = () => {
const bloom = useRef<typeof BloomEffect | null>(null);
useFrame((state, delta) => {
bloom.current.intensity = 2;
});
return <Bloom ref={bloom} />
}
I get the following error:
Property 'intensity' does not exist on type 'typeof BloomEffect'.
The code works though - am I doing something wrong or is there an issue with the types?
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
ファイルもテストも指定されていません。まず、例にあるインポートされた Bloom コンポーネントと BloomEffect ref の背後にある TypeScript 型から始め、次に小さな TypeScript チェックで報告されたエラーを再現します。ref が Bloom インスタンスの intensity プロパティを公開し、実行時の動作が変わらなければ完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- react, three.js, typescript
- 領域
- computer-graphics, frontend
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100