Within my Angular6 application, I am utilizing 'three.js' and 'three-decal-geometry'. Here is a snippet of the necessary imports:
import * as THREE from 'three';
import * as OBJLoader from 'three-obj-loader';
import * as DecalGeometry from 'three-decal-geometry';
OBJLoader(THREE);
However, when attempting to access THREE.DecalGeometry, an error is thrown with the message:
Property 'DecalGeometry' does not exist on type 'typeof "..node_modules/@types/three/index"'.
Did you mean 'DirectGeometry'?
Reviewing my package.json file shows the installed dependencies:
"dependencies": {
"@angular/cdk": "^6.2.0",
"three": "^0.84.0",
"three-decal-geometry": "^1.0.0",
"three-obj-loader": "^1.1.3"
}
"devDependencies": {
"@types/three": "^0.92.15",
"@angular/cli": "~6.0.7",
}
Despite including 'three-decal-geometry' via npm, attempts to utilize DecalGeometry library have been unsuccessful. I even tried adding
<script src="THREE.DecalGeometry.js" ></script>
in index.html following directions in https://www.npmjs.com/package/three-decal-geometry