Socket
Socket
Sign inDemoInstall

@lastcode802/threedview

Package Overview
Dependencies
15
Maintainers
3
Versions
7
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @lastcode802/threedview

A custom lib for ThreeD View


Version published
Maintainers
3
Created

Readme

Source

MUI logo

lastcode802

MUI logo

Lastcode802 Present 3d Model View

This library render a 3d model View on React.js and Next.js

Description

This library or package is all about rendering your 3D models in way, So you can manage or get preview of your 3D models and play with them. The model loading speed in the browser depends on the user's internet speed.

Available Code

import * as React from 'react';
import { ThreedView } from "@lastcode802/threedview";

function App() {
  return (
    <ThreedView
      model3dmtl="./assets/IronMan/IronMan.mtl"
      model3dobj="./assets/IronMan/IronMan.obj"
      near={0.1}
      positionx3d={0}
      positiony3d={5}
      positionz3d={20}
      meshpositionx={0}
      meshpositiony={3}
      meshpositionz={0}
      rotationx={0.0}
      rotationy={0.01}
      rotationz={0.0}
      scalex={0.02}
      scaley={0.02}
      scalez={0.02}
      threedviewcanvascolor="#263238"
      directionallightcolor={0xffffff}
      directionallightintensity={1.8}
    />
  );
}

export default App;

In the interactive demo below, try changing the props and see how it affects the storybook output.

Download default 3d model use in library.

Document

Props

proptypedefaultexample
model3dmtl*string./assets/IronMan/IronMan.mtlassests must be in the public folder
model3dobj*string./assets/IronMan/IronMan.objassests must be in the public folder
near*number0.10.1-(-10)-1000
positionx3d*number3350-(-800000)
positiony3d*number530-(-800000)
positionz3d*number2020-(-800000)
meshpositionx*number00
meshpositiony*number30
meshpositionz*number00
rotationx*number00-0.001
rotationy*number0.010-0.01
rotationz*number00-0.001
scalex*number0(0.1-0.9,0.01-0.0.9,0.0001-0.0009)
scaley*number0.02(0.1-0.9,0.01-0.0.9,0.0001-0.0009)
scalez*number0.02(0.1-0.9,0.01-0.0.9,0.0001-0.0009)
threedviewcanvascolor*THREE.ColorRepresentationwhiteAccepts hash vale,rgb and name of the color
directionallightcolor*number16777215Accepts hash vale,rgb and name of the color
directionallightintensity*number1.80-255
loaderColor*stringredAccepts hash vale,rgb and name of the color
showLoader*booltruetrue-false

Special Mentions for Contributors


Find & contact me

LinkedIn Gmail Discord Discord Github

Keywords

FAQs

Last updated on 07 Nov 2022

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc