Skip to content

feat(objwriter): add support for vtkOBJWriter #2405

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

daker
Copy link
Collaborator

@daker daker commented May 8, 2022

fix #2404

Context

Add support for vtkOBJWriter

const writer = vtkOBJWriter.newInstance();
writer.setInputData(source.getOutputData());
writer.setTexture(tex);

// const objContent = writer.getOutputData();
// const mtlContent = writer.getMtl();

const zip = writer.exportAsZip();
zip.then((zipData) => {
    const blob = new Blob([zipData], { type: 'application/zip' });
    const url = URL.createObjectURL(blob);
    console.log(url);
});

Results

Changes

  • Documentation and TypeScript definitions were updated to match those changes

PR and Code Checklist

  • semantic-release commit messages
  • Run npm run reformat to have correctly formatted code

Testing

  • This change adds or fixes unit tests
  • Tested environment:
    • vtk.js:
    • OS:
    • Browser:

@daker daker force-pushed the add-objwriter branch 2 times, most recently from 68353a6 to 175a919 Compare May 8, 2022 12:37
@jourdain jourdain self-requested a review May 8, 2022 15:14
Copy link
Collaborator

@jourdain jourdain left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@daker daker marked this pull request as draft May 11, 2022 10:24
@daker daker force-pushed the add-objwriter branch 2 times, most recently from 7addc1e to de494f4 Compare May 26, 2025 00:14
@daker daker marked this pull request as ready for review May 26, 2025 00:14
@daker daker force-pushed the add-objwriter branch 3 times, most recently from c5fbfac to db7d26b Compare May 26, 2025 01:02
@daker daker requested a review from finetjul May 26, 2025 14:36
@daker daker requested a review from jourdain May 30, 2025 22:15
@jourdain
Copy link
Collaborator

jourdain commented Jun 1, 2025

I'm ok with the code, knowing that there is some limitation in the current implementation as only one texture can exist.

@daker
Copy link
Collaborator Author

daker commented Jun 27, 2025

@floryst ready for a merge 👍🏼

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature Request: OBJWriter
3 participants