Skip to content

Typescript examples throws type errors. #88

@muningis

Description

@muningis

Part 1:

userLocation.position.copy(userPose.position);
Argument of type 'Cartesian3' is not assignable to parameter of type 'Vector3'. Property 'set' is missing in type 'Cartesian3'.'

Since TypeCast doesn't help, gotta do this:

userLocation.position.copy(new Three.Vector3(
  userPose.position.x,
  userPose.position.y,
  userPose.position.z,
))

And then there's more errors for these:

boxGeoEntity.position.setValue(boxPos, defaultFrame)
boxGeoEntity.orientation.setValue(Argon.Cesium.Quaternion.IDENTITY)
message: 'Property 'setValue' does not exist on type 'PositionProperty'. Did you mean 'getValue'?'
message: 'Property 'setValue' does not exist on type 'Property'. Did you mean 'getValue'?'

Yes, I'm using types both for THREE.js and Argon.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions