Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation is already out of date #22

Closed
5 tasks done
tristanradams opened this issue Sep 27, 2023 · 3 comments
Closed
5 tasks done

Documentation is already out of date #22

tristanradams opened this issue Sep 27, 2023 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@tristanradams
Copy link

Describe the bug 📝

I am attempting to follow the documentation as closely as possible and there have been multiple instances where the documentation has been outright incorrect in regards to types and what is actually available.

Examples of instances of missing documented properties/methods:

  • components.scene.setup(), where setup() does not exist
  • components.renderer.postproduction.customEffects.outlineEnabled = true, where postproduction does not exist
  • The docs say for the highlighter to use highlighter.outlinesEnabled = true, where the actual call is highlighter.outlineEnabled = true.

With running into just these few variances, there have to be multiple more. The variance between the documentation and the actual types can get frustrating and if types are included, they should accurately describe available functionality, methods, and properties.

Reproduction ▶️

No response

Steps to reproduce 🔢

  1. Read the docs
  2. Attempt to follow instructions exactly using a typescript project
  3. Discover missing methods, properties.

System Info 💻

Node, Vite, Typescript, MacOS

Used Package Manager 📦

npm

Error Trace/Logs 📃

No response

Validations ✅

  • Read the docs.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Make sure this is a IFC.js components issue and not a framework-specific issue. For example, if it's a THREE.js related bug, it should likely be reported to mrdoob/threejs instead.
  • Check that this is a concrete bug. For Q&A join our Community.
  • The provided reproduction is a minimal reproducible example of the bug.
@daniel-augusto
Copy link

There is a difference between component.scene and new OBC.SimpleScene(component)

component.scene return object from THREE.Scene.

image

The scene of three.js doesn´t have the method setup(). See https://github.com/mrdoob/three.js/blob/master/src/scenes/Scene.js

But OBC.SimpleScene has a method setup(). You can see at https://github.com/IFCjs/components/blob/main/src/core/SimpleScene/index.ts#L41.

To call the setup() from SimpleScene, it needs to break into 2 commands like this:

const myScene = new OBC.SimpleScene(components);
components.scene = myScene;
myScene.setup();

A similar is true for postproduction.

const rendererComponent = new OBC.PostproductionRenderer(component, viewerContainer)
rendererComponent.postproduction.enabled = true
component.renderer = rendererComponent

image

@HoyosJuan
Copy link
Member

Hi! Just passing by to follow up this issue.

Some of those problems are typescript concepts, but we're aware that some things in the documentation need to be reviewed. We're going to update the documentation asap!

@HoyosJuan HoyosJuan assigned HoyosJuan and unassigned agviegas Nov 28, 2023
@HoyosJuan HoyosJuan transferred this issue from ThatOpen/engine_components Dec 1, 2023
@agviegas
Copy link
Contributor

Documentation is now 100% up to date!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants