Migration - WhitestormJS/whs.js GitHub Wiki
v2.0.0-beta.8 -> v2.0.0-beta.9
- WHS.Model -> WHS.Importer
r11 → r12 (dev)
WHS.World.setScene()is now.importScene()- (
WHS.Shape,WHS.Light,WHS.Camera).setNative()removed. Use.native = myMeshinstead..getNative()removed. Use.nativeinstead..getParent()removed. Use.parentinstead..setParams()removed. Use.params = {}instead.
- Object-oriented System -> Component-oriented System. Usage:
@MeshComponent
class BasicSphere extends Component {
// ...
Or:
const mesh = new THREE.Mesh();
const elementFromMesh = WHS.Element(mesh, [WHS.MeshComponent]);
- Classes changed:
WHS.Camera->WHS.CameraComponentdecorator.WHS.Light->WHS.LighgtComponentdecorator.WHS.Shape->WHS.MeshComponentdecorator. (WHS.Shapenow replacesWHS.Shape2D)WHS.Shapephysics part ->WHS.PhysicsComponentdecorator.WHS.Shapesoftbody processing part ->WHS.SoftbodyComponentdecorator.