question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Editor should have most of THREE's features

See original GitHub issue
Description of the problem

There are several features of THREE that aren’t accessible from the Editor. When I say accessible, I mean combination of:

  • properties are not visible for editing
  • objects not being able to be created
  • objects not being able to be imported or exported.

Ideally, the Editor should be capable of creating and editing most objects and features that the API contains. This issue is really more to keep track of what the Editor can and can’t do currently. I’m listing features that I think the Editor would be capable of handling.

Cameras

  • PerspectiveCamera
  • OrthographicCamera
  • ArrayCamera
  • CubeCamera
  • StereoCamera

Core

  • BufferAttribute
  • BufferGeometry
  • Layers
  • InstancedBufferAttribute
  • InstancedBufferGeometry
  • InstancedInterleavedBuffer * (#16050)
  • InterleavedBufferAttribute

Geometry

  • BoxGeometry
  • CircleGeometry
  • ConeGeometry
  • CylinderGeometry
  • DodecahedronGeometry
  • EdgesGeometry *
  • ExtrudeGeometry
  • IcosahedronGeometry
  • LatheGeometry
  • OctahedronGeometry
  • PlaneGeometry
  • RingGeometry
  • ShapeGeometry
  • SphereGeometry
  • TetrahedronGeometry
  • TorusGeometry
  • TorusKnotGemetry
  • TubeGeometry
  • WireframeGeometry **

Lights

  • AmbientLight
  • DirectionalLight
  • HemisphereLight
  • PointLight
  • RectAreaLight (#16251)
  • SpotLight
  • LightProbe

Materials

  • LineBasicMaterial
  • LineDashedMaterial
  • MeshBasicMaterial
  • MeshDepthMaterial
  • MeshLambertMaterial
  • MeshMatcapMaterial
  • MeshNormalMaterial
  • MeshPhongMaterial
  • MeshPhysicalMaterial
  • MeshStandardMaterial
  • MeshToonMaterial
  • PointsMaterial
  • RawShaderMaterial
  • ShaderMaterial
  • ShadowMaterial
  • SpriteMaterial

Objects

  • Group
  • LOD
  • Line
  • LineLoop
  • LineSegments
  • Mesh
  • InstancedMesh
  • Points
  • SkinnedMesh
  • Sprite

Textures

  • Texture (properties not editable #13882, #15695)
  • CubeTexture (#13880)
  • VideoTexture

Misc

  • Animations
  • Audio

* = Serializable, but not deserializable ** = Serializable, but not as the original geometry (i.e. WireframeGeometry is serialized as BufferGeometry)

Three.js version
  • Dev
  • r103
Browser
  • All of them
  • Chrome
  • Firefox
  • Internet Explorer
OS
  • All of them
  • Windows
  • macOS
  • Linux
  • Android
  • iOS

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:9
  • Comments:15 (7 by maintainers)

github_iconTop GitHub Comments

8reactions
mrdoobcommented, Apr 15, 2019

I’m hoping we can create an official extension later this year.

1reaction
Mugen87commented, Nov 15, 2020

Nevertheless, I see you favor the Scene approach. I’ll playing with it around and see how it goes.

I’ve implemented this approach today here: https://github.com/Mugen87/three.js/commit/c27d8c2316807f5a03c7fdeffae3614f366b6935

https://raw.githack.com/Mugen87/three.js/8917105377839889844f77c127d4d479f1844998/editor/index.html

My conclusion is that managing animations on Scene level introduces an unnecessary complexity that you don’t see if you manage animations on Object3D level.

  • As you can see at the Scene class, you need an API that assign animations to 3D objects. Something which is not required if you have Object3D.animations. Animations on object level are required though since you usually want to work with all animations of a specific 3D object. The editor is a good example for this (clicking on an object in the outliner and display all respective animations).
  • The problem is now the PR builds this relationship in Scene and decomposes it again in editor. You can see this in SidebarAnimation where the code requests the object’s animations from the scene.
  • If we would handle animation clips similar to shapes or textures, it would be possible to maintain them on object level without serializing the same clip multiple times. So managing animations on object level does not lead to duplicate JSON.

To sum up: I do not recommend to manage animations on scene level. If we do this on object level, we can still ensure that clips are serialized once and not nested inside the JSON structure. Sorry but I’m currently not able to see the benefits of having animations on scene level. Benefits which justify the additional complexity in code. It’s like assigning materials to Scene instead of Object3D and then model the relationship between 3D objects and materials in Scene. It’s just does not feel right.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Medium Editors Will Feature Your Story. But It Needs to Have ...
Medium loves publishing stories that tend to always have three elements in common: original introspection, cultural relevance, and smart writing ...
Read more >
The three 'S's of editing: story, structure, and style | SpringerLink
In the writer's craft section we offer simple tips to improve your writing in one of three areas: Energy, Clarity and Persuasiveness.
Read more >
What Are The Key Features For Editing In Writing - C# Corner
The editor is as much as responsible as a writer when it comes to relevancy. The topic should be relevant and up to...
Read more >
How to Become an Editor: Characteristics of Success
This guide will cover the skills, education, and experience you'll need to begin a career in editing. Let's jump in!
Read more >
5 Traits of a Good Content Editor - Oasis Workflow
1. Attention to detail · 2. Knowledge of the topic · 3. Familiarity with your audience · 4. Flexibility · 5. Creativity ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found