diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..a1a82b1 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,5 @@ +{ + "cSpell.words": [ + "frameloop" + ] +} \ No newline at end of file diff --git a/src/App.js b/src/App.js index 7a76c39..69e98be 100644 --- a/src/App.js +++ b/src/App.js @@ -1,154 +1,25 @@ import React from 'react'; import { BrowserRouter as Router, Routes, Route } from 'react-router-dom'; import PageScrollTop from './components/pageToTop/PageScrollTop' - -// Pages import Here -import Splash from "./pages/Splash"; -import HomeDefault from "./pages/HomeDefault"; -import BusinessConsulting2 from "./pages/BusinessConsulting2"; -import Corporate from "./pages/Corporate"; -import Business from "./pages/Business"; -import DigitalAgency from "./pages/DigitalAgency"; -import Finance from "./pages/Finance"; import Company from "./pages/Company"; -import Marketing from "./pages/Marketing"; -import TravelAgency from "./pages/TravelAgency"; -import Consulting from "./pages/Consulting"; -import SeoAgency from "./pages/SeoAgency"; -import PersonalPortfolio from "./pages/PersonalPortfolio"; -import EventConference from "./pages/EventConference"; -import CreativePortfolio from "./pages/CreativePortfolio"; -import Freelancer from "./pages/Freelancer"; -import InternationalConsulting from "./pages/InternationalConsulting"; -import Startup from "./pages/Startup"; -import WebAgency from "./pages/WebAgency"; - - -import CategoryList from "./pages/CategoryList"; -import TagList from "./pages/TagList"; -import Author from "./pages/Author"; -import AboutUs from "./pages/AboutUs"; - import NGS from "./covisart/NGS"; -// Elements import Here - -import Elements from "./elements/elements/Elements"; -import Button from "./elements/button/Button"; -import Service from "./elements/service/Service"; -import CounterUp from "./elements/counterup/CounterUp"; -import Progressbar from "./elements/progressbar/Progressbar"; - -import Portfolio from "./elements/portfolio/Portfolio"; -import portfolioThreeColumn from "./elements/portfolio/PortfolioThreeColumn"; -import PortfolioFullWidth from "./elements/portfolio/PortfolioFullWidth"; -import PortfolioGrid from "./elements/portfolio/PortfolioGrid"; -import PortfolioBoxLayout from "./elements/portfolio/PortfolioBoxLayout"; -import PortfolioDetails from "./pages/PortfolioDetails"; -import Social from "./elements/social/Social"; -import Team from "./elements/team/Team"; -import Timeline from "./elements/timeline/Timeline"; -import Testimonial from "./elements/testimonial/Testimonial"; -import RnAccordion from "./elements/accordion/RnAccordion"; -import Tab from "./elements/tab/Tab"; -import Pricing from "./elements/pricing/Pricing"; -import Split from "./elements/split/Split"; -import CalltoAction from "./elements/calltoaction/CalltoAction"; -import Video from "./elements/video/Video"; -import Gallery from "./elements/gallery/Gallery"; +import Simulator from "./covisart/Simulator"; import Contact from "./elements/contact/Contact"; -import Brand from "./elements/brand/Brand"; -import AdvanceTab from "./elements/advancetab/AdvanceTab"; -import AdvancePricing from "./elements/advancePricing/AdvancePricing"; - - -import BlogGridView from "./components/blog/BlogGridView"; -import BlogListView from "./components/blog/BlogListView"; -import BlogGridSidebar from "./components/blog/BlogGridSidebar"; -import BlogListSidebar from "./components/blog/BlogListSidebar"; -import BlogDetails from "./pages/BlogDetails"; -import Error from "./pages/Error"; - // Import Css Here import './assets/scss/style.scss'; - const App = () => { - - //initializeGtag('G-XTQCE7S8BR'); // Your tracking code - return ( - } /> - } /> - } /> - - - - - - - - - - - - - - - - - - - - - {/* Blog Part */} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + } /> + } /> + } /> + } /> ) } - - export default App diff --git a/src/covisart/Canvas.js b/src/covisart/Canvas.js index d6c6e9c..7ef7843 100644 --- a/src/covisart/Canvas.js +++ b/src/covisart/Canvas.js @@ -5,7 +5,7 @@ import { easing } from 'maath' import { useSnapshot } from 'valtio' import { state } from '../elements/tab/store' -export const App = ({ position = [0, 0, 2.5], fov = 25 }) => ( +export default function App ({ position = [0, 0, 2.5], fov = 25 }){ @@ -16,7 +16,7 @@ export const App = ({ position = [0, 0, 2.5], fov = 25 }) => ( -) +} function Backdrop() { const shadows = useRef() diff --git a/src/covisart/Product.js b/src/covisart/Product.js index fa88827..061fc95 100644 --- a/src/covisart/Product.js +++ b/src/covisart/Product.js @@ -10,6 +10,7 @@ import { PayloadSelection } from './Selections/PayloadSelection' import { useSnapshot } from 'valtio' import { state } from './store' import Configuration from './Configuration' +import Simulator from './Simulator'; import { Order, PingAPI, LocalOrder } from './system/OrderRequest'; import ReactGA from "react-ga4"; @@ -86,7 +87,7 @@ const Product = () => {
- +
@@ -108,11 +109,15 @@ const Product = () => {
- -
- -
-
+ { + /* + +
+ +
+
+ */ + }
@@ -138,17 +143,21 @@ const Product = () => {
- -
-
-

NGS-360-3 Motion Platform has 3 different color available. All colors are matte and powder painted

- -
- setSelectedTab((selectedTab + 1) % tabCount)}>Next + { + /* + +
+
+

NGS-360-3 Motion Platform has 3 different color available. All colors are matte and powder painted

+ +
-
- + + */ + }
@@ -249,7 +258,7 @@ const Product = () => { ) : ( -
+
) diff --git a/src/covisart/Simulator.js b/src/covisart/Simulator.js index 32819e3..742d90b 100644 --- a/src/covisart/Simulator.js +++ b/src/covisart/Simulator.js @@ -1,6 +1,6 @@ import { useRef, Suspense } from 'react' -import { Canvas, useFrame } from '@react-three/fiber' -import { useGLTF, Stage, Grid, OrbitControls, Html, MeshDistortMaterial, MeshDiscardMaterial, useProgress } from '@react-three/drei' +import { Canvas, useThree } from '@react-three/fiber' +import { useGLTF, Stage, Grid, OrbitControls, Html, ContactShadows, MeshDiscardMaterial, useProgress } from '@react-three/drei' import { EffectComposer, Bloom } from '@react-three/postprocessing' import { Model } from './models/NGS_GLT_V2' import { Ngs_GLT } from './models/NGS_GLT' @@ -14,21 +14,21 @@ function Loader() { export default function Simulator() { const { ruler } = useControls({ "ruler": false }) state.ruler = ruler + return ( - + frameloop="demand" + camera={{fov: 45}}> }> - - + + + - + + + + - + ) -} - -/* -Auto-generated by: https://github.com/pmndrs/gltfjsx -Command: npx gltfjsx@6.1.0 s2wt_kamdo_industrial_divinities.glb --transform --simplify -Author: Hansalex (https://sketchfab.com/Hansalex) -License: CC-BY-4.0 (http://creativecommons.org/licenses/by/4.0/) -Source: https://sketchfab.com/3d-models/s2wt-kamdo-industrial-divinities-f503b70ac05e49a38c81100d71599a1b -Title: S2WT "Kamdo" (Industrial Divinities) -*/ - -function Kamdo({ url, ...props }) { - const head = useRef() - const { nodes, materials } = useGLTF('/s2wt_kamdo_industrial_divinities-transformed.glb') - - return ( - - - - - - - - { - // - } - - ) -} - -useGLTF.preload('/s2wt_kamdo_industrial_divinities-transformed.glb') +} \ No newline at end of file diff --git a/src/covisart/models/NGS_GLT.jsx b/src/covisart/models/NGS_GLT.jsx index e8796a2..8fc8782 100644 --- a/src/covisart/models/NGS_GLT.jsx +++ b/src/covisart/models/NGS_GLT.jsx @@ -5,7 +5,7 @@ Files: NGS_GLT_V2.glb [117.38MB] > NGS_GLT_V2-transformed.glb [11.95MB] (90%) */ import React, { useRef, useLayoutEffect } from 'react' -import { useGLTF, useAnimations } from '@react-three/drei' +import { useGLTF } from '@react-three/drei' import { useFrame, applyProps } from '@react-three/fiber' import { useSnapshot } from 'valtio' import { easing } from 'maath' @@ -15,35 +15,33 @@ export function Ngs_GLT({ url, ...props }) { const axis2 = useRef() const axis1 = useRef() const snap = useSnapshot(control) - const { nodes, materials, animations } = useGLTF(url) - const { actions } = useAnimations(animations, axis3) + const { nodes, materials } = useGLTF(url) + easing.dampC(materials.Metal.color, snap.color, 0.0, 0) + useFrame((state, delta) => { - easing.dampC(materials.Metal.color, snap.color, 0.0, delta) - }) - /*useFrame((state, delta) => { - const t = Math.sin(state.clock.elapsedTime) - easing.dampE(axis3.current.rotation, [t, 0, 0], control.speed, delta) - easing.dampE(axis2.current.rotation, [0, t, 0], control.speed, delta) - easing.dampE(axis1.current.rotation, [t, 0, 0], control.speed, delta) + const t = Math.sin(state.clock.elapsedTime) //map(Math.sin(state.clock.elapsedTime), -45, 45, -360, 360) + easing.dampE(axis3.current.rotation, [t, 0, 0], control.speed, delta/2) + easing.dampE(axis2.current.rotation, [0, t, 0], control.speed, delta/2) + easing.dampE(axis1.current.rotation, [t, 0, 0], control.speed, delta/2) }) useLayoutEffect(() => { Object.values(nodes).forEach((node) => node.isMesh && (node.receiveShadow = node.castShadow = true, applyProps(node.material, { roughness: 1.0, roughnessMap: null, normalScale: [4, 4] }))) - }, [nodes, materials])*/ + }, [nodes, materials]) return ( - - + + - - - - + + + + - - + + - + { @@ -60,49 +58,54 @@ export function Ngs_GLT({ url, ...props }) { } - - - - - - - - - - + + + + + + + + + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + { nodes[snap.motor] != null && - + } - - - - - - + + + + + + - ) } - -useGLTF.preload('/NGS_GLT_V2-transformed.glb') +export function clamp(input, min, max) { + return input < min ? min : input > max ? max : input; +} +export function map(current, in_min, in_max, out_min, out_max) { + const mapped= ((current - in_min) * (out_max - out_min)) / (in_max - in_min) + out_min; + return clamp(mapped, out_min, out_max); +} +useGLTF.preload('/covisart/models/NGS_GLT_V2-transformed.glb') diff --git a/src/covisart/store.js b/src/covisart/store.js index a68aa68..f7113f1 100644 --- a/src/covisart/store.js +++ b/src/covisart/store.js @@ -13,7 +13,7 @@ const state = proxy({ accessory:'JustSim', colors: ['grey','black', 'blue', 'goldenrod', 'azure', 'lightslategray' ], decals: ['react', 'three2', 'pmndrs'], - color: 'grey', + color: 'black', led: '#FF0000', decal: 'three2', motors: ['BECKHOFF_AM8552', 'BECKHOFF_AM8052'],