Skip to content

Commit

Permalink
Merge pull request #31 from nwpointer/rm-distance-material
Browse files Browse the repository at this point in the history
Rm distance material
  • Loading branch information
nwpointer committed Mar 20, 2023
2 parents 60a4c99 + 1fa00f2 commit 3292029
Show file tree
Hide file tree
Showing 10 changed files with 8 additions and 580 deletions.
2 changes: 1 addition & 1 deletion package/package.json
@@ -1,6 +1,6 @@
{
"name": "three-landscape",
"version": "0.9.0",
"version": "0.9.1",
"description": "",
"module": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down
135 changes: 0 additions & 135 deletions package/src/three/DistanceMaterial.ts

This file was deleted.

1 change: 1 addition & 0 deletions package/src/three/MacroMaterial.ts
Expand Up @@ -2,6 +2,7 @@ import { RepeatWrapping } from "three";
import glsl from "glslify";
import { ShaderMaterial } from "three";

// used to help generate macro level details that break up terrain similarities when zoomed out
export function MacroMaterial(parent) {
parent.props.macroMap.wrapT = RepeatWrapping;
parent.props.macroMap.wrapS = RepeatWrapping;
Expand Down
6 changes: 3 additions & 3 deletions package/src/three/TerrainMaterial.tsx
Expand Up @@ -7,8 +7,8 @@ import mixers from "../util/mixers";
import sort from "../util/sort";
import { dynamicHeightUtils } from "../util/dynamicHeight";
import noise from "../util/noise";
import { memGenerateTextureArray } from "./generateTextureArray";
import { materialScene } from "./materialScene";
import { memGenerateTextureArray } from "../util/generateTextureArray";
import { createMaterialScene } from "./createMaterialScene";
import { TerrainMaterialOptions } from "../components/TerrainMaterial";

export default class TerrainMaterial extends CustomShaderMaterial {
Expand Down Expand Up @@ -454,7 +454,7 @@ export default class TerrainMaterial extends CustomShaderMaterial {
if (this.farMaterial)
return; // already initialized
this.farMaterial = new TerrainMaterial({ ...props, parent: this });
const { camera, scene } = materialScene(this.farMaterial);
const { camera, scene } = createMaterialScene(this.farMaterial);
this.farCamera = camera;
this.farScene = scene;
const maxSize = this.getMaxTextureSize();
Expand Down

1 comment on commit 3292029

@vercel
Copy link

@vercel vercel bot commented on 3292029 Mar 20, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

three-landscape – ./

three-landscape-git-main-nwpointer.vercel.app
three-landscape.vercel.app
three-landscape-nwpointer.vercel.app

Please sign in to comment.