Three 160, importmap only towards CDN, no more Sparc imports for Three components, kicke outdated outliner, replaced by custom simpler highliter
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import * as THREE from '/app/thirdparty/Three/three.module.js'
|
||||
import { OrbitControls } from '/app/thirdparty/Three/OrbitControls.module.js'
|
||||
import * as TWEEN from '/app/thirdparty/Three/tween.module.js'
|
||||
import * as THREE from 'three' // '/app/thirdparty/Three/three.module.js'
|
||||
import { OrbitControls } from 'three/examples/jsm/controls/OrbitControls.js' // '/app/thirdparty/Three/OrbitControls.module.js'
|
||||
import * as TWEEN from 'three/examples/jsm/libs/tween.module.js' //'/app/thirdparty/Three/tween.module.js'
|
||||
|
||||
export class kfArena{
|
||||
|
||||
@@ -56,15 +56,13 @@ export class kfArena{
|
||||
this.axes.layers.set(2)
|
||||
this.scene.add(this.axes)
|
||||
|
||||
this.renderer = new THREE.WebGLRenderer({ antialias: true, canvas: this.canvasEl })
|
||||
this.init3DHighlighter({
|
||||
edgeStrength: 3,
|
||||
visibleEdgeColor: 0xffff00,
|
||||
edgeGlow: 1,
|
||||
edgeThickness: 4,
|
||||
pulsePeriod: 2,
|
||||
})
|
||||
this.canvasEl.addEventListener('click', this.onSceneClick.bind(this))
|
||||
this.renderer = new THREE.WebGLRenderer({ antialias: true, canvas: this.canvasEl, stencil: true })
|
||||
// this.renderer.physicallyCorrectLights = true
|
||||
// this.renderer.outputColorSpace = THREE.SRGBColorSpace
|
||||
// this.renderer.toneMapping = THREE.ACESFilmicToneMapping
|
||||
// this.renderer.toneMappingExposure = 1
|
||||
|
||||
this.canvasEl.addEventListener('click', this.onSceneClick.bind(this))
|
||||
}
|
||||
|
||||
startRendering(){
|
||||
@@ -74,9 +72,8 @@ export class kfArena{
|
||||
|
||||
render() {
|
||||
TWEEN.update()
|
||||
this.resizeRendererToDisplaySize()
|
||||
if(this.composer) this.composer.render()
|
||||
else this.renderer.render(this.scene, this.camera)
|
||||
const resized = this.resizeRendererToDisplaySize()
|
||||
this.renderer.render(this.scene, this.camera)
|
||||
requestAnimationFrame(this.render.bind(this))
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user