iteam-software / tactile-core-web

The core of the tactile game engine for the web platform
Apache License 2.0
1 stars 0 forks source link

feat: integrate with threejs #2

Open mlynam opened 7 years ago

mlynam commented 7 years ago

We need to rework the core loop and render logic to integrate with threejs. Threejs also includes some physics and math features and we should see about including those as well. Our current design doesn't work well with threejs.

mlynam commented 7 years ago

@casjr13 take a look at this when you have free time

mlynam commented 7 years ago

Motivation

The tactile engine strives to be a purely functional, unidirectional data flow, component system. Three.js is a hierarchical system. We need to find a way to marry the two ideas.

THREE.Object3D === TACTILE.Entity

One solution is to adopt the Object3D three.js class as the Entity. Every game object that is iterated over is an Object3D. Each Tactile system will create and maintain a component which is owned by the underlying Object3D entity. The purpose of the component is to connect the Object3D to the global game state and to change the Object3D in a purposed way. Systems must have a specific purpose