feat: add ambient sound
This commit is contained in:
Binary file not shown.
Binary file not shown.
@@ -10,6 +10,7 @@ import { folder, useControls, Leva } from 'leva';
|
|||||||
import SealCube from './scene-components/sealcube';
|
import SealCube from './scene-components/sealcube';
|
||||||
import Terrain from './scene-components/terrain';
|
import Terrain from './scene-components/terrain';
|
||||||
import { LUTCubeLoader } from 'three/examples/jsm/Addons.js';
|
import { LUTCubeLoader } from 'three/examples/jsm/Addons.js';
|
||||||
|
import { AmbientSound } from './scene-components/ambient-sound';
|
||||||
|
|
||||||
function Loader() {
|
function Loader() {
|
||||||
const { progress, active } = useProgress();
|
const { progress, active } = useProgress();
|
||||||
@@ -147,6 +148,9 @@ export default function Seal() {
|
|||||||
gl={{ antialias: true }}
|
gl={{ antialias: true }}
|
||||||
className='canvas'
|
className='canvas'
|
||||||
>
|
>
|
||||||
|
<AmbientSound url="niko/snd/wind.mp3" volume={0.4}/>
|
||||||
|
<AmbientSound url="niko/snd/birds.mp3" volume={0.1}/>
|
||||||
|
|
||||||
<Scene />
|
<Scene />
|
||||||
<PostProcessing />
|
<PostProcessing />
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user