bx-1316-refactoring #14

Merged
ksenia_mikhailova merged 46 commits from bx-1316-refactoring into dev 2024-08-28 15:06:52 +03:00
3 changed files with 5 additions and 3 deletions
Showing only changes of commit c9fde2889f - Show all commits

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

View File

@ -7,6 +7,7 @@ import {
Object3D,
MeshPhongMaterial,
CircleGeometry,
MeshBasicMaterial,
} from 'three';
import { useTresContext, useSeek, useTexture, useLoop } from '@tresjs/core';
@ -40,8 +41,9 @@ const { seekByName, seekAllByName } = useSeek()
const groundTexture = await useTexture({
displacementMap: '/ground_displacement.jpg',
})
const { scene: pointer_pin } = await useGLTF('/pointer.glb')
const pointerTexture = await useTexture({
map: '/pointer_texture.png'
})
const timer = ref(10)
setInterval(() => {
@ -189,7 +191,7 @@ const loadModels = async () => {
const point = new Mesh(
new CircleGeometry(p, 32),
new MeshPhongMaterial({ emissive: new Color(1, 1, 1), emissiveIntensity: 10 })
new MeshBasicMaterial({ map: pointerTexture.map })
)
point.rotateX(-0.5 * Math.PI)
point.position.set(world_position.x, p * 3, world_position.z * 2)