mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-23 19:49:50 +02:00
feat: baked ao
This commit is contained in:
1 parent
335cd4d699
commit
66cf1fd223
11 files changed
+75
-93
No files matched your search
+2
-2
@@ -11,7 +11,7 @@ const LIGHTS_COUNT = 5;
|
||||
const LIGHT_DISTANCE = 13;
|
||||
const LIGHT_HEIGHT_0 = 4;
|
||||
const LIGHT_HEIGHT_1 = 2;
|
||||
const INTENSITY = 30;
|
||||
const INTENSITY = 35;
|
||||
|
||||
const N = 128;
|
||||
const TARGET_FRAME_RATE = 30;
|
||||
@@ -64,7 +64,7 @@ export function Lighting() {
|
||||
position={position}
|
||||
intensity={INTENSITY}
|
||||
penumbra={1}
|
||||
// castShadow={cast}
|
||||
castShadow={cast}
|
||||
decay={1}
|
||||
color={color}
|
||||
/>
|
||||
|
||||
+5
-5
@@ -1,8 +1,8 @@
|
||||
import { invalidate, useFrame } from '@react-three/fiber';
|
||||
import { clamp } from 'lodash-es';
|
||||
import { Quicklime, type QuicklimeEvent } from 'quicklime';
|
||||
import { useEffect, useRef } from 'react';
|
||||
import { Mesh, MeshStandardMaterial } from 'three';
|
||||
import { invalidate, useFrame } from "@react-three/fiber";
|
||||
import { clamp } from "lodash-es";
|
||||
import { Quicklime, type QuicklimeEvent } from "quicklime";
|
||||
import { useEffect, useRef } from "react";
|
||||
import { Mesh, MeshStandardMaterial } from "three";
|
||||
|
||||
const SIZE = 2 ** 5;
|
||||
|
||||
|
||||
-7
@@ -28,13 +28,6 @@ export function TankModel() {
|
||||
const { gltf } = useModel(protagonist.tank.id);
|
||||
const nodes = Object.values(gltf.nodes);
|
||||
|
||||
nodes.forEach((n) => {
|
||||
if (n instanceof Mesh && n.material instanceof MeshStandardMaterial) {
|
||||
n.material.aoMapIntensity = 10;
|
||||
console.log(n.geometry.attributes);
|
||||
}
|
||||
});
|
||||
|
||||
useTankTransform(track, turret, turretContainer, gunContainer);
|
||||
|
||||
return (
|
||||
|
||||
Reference in new issue
Block a user