Coder Social home page Coder Social logo

three-full's Introduction

three-full

License

Deprecation note:

I am glad to annonce since Three release his examples files under JSM folder, this repository should be avoided. The first goal of this repository was to provided an alternative solution during this migration. From now, please consider to use Three.module.js instead even if i maintain this repository for my personal usage. Thanks for all ! Itee...

The version 28.0.2 is now available under Three r0.113.2

Extended Three JavaScript 3D library

Three.js come with lot of examples files, which are curently not usable as ES6 module. The purpose of this project is to convert all examples files and includes them as part of the library.

Setup

Assuming that npm and node are already installed.

Install:

npm install --save three-full

Usage

Like Three.js but with more, more and more available stuff.

Using ES6:
import { WhatIWant } from 'node_modules/three-full/builds/Three.es.js'
// equivalent to
import { WhatIWant } from 'three-full'
 
// or directly from sources folder
 
import { Ocean } from 'node_modules/three-full/sources/Ocean'
Using Node/CommonJS:
const Three = require('node_modules/three-full/builds/Three.cjs.js')
// equivalent to 
const Three = require('three-full')
Using UMD:
const Three = require('node_modules/three-full/builds/Three.umd.js')
Using AMD:
require(['node_modules/three-full/builds/Three.amd.js'], 
    function( Three ){
    
        //...
        
});
From HTML (not recommended):
<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8">
        <title>Three Full Es6</title>
    </head>
    <body>
        <script src="node_modules/three-full/builds/Three.iife.js"></script>
        <script>
            alert('Three.REVISION: ' + Three.REVISION)
        </script>
    </body>
</html>

Note: You should copy the file in right server location to serve it correctly, and use Three.iife.min.js under production ! Importing the all library in HTML page should be avoided, use a proper module bundler like webpack or rollup using es6 module syntaxe !

Commands

In case you want participate, you need to known some commands below:

Help:

npm run help

Will display all you need to known about available commands in three-full package

Patch:

npm run patch

Important: After installing/reinstalling node_modules/three you need to apply patch only once, for fix some examples parts.

Convert:

npm run convert

This command will convert all examples files as ES6 modules (*) and copy all three files at top level of the package in view to be build.

Build:

npm run build

This command will build converted sources as UMD, AMD, ES (*), CJS and IIFE using Rollup

Missings Files

This is the list of unsupported part of example, which cannot/won't be converted.

  • Intermediary exporter files

    • Curves.js
    • Geometries.js
    • Materials.js
    • Nodes.js
  • Others

    • examples\js //Good job was done in JSM folder, nice
    • examples\jsm\controls\experimental //Duplicate exports
  • Specific Files

    • examples\js\loaders\VRMLLoader
    • examples\js\loaders\NRRDLoader
    • examples\js\renderers\RaytracingWorker

Missings Imports

  • Scene Could use __THREE_DEVTOOLS__
  • WebGLRenderer Could use __THREE_DEVTOOLS__
  • MMDLoader Require MMDParser available at three/examples/jsm/libs/mmdparser.module.js
  • MMDExporter Require MMDParser available at three/examples/jsm/libs/mmdparser.module.js
  • FBXLoader Require Zlib.Inflate available at three/examples/jsm/libs/inflate.module.min.js
  • EXRLoader Require Zlib.Inflate available at three/examples/jsm/libs/inflate.module.min.js
  • NRRDLoader Require Zlib.Inflate available at three/examples/jsm/libs/inflate.module.min.js
  • VTKLoader Require Zlib.Inflate available at three/examples/jsm/libs/inflate.module.min.js
  • TTFLoader Require opentype available at three/examples/js/libs/opentype.min.js
  • TimelinerController Require Timeliner available at three/examples/js/libs/timeliner_gui.min.js

Redirected Files

All JSM files are mapped to their counter-part under sources folders except

Filename New Location
ConvexObjectBreaker 'modifiers/ConvexObjectBreaker.js'
Curve 'curves/Curve.js'
Earcut 'misc/Earcut.js'
GPUComputationRenderer 'renderers/GPUComputationRenderer.js'
Gyroscope 'objects/Gyroscope.js'
ImageUtils 'utils/ImageUtils.js'
MD2Character 'objects/MD2Character.js'
MD2CharacterComplex 'objects/MD2CharacterComplex.js'
MorphAnimMesh 'objects/MorphAnimMesh.js'
MorphBlendMesh 'objects/MorphBlendMesh.js'
Ocean 'objects/Ocean.js'
PMREMGenerator 'utils/PMREMGenerator.js'
RollerCoaster 'objects/RollerCoaster.js'
ShapeUtils 'utils/ShapeUtils.js'
VolumeSlice 'audio/VolumeSlice.js'
WebGL 'helpers/WebGL.js'

Change log

28.0.2:
  • Fix WebGLShadowMap missing imports
28.0.1:
  • Fix banner deprecation warning
  • Fix OBJLoader2Worker management
  • Ignore XRControllerModelFactory
  • Fix missing motion-controllers lib copy
  • Fix multi-imports override from external file
28.0.0:
  • Support of Three r113.2
  • Ignore experimental jsm folder
  • Add eslint fix about StandardNode
  • Fix SVGLoader imports
  • Fix TypedArrayUtils imports
  • Fix WebGLPrograms imports
27.0.0:
  • Support of Three r112.1
  • Better redirection of TS files
  • Add PMREMGenerator
  • Add ShaderChunk light toon
  • Add ShaderLib mesh toon
  • Move WebXRManager into webxr folder
26.0.0:
  • Support of Three r111.0
  • Remove OutlineEffect edgecase
  • Remove LegacyGLTFLoader
  • Remove LegacyJSONLoader
  • Remove PaintViveController
  • Remove ViveController
  • Remove DaydreamController
  • Remove GearVRController
25.0.0:
  • Support of Three r110.0
  • Remove AssimpJSONLoader
  • Remove EquirectangularToCubeGenerator
  • Remove SoftwareRenderer
  • Remove WebGL2Renderer
24.0.0:
  • Support of Three r109.0
  • Add InstancedMesh
  • Add WebGLMultiviewRenderTarget
  • Add WebGLMultiview
  • Remove EditorControls
  • Remove OrthographicTrackballControls
  • Remove AWDLoader
  • Remove BabylonLoader
  • Remove PlayCanvasLoader
23.0.1:
  • Fix missing branch merge
23.0.0:
  • Support of Three r108.0
  • Add missing imports to WebGLPrograms
  • Add missing libs folder
  • Add PointLightShadow
  • Add some ShaderChunk
  • Add VSM shader
22.0.0:
  • Support of Three r107.0
  • Fix FBXLoader imports
  • Fix TypedArrayUtils imports
  • Fix WebGL declaration
  • Fix WebVR declaration
21.0.0:
  • Support of Three r106.2
  • Ignore VRMLLoader due to incompatible AMD dependencies
  • Add RectAreaLightUniformsLib
  • Add CarControls
  • Add MathNode
  • Add GodRayShader
  • Add OceanShader
  • Add SkinShader
  • Add TerrainShader
  • Add ToonShader
  • Add TranslucentShader
  • Fix DRACOExporter name
  • Fix ObjectLoader curves imports
  • Fix TextureCubeUVNode imports
20.0.0:
  • Support of Three r105.2
  • Add special treatment for HelioWebXRPolyfill
  • Update Pass patch
  • Add BasisTextureLoader
  • Fix Lut export
  • Fix NodeMaterialLoader export
  • Fix SMAAShader export
  • Fix WebGLDeferredRenderer export
19.0.0:
  • Support of Three r104
  • Add LightProbeHelper
  • Add AmbientLightProbe
  • Add HemisphereLightProbe
  • Add LightProbe
  • Add LightProbeGenerator
  • Add SphericalHarmonics3
18.0.0:
  • Support of Three r103
  • Add DracoExporter
  • Add LWOLoader
  • Add DataTexture2DArray
  • Move ImageUtils into utils folder
  • Reintroduce ParametricGeometries
  • Allow to remove exports from config file using negation
17.2.0:
  • Auto generate unit test files for karma and html
  • Fix DRACOLoader, NormalNode, , Loader, Material naming (internal $1)
  • Export EquirectangularToCubeGenerator
  • Export cloneUniforms and mergeUniforms from UniformsUtils
  • Unexport HDRLoader (Use RGBELoader instead)
17.1.0:
  • Add unit tests about the usability of each Three class
  • Add new npm script 'test' to run unit under karma server
  • Add new gulp tasks to auto-generate unit tests
  • Generate an HTML report after 'npm run test'
17.0.0:
  • Support of Three r102
16.0.1:
  • Fix missing core folder due to NPM v6.8.0 bug
16.0.0:
  • Support of Three r101
  • Add patch in BufferGeometryUtils againt for...of loop
15.0.0:
  • Support of Three r100
  • Ignore ldraw folder
14.0.0:
  • Support of Three r99
  • Allow new glsl support
13.0.0:
  • Support of Three r98
  • Some trouble could come from LoaderSupport using eval (/!)
  • Ignore offscreen folder
12.0.0:
  • Support of Three r97
  • Add cleaning step before right source files ( Remove extra blank lines and semi-colons)
  • Remove some useless patch about Nodes
  • Use new WebGL lib instead of Detector
11.3.3:
  • Fix warning for cjs build onky in debug mode and improve window global check
11.3.2:
  • Fix global window declaration for cjs build usage (again)
11.3.1:
  • Fix global window declaration for cjs build usage
11.3.0:
  • Fix ObjLoader2 worker code
  • Build tests under a gulp task
  • Allow to lint tests files
11.2.0:
  • Add banner management over all sources files to avoid PR on sources that are converted
11.1.1:
  • Fix SkeletonUtils eslint bug using replacements edge case
11.1.0:
  • Sources files are now linted
11.0.0:
  • Support of Three r96
  • Update edgecase replacement for LoaderSupport
10.0.0:
  • Support of Three r95
  • Use a generator function that iterate over all files under sources and create the rollup config to build them separatly
  • Fix missing LoaderUtils import in OBJLoader2
  • Fix missing TextureCubeNode import in NodeBuilder
  • Fix missing _Math import in Node
  • Fix missing BufferGeometryUtils import in GLTFLoader
  • Fix missing BokehDepthShader import in CinematicCamera
  • Fix missing UniformsUtils and HalftoneShader import in HalftonePass
  • Fix missing UniformsUtils and AfterimageShader import in AfterimagePass
  • Fix missing Uint8BufferAttribute, Int8BufferAttribute, Int16BufferAttribute, Int32BufferAttribute and Float32BufferAttribute import in DRACOLoader
  • Ignore Nodes and THREE.Nodes intermediary files
  • Move ShaderTranslucent in shader folder
9.0.0:
  • Support of Three r94
8.0.0:
  • Support of Three r93
7.0.0:
  • Support of Three r92
6.0.0:
  • Support of Three r91
  • Fix DefaultLoadingManager import in OBJLoader2
  • Fix ShaderLib, UniformsLib, and UniformsUtils imports in LineMaterial
  • Fix DefaultLoadingManager, Uint16BufferAttribute and Uint32BufferAttribute imports in DRACOLoader
  • Remove fix-camera-node task due to threejs fix
5.0.7:
  • Fix missings PropertyBinding imports in FBXLoader
  • Fix missings PropertyBinding imports in GLTFExporter
  • Fix missings AnimationClip imports in MorphAnimMesh
  • Fix missings AnimationClip imports in MD2Loader
  • Fix missings _Math imports in SoftwareRenderer
  • Fix missings CameraNode imports in NodeMaterialLoader
  • Fix missings Interpolant imports in MMDLoader
  • Remove unnecessary _Math imports
5.0.6:
  • Add a window global variable check to avoid crach under nodejs
5.0.5:
  • Change default entry for main and module in package
5.0.4:
  • Fix #18, OBJLoader2 worker code
5.0.3:
  • Fix missings Geometries imports in ObjectLoader
  • Fix missings Materials imports in LoaderMaterial
  • Fix missings Curves imports in CurvePath
5.0.2 (Thanks to Marc Bartels):
  • Fix missings Loader imports in GLTFLoader
  • Fix invalid module.export stuff inside Detector
5.0.1 :
  • Reintroduce LineSegment fix
5.0.0 :
  • Support of Three r90
  • Move the example folder tree to source /!\ In case you're using direct source import, please check the '(Redirected Files)' part
  • Fix Math (instead of _Math) issue
  • Fix missings imports/exports
  • Reintroduce RollerCoaster stuff
