Skip to content

Would it be possible to use this with THREE.Vector3? #9

@bnolan

Description

@bnolan

Sorry if I'm being daft, but would this work with passing a three.vector in as a variable, and allowing the code to call methods on that? I want to allow declarative animations in @scenevr.

var src = 'v.multiplyScalar(t)';
var ast = parse(src).body[0].expression;

console.log(evaluate(ast, {
    v: new THREE.Vector3,
    t : new Date().valueOf()
}));

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