pointer
This commit is contained in:
parent
41fbe54430
commit
c9fde2889f
Binary file not shown.
Binary file not shown.
After Width: | Height: | Size: 15 KiB |
|
@ -7,6 +7,7 @@ import {
|
||||||
Object3D,
|
Object3D,
|
||||||
MeshPhongMaterial,
|
MeshPhongMaterial,
|
||||||
CircleGeometry,
|
CircleGeometry,
|
||||||
|
MeshBasicMaterial,
|
||||||
} from 'three';
|
} from 'three';
|
||||||
|
|
||||||
import { useTresContext, useSeek, useTexture, useLoop } from '@tresjs/core';
|
import { useTresContext, useSeek, useTexture, useLoop } from '@tresjs/core';
|
||||||
|
@ -40,8 +41,9 @@ const { seekByName, seekAllByName } = useSeek()
|
||||||
const groundTexture = await useTexture({
|
const groundTexture = await useTexture({
|
||||||
displacementMap: '/ground_displacement.jpg',
|
displacementMap: '/ground_displacement.jpg',
|
||||||
})
|
})
|
||||||
|
const pointerTexture = await useTexture({
|
||||||
const { scene: pointer_pin } = await useGLTF('/pointer.glb')
|
map: '/pointer_texture.png'
|
||||||
|
})
|
||||||
|
|
||||||
const timer = ref(10)
|
const timer = ref(10)
|
||||||
setInterval(() => {
|
setInterval(() => {
|
||||||
|
@ -189,7 +191,7 @@ const loadModels = async () => {
|
||||||
|
|
||||||
const point = new Mesh(
|
const point = new Mesh(
|
||||||
new CircleGeometry(p, 32),
|
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.rotateX(-0.5 * Math.PI)
|
||||||
point.position.set(world_position.x, p * 3, world_position.z * 2)
|
point.position.set(world_position.x, p * 3, world_position.z * 2)
|
||||||
|
|
Loading…
Reference in New Issue