4.2.4 :
  • Fix Line/LineSegments circular dependency ( Be aware: Line constructor don't return LineSegments in case of wrong arguments, and log an error instead of a warning )
4.2.3 :
  • Fix Detector module.export code snippet
4.2.2 :
  • README.md fix wrong copy/paste
4.2.1 :
  • Ignore some dev files for npm
4.2.0 :
  • Change main entry point of package to Three.es.js
4.1.1 :
  • Fix NodeLib circular dependency with FunctionNode
4.1.0 :
  • Allow to build es module under production environment
  • Fix node warning about unhandled promise rejection
  • Fix rollup warning about indent option moved under output options
  • Clean up sources
4.0.0 :
  • XLoader.js: is now ignored due to AMD module
  • Add Earcut, Curves, EXRLoader, GCodeLoader, LoaderUtils
  • Remove KeyframeTrackConstructor, KeyframeTrackPrototype, PathPrototype and ImageUtils
  • Update imports statements
3.0.0 :
2.2.0 :
  • Add tests about every file to check their imports
2.1.1 :
  • Fix missing import statement in ShaderPass
2.1.0 :
  • Export and import statement support multilines
2.0.0 :
  • Support Three.js r88
  • Reintroduce ColladaLoader in available modules
  • Refactor the convert pipeline

three-full's People

Contributors

dependabot[bot] avatar itee avatar mattmm3d avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

three-full's Issues

DRACOLoader.js missing imports

Hello,
In the DRACOLoader.js file several BufferAttribute types are being used but only Uint16BufferAttribute and Uint32BufferAttribute have been imported.

You just need to include the rest in this block:
import {
    Uint16BufferAttribute,
    Uint32BufferAttribute
} from '../core/BufferAttribute.js'

ReferenceError: process is not defined

Hi,
I tried your latest version (and as for the previous one) I always get that :
ReferenceError: process is not defined
from 'Three.cjs.js:8'
reverting to regular 'three' package, too bad, nice try thought :-)

Constant warning on node.js

Hello,

Thank you for the hard work of bundling all of three.js into one package.
We use it daily on node.js as well as in the browser.

However, we constantly get the following warning on node.js.

It seems you are using this package in a non-browser environment. Some dependencies that depending on global window variable could not work properly.

Not that this is a high-severity problem, but we do ship node.js programs using three-full, and can not get rid of this warning, despite the fact that we got all our use cases tested. It's kind of breaking our front-end display.

I was thinking: could we move this warning in the actual examples that are relying on the window object instead of in the core three.js package? A quick grep shows that there's about 30 files using the window object (but it needs further investigations, some of theses have a "safe" try/catch usage of it).

TrackballControls - zoom works, pan and rotate don't

Hello,

First off thanks for this version of ThreeJS. It's great the work you've done on this. I've got a simple use case of using the trackballcontrols module. The zoom works, but the pan/rotate functionality does not work. No errors, it just isn't working in my Nuxt project (a framework for Vue). Here's a snippet of the method that adds trackballcontrols:

setupTrackballControls() {
      this.trackballControls = new THREE.TrackballControls(
        this.camera,
        this.renderer.domElement
      );
      this.trackballControls.rotateSpeed = 1.0;
      this.trackballControls.zoomSpeed = 1.2;
      this.trackballControls.panSpeed = 0.8;
      this.trackballControls.noZoom = false;
      this.trackballControls.noPan = false;
      this.trackballControls.staticMoving = false;
      this.trackballControls.dynamicDampingFactor = 0.3;
      this.trackballControls.keys = [65, 83, 68];
    },

Any advice on what might be going wrong? I had this issue same issue using three-trackballcontrols before I discovered your fork of three while reading the giant threejs modules of examples folder here.

Question: Possible to load CTMLoader in es6

More of a question and could be tagged as such, but is there any clean way to use the CTMLoader as an es6 import. That is to say I have a base64 encoded string, change that into a ctm file, and load it using the CTMLoader all in es6 authored code? I see that you have ctm folder listed under workers and I am not sure what that means.

OrbitControls example lib is not matching witch current @types/three

Using @types/three I'm having trouble using OrbitControls.
Current, official type for mouseButtons is {ORBIT: MOUSE; ZOOM: MOUSE; PAN: MOUSE}
Version included in three-full defines it as {LEFT: MOUSE, MIDDLE: MOUSE, RIGHT: MOUSE};

My workaround is to cast arguments to any but I sense troubles with other example libs if types are inconsistent and it's an ugly workaround.

Is there any way to use current version of this library?

This repo and npm package are obsolete and need to be deleted

First of all, @Itee, thank you for making this package and all the hard work you put into maintaining it. It had an important influence on moving the conversion of three.js to es6 modules forward at a time when the conversation on the main repo had stalled.

However, that conversion is now complete - all part of three.js including the examples are available as es6 modules - and it's important that people use the up to date versions from the official three.js package.
rather than the versions from this repo which, as of now, are 5 releases out of date.

Currently about 2000 people per week are downloading this module on npm. That's a lot of people getting outdated software!

Could you please delete the npm package and archive this repo?

11.3.3 No Core folder?

Heya, just updated to 11.3.3 and get this on compile now:

./node_modules/three-full/sources/renderers/webgl/WebGLGeometries.js
Module not found: Can't resolve '../../core/BufferAttribute.js' in '/Development/project/node_modules/three-full/sources/renderers/webgl'

Peeked in the sources folder, and it seems like /core isn't in there anymore! 11.3.2 worked great.

HDRCubeTextureLoader throws error

When i create a new THREE.HDRCubeTextureLoader() and use the load() method , it gives error saying about this.manager is undefined. in the actual three.js examples, the loader has scope.manager, but in the three-full, it has this.manager.

its in this function below

function loadHDRData( i, onLoad, onProgress, onError ) {

	var loader = new FileLoader( this.manager );

OrbitControls addEventListener not a function

Hi - thanks for generating this library!
I am getting an error when trying to use the OrbitControls:
TypeError: window.addEventListener is not a function at new OrbitControls
which refers to line 238 of OrbitControls.js:
window.removeEventListener( 'keydown', onKeyDown, false );

I have created a StackBlitz and would appreciate any help resolving this:
https://stackblitz.com/edit/angular-three-full

P.S. I have a working version of the same code but using three-orbitcontrols-ts but would like to minimize my dependencies and so prefer three-full...:
https://stackblitz.com/edit/angular-three-orbitcontrols

Update Three-Full to latest version of ThreeJs

First of all, sorry to being late !

Lot of work, lot of children, lot of life...

I will upgrade this package for each missing version of ThreeJs. So 97, 98, 99, 100, 101.
You will be able to find the version you want.

But i will support only the latest for fix of course.
I hope the job will be done for this week-end.

Thanks for your patience and understanding.

Use with Webpack Tree Shaking?

I notice if I use 'three-full' and only import the classes I need, the bundle turns out larger than when I use the regular 'three' package. (1.6 Mb vs 557Kb)

This is doing a webpack production build. Is this expected? Is it possible to get webpack tree shaking to only bundle the used parts of threejs?

BTW - thanks for making three-full. It's great for ES6 projects.

Thank you

I want to say thanks for your effort creating this repo. It helped us a lot.
Now that three.js has converted almost all examples to modules we made the move to directly import from three.

Update to Three.js r98

Would it be possible to upgrade the official three-full package to use Three.js r98? This was released a few days ago.

I'm happy to submit a PR with this if I can be told what to look out for in terms of missing features / bugs due to the conversion process and changes since the last release of three-full (using Three.js r96).

Minified OBJLoader2 Async fails on building worker code

When OBJLoader2 is used async it builds the worker code by building up a string and passing it to the worker. Unfortunately some of the string is hard coded. That means that when it is minified (as all of my code is when I deploy) the strings aren't the correct class/variable name any more.

In the following code you can see that LoaderSupport is hard-coded (eg. var LoaderSupport) but the Parser class definition has been minified, so where it should say LoaderSupport.Validator in prototype.setMaterials it says mh.Validator instead. I can't think of a good way to handle this. Any ideas???

    var LoaderSupport = {};

    LoaderSupport.Validator = {
	    isValid: function(e){return null!==e&&void 0!==e},
	    verifyInput: function(e,t){return null===e||void 0===e?t:e},
    }

    Parser = (function () {

	function e(){this.callbackProgress=null,this.callbackMeshBuilder=null,this.contentRef=null,this.legacyMode=!1,this.materials={},this.useAsync=!1,this.materialPerSmoothingGroup=!1,this.useIndices=!1,this.disregardNormals=!1,this.vertices=[],this.colors=[],this.normals=[],this.uvs=[],this.rawMesh={objectName:"",groupName:"",activeMtlName:"",mtllibName:"",faceType:-1,subGroups:[],subGroupInUse:null,smoothingGroup:{splitMaterials:!1,normalized:-1,real:-1},counts:{doubleIndicesCount:0,faceCount:0,mtlCount:0,smoothingGroupCount:0}},this.inputObjectCount=1,this.outputObjectCount=1,this.globalCounts={vertices:0,faces:0,doubleIndicesCount:0,lineByte:0,currentByte:0,totalBytes:0},this.logging={enabled:!0,debug:!1}}

	e.prototype.resetRawMesh = function(){this.rawMesh.subGroups=[],this.rawMesh.subGroupInUse=null,this.rawMesh.smoothingGroup.normalized=-1,this.rawMesh.smoothingGroup.real=-1,this.pushSmoothingGroup(1),this.rawMesh.counts.doubleIndicesCount=0,this.rawMesh.counts.faceCount=0,this.rawMesh.counts.mtlCount=0,this.rawMesh.counts.smoothingGroupCount=0};

	e.prototype.setUseAsync = function(e){this.useAsync=e};

	e.prototype.setMaterialPerSmoothingGroup = function(e){this.materialPerSmoothingGroup=e};

	e.prototype.setUseIndices = function(e){this.useIndices=e};

	e.prototype.setDisregardNormals = function(e){this.disregardNormals=e};

	e.prototype.setMaterials = function(e){this.materials=mh.Validator.verifyInput(e,this.materials),this.materials=mh.Validator.verifyInput(this.materials,{})};

	e.prototype.setCallbackMeshBuilder = function(e){if(!mh.Validator.isValid(e))throw'Unable to run as no "MeshBuilder" callback is set.';this.callbackMeshBuilder=e};

	e.prototype.setCallbackProgress = function(e){this.callbackProgress=e};

And just for reference, here is the code that is causing the problem (the build worker code):

      var buildCode = function(funcBuildObject, funcBuildSingleton) {
            var workerCode = '';
            workerCode += '\n\n';
            workerCode += 'var LoaderSupport = {};\n\n';
            workerCode += funcBuildObject('LoaderSupport.Validator', Validator);
            workerCode += funcBuildSingleton('Parser', Parser);
            return workerCode;
      };
      this.workerSupport.validate(buildCode, 'Parser');
      this.workerSupport.setCallbacks(scopedOnMeshLoaded, scopedOnLoad);
      if (scope.terminateWorkerOnLoad) { this.workerSupport.setTerminateRequested(true); }

edit: add javascript tag to code

Warning: Could not find a declaration file for module 'three-full'.

Could not find a declaration file for module 'three-full'. '/home/rudolfs/workspace/VZChains/blocstate/node_modules/three-full/builds/Three.cjs.js' implicitly has an 'any' type.
Try `npm install @types/three-full` if it exists or add a new declaration (.d.ts) file containing `declare module 'three-full';`
module "/node_modules/three-full/builds/Three.cjs"```

Intellisense not working with ThreeFull

Hey Itee!

Great npm! Made it quite easy to install and setup a quick example in Angular 7. However, i discovered that VisualStudios Intellisense doesn't show me any suggestions? Is there any documentation about this in order to make it work? I declared Threejs by adding import * as THREE from 'three-full'; at the top of my component and wrote a simple scene. A scene with a rotating cube itself works, but Intellisense doesn't.

Any help on this would be great!

Thank you in advance

FBXLoader giving a TypeError

It's an angular 7 project
I included inflate.min.js but it gives the following error:
Error:
TypeError: child.material.clone is not a function
at Three.es.js:60764
at Mesh.traverse (Three.es.js:3918)
at Group.traverse (Three.es.js:3924)
at FBXTreeParser.setupMorphMaterials (Three.es.js:60742)
at FBXTreeParser.parseScene (Three.es.js:60174)
at FBXTreeParser.parse (Three.es.js:59479)
at FBXLoader.parse (Three.es.js:59452)
at Object.onLoad (Three.es.js:59398)
at XMLHttpRequest. (Three.es.js:21917)
at ZoneDelegate.push…/node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask (zone.js:421)

Is there any way of selecting which branch of three.js is being converted?

from @looeee

Well done with this package, so far it looks like one of the best solutions to the problem of importing three.js examples as modules!

Personally, I need to be able to select which branch the modules come from, especially for development work. I'd love to be able to do some thing like npm run convert dev to convert examples from the dev branch. Is there any way of setting that up?

async FBXLoader

It doesn't seem the async method for the FBXLoader has been added. I'm sure this is intentional since mutations must be synchronous, but in my traditional three.js projects I utilize the async method to ensure a model is loaded before adding it to a scene. I'm running into the same issue here while loading an FBX during my INITIALIZATION mutations. Any suggestions would be much appreciated.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.