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

Open
#9 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
30/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
javascript, three.js
Domain
tooling

Research direction

No source file or test is named in the issue. Start with the provided parse/evaluate example using THREE.Vector3 as v and the timestamp as t, then trace how static-eval handles member calls on supplied values. Done means the project has a tested, documented answer for whether v.multiplyScalar(t) is supported.

Written by the indexing model from the issue text.

Description

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()
}));
Dominant language
JavaScript
Stars
177
Forks
27
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from browserify/static-eval

All issues in browserify/static-eval

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.