feat(fields): use new field ref and field types
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
use crate::{
|
||||
core::client::INTERNAL_CLIENT,
|
||||
nodes::{
|
||||
fields::Ray,
|
||||
fields::{FieldTrait, Ray},
|
||||
input::{InputDataType, InputMethod, Pointer, INPUT_HANDLER_REGISTRY},
|
||||
spatial::Spatial,
|
||||
Node,
|
||||
@@ -46,9 +46,11 @@ impl EyePointer {
|
||||
}
|
||||
pub fn update(&self) {
|
||||
let ray = Input::get_eyes();
|
||||
self.spatial.set_local_transform(
|
||||
Mat4::from_rotation_translation(ray.orientation.into(), ray.position.into()),
|
||||
);
|
||||
self.spatial
|
||||
.set_local_transform(Mat4::from_rotation_translation(
|
||||
ray.orientation.into(),
|
||||
ray.position.into(),
|
||||
));
|
||||
{
|
||||
// Set pointer input datamap
|
||||
*self.pointer.datamap.lock() = Datamap::from_typed(EyeDatamap { eye: 2 }).unwrap();
|
||||
|
||||
@@ -4,7 +4,7 @@ use crate::{
|
||||
data::{
|
||||
mask_matches, pulse_receiver_client, PulseSender, KEYMAPS, PULSE_RECEIVER_REGISTRY,
|
||||
},
|
||||
fields::Ray,
|
||||
fields::{FieldTrait, Ray},
|
||||
input::{InputDataType, InputHandler, InputMethod, Pointer, INPUT_HANDLER_REGISTRY},
|
||||
spatial::Spatial,
|
||||
Node,
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
use crate::{
|
||||
core::client::INTERNAL_CLIENT,
|
||||
nodes::{
|
||||
fields::FieldTrait,
|
||||
input::{InputDataType, InputHandler, InputMethod, Tip, INPUT_HANDLER_REGISTRY},
|
||||
spatial::Spatial,
|
||||
Node,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
use crate::core::client::INTERNAL_CLIENT;
|
||||
use crate::nodes::fields::Field;
|
||||
use crate::nodes::fields::{Field, FieldTrait};
|
||||
use crate::nodes::input::{InputDataType, InputHandler, INPUT_HANDLER_REGISTRY};
|
||||
use crate::nodes::{
|
||||
input::{Hand, InputMethod, Joint},
|
||||
|
||||
Reference in New Issue
Block a user