Basic questions on the three.js editor program

Been reading and browsing but I still don’t quite get the intent of this program.

Is it a sample program designed to show much of what can be achieved by a programmer of three.js? That would be quite a task to accomplish…one can accomplish so much!

There are occasional references to “script” or “scripting” in the context of this program. What does that mean?

I’ve been wondering about programmatically driving the UI in a three.js based application. It could be quite useful for repetitive software testing. Are there any tools for this?

Best,

OLDMAN

1 Like

It is both a sample program, but also pretty full fledged… You can attach scripts to the objects and they will run, and they have access to the rendering context in the editor… the scene, camera, controls, etc.

If you go into the properties on the Scene, you can “publish” it, and it will send you a standalone .zip file of just your document, including threejs.min.js, so it can be used to crank out small demos and prototypes. It’s actually surprisingly deep once your get into it.

I haven’t seen any testing apps/frameworks for that kind of repetitive testing in threejs, and I could see some value there… though it might take a large-ish project before you could justify the up front effort to maintain that infrastructure.

A loong time ago I worked on/with a rendering library called “Intrinsic Alchemy” that did something like that internally to test for regressions.

They had a suite of small tests and games and would programmatically drive them, then do pixel comparison of the outputted frames with saved reference images, to detect when changes to the renderer resulted in regressions.

2 Likes

It appears I have implemented exactly the same approach in Suica:

Suica self-tests

5 Likes

Suica looks really nice.
I had a quick look through the demos, copied one and it worked straight away.

2 Likes

Wow I just checked out what you have now in suica… I think I remember when you started working on it! :smiley: You’ve got a Ton of amazing stuff in there!

What an incredible resource!

1 Like

By script, do you mean a snippet of three.js code